1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
6 desc 'Ensure site configuration has all required settings'
7 task check: :environment do
8 $stderr.puts "%-32s %s" % ["AppVersion (discovered)", AppVersion.hash]
9 $application_config.sort.each do |k, v|
10 if ENV.has_key?('QUIET') then
11 # Make sure we still check for the variable to exist
12 eval("Rails.configuration.#{k}")
14 if /(password|secret|signing_key)/.match(k) then
15 # Make sure we still check for the variable to exist, but don't print the value
16 eval("Rails.configuration.#{k}")
17 $stderr.puts "%-32s %s" % [k, '*********']
19 $stderr.puts "%-32s %s" % [k, eval("Rails.configuration.#{k}")]
23 # default_trash_lifetime cannot be less than 24 hours
24 if Rails.configuration.default_trash_lifetime < 86400 then
25 raise "default_trash_lifetime is %d, must be at least 86400" % Rails.configuration.default_trash_lifetime