cfndsl 1.3.3 → 1.3.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: 5f9e4225237504ceeefb412f00d2b40155ffe6f6997630a9a2a8cac3f1c0e4ac
4
- data.tar.gz: c2252302422353a946fd82f7a52d8961380cf7c1c824fb32728eeeeb91bb1d6b
3
+ metadata.gz: 1ceb84791ba82ab87bc436044190c38d88977e91ba3000a23eda817223a5a7a1
4
+ data.tar.gz: f70d20c384bffe9739301c6b3b8ba40ebe3d605de99b8a46ebe715e178492b30
5
5
  SHA512:
6
- metadata.gz: dce14c2caef119a285ef6c76b9895d5bbfa80936d77c61a3955501c2f72646503295ec5a2c2fc0aab3ab28d131669e7a38c80ee4e2b9d0e51e1558c02b34d57b
7
- data.tar.gz: f7620f53641683b52a125185c87cef06aee2dca097171aaf292106808bcf83fb1124bf688d4f90c12f057cf521b80c3a49bc87128db5166905f54d0578c1a6a1
6
+ metadata.gz: 19af4bc25b347cc61363cd6500ed59fb913182d5a4ce32c5c0754d5eca33bc78de168ebbb584d55e2f801a9a7076675b425b758c627bf4d2114646e5761b8ed8
7
+ data.tar.gz: 989bad5d7dc8a08011290f066d3de6fc9b082b6b6ec92604407497eae26c7aaf84782dadc89211691b9e8a0fbb3aabe8d53030613e3cf2bce064288986e1647a
@@ -0,0 +1,28 @@
1
+ name: Spec
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - "**"
7
+ jobs:
8
+ test:
9
+
10
+ runs-on: ubuntu-latest
11
+
12
+ strategy:
13
+ matrix:
14
+ ruby-version: ['2.6', '2.7', '3.0']
15
+
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ - name: Set up Ruby ${{ matrix.ruby-version }}
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby-version }}
22
+ bundler-cache: true
23
+ - name: Update system gems
24
+ run: gem update --system
25
+ - name: Install dependencies
26
+ run: bundle install
27
+ - name: Run tests
28
+ run: bundle exec rake
@@ -0,0 +1,36 @@
1
+ name: Spec and publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+ jobs:
8
+ test:
9
+
10
+ runs-on: ubuntu-latest
11
+
12
+ strategy:
13
+ matrix:
14
+ ruby-version: ['3.0']
15
+
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ - name: Set up Ruby ${{ matrix.ruby-version }}
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby-version }}
22
+ bundler-cache: true
23
+ - name: Update system gems
24
+ run: gem update --system
25
+ - name: Install dependencies
26
+ run: bundle install
27
+ - name: Run tests
28
+ run: bundle exec rake
29
+
30
+ - name: Publish Gem
31
+ if: contains(github.ref, 'refs/tags/v')
32
+ uses: cadwallion/publish-rubygems-action@master
33
+ env:
34
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
35
+ RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
36
+ RELEASE_COMMAND: bundle exec rake release
data/.rubocop.yml CHANGED
@@ -47,3 +47,4 @@ AllCops:
47
47
  TargetRubyVersion: 2.6
48
48
  Exclude:
49
49
  - 'tmp/**/*'
50
+ - 'vendor/**/*'
data/CHANGELOG.md CHANGED
@@ -1,8 +1,29 @@
1
1
  # Changelog
2
2
 
3
- ## [1.3.3](https://github.com/cfndsl/cfndsl/tree/1.3.3) (2021-07-15)
3
+ ## [v1.3.5](https://github.com/cfndsl/cfndsl/tree/v1.3.5) (2022-06-07)
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.4...v1.3.5)
6
+
7
+ **Closed issues:**
8
+
9
+ - List ItemType in the specification file breaking template generation with spec version 69.0.0 [\#474](https://github.com/cfndsl/cfndsl/issues/474)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - patch for sagemaker untyped tag [\#478](https://github.com/cfndsl/cfndsl/pull/478) ([gergnz](https://github.com/gergnz))
14
+ - Remove TravisCI [\#477](https://github.com/cfndsl/cfndsl/pull/477) ([elmobp](https://github.com/elmobp))
15
+
16
+ ## [v1.3.4](https://github.com/cfndsl/cfndsl/tree/v1.3.4) (2022-05-16)
17
+
18
+ [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v1.3.3...v1.3.4)
19
+
20
+ **Merged pull requests:**
21
+
22
+ - handle List ItemType in the spec file [\#475](https://github.com/cfndsl/cfndsl/pull/475) ([Guslington](https://github.com/Guslington))
23
+
24
+ ## [v1.3.3](https://github.com/cfndsl/cfndsl/tree/v1.3.3) (2021-07-14)
25
+
26
+ [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v1.3.2...v1.3.3)
6
27
 
7
28
  **Merged pull requests:**
8
29
 
@@ -740,6 +761,9 @@
740
761
  **Merged pull requests:**
741
762
 
742
763
  - Application Autoscaling Types [\#271](https://github.com/cfndsl/cfndsl/pull/271) ([kornypoet](https://github.com/kornypoet))
764
+ - Certificate manager type [\#267](https://github.com/cfndsl/cfndsl/pull/267) ([kornypoet](https://github.com/kornypoet))
765
+ - Add monitoring properties to AWS::RDS::DBInstance [\#266](https://github.com/cfndsl/cfndsl/pull/266) ([mikechau](https://github.com/mikechau))
766
+ - Add support for AWS::KMS::Alias [\#265](https://github.com/cfndsl/cfndsl/pull/265) ([mikechau](https://github.com/mikechau))
743
767
 
744
768
  ## [v0.11.8](https://github.com/cfndsl/cfndsl/tree/v0.11.8) (2016-11-13)
745
769
 
@@ -749,12 +773,6 @@
749
773
 
750
774
  - Support for Export/Import values from stacks [\#260](https://github.com/cfndsl/cfndsl/issues/260)
751
775
 
752
- **Merged pull requests:**
753
-
754
- - Certificate manager type [\#267](https://github.com/cfndsl/cfndsl/pull/267) ([kornypoet](https://github.com/kornypoet))
755
- - Add monitoring properties to AWS::RDS::DBInstance [\#266](https://github.com/cfndsl/cfndsl/pull/266) ([mikechau](https://github.com/mikechau))
756
- - Add support for AWS::KMS::Alias [\#265](https://github.com/cfndsl/cfndsl/pull/265) ([mikechau](https://github.com/mikechau))
757
-
758
776
  ## [v0.11.6](https://github.com/cfndsl/cfndsl/tree/v0.11.6) (2016-10-23)
759
777
 
760
778
  [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.11.5...v0.11.6)
@@ -1005,10 +1023,6 @@
1005
1023
 
1006
1024
  [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.8.2...v0.8.3)
1007
1025
 
1008
- **Fixed bugs:**
1009
-
1010
- - Add tag arguments [\#188](https://github.com/cfndsl/cfndsl/pull/188) ([kornypoet](https://github.com/kornypoet))
1011
-
1012
1026
  ## [v0.8.2](https://github.com/cfndsl/cfndsl/tree/v0.8.2) (2016-04-27)
1013
1027
 
1014
1028
  [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.8.1...v0.8.2)
@@ -1037,10 +1051,6 @@
1037
1051
 
1038
1052
  [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.6.2...v0.7.0)
1039
1053
 
1040
- **Implemented enhancements:**
1041
-
1042
- - Fix the issue with plural types [\#153](https://github.com/cfndsl/cfndsl/pull/153) ([johnf](https://github.com/johnf))
1043
-
1044
1054
  ## [v0.6.2](https://github.com/cfndsl/cfndsl/tree/v0.6.2) (2016-04-19)
1045
1055
 
1046
1056
  [Full Changelog](https://github.com/cfndsl/cfndsl/compare/v0.6.1...v0.6.2)
data/Gemfile CHANGED
@@ -8,6 +8,7 @@ gem 'json'
8
8
 
9
9
  group :development, :test do
10
10
  gem 'github_changelog_generator', require: false
11
+ gem 'panolint', require: false
11
12
  gem 'rubocop', require: false
12
13
  gem 'yamllint', require: false
13
14
  end
data/Rakefile CHANGED
@@ -8,8 +8,10 @@ require 'yamllint/rake_task'
8
8
  require 'github_changelog_generator/task'
9
9
  require 'cfndsl/rake_task'
10
10
 
11
- RSpec::Core::RakeTask.new
12
- RuboCop::RakeTask.new
11
+ # RSpec::Core::RakeTask.new
12
+ RuboCop::RakeTask.new do |t|
13
+ t.options = ['--debug', '--cache=false']
14
+ end
13
15
 
14
16
  desc 'Run RSpec with SimpleCov'
15
17
  task :cov do
@@ -20,7 +22,6 @@ end
20
22
  YamlLint::RakeTask.new do |t|
21
23
  t.paths = %w[
22
24
  sample/t1.yaml
23
- .travis.yml
24
25
  .rubocop.yml
25
26
  ]
26
27
  end
@@ -99,5 +100,5 @@ task :bump, :type do |_, args|
99
100
  puts 'Pushing tag'
100
101
  `git push origin v#{version}`
101
102
 
102
- puts 'All done, travis should pick up and release the gem now!'
103
+ puts 'All done, GitHub should pick up and release the gem now!'
103
104
  end
@@ -0,0 +1,23 @@
1
+ {
2
+ "broken": "75.0.0",
3
+ "ResourceTypes": {
4
+ "AWS::SageMaker::ModelPackage": {
5
+ "patch": {
6
+ "operations": [
7
+ {
8
+ "op": "replace",
9
+ "path": "/Properties/Tag",
10
+ "value": {
11
+ "Type": "List",
12
+ "ItemType": "Tag",
13
+ "Required": false,
14
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-device.html#cfn-sagemaker-device-tags",
15
+ "UpdateType": "Mutable"
16
+ }
17
+ }
18
+ ],
19
+ "description": "Fix SageMaker Device to be List of Tag"
20
+ }
21
+ }
22
+ }
23
+ }
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.6'
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.6
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-06-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -52,9 +52,10 @@ executables:
52
52
  extensions: []
53
53
  extra_rdoc_files: []
54
54
  files:
55
+ - ".github/workflows/spec.yml"
56
+ - ".github/workflows/spec_publish.yml"
55
57
  - ".gitignore"
56
58
  - ".rubocop.yml"
57
- - ".travis.yml"
58
59
  - CHANGELOG.md
59
60
  - Gemfile
60
61
  - LICENSE
@@ -84,6 +85,7 @@ files:
84
85
  - lib/cfndsl/aws/patches/600_RefKinds_patch.json
85
86
  - lib/cfndsl/aws/patches/700_SAM_Serverless_Function_InlineCode_patch.json
86
87
  - lib/cfndsl/aws/patches/900_SageMakerTags_patch.json
88
+ - lib/cfndsl/aws/patches/901_SageMakerTags_patch.json
87
89
  - lib/cfndsl/aws/resource_specification.json
88
90
  - lib/cfndsl/aws/types.rb
89
91
  - lib/cfndsl/aws/types.yaml
@@ -192,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
194
  - !ruby/object:Gem::Version
193
195
  version: '0'
194
196
  requirements: []
195
- rubygems_version: 3.0.8
197
+ rubygems_version: 3.3.7
196
198
  signing_key:
197
199
  specification_version: 4
198
200
  summary: AWS Cloudformation DSL
data/.travis.yml DELETED
@@ -1,24 +0,0 @@
1
- language: ruby
2
- rvm: # all MRI ruby versions that are not EOL
3
- - '2.7'
4
- - '2.6'
5
- - '3.0'
6
- sudo: false
7
- before_install:
8
- - gem update --system
9
- - gem install bundler
10
- deploy:
11
- provider: rubygems
12
- api_key:
13
- secure: cIDF27JCirxxg7SXw6R+xxABMwCrrirJiJzljVxb/MdlRyUVaSW8XdZjOVyNgJkCx+vQOX4U+hp+p0xVI/Loh4EXkgbDvu2oGIAn/g1lfWabwKtdkFEviQn4tWvqDcEkxm5Hm6Gs0pFCaurqynMPNbsLVAEIiSw+la8LxEeeQ6I=
14
- gem: cfndsl
15
- on:
16
- tags: true
17
- repo: cfndsl/cfndsl
18
- ruby: '2.7'
19
- notifications:
20
- email:
21
- recipients:
22
- - gergnz@gmail.com
23
- on_failure: change
24
- on_success: never