hcl_parser 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6570c678f64e03d6dd6fca6b1bc4800cb7eafc3222ca02784e6f62c148279672
4
- data.tar.gz: 0ea732a8d48b24527220721fb79bf9f2c28c38a35dc1bfe6953799cef90409db
3
+ metadata.gz: c68e7a4474d1b96b0da7990388f077728a3c11ae198dae2a6f6863cc8c9abc0c
4
+ data.tar.gz: 37a31807784ddf3d81472d9834da1b41a9eb337bdbebfd2e273e41deac457986
5
5
  SHA512:
6
- metadata.gz: 778963fb140bc4fb1457370d930569a4901f0831c5471af1a977abba845d78a7ce732661eacd2abf1986b5fe26c907b27a7dd8c88876d0cce21c6927d51c4e63
7
- data.tar.gz: 702c25648f6259a3f8dbae407768692b9969c033792e92d167f9d5f335b939c773829015536382b406afe69e3c73568ed9e6fa57ccca48adfadfb070034490c4
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
 
@@ -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 > variable_start_index
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
 
@@ -1,3 +1,3 @@
1
1
  module HclParser
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
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: 2021-11-28 00:00:00.000000000 Z
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.1.6
81
+ rubygems_version: 3.3.21
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: HCL Variables Parser