Merge branch '8784-dir-listings'
[arvados.git] / apps / workbench / lib / tasks / config_check.rake
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 namespace :config do
6   desc 'Ensure site configuration has all required settings'
7   task check: :environment do
8     $application_config.sort.each do |k, v|
9       if ENV.has_key?('QUIET') then
10         # Make sure we still check for the variable to exist
11         eval("Rails.configuration.#{k}")
12       else
13         if /(password|secret)/.match(k) then
14           # Make sure we still check for the variable to exist, but don't print the value
15           eval("Rails.configuration.#{k}")
16           $stderr.puts "%-32s %s" % [k, '*********']
17         else
18           $stderr.puts "%-32s %s" % [k, eval("Rails.configuration.#{k}")]
19         end
20       end
21     end
22   end
23 end