[ARVADOS] updated: 545b33abf34ebbc74fe16e5e541e82d5a79e8457
git at public.curoverse.com
git at public.curoverse.com
Mon Mar 24 16:16:32 EDT 2014
Summary of changes:
apps/workbench/lib/tasks/config_check.rake | 13 ++++++++++---
services/api/lib/tasks/config_check.rake | 13 ++++++++++---
2 files changed, 20 insertions(+), 6 deletions(-)
via 545b33abf34ebbc74fe16e5e541e82d5a79e8457 (commit)
from 1d3810b3150d653314437471d7858cdbf76b62c7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 545b33abf34ebbc74fe16e5e541e82d5a79e8457
Author: Ward Vandewege <ward at curoverse.com>
Date: Mon Mar 24 16:16:10 2014 -0400
Allow disabling of output for rake config:check via a QUIET environment
variable.
diff --git a/apps/workbench/lib/tasks/config_check.rake b/apps/workbench/lib/tasks/config_check.rake
index b74e03d..ec1ae7b 100644
--- a/apps/workbench/lib/tasks/config_check.rake
+++ b/apps/workbench/lib/tasks/config_check.rake
@@ -2,10 +2,17 @@ namespace :config do
desc 'Ensure site configuration has all required settings'
task check: :environment do
$application_config.sort.each do |k, v|
- if /(password|secret)/.match(k) then
- $stderr.puts "%-32s %s" % [k, '*********']
+ if ENV.has_key?('QUIET') then
+ # Make sure we still check for the variable to exist
+ eval("Rails.configuration.#{k}")
else
- $stderr.puts "%-32s %s" % [k, eval("Rails.configuration.#{k}")]
+ if /(password|secret)/.match(k) then
+ # Make sure we still check for the variable to exist, but don't print the value
+ eval("Rails.configuration.#{k}")
+ $stderr.puts "%-32s %s" % [k, '*********']
+ else
+ $stderr.puts "%-32s %s" % [k, eval("Rails.configuration.#{k}")]
+ end
end
end
end
diff --git a/services/api/lib/tasks/config_check.rake b/services/api/lib/tasks/config_check.rake
index b74e03d..ec1ae7b 100644
--- a/services/api/lib/tasks/config_check.rake
+++ b/services/api/lib/tasks/config_check.rake
@@ -2,10 +2,17 @@ namespace :config do
desc 'Ensure site configuration has all required settings'
task check: :environment do
$application_config.sort.each do |k, v|
- if /(password|secret)/.match(k) then
- $stderr.puts "%-32s %s" % [k, '*********']
+ if ENV.has_key?('QUIET') then
+ # Make sure we still check for the variable to exist
+ eval("Rails.configuration.#{k}")
else
- $stderr.puts "%-32s %s" % [k, eval("Rails.configuration.#{k}")]
+ if /(password|secret)/.match(k) then
+ # Make sure we still check for the variable to exist, but don't print the value
+ eval("Rails.configuration.#{k}")
+ $stderr.puts "%-32s %s" % [k, '*********']
+ else
+ $stderr.puts "%-32s %s" % [k, eval("Rails.configuration.#{k}")]
+ end
end
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list