hcl_parser 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/hcl_parser/loader.rb +2 -3
- data/lib/hcl_parser/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c68e7a4474d1b96b0da7990388f077728a3c11ae198dae2a6f6863cc8c9abc0c
|
4
|
+
data.tar.gz: 37a31807784ddf3d81472d9834da1b41a9eb337bdbebfd2e273e41deac457986
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f1870f3f238bdb0074ff6718945697a44bfe5390231b684598202fe4b47633af565fa5e025e6813c63600af248066d84a0e209163a6184193e66a95e668bca8
|
7
|
+
data.tar.gz: 97c932c7b10ed1afd4eee68afb94b3cf193c766efe9016606d40463456f0c93fe133ac5e2320d7e889d0f5f5d8493ac2d9b8ac85d1bd33f2a00d5cce307cdb6a
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.2.2] - 2022-08-26
|
7
|
+
- [#5](https://github.com/boltops-tools/hcl_parser/pull/5) handle single line variable
|
8
|
+
|
6
9
|
## [0.2.1] - 2021-11-28
|
7
10
|
- [#2](https://github.com/boltops-tools/hcl_parser/pull/2) improve complex type parser: handle any
|
8
11
|
|
data/lib/hcl_parser/loader.rb
CHANGED
@@ -83,10 +83,9 @@ module HclParser
|
|
83
83
|
end
|
84
84
|
|
85
85
|
def variable_end_index(lines, variable_start_index)
|
86
|
-
end_variable_index = nil
|
87
86
|
lines.each_with_index do |l,i|
|
88
|
-
next unless i
|
89
|
-
return i if l.match(/^}/)
|
87
|
+
next unless i >= variable_start_index
|
88
|
+
return i if l.match(/^}/) || l.match(/{\s*}/)
|
90
89
|
end
|
91
90
|
end
|
92
91
|
|
data/lib/hcl_parser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hcl_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rhcl
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
|
-
rubygems_version: 3.
|
81
|
+
rubygems_version: 3.3.21
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: HCL Variables Parser
|