sparkle_formation 2.1.6 → 2.1.8

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
  SHA1:
3
- metadata.gz: b90504a372c30016cb3ac38668586571b7df605b
4
- data.tar.gz: 5e2dddc009e43e3e107f884a75b02d0c9cd9c261
3
+ metadata.gz: 9afdab094c6cd47a509662f18ad290fc743d2ee9
4
+ data.tar.gz: 20e9e353dae5fa25db4b3415b33622bac16058f8
5
5
  SHA512:
6
- metadata.gz: 222b26eb1dd56868023c9b9360dca1186825caa6450f3966019d9c0869e93f2ebde99924529e51cf48e8bf2f7f6ae6ee8e8681c99a1f09b55870d7be374e4766
7
- data.tar.gz: 28f754b8b048d941ea844c5e3e5b605a0a2b5a8844ad9d915d16fd61ddd0007ca72203824ec50bcd721fe9ea4f8bf18bac2c294bef420016188bf73c6ef59152
6
+ metadata.gz: fe65169a0f63eca6043542891a2f44b90935cd243d2ec56d7fc5b04ca6ad9f18796aa9d11f2d47d8800e9253126121111b9741b38ec6d8885a1b1653e2914312
7
+ data.tar.gz: 3ad051b35500b4f0782f3e5d41a39b9b1c79fa1efaf76b70eaf4776ce1dd3d00d8c9c12b41aed4ebaada43dfa6bc368895e839b5a1bd4bd91f84140d8628d6aa
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # v2.1.8
2
+ * Add support for CFN list type with shallow nesting (#150)
3
+ * Fix deprecation warnings on Ruby 2.3 caused by TimeoutError constant
4
+ * Fix JSON dump behavior with pure ruby json library (#162)
5
+
1
6
  # v2.1.6
2
7
  * Update builtin resource lists (#156)
3
8
  * Refactor internal template composition (#158)
@@ -167,7 +167,7 @@ class SparkleFormation
167
167
  check_name = pname
168
168
  end
169
169
  if(parameters.keys.include?(check_name))
170
- if(parameters[check_name]['Type'] == 'CommaDelimitedList')
170
+ if(list_type?(parameters[check_name]['Type']))
171
171
  new_val = {'Fn::Join' => [',', {'Ref' => check_name}]}
172
172
  else
173
173
  new_val = {'Ref' => check_name}
@@ -178,7 +178,7 @@ class SparkleFormation
178
178
  pname, 'Fn::GetAtt' => output_map[check_name]
179
179
  )
180
180
  else
181
- if(pval['Type'] == 'CommaDelimitedList')
181
+ if(list_type?(pval['Type']))
182
182
  new_val = {'Fn::Join' => [',', {'Ref' => check_name}]}
183
183
  else
184
184
  new_val = {'Ref' => check_name}
@@ -196,6 +196,14 @@ class SparkleFormation
196
196
  true
197
197
  end
198
198
 
199
+ # Check if type is a list type
200
+ #
201
+ # @param type [String]
202
+ # @return [TrueClass, FalseClass]
203
+ def list_type?(type)
204
+ type == 'CommaDelimitedList' || type.start_with?('List<')
205
+ end
206
+
199
207
  end
200
208
  end
201
209
  end
@@ -157,7 +157,7 @@ class SparkleFormation
157
157
 
158
158
  ::Object.constants.each do |const|
159
159
  unless(self.const_defined?(const))
160
- next if const == :Config # prevent warning output
160
+ next if const == :Config || const == :TimeoutError # prevent warning output
161
161
  self.const_set(const, ::Object.const_get(const))
162
162
  end
163
163
  end
@@ -73,7 +73,7 @@ class SparkleFormation
73
73
 
74
74
  # @return [TrueClass, FalseClass]
75
75
  def empty?
76
- size == 0
76
+ size == 0 # rubocop:disable Style/ZeroLengthPredicate
77
77
  end
78
78
 
79
79
  # @return [Smash]
@@ -919,6 +919,12 @@ class SparkleFormation
919
919
 
920
920
  # @return [String] dumped hash JSON
921
921
  def to_json(*args)
922
+ # NOTE: Ported in from batali
923
+ # Prevent stupid conversion errors of
924
+ # JSON::Ext::Generator::State into Hash
925
+ args = args.map do |argument|
926
+ argument.respond_to?(:to_h) ? argument.to_h : argument
927
+ end
922
928
  MultiJson.dump(compile.dump!, *args)
923
929
  end
924
930
 
@@ -1,5 +1,5 @@
1
1
  # Unicorns and rainbows
2
2
  class SparkleFormation
3
3
  # Current library version
4
- VERSION = Gem::Version.new('2.1.6')
4
+ VERSION = Gem::Version.new('2.1.8')
5
5
  end
@@ -15,8 +15,8 @@ Gem::Specification.new do |s|
15
15
  s.add_runtime_dependency 'multi_json'
16
16
  s.add_runtime_dependency 'bogo'
17
17
  s.add_development_dependency 'minitest'
18
- s.add_development_dependency 'rake'
19
- s.add_development_dependency 'rubocop'
18
+ s.add_development_dependency 'rake', '~> 10'
19
+ s.add_development_dependency 'rubocop', '0.38.0'
20
20
  s.add_development_dependency 'yard'
21
21
  s.add_development_dependency 'redcarpet', '~> 2.0'
22
22
  s.add_development_dependency 'github-markup'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparkle_formation
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.6
4
+ version: 2.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2016-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: attribute_struct
@@ -76,30 +76,30 @@ dependencies:
76
76
  name: rake
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ">="
79
+ - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0'
81
+ version: '10'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ">="
86
+ - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0'
88
+ version: '10'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rubocop
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ">="
93
+ - - '='
94
94
  - !ruby/object:Gem::Version
95
- version: '0'
95
+ version: 0.38.0
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ">="
100
+ - - '='
101
101
  - !ruby/object:Gem::Version
102
- version: '0'
102
+ version: 0.38.0
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: yard
105
105
  requirement: !ruby/object:Gem::Requirement