cfnpp 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/cfnpp +16 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc33bf38fe5963d84f59af0c4594ad3dd94134e8
4
- data.tar.gz: aa7fbda79bc80f45ffbf8e51c6c271063cecd3f2
3
+ metadata.gz: c9bd603f0ebfc570a3f4ad43a03058ce19f8d550
4
+ data.tar.gz: 4f4d1ef02b710c3f8c75329d5cf21bd23da642f7
5
5
  SHA512:
6
- metadata.gz: 74d3c94bf5b700c211b4c049391a1d885b828f247dd9814e6a0d9e682f1a931d8e506b44e26a819538a6e7058bfebc5793487c7501fcaf6db209464981e70f55
7
- data.tar.gz: 8d474998c20402957de8eae6a8368f3526bf0dc84f1d28ff50b73596a17533a1defc34129c108ba496ad3a6610f3b1f92092fa99a09892e87693fa084a4e5f7d
6
+ metadata.gz: 01849425f5ee63c3c5f9085656c1227809197db723b4cbd26a58d2a1426fe3983c9b1e8df2dfcd994bb7f5b3592bda94c5c10b369953ccbf04f745326c8790bb
7
+ data.tar.gz: 950c1d0b41bf1624e4c98ffacb56f7afcb40d015540772eb1170f44361f948e77d9f970a3a442e919e3f1914864e39248dde52e3cbf93c437674a3386a15b344
data/bin/cfnpp CHANGED
@@ -99,6 +99,15 @@ eot
99
99
  stack_name = "#{stack_type}--#{environment_name}--#{environment_type}"
100
100
  conf_path = cli_opts[:confpath] || "#{basepath}/#{stack_type}/conf/#{environment_type}.yml"
101
101
 
102
+ # Support config overrides for specific environment names, if such a file exists.
103
+ conf_override_path = ''
104
+ unless cli_opts[:confpath]
105
+ conf_override_path = "#{basepath}/#{stack_type}/conf/#{environment_name}.yml"
106
+ if !File.file?(conf_override_path)
107
+ conf_override_path = ''
108
+ end
109
+ end
110
+
102
111
  stack = cfn.stacks[stack_name]
103
112
  if stack.exists?
104
113
  status = stack.status
@@ -134,8 +143,15 @@ eot
134
143
  exit 1
135
144
  end
136
145
 
146
+ puts "loading config from (#{conf_path})"
137
147
  conf_yaml = File.read(conf_path)
138
148
  opts = YAML::load(conf_yaml)
149
+ if conf_override_path.size()
150
+ puts "applying overrides from (#{conf_override_path})"
151
+ conf_override_yaml = File.read(conf_override_path)
152
+ opts_override = YAML::load(conf_override_yaml)
153
+ opts.merge!(opts_override)
154
+ end
139
155
 
140
156
  timestamp = Time.now.utc.strftime("%Y-%m-%dT%H.%M.%S.%LZ")
141
157
  template_info = get_template_info()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfnpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bruce