lib/rest-ftp-daemon/settings.rb in rest-ftp-daemon-0.231.1 vs lib/rest-ftp-daemon/settings.rb in rest-ftp-daemon-0.240.0

- old
+ new

@@ -1,11 +1,11 @@ require "settingslogic" # Configuration class class Settings < Settingslogic # Read configuration - namespace defined?(APP_ENV) ? APP_ENV : "production" + namespace APP_ENV source File.exist?(APP_CONF) ? APP_CONF : Hash.new suppress_errors true # Direct access to any depth def at *path @@ -21,10 +21,10 @@ Settings.at(:newrelic) end def init_defaults # Init host if missing - Settings["host"] ||= `hostname`.chomp.split(".").first + Settings["host"] ||= `hostname`.to_s.chomp.split(".").first # Init PID file name if missing Settings["pidfile"] ||= "/tmp/#{APP_NICK}-#{Settings['host']}-#{Settings['port']}.pid" # Init NEWRELIC env