2 desc 'Ensure site configuration has all required settings'
3 task check: :environment do
4 $application_config.sort.each do |k, v|
5 if ENV.has_key?('QUIET') then
6 # Make sure we still check for the variable to exist
7 eval("Rails.configuration.#{k}")
9 if /(password|secret)/.match(k) then
10 # Make sure we still check for the variable to exist, but don't print the value
11 eval("Rails.configuration.#{k}")
12 $stderr.puts "%-32s %s" % [k, '*********']
14 $stderr.puts "%-32s %s" % [k, eval("Rails.configuration.#{k}")]