diff options
author | elijah <elijah@riseup.net> | 2015-05-05 15:49:07 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-05-05 15:49:07 -0700 |
commit | 6c6b5a88f18f714924530d64486cb88c02bd7ee4 (patch) | |
tree | 3a663822de4c279da8287db04f0a42cfb2c407fb /lib/leap_cli/config/manager.rb | |
parent | 51195b20531c4dcdf6a76e6a9a8ef7a771cf76be (diff) | |
parent | 61fdf41087b480db12720df5d5beadd32992475a (diff) |
Merge branch 'develop'
Conflicts:
lib/leap_cli/commands/db.rb
lib/leap_cli/commands/vagrant.rb
Diffstat (limited to 'lib/leap_cli/config/manager.rb')
-rw-r--r-- | lib/leap_cli/config/manager.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb index be95831..33b7f05 100644 --- a/lib/leap_cli/config/manager.rb +++ b/lib/leap_cli/config/manager.rb @@ -133,9 +133,9 @@ module LeapCli next unless ename log 3, :loading, '%s environment...' % ename env(ename) do |e| - e.services = load_all_json(Path.named_path([:service_env_config, '*', ename], @provider_dir), Config::Tag) - e.tags = load_all_json(Path.named_path([:tag_env_config, '*', ename], @provider_dir), Config::Tag) - e.provider = load_json( Path.named_path([:provider_env_config, ename], @provider_dir), Config::Provider) + e.services = load_all_json(Path.named_path([:service_env_config, '*', ename], @provider_dir), Config::Tag, :env => ename) + e.tags = load_all_json(Path.named_path([:tag_env_config, '*', ename], @provider_dir), Config::Tag, :env => ename) + e.provider = load_json( Path.named_path([:provider_env_config, ename], @provider_dir), Config::Provider, :env => ename) e.services.inherit_from! env('default').services e.tags.inherit_from! env('default').tags e.provider.inherit_from! env('default').provider @@ -315,6 +315,9 @@ module LeapCli if obj name = File.basename(filename).force_encoding('utf-8').sub(/^([^\.]+).*\.json$/,'\1') obj['name'] ||= name + if options[:env] + obj.environment = options[:env] + end results[name] = obj end end |