Hi,
On 13.8.2009 21:31, Klaus Kaempf wrote:
> 'Reboot' seems to be a function. However according to Ruby naming
> conventions 'Reboot' is a class (first letter upper case).
This is a HAL DBus method call, it has
int org.freedesktop.Hal.Device.SystemPowerManagement.Reboot()
function, Ruby conventions cannot be applied here.
>> + else
>> + Rails.logger.debug "Skipping reboot in
>> #{ENV['RAILS_ENV']} mode"
>> + return true
>> + end
>
> The result of the "when :reboot" case is of boolean type. Let the
> 'reboot' function also return a boolean and drop the comparison with 0
Again, it's a HAL method returning int (see above).
> The duplication of the production check is not DRY (don't repeat
> yourself). Also think about moving the check into the 'reboot' resp.
> 'shutdown' functions, because this is "where the action is".
The same here...
--
Best Regards
Ladislav Slezák
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: [email protected]
Lihovarská 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]