8784: Fix test for latest firefox.
[arvados.git] / services / api / lib / tasks / config_check.rake
1 namespace :config do
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}")
9       else
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, '*********']
14         else
15           $stderr.puts "%-32s %s" % [k, eval("Rails.configuration.#{k}")]
16         end
17       end
18     end
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
22     end
23   end
24 end