cfn-model 0.1.29 → 0.1.30

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: d727b122287e1f97d8c2f75323e7ab57553b8265cff424a06abd8127e4cc5893
4
- data.tar.gz: ff0dd5f3e93115b884a4e217366688d960025b0ed54355a9a0a092d8e5de121b
3
+ metadata.gz: 9cfc80b307fbecec5badac796808bd82433f16aff68977945fdfb77e12e3e335
4
+ data.tar.gz: 2177924c1ecbd158d735ff2526f10acbfa3046d67d5f71ead728a789dbcbce71
5
5
  SHA512:
6
- metadata.gz: 0c2a43026c14efb0de73770172ea6d1f89f3ee2c96b9f69ee19dd6ffa58b4e7f41d7b8854540d3c27c0e476bde42738b50a3a63d1adbdc60066edbbf368f3a55
7
- data.tar.gz: b4e3e37b0b8176d28d67dde05b0860104aa19ec1828f753737047f8290efe320e1f46dbc7a257bec6a5db29375b500282b63af74478fe92f1e40cba947379b17
6
+ metadata.gz: f812a007ee0b55d9fa3e708c91a785dda3a3a4b108a486da56d483f30d3e87e60a95135e375f1bc9b2d9e1bf72930e670dff33dedcac21e4f2eb617bae4336d5
7
+ data.tar.gz: 2bf78b3fad549cf3a7f28f34abe03189a13c098389f565e39b92ccca3d1a636432ff38286392fcc26b8a224c55a35b5c546ae405c0c3587f616f2c0729133d0e
@@ -3,12 +3,14 @@ class ToRubyWithLineNumbers < Psych::Visitors::ToRuby
3
3
  o.children.each_slice(2) { |k,v|
4
4
  key = accept(k)
5
5
  val = accept(v)
6
- line = v.respond_to?(:line) ? v.line : v.start_line
6
+
7
+ # Supporting various versions of psych
8
+ line = v.respond_to?(:start_line) ? v.start_line + 1 : v.line
7
9
 
8
10
  # This is the important bit. If the value is a scalar,
9
11
  # we replace it with the desired hash.
10
12
  if v.is_a?(::Psych::Nodes::Scalar) && key == 'Type'
11
- val = { "value" => val, "line" => line + 1} # line is 0 based, so + 1
13
+ val = { "value" => val, "line" => line}
12
14
  end
13
15
 
14
16
  hash[key] = val
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfn-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.29
4
+ version: 0.1.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Kascic
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.7.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: psych
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3'
41
55
  description: An object model for CloudFormation templates
42
56
  email:
43
57
  executables: