2 desc 'Ensure site configuration has all required settings'
3 task check: :environment do
4 $stderr.puts "%-32s %s" % ["AppVersion (discovered)", AppVersion.hash]
5 $application_config.sort.each do |k, v|
6 if ENV.has_key?('QUIET') then
7 # Make sure we still check for the variable to exist
8 eval("Rails.configuration.#{k}")
10 if /(password|secret|signing_key)/.match(k) then
11 # Make sure we still check for the variable to exist, but don't print the value
12 eval("Rails.configuration.#{k}")
13 $stderr.puts "%-32s %s" % [k, '*********']
15 $stderr.puts "%-32s %s" % [k, eval("Rails.configuration.#{k}")]
19 # default_trash_lifetime cannot be less than 24 hours
20 if Rails.configuration.default_trash_lifetime < 86400 then
21 raise "default_trash_lifetime is %d, must be at least 86400" % Rails.configuration.default_trash_lifetime