cfndsl 0.17.2 → 0.17.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -3
- data/lib/cfndsl/external_parameters.rb +5 -1
- data/lib/cfndsl/version.rb +1 -1
- data/spec/external_parameters_spec.rb +24 -8
- data/spec/fixtures/params.json +1 -0
- data/spec/fixtures/params.yaml +2 -0
- data/spec/fixtures/params_struct1.yaml +4 -0
- data/spec/fixtures/params_struct2.yaml +4 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca0ed3764660d99aba5bab73da20c6e91d59e738bfb21e0bc8d8805eb8ecd63a
|
4
|
+
data.tar.gz: 592e14b691e4eb8367599507dc19adb6aedccdda01c32c219f44c6c2c5f84e31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26c92723daeded312aad01d28d6b31fe238586e468a13a583741d9619295881f1e1602d1d3e121c9e23e861ef2992cc3c280924ee2395c935df9b7e82bb41b2d
|
7
|
+
data.tar.gz: 54b966108890545e7e7cda01871639c9d73ff3ffee8a4ef800c02ca2f94f096a71413b0892f55e2109508f2a72cca2eb951f07358b137b8065895a3da382c8cc
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [0.17.
|
4
|
-
[Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.17.
|
3
|
+
## [0.17.3](https://github.com/cfndsl/cfndsl/tree/0.17.3) (2019-09-13)
|
4
|
+
[Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.17.2...0.17.3)
|
5
|
+
|
6
|
+
**Merged pull requests:**
|
7
|
+
|
8
|
+
- Fix for \#418. This time with less pre 1.0.... [\#420](https://github.com/cfndsl/cfndsl/pull/420) ([cmaxwellau](https://github.com/cmaxwellau))
|
9
|
+
|
10
|
+
## [v0.17.2](https://github.com/cfndsl/cfndsl/tree/v0.17.2) (2019-09-05)
|
11
|
+
[Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.17.1...v0.17.2)
|
5
12
|
|
6
13
|
**Fixed bugs:**
|
7
14
|
|
@@ -344,7 +351,6 @@
|
|
344
351
|
**Merged pull requests:**
|
345
352
|
|
346
353
|
- Update AWS::CloudWatch::Alarm with 2 new properties [\#312](https://github.com/cfndsl/cfndsl/pull/312) ([AnominousSign](https://github.com/AnominousSign))
|
347
|
-
- Add support for AWS::KMS::Alias [\#265](https://github.com/cfndsl/cfndsl/pull/265) ([mikechau](https://github.com/mikechau))
|
348
354
|
|
349
355
|
## [v0.12.8](https://github.com/cfndsl/cfndsl/tree/v0.12.8) (2017-05-03)
|
350
356
|
[Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.12.7...v0.12.8)
|
@@ -501,6 +507,7 @@
|
|
501
507
|
|
502
508
|
- Certificate manager type [\#267](https://github.com/cfndsl/cfndsl/pull/267) ([kornypoet](https://github.com/kornypoet))
|
503
509
|
- Add monitoring properties to AWS::RDS::DBInstance [\#266](https://github.com/cfndsl/cfndsl/pull/266) ([mikechau](https://github.com/mikechau))
|
510
|
+
- Add support for AWS::KMS::Alias [\#265](https://github.com/cfndsl/cfndsl/pull/265) ([mikechau](https://github.com/mikechau))
|
504
511
|
|
505
512
|
## [v0.11.6](https://github.com/cfndsl/cfndsl/tree/v0.11.6) (2016-10-23)
|
506
513
|
[Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.11.5...v0.11.6)
|
@@ -51,7 +51,11 @@ module CfnDsl
|
|
51
51
|
# rubocop:disable Style/SafeNavigation
|
52
52
|
logstream.puts("Setting local variable #{key} to #{val}") if logstream
|
53
53
|
# rubocop:enable Style/SafeNavigation
|
54
|
-
bind.eval "#{key}
|
54
|
+
if bind.eval "defined? #{key}"
|
55
|
+
bind.eval "#{key}.merge(#{val.inspect})"
|
56
|
+
else
|
57
|
+
bind.eval "#{key} = #{val.inspect}"
|
58
|
+
end
|
55
59
|
end
|
56
60
|
end
|
57
61
|
|
data/lib/cfndsl/version.rb
CHANGED
@@ -3,6 +3,11 @@
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
describe CfnDsl::ExternalParameters do
|
6
|
+
let(:params_struct1) { "#{File.dirname(__FILE__)}/fixtures/params_struct1.yaml" }
|
7
|
+
let(:params_struct2) { "#{File.dirname(__FILE__)}/fixtures/params_struct2.yaml" }
|
8
|
+
let(:params_json) { "#{File.dirname(__FILE__)}/fixtures/params.json" }
|
9
|
+
let(:params_yaml) { "#{File.dirname(__FILE__)}/fixtures/params.yaml" }
|
10
|
+
|
6
11
|
subject do
|
7
12
|
exp = described_class.new
|
8
13
|
exp.set_param(:username, 'Wiz Khalifa')
|
@@ -41,6 +46,21 @@ describe CfnDsl::ExternalParameters do
|
|
41
46
|
end
|
42
47
|
end
|
43
48
|
|
49
|
+
context '#set_param_capitalised' do
|
50
|
+
it 'treats keys as symbols only' do
|
51
|
+
subject.set_param('Reminder', 'You Know What It Is')
|
52
|
+
expect(subject['Reminder']).to eq('You Know What It Is')
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context '#set_param_merge_struct' do
|
57
|
+
it 'treats keys as symbols only' do
|
58
|
+
subject.load_file(params_struct1)
|
59
|
+
subject.load_file(params_struct2)
|
60
|
+
expect(subject['TagStandard']).to eq('Tag1' => { 'Default' => 'value1' }, 'Tag2' => { 'Default' => 'value2' })
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
44
64
|
context '#get_param' do
|
45
65
|
it 'treats keys as symbols only' do
|
46
66
|
subject.set_param(:reminder, 'You Know What It Is')
|
@@ -69,20 +89,16 @@ describe CfnDsl::ExternalParameters do
|
|
69
89
|
end
|
70
90
|
end
|
71
91
|
|
72
|
-
context '#load_file JSON'
|
73
|
-
before { write_file('params.json', '{"reminder":"You Know What It Is"}') }
|
74
|
-
|
92
|
+
context '#load_file JSON' do
|
75
93
|
it 'merges a JSON file as parameters' do
|
76
|
-
subject.load_file
|
94
|
+
subject.load_file(params_json)
|
77
95
|
expect(subject[:reminder]).to eq('You Know What It Is')
|
78
96
|
end
|
79
97
|
end
|
80
98
|
|
81
|
-
context '#load_file YAML'
|
82
|
-
before { write_file('params.yaml', '{"reminder":"You Know What It Is"}') }
|
83
|
-
|
99
|
+
context '#load_file YAML' do
|
84
100
|
it 'merges a YAML file as parameters' do
|
85
|
-
subject.load_file
|
101
|
+
subject.load_file(params_yaml)
|
86
102
|
expect(subject[:reminder]).to eq('You Know What It Is')
|
87
103
|
end
|
88
104
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
{"reminder":"You Know What It Is"}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfndsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Jack
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-09-
|
14
|
+
date: 2019-09-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -116,6 +116,10 @@ files:
|
|
116
116
|
- spec/deep_merge_spec.rb
|
117
117
|
- spec/external_parameters_spec.rb
|
118
118
|
- spec/fixtures/heattest.rb
|
119
|
+
- spec/fixtures/params.json
|
120
|
+
- spec/fixtures/params.yaml
|
121
|
+
- spec/fixtures/params_struct1.yaml
|
122
|
+
- spec/fixtures/params_struct2.yaml
|
119
123
|
- spec/fixtures/rule-assertion.json
|
120
124
|
- spec/fixtures/serverless-api.json
|
121
125
|
- spec/fixtures/serverless-function.json
|
@@ -173,6 +177,10 @@ test_files:
|
|
173
177
|
- spec/deep_merge_spec.rb
|
174
178
|
- spec/external_parameters_spec.rb
|
175
179
|
- spec/fixtures/heattest.rb
|
180
|
+
- spec/fixtures/params.json
|
181
|
+
- spec/fixtures/params.yaml
|
182
|
+
- spec/fixtures/params_struct1.yaml
|
183
|
+
- spec/fixtures/params_struct2.yaml
|
176
184
|
- spec/fixtures/rule-assertion.json
|
177
185
|
- spec/fixtures/serverless-api.json
|
178
186
|
- spec/fixtures/serverless-function.json
|