terradoc 0.1.2 → 0.1.3

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: c6730bc600493a11b93cdc744a167dc7940cce1eede4372dc1747679c57f97df
4
- data.tar.gz: bd8cb23a1b9680f02692781fb275cd7fbb18bb4277fe3fdb2297b95523b3b798
3
+ metadata.gz: 9ae2edc8cf4330163a89342cf1e0465a1ec5be75430225cfa1ecaedb1eae8267
4
+ data.tar.gz: 720958cb168d3cd026ee9be8c3e06ecf11d3245702ea0d2459bb2d6f608ea4a1
5
5
  SHA512:
6
- metadata.gz: 8558e709dd27dab84316ecf3d18b1a397a4fd0954fac2cfc7cb59eaf6f1b839a8598c9385f81c549ccd5958c246f3ca8f55d0f42eed425f45af0d4f026160729
7
- data.tar.gz: 13f7f229ca4e5aa3f15d597d6d165bb390f4f74d7ca55919e19e89d00e2b9bc8237b3c97a726412b13d43f89b059c174ab9ffd02563fd640d0a9800b29f8d0c5
6
+ metadata.gz: 78926d31b1c5b1cb53c83835437573340ae0a7be4fc457e00a0f2eaadc1fccaaf57190493ff750e658c78bbcc1c4434cb1b5bba09ea9b6f076149caf88fb2f34
7
+ data.tar.gz: a527fffd7aeba52586972e1f7f959a66e781b378ab274cb7fad4b3d064240d1fbb0d4757f7b14c4972aec82df5addadcd6529c4e1277b276fce1609abaf998bb
data/CHANGELOG.md CHANGED
@@ -5,11 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
 
6
6
  This changelog was automatically generated using [Caretaker](https://github.com/TerraformToolbox/terradoc) by [Wolf Software](https://github.com/WolfSoftware)
7
7
 
8
+ ### [v0.1.3](https://github.com/TerraformToolbox/terradoc/compare/v0.1.2...v0.1.3)
9
+
10
+ > Released on March, 18th 2020
11
+
12
+ - Fixed a bug which caused an issues if data and resources were in the same file [`[d5ae242]`](https://github.com/TerraformToolbox/terradoc/commit/d5ae24258db1ff47acf7aafab8540e8e54543f79) [`[TGWolf]`](https://github.com/TGWolf)
13
+
8
14
  ### [v0.1.2](https://github.com/TerraformToolbox/terradoc/compare/v0.1.0...v0.1.2)
9
15
 
10
16
  > Released on March, 18th 2020
11
17
 
12
- - Change the default file from CHANGELOG to README (which is what it should have been in first place) [`[63dd286]`](https://github.com/TerraformToolbox/terradoc/commit/63dd28635edebef5bbb3760fd9bf4e2d326e54e2) [`[TGWolf]`](https://github.com/TGWolf)
18
+ - Change the default file from CHANGELOG to README (which is what it should have been in first place) [`[1817ee0]`](https://github.com/TerraformToolbox/terradoc/commit/1817ee06e5dc2c27bf8e096f857d0172ffa93b35) [`[TGWolf]`](https://github.com/TGWolf)
13
19
 
14
20
  - Fix an error in the README and a couple of typos [`[0ef365d]`](https://github.com/TerraformToolbox/terradoc/commit/0ef365dd9ed0b3dac8eabbe5e83b16d5eaf04bad) [`[TGWolf]`](https://github.com/TGWolf)
15
21
 
data/VERSION.txt CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -1,3 +1,3 @@
1
1
  class Terradoc
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
data/lib/terradoc.rb CHANGED
@@ -24,7 +24,7 @@ class Terradoc
24
24
  'data-sources' => {
25
25
  'include' => 'data',
26
26
  'match' => /^(?!data).*/,
27
- 'regex' => /^data\s*"(?<name>.*)"\s*".*/,
27
+ 'regex' => /^data\s*"(?<name>.*?)"\s*".*/,
28
28
  'split' => /(?=data\s*")/,
29
29
  'start' => '<!--Terradoc-data-sources-start-->',
30
30
  'end' => '<!--Terradoc-data-sources-end-->',
@@ -58,7 +58,7 @@ class Terradoc
58
58
  'resources' => {
59
59
  'include' => 'resource',
60
60
  'match' => /^(?!resource).*/,
61
- 'regex' => /^resource\s*"(?<name>.*)"\s*".*/,
61
+ 'regex' => /^resource\s*"(?<name>.*?)"\s*".*/,
62
62
  'split' => /(?=resource\s*")/,
63
63
  'start' => '<!--Terradoc-resources-start-->',
64
64
  'end' => '<!--Terradoc-resources-end-->',
@@ -231,6 +231,9 @@ class Terradoc
231
231
  next if item.match(value['match'])
232
232
 
233
233
  matches = item.match(value['regex'])
234
+
235
+ puts matches[:name]
236
+
234
237
  next unless matches.size.positive?
235
238
  next unless matches.names.include?('name')
236
239
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terradoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Gurney aka Wolf