terradoc 0.1.6 → 0.1.8

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: f8d4b322dd69ee236532a345bca8ac90f081197f724c647db1d5ac65ba720bab
4
- data.tar.gz: 11b18b4769f977988a0b8bb277d35b4f495641b2f75483604f4aaad15317c958
3
+ metadata.gz: e125cf8c7b7500b455c6f52e2b1073f7f64a76cee715375831e965adc7d977c7
4
+ data.tar.gz: 914e0f417d6482bbe7528d59e8c5fe8ac1d0aab2ab5d11b2bf0b3d010ff2ef96
5
5
  SHA512:
6
- metadata.gz: e4a00858f0dc2061fbde8b6159b23682855d4162e6c2114a78f945a4e6e8cd7ef5e39ef71974043598d5b9e6d59c72ffe246687932613a8698ee0a6dd0f39ff9
7
- data.tar.gz: 8aff03b52debea2854e0a0c7152f9a3f63c1be87e117d95f7360d81b0ed9685734277252ac433a1169756c7119518761dd178db80d549184eace019afbb57ad2
6
+ metadata.gz: 043b1390f79765f36d9fd3bd33b0d0d20918771055ba06065fc0db8e99eb8d2c28a3fb6d8fd63e81d21de5dbaeabfe87014d90e09b1f9f5a6be1fecf3002963d
7
+ data.tar.gz: 65ed88938ebc9622254da92d186b62cd8d6c93de633e0a04e65597d68589bd9bb76a0109e7f6d86efad31e1c8e3c0aaab9d6418c59749006e232a94e01df2bf1
data/CHANGELOG.md CHANGED
@@ -5,11 +5,23 @@ 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.8](https://github.com/TerraformToolbox/terradoc/compare/v0.1.7...v0.1.8)
9
+
10
+ > Released on March, 18th 2020
11
+
12
+ - Passing wrong data-table when generating output [`[1aeff45]`](https://github.com/TerraformToolbox/terradoc/commit/1aeff4504947e7fd26b0d20a6826dfdbe774600a) [`[TGWolf]`](https://github.com/TGWolf)
13
+
14
+ ### [v0.1.7](https://github.com/TerraformToolbox/terradoc/compare/v0.1.6...v0.1.7)
15
+
16
+ > Released on March, 18th 2020
17
+
18
+ - Add providers to the output file [`[ba5d084]`](https://github.com/TerraformToolbox/terradoc/commit/ba5d084e8e09a5d1278e952e53e695da310c4fe5) [`[TGWolf]`](https://github.com/TGWolf)
19
+
8
20
  ### [v0.1.6](https://github.com/TerraformToolbox/terradoc/compare/v0.1.5...v0.1.6)
9
21
 
10
22
  > Released on March, 18th 2020
11
23
 
12
- - Fixed a bug in 'Required' for variables, and increased the nesting level for json parse for deep nested code [`[4c7d6b4]`](https://github.com/TerraformToolbox/terradoc/commit/4c7d6b4f9fa7bf83d7d61a27c6dc3bd42e2c4dc0) [`[TGWolf]`](https://github.com/TGWolf)
24
+ - Fixed a bug in 'Required' for variables, and increased the nesting level for json parse for deep nested code [`[d77efd9]`](https://github.com/TerraformToolbox/terradoc/commit/d77efd90dcfd664692efbce824629969b3931c87) [`[TGWolf]`](https://github.com/TGWolf)
13
25
 
14
26
  ### [v0.1.5](https://github.com/TerraformToolbox/terradoc/compare/v0.1.4...v0.1.5)
15
27
 
data/VERSION.txt CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.8
data/lib/terradoc.rb CHANGED
@@ -49,16 +49,16 @@ class Terradoc
49
49
  'sorted_results' => [],
50
50
  'data_table' => []
51
51
  },
52
- 'resources' => {
53
- 'start' => '<!--Terradoc-resources-start-->',
54
- 'end' => '<!--Terradoc-resources-end-->',
52
+ 'providers' => {
53
+ 'start' => '<!--Terradoc-providers-start-->',
54
+ 'end' => '<!--Terradoc-providers-end-->',
55
55
  'raw_results' => [],
56
56
  'sorted_results' => [],
57
57
  'data_table' => []
58
58
  },
59
- 'providers' => {
60
- 'start' => '<!--Terradoc-providers-start-->',
61
- 'end' => '<!--Terradoc-providers-end-->',
59
+ 'resources' => {
60
+ 'start' => '<!--Terradoc-resources-start-->',
61
+ 'end' => '<!--Terradoc-resources-end-->',
62
62
  'raw_results' => [],
63
63
  'sorted_results' => [],
64
64
  'data_table' => []
@@ -213,6 +213,7 @@ class Terradoc
213
213
  @config['data-sources']['sorted_results'] = cleanup_array(@config['data-sources']['raw_results'])
214
214
  @config['modules']['sorted_results'] = cleanup_array(@config['modules']['raw_results'])
215
215
  @config['outputs']['sorted_results'] = cleanup_array(@config['outputs']['raw_results'])
216
+ @config['providers']['sorted_results'] = cleanup_array(@config['providers']['raw_results'])
216
217
  @config['resources']['sorted_results'] = cleanup_array(@config['resources']['raw_results'])
217
218
  @config['variables']['sorted_results'] = cleanup_array(@config['variables']['raw_results'])
218
219
  end
@@ -227,7 +228,7 @@ class Terradoc
227
228
  @config['data-sources']['data_table'] << "| #{item[:name]} |"
228
229
  end
229
230
  else
230
- @config['data-sources']['data_table'] << '> No data found'
231
+ @config['data-sources']['data_table'] << '> No data sources found'
231
232
  end
232
233
 
233
234
  if @config['modules']['sorted_results'].size.positive?
@@ -237,7 +238,7 @@ class Terradoc
237
238
  @config['modules']['data_table'] << "| #{item[:name]} |"
238
239
  end
239
240
  else
240
- @config['modules']['data_table'] << '> No data found'
241
+ @config['modules']['data_table'] << '> No modules found'
241
242
  end
242
243
 
243
244
  if @config['outputs']['sorted_results'].size.positive?
@@ -247,7 +248,17 @@ class Terradoc
247
248
  @config['outputs']['data_table'] << "| #{item[:name]} | #{item[:description]} |"
248
249
  end
249
250
  else
250
- @config['outputs']['data_table'] << '> No data found'
251
+ @config['outputs']['data_table'] << '> No outputs found'
252
+ end
253
+
254
+ if @config['providers']['sorted_results'].size.positive?
255
+ @config['providers']['data_table'] << '| Name |'
256
+ @config['providers']['data_table'] << '| ---- |'
257
+ @config['providers']['sorted_results'].each do |item|
258
+ @config['providers']['data_table'] << "| #{item[:name]} |"
259
+ end
260
+ else
261
+ @config['providers']['data_table'] << '> No providers found'
251
262
  end
252
263
 
253
264
  if @config['resources']['sorted_results'].size.positive?
@@ -257,7 +268,7 @@ class Terradoc
257
268
  @config['resources']['data_table'] << "| #{item[:name]} |"
258
269
  end
259
270
  else
260
- @config['resources']['data_table'] << '> No data found'
271
+ @config['resources']['data_table'] << '> No resources found'
261
272
  end
262
273
 
263
274
  if @config['variables']['sorted_results'].size.positive?
@@ -267,7 +278,7 @@ class Terradoc
267
278
  @config['variables']['data_table'] << "| #{item[:name]} | #{item[:description]} | #{item[:type]} | #{item[:default]} | #{item[:required]} |"
268
279
  end
269
280
  else
270
- @config['variables']['data_table'] << '> No data found'
281
+ @config['variables']['data_table'] << '> No variables found'
271
282
  end
272
283
  end
273
284
 
@@ -322,6 +333,7 @@ class Terradoc
322
333
  lines = generate_output(lines, @config['data-sources']['start'], @config['data-sources']['end'], @config['data-sources']['data_table'])
323
334
  lines = generate_output(lines, @config['modules']['start'], @config['modules']['end'], @config['modules']['data_table'])
324
335
  lines = generate_output(lines, @config['outputs']['start'], @config['outputs']['end'], @config['outputs']['data_table'])
336
+ lines = generate_output(lines, @config['providers']['start'], @config['providers']['end'], @config['providers']['data_table'])
325
337
  lines = generate_output(lines, @config['resources']['start'], @config['resources']['end'], @config['resources']['data_table'])
326
338
  lines = generate_output(lines, @config['variables']['start'], @config['variables']['end'], @config['variables']['data_table'])
327
339
 
@@ -1,3 +1,3 @@
1
1
  class Terradoc
2
- VERSION = '0.1.6'.freeze
2
+ VERSION = '0.1.8'.freeze
3
3
  end
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.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Gurney aka Wolf