cfndsl 1.3.3 → 1.3.4

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: 5f9e4225237504ceeefb412f00d2b40155ffe6f6997630a9a2a8cac3f1c0e4ac
4
- data.tar.gz: c2252302422353a946fd82f7a52d8961380cf7c1c824fb32728eeeeb91bb1d6b
3
+ metadata.gz: 17679a08d00f3dca0cdb03403c4f7189119cd9005617f028c0cc35bfac4a4046
4
+ data.tar.gz: 910aef72b07b641d5b11fe9195ff8e4c1a1cfe6cc3e389a498a2714741523b42
5
5
  SHA512:
6
- metadata.gz: dce14c2caef119a285ef6c76b9895d5bbfa80936d77c61a3955501c2f72646503295ec5a2c2fc0aab3ab28d131669e7a38c80ee4e2b9d0e51e1558c02b34d57b
7
- data.tar.gz: f7620f53641683b52a125185c87cef06aee2dca097171aaf292106808bcf83fb1124bf688d4f90c12f057cf521b80c3a49bc87128db5166905f54d0578c1a6a1
6
+ metadata.gz: dfc60d2efcd15a7897fe0bab4d221b44c4a6f460f35a57eea0e655d9037649ccadcfb8a182b0714db00c1dbef2eada39868efa3d4b1d86db85aac171202c1bfa
7
+ data.tar.gz: 003a5afb81f87d556c16a45412e4fba43c313dd58a0283ce08579a663853f2ca3ebae04883f1a22e07ad9723021871df8e4252b4c7b4c00abc5d82f82aacc4c9
data/CHANGELOG.md CHANGED
@@ -1,8 +1,16 @@
1
1
  # Changelog
2
2
 
3
- ## [1.3.3](https://github.com/cfndsl/cfndsl/tree/1.3.3) (2021-07-15)
3
+ ## [1.3.4](https://github.com/cfndsl/cfndsl/tree/1.3.4) (2022-05-16)
4
4
 
5
- [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v1.3.2...1.3.3)
5
+ [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v1.3.3...1.3.4)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - handle List ItemType in the spec file [\#475](https://github.com/cfndsl/cfndsl/pull/475) ([Guslington](https://github.com/Guslington))
10
+
11
+ ## [v1.3.3](https://github.com/cfndsl/cfndsl/tree/v1.3.3) (2021-07-14)
12
+
13
+ [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v1.3.2...v1.3.3)
6
14
 
7
15
  **Merged pull requests:**
8
16
 
@@ -777,10 +785,6 @@
777
785
 
778
786
  [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.11.4...v0.11.5)
779
787
 
780
- **Implemented enhancements:**
781
-
782
- - Support new function "Sub" [\#241](https://github.com/cfndsl/cfndsl/issues/241)
783
-
784
788
  **Merged pull requests:**
785
789
 
786
790
  - create fnsub branch, resolves \#244 and \#241 [\#258](https://github.com/cfndsl/cfndsl/pull/258) ([gergnz](https://github.com/gergnz))
@@ -824,6 +828,7 @@
824
828
 
825
829
  **Implemented enhancements:**
826
830
 
831
+ - Support new function "Sub" [\#241](https://github.com/cfndsl/cfndsl/issues/241)
827
832
  - `FnNot` could be improved to not require array as the argument... [\#235](https://github.com/cfndsl/cfndsl/issues/235)
828
833
  - Provide support for AWS::CloudFormation::CustomResource [\#18](https://github.com/cfndsl/cfndsl/issues/18)
829
834
  - A couple of little things that were annoying me. [\#237](https://github.com/cfndsl/cfndsl/pull/237) ([gergnz](https://github.com/gergnz))
data/lib/cfndsl/types.rb CHANGED
@@ -28,7 +28,7 @@ module CfnDsl
28
28
  { 'Resources' => resources, 'Types' => types, 'Version' => spec.version, 'File' => spec.file }
29
29
  end
30
30
 
31
- # rubocop:disable Metrics/CyclomaticComplexity
31
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/AbcSize
32
32
  def self.extract_resources(spec)
33
33
  spec.each_with_object({}) do |(resource_name, resource_info), resources|
34
34
  properties = resource_info['Properties'].each_with_object({}) do |(property_name, property_info), extracted|
@@ -43,6 +43,8 @@ module CfnDsl
43
43
  Array(property_info['PrimitiveItemType'])
44
44
  elsif property_info['PrimitiveTypes']
45
45
  property_info['PrimitiveTypes'][0]
46
+ elsif property_info['ItemType'] == 'List'
47
+ 'List'
46
48
  elsif property_info['ItemType']
47
49
  extract_list_type(resource_name.split('::').join, property_info)
48
50
  elsif property_info['Type']
@@ -61,7 +63,7 @@ module CfnDsl
61
63
  end
62
64
  end
63
65
 
64
- # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/MethodLength
66
+ # rubocop:disable Metrics/PerceivedComplexity
65
67
  def self.extract_types(spec)
66
68
  primitive_types = {
67
69
  'String' => 'String',
@@ -73,7 +75,8 @@ module CfnDsl
73
75
  'Double' => 'Double',
74
76
  'Timestamp' => 'Timestamp',
75
77
  'Map' => 'Map',
76
- 'Long' => 'Long'
78
+ 'Long' => 'Long',
79
+ 'List' => 'List'
77
80
  }
78
81
  spec.each_with_object(primitive_types) do |(property_name, property_info), types|
79
82
  # In order to name things uniquely and allow for connections
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CfnDsl
4
- VERSION = '1.3.3'
4
+ VERSION = '1.3.4'
5
5
  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: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Jack
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2021-07-14 00:00:00.000000000 Z
14
+ date: 2022-05-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler