hcl-checker 1.2.0 → 1.3.0

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: d85d4b3175de82a6a7f8b7fc4b7902b1a3854995f175c44b55ab6319cd336030
4
- data.tar.gz: 3dec1439149205bf08ba66017948f12e54fe3a616da0c3de4ce8219c15bcfc3f
3
+ metadata.gz: 247e05cab60fd6767963cf61fe8f2ad29eaf0b846188190abbfad18622a0ed24
4
+ data.tar.gz: b21ba731c3f5900733d6558a14f88f2a58f09c9bea0f1e679a08f771cced6678
5
5
  SHA512:
6
- metadata.gz: cae4ca4014aa2bba9440133e39f57504e7d06d81b82d4c54d5005abfee0ecad57385aa71698b4728c2d7bfbc200584f1448bd1f8c162f129ab2c3f1ab6387cd3
7
- data.tar.gz: 8973ab4020427a3954e5076bc8f38060a88934bbc9c9afb72bea81a2a259831ab17934d73282e3828a7e0a1cd91606c859ffa2a74469808431186ee54821c7e4
6
+ metadata.gz: ad59851141be917a28be85d9d18ca41ce436a966b37a6cf9e71ee81b67e24d456d909d89a0785066eb23b740bc6319321b5d7f0aa38212486ca1b82ed2196d32
7
+ data.tar.gz: 7e5446473d11b96397c9c3d7471de1c165f279109e5f84005dada493ddb939443f2fa345f17c5490b39137761a9c61dfdf2af65008e141b62f28c5ff0c4517ba
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ source "https://rubygems.org"
7
7
  # with the use of the libxml2 library may be vulnerable to a denial of service attack due
8
8
  # to a crash of the application.
9
9
  # Nokogiri >= 1.8.5 solves this problem
10
- gem "nokogiri", ">= 1.10.4"
10
+ gem "nokogiri", ">= 1.10.8"
11
11
 
12
12
 
13
13
  git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hcl-checker (1.2.0)
4
+ hcl-checker (1.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -10,13 +10,13 @@ GEM
10
10
  filesize (0.2.0)
11
11
  jsobfu (0.4.2)
12
12
  rkelly-remix
13
- json (2.2.0)
13
+ json (2.3.0)
14
14
  metasm (1.0.4)
15
15
  mini_portile2 (2.4.0)
16
- nokogiri (1.10.4)
16
+ nokogiri (1.10.9)
17
17
  mini_portile2 (~> 2.4.0)
18
18
  racc (1.4.14)
19
- rake (10.5.0)
19
+ rake (12.3.3)
20
20
  rb-readline (0.5.5)
21
21
  rex (2.0.12)
22
22
  filesize (~> 0)
@@ -27,32 +27,32 @@ GEM
27
27
  rb-readline (~> 0)
28
28
  rexical (1.0.7)
29
29
  rkelly-remix (0.0.7)
30
- rspec (3.8.0)
31
- rspec-core (~> 3.8.0)
32
- rspec-expectations (~> 3.8.0)
33
- rspec-mocks (~> 3.8.0)
34
- rspec-core (3.8.2)
35
- rspec-support (~> 3.8.0)
36
- rspec-expectations (3.8.4)
30
+ rspec (3.9.0)
31
+ rspec-core (~> 3.9.0)
32
+ rspec-expectations (~> 3.9.0)
33
+ rspec-mocks (~> 3.9.0)
34
+ rspec-core (3.9.1)
35
+ rspec-support (~> 3.9.1)
36
+ rspec-expectations (3.9.1)
37
37
  diff-lcs (>= 1.2.0, < 2.0)
38
- rspec-support (~> 3.8.0)
39
- rspec-mocks (3.8.1)
38
+ rspec-support (~> 3.9.0)
39
+ rspec-mocks (3.9.1)
40
40
  diff-lcs (>= 1.2.0, < 2.0)
41
- rspec-support (~> 3.8.0)
42
- rspec-support (3.8.2)
41
+ rspec-support (~> 3.9.0)
42
+ rspec-support (3.9.2)
43
43
 
44
44
  PLATFORMS
45
45
  ruby
46
46
 
47
47
  DEPENDENCIES
48
- bundler (~> 2.0.2)
48
+ bundler (~> 2.1.4)
49
49
  hcl-checker!
50
- nokogiri (>= 1.10.4)
50
+ nokogiri (>= 1.10.8)
51
51
  racc (= 1.4.14)
52
- rake (~> 10.0)
52
+ rake (~> 12.3.3)
53
53
  rex (= 2.0.12)
54
54
  rexical (>= 1.0.7)
55
55
  rspec (~> 3.0)
56
56
 
57
57
  BUNDLED WITH
58
- 2.0.2
58
+ 2.1.4
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
18
18
  end
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_development_dependency 'bundler', '~> 2.0.2'
22
- spec.add_development_dependency 'rake', '~> 10.0'
21
+ spec.add_development_dependency 'bundler', '~> 2.1.4'
22
+ spec.add_development_dependency 'rake', '~> 12.3.3'
23
23
  spec.add_development_dependency 'rspec', '~> 3.0'
24
24
  spec.add_development_dependency 'racc', '1.4.14'
25
25
  spec.add_development_dependency 'rex', '2.0.12'
@@ -1,5 +1,5 @@
1
1
  module HCL
2
2
  module Checker
3
- VERSION = '1.2.0'
3
+ VERSION = '1.3.0'
4
4
  end
5
5
  end
@@ -1,123 +1,124 @@
1
1
  #--
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by rex 1.0.5
3
+ # This file is automatically generated by rex 1.0.7
4
4
  # from lexical definition file "./assets/lexer.rex".
5
5
  #++
6
6
 
7
7
 
8
8
  class HCLLexer
9
- require 'strscan'
9
+ require 'strscan'
10
10
 
11
- class ScanError < StandardError ; end
11
+ class ScanError < StandardError ; end
12
12
 
13
- attr_reader :lineno
14
- attr_reader :filename
15
- attr_accessor :state
13
+ attr_reader :lineno
14
+ attr_reader :filename
15
+ attr_accessor :state
16
16
 
17
- def scan_setup(str)
18
- @ss = StringScanner.new(str)
19
- @lineno = 1
20
- @state = nil
21
- end
17
+ def scan_setup(str)
18
+ @ss = StringScanner.new(str)
19
+ @lineno = 1
20
+ @state = nil
21
+ end
22
22
 
23
- def action
24
- yield
25
- end
23
+ def action
24
+ yield
25
+ end
26
26
 
27
- def scan_str(str)
28
- scan_setup(str)
29
- do_parse
30
- end
31
- alias :scan :scan_str
27
+ def scan_str(str)
28
+ scan_setup(str)
29
+ do_parse
30
+ end
31
+ alias :scan :scan_str
32
32
 
33
- def load_file( filename )
34
- @filename = filename
35
- open(filename, "r") do |f|
36
- scan_setup(f.read)
37
- end
38
- end
33
+ def load_file( filename )
34
+ @filename = filename
35
+ File.open(filename, "r") do |f|
36
+ scan_setup(f.read)
37
+ end
38
+ end
39
39
 
40
- def scan_file( filename )
41
- load_file(filename)
42
- do_parse
43
- end
40
+ def scan_file( filename )
41
+ load_file(filename)
42
+ do_parse
43
+ end
44
44
 
45
45
 
46
- def next_token
47
- return if @ss.eos?
48
-
49
- # skips empty actions
50
- until token = _next_token or @ss.eos?; end
51
- token
52
- end
46
+ def next_token
47
+ return if @ss.eos?
53
48
 
54
- def _next_token
55
- text = @ss.peek(1)
56
- @lineno += 1 if text == "\n"
57
- token = case @state
58
- when nil
59
- case
60
- when (text = @ss.scan(/\s+/))
61
- ;
49
+ # skips empty actions
50
+ until token = _next_token or @ss.eos?; end
51
+ token
52
+ end
62
53
 
63
- when (text = @ss.scan(/\#.*|\/\/.*$/))
64
- ;
54
+ def _next_token
55
+ text = @ss.peek(1)
56
+ @lineno += 1 if text == "\n"
57
+ token = case @state
58
+ when nil
59
+ case
60
+ when (text = @ss.scan(/\s+/))
61
+ ;
65
62
 
66
- when (text = @ss.scan(/\n|\r/))
67
- ;
63
+ when (text = @ss.scan(/\#.*|\/\/.*$/))
64
+ ;
68
65
 
69
- when (text = @ss.scan(/\/\*/))
70
- action { consume_comment(text) }
66
+ when (text = @ss.scan(/\n|\r/))
67
+ ;
71
68
 
72
- when (text = @ss.scan(/true|false/))
73
- action { [:BOOL, to_boolean(text)]}
69
+ when (text = @ss.scan(/\/\*/))
70
+ action { consume_comment(text) }
74
71
 
75
- when (text = @ss.scan(/\-?\d+\.\d+/))
76
- action { [:FLOAT, text.to_f] }
72
+ when (text = @ss.scan(/true|false/))
73
+ action { [:BOOL, to_boolean(text)]}
77
74
 
78
- when (text = @ss.scan(/-?\d+/))
79
- action { [:NUMBER, text.to_i] }
75
+ when (text = @ss.scan(/\-?\d+\.\d+/))
76
+ action { [:FLOAT, text.to_f] }
80
77
 
81
- when (text = @ss.scan(/\"/))
82
- action { [:STRING, consume_string(text)] }
78
+ when (text = @ss.scan(/-?\d+/))
79
+ action { [:NUMBER, text.to_i] }
83
80
 
84
- when (text = @ss.scan(/\<<\-?/))
85
- action { [:STRING, consume_heredoc] }
81
+ when (text = @ss.scan(/\"/))
82
+ action { [:STRING, consume_string(text)] }
86
83
 
87
- when (text = @ss.scan(/\{/))
88
- action { [:LEFTBRACE, text]}
84
+ when (text = @ss.scan(/\<<\-?/))
85
+ action { [:STRING, consume_heredoc] }
89
86
 
90
- when (text = @ss.scan(/\}/))
91
- action { [:RIGHTBRACE, text]}
87
+ when (text = @ss.scan(/\{/))
88
+ action { [:LEFTBRACE, text]}
92
89
 
93
- when (text = @ss.scan(/\[/))
94
- action { [:LEFTBRACKET, text]}
90
+ when (text = @ss.scan(/\}/))
91
+ action { [:RIGHTBRACE, text]}
95
92
 
96
- when (text = @ss.scan(/\]/))
97
- action { [:RIGHTBRACKET, text]}
93
+ when (text = @ss.scan(/\[/))
94
+ action { [:LEFTBRACKET, text]}
98
95
 
99
- when (text = @ss.scan(/\,/))
100
- action { [:COMMA, text]}
96
+ when (text = @ss.scan(/\]/))
97
+ action { [:RIGHTBRACKET, text]}
101
98
 
102
- when (text = @ss.scan(/[a-zA-Z_][a-zA-Z0-9_\-\.]*/))
103
- action { [:IDENTIFIER, text]}
99
+ when (text = @ss.scan(/\,/))
100
+ action { [:COMMA, text]}
104
101
 
105
- when (text = @ss.scan(/\=/))
106
- action { [:EQUAL, text]}
102
+ when (text = @ss.scan(/[a-zA-Z_][a-zA-Z0-9_\-\.]*/))
103
+ action { [:IDENTIFIER, text]}
107
104
 
108
- when (text = @ss.scan(/\-/))
109
- action { [:MINUS, text]}
105
+ when (text = @ss.scan(/\=/))
106
+ action { [:EQUAL, text]}
110
107
 
111
- else
112
- text = @ss.string[@ss.pos .. -1]
113
- raise ScanError, "can not match: '" + text + "'"
114
- end # if
115
-
116
- else
117
- raise ScanError, "undefined state: '" + state.to_s + "'"
118
- end # case state
119
- token
120
- end # def _next_token
108
+ when (text = @ss.scan(/\-/))
109
+ action { [:MINUS, text]}
110
+
111
+
112
+ else
113
+ text = @ss.string[@ss.pos .. -1]
114
+ raise ScanError, "can not match: '" + text + "'"
115
+ end # if
116
+
117
+ else
118
+ raise ScanError, "undefined state: '" + state.to_s + "'"
119
+ end # case state
120
+ token
121
+ end # def _next_token
121
122
 
122
123
  def lex(input)
123
124
  scan_setup(input)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hcl-checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Castellani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-16 00:00:00.000000000 Z
11
+ date: 2020-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.2
19
+ version: 2.1.4
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.2
26
+ version: 2.1.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 12.3.3
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: 12.3.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -138,8 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubyforge_project:
142
- rubygems_version: 2.7.6.2
141
+ rubygems_version: 3.0.1
143
142
  signing_key:
144
143
  specification_version: 4
145
144
  summary: Hashicorp Configuration Language parser for Ruby