cfndsl 0.16.5 → 0.16.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2df6ce4cd8345b6b98c522f4862fe29a3c725274e5032d9df0bb151f8094880
4
- data.tar.gz: 50ec4a16897869a33322e936ed1ecd28b30399898669530d6718f5bb10f086bf
3
+ metadata.gz: 32406255a9011d3aed5a47d015a3b55e3d7f2f500cff17847aba34e29f02e03f
4
+ data.tar.gz: f340711869f18db7f011c2a9e4dadf928ca32efa12ab977590d54f72d0db37a3
5
5
  SHA512:
6
- metadata.gz: 315f3fda2e9a1bf5c88ee7f9077640728b6a6172354bdc2e6e38776408990ab55b56b3f5c576f01300ef137b582fe37e45ddbdbc013eb784d1585f7fdbea1ace
7
- data.tar.gz: ed0f7aedd0c7bcc64879a6ea0fa28d4682f6e137118572aed6a8a6fcf308953c9e0a1028211d12ef39ce89249b07b94f8e3df999898478019466d4c226a30ebc
6
+ metadata.gz: 7186f763335491c5777d1194cddce0b96687cfd335cc6d50dcff13ee7491ee25b37713f968d8579c980688bbfa399d3c5b8cd783bef2164416c15214a0ccd029
7
+ data.tar.gz: 8793e4e15dfad5a6d03ffaf7c43742ee9aedd24d649780366f197a5e9fa7c2f5b81a06cd30122155f8034b0d8011e1e8f7e96ef34d0e1e945945befa999228f1
data/.gitignore CHANGED
@@ -5,3 +5,5 @@ tmp/
5
5
  coverage/
6
6
  *.swp
7
7
  *.swo
8
+ vendor
9
+ .bundle
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## [0.16.6](https://github.com/cfndsl/cfndsl/tree/0.16.6) (2018-05-31)
4
+ [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.16.5...0.16.6)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - Array Issue for Nested Types [\#349](https://github.com/cfndsl/cfndsl/issues/349)
9
+
10
+ **Merged pull requests:**
11
+
12
+ - Array dupe [\#372](https://github.com/cfndsl/cfndsl/pull/372) ([johnf](https://github.com/johnf))
13
+
14
+ ## [v0.16.5](https://github.com/cfndsl/cfndsl/tree/v0.16.5) (2018-04-16)
15
+ [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.16.4...v0.16.5)
16
+
3
17
  ## [v0.16.4](https://github.com/cfndsl/cfndsl/tree/v0.16.4) (2018-04-16)
4
18
  [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.16.3...v0.16.4)
5
19
 
@@ -123,8 +123,8 @@ module CfnDsl
123
123
  # hope that the user knows what he is
124
124
  # doing and stuff them into our existing
125
125
  # array
126
- array_params.each do |_|
127
- existing.push value
126
+ array_params.each do |v|
127
+ existing.push v
128
128
  end
129
129
  end
130
130
  return existing
@@ -1,3 +1,3 @@
1
1
  module CfnDsl
2
- VERSION = '0.16.5'.freeze
2
+ VERSION = '0.16.6'.freeze
3
3
  end
@@ -0,0 +1,41 @@
1
+ require 'spec_helper'
2
+
3
+ describe CfnDsl::CloudFormationTemplate do
4
+ subject(:template) { described_class.new }
5
+
6
+ describe '#Nested_Arrays' do
7
+ it 'ensure nested arrays are not duplicated' do
8
+ template.DirectoryService_SimpleAD(:Test) do
9
+ VpcSettings do
10
+ SubnetId ['subnet-a', 'subnet-b']
11
+ end
12
+ end
13
+
14
+ puts template.to_json
15
+ expect(template.to_json).to include('"SubnetIds":["subnet-a","subnet-b"]}')
16
+ expect(template.to_json).not_to include('"SubnetIds":[["subnet-a","subnet-b"],["subnet-a","subnet-b"]]')
17
+ end
18
+
19
+ it 'check multiple invocations work' do
20
+ template.DirectoryService_SimpleAD(:Test) do
21
+ VpcSettings do
22
+ SubnetId 'subnet-a'
23
+ SubnetId 'subnet-b'
24
+ end
25
+ end
26
+
27
+ expect(template.to_json).to include('"SubnetIds":["subnet-a","subnet-b"]}')
28
+ end
29
+
30
+ it 'check multiple invocation with arrays works' do
31
+ template.DirectoryService_SimpleAD(:Test) do
32
+ VpcSettings do
33
+ SubnetId ['subnet-a', 'subnet-b']
34
+ SubnetId ['subnet-c', 'subnet-d']
35
+ end
36
+ end
37
+
38
+ expect(template.to_json).to include('"SubnetIds":["subnet-a","subnet-b","subnet-c","subnet-d"]')
39
+ end
40
+ end
41
+ end
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.16.5
4
+ version: 0.16.6
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: 2018-04-16 00:00:00.000000000 Z
14
+ date: 2018-05-31 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -106,6 +106,7 @@ files:
106
106
  - spec/aws/iam_managed_policy_spec.rb
107
107
  - spec/aws/kms_alias_spec.rb
108
108
  - spec/aws/logs_log_group_spec.rb
109
+ - spec/aws/nested_arrays_spec.rb
109
110
  - spec/aws/rds_db_instance_spec.rb
110
111
  - spec/aws/serverless_spec.rb
111
112
  - spec/cfndsl_spec.rb
@@ -150,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
151
  version: '0'
151
152
  requirements: []
152
153
  rubyforge_project:
153
- rubygems_version: 2.7.6
154
+ rubygems_version: 2.7.7
154
155
  signing_key:
155
156
  specification_version: 4
156
157
  summary: AWS Cloudformation DSL
@@ -160,6 +161,7 @@ test_files:
160
161
  - spec/aws/iam_managed_policy_spec.rb
161
162
  - spec/aws/kms_alias_spec.rb
162
163
  - spec/aws/logs_log_group_spec.rb
164
+ - spec/aws/nested_arrays_spec.rb
163
165
  - spec/aws/rds_db_instance_spec.rb
164
166
  - spec/aws/serverless_spec.rb
165
167
  - spec/cfndsl_spec.rb