aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-02-10 00:22:34 -0800
committerelijah <elijah@riseup.net>2014-02-10 00:22:34 -0800
commitb89b8b532e992eed0b61fae7a42ee3bee064d30e (patch)
tree3296b68417aee5eff523b1825ce475bc0f4edb05 /lib
parent2877c1975bee30ef0b83b11c652e052c0001fd55 (diff)
downloadleap_cli-b89b8b532e992eed0b61fae7a42ee3bee064d30e.tar.gz
leap_cli-b89b8b532e992eed0b61fae7a42ee3bee064d30e.tar.bz2
automatically upgrade secrets.json
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/config/manager.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb
index 90c4db0..d6cb89e 100644
--- a/lib/leap_cli/config/manager.rb
+++ b/lib/leap_cli/config/manager.rb
@@ -61,6 +61,14 @@ module LeapCli
@provider = load_json(provider_path, Config::Object)
@secrets = load_json(Path.named_path(:secrets_config, @provider_dir), Config::Secrets)
+ ### BEGIN HACK
+ ### remove this after it is likely that no one has any old-style secrets.json
+ if @secrets['webapp_secret_token']
+ @secrets = Config::Secrets.new
+ Util::log :warning, "Creating all new secrets.json (new version is scoped by environment). Make sure to do a full deploy so that new secrets take effect."
+ end
+ ### END HACK
+
# inherit
@services.inherit_from! base_services
@tags.inherit_from! base_tags