cfn-model 0.4.25 → 0.4.26

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: 0e7c009b577d4be1bbec5a64b515ed6d0c31817c9ab117fdcca721b24a86e1e1
4
- data.tar.gz: fc3bf7272a882da419460050806392f3a39dbdfa0b2a68fd7e11fa9acd2c75c0
3
+ metadata.gz: 13bd6416bc4d2bfdf87ed030392912613f49c45dec0a63b66c987ef5075bab4d
4
+ data.tar.gz: 30c8580afa3bceefab4c692024ebd141a3ef1a557041907d24e3f5234d3ff3c8
5
5
  SHA512:
6
- metadata.gz: 37cfdb1c6febe631fc01b6026d1950372f1bace1e9fdc3360912bc1e3b1d2213bf3e0014d91688053793293cc87898525d768f459fb33e714085444b8962c783
7
- data.tar.gz: 1e5860b684a6429437edccb98261c40dc5c43647536fd267e13026eac308090145070a1c83ac8da1252a369d793d925670edfd44be75e7116f549d27a378def6
6
+ metadata.gz: 9baec396372cfb00ec72206254575d62acf49232ee530d586b91fa1a0baa06bf6e2bb4b961307f672c5f28a28a33e208dde43925f5cc13132bff784645a9a9db
7
+ data.tar.gz: 3953a334432f2f18d29b93d11cae2916438e6a8dad4bd61a91dc41cb6893410cf7f42613b1af9c8bd1dc956e2a81e0d9ab2286bcadeaf2f13de448b9ccb9c967
data/bin/cfn_parse CHANGED
@@ -4,5 +4,5 @@ require 'cfn-model'
4
4
  puts '======'
5
5
  puts ARGV[0]
6
6
  puts '======'
7
- cfn_model = CfnParser.new.parse IO.read(ARGV[0]), nil, true
7
+ cfn_model = CfnParser.new.parse IO.read(ARGV[0], encoding: Encoding::UTF_8), nil, true
8
8
  puts cfn_model
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'cfn-model/parser/parser_error'
4
+
3
5
  ##
4
6
  # this is a placeholder for anything related to resolving references
5
7
  #
@@ -43,6 +45,8 @@ module References
43
45
  # so don't/can't link it up
44
46
  return nil
45
47
  end
48
+ rescue NoMethodError => e
49
+ raise ParserError, e.inspect
46
50
  end
47
51
 
48
52
  def self.is_security_group_id_external(group_id)
@@ -13,6 +13,8 @@ class CloudFormationValidator
13
13
  schema = SchemaGenerator.new.generate cloudformation_string
14
14
  validator = Kwalify::Validator.new(schema)
15
15
  validator.validate(YAML.load(cloudformation_string))
16
+ rescue ArgumentError, IOError, NameError => e
17
+ raise ParserError, e.inspect
16
18
  end
17
19
 
18
20
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfn-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.25
4
+ version: 0.4.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Kascic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-20 00:00:00.000000000 Z
11
+ date: 2020-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop