terradoc 0.1.5 → 0.1.6

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: 0deada70047ce96aaebd65a8ba1b59deed1a73e2de26fb52ef555cdc1bd45ab4
4
- data.tar.gz: a969849a9d998faffdc452ede71654ebc25b22d69202421da7ae59a2367cdd38
3
+ metadata.gz: f8d4b322dd69ee236532a345bca8ac90f081197f724c647db1d5ac65ba720bab
4
+ data.tar.gz: 11b18b4769f977988a0b8bb277d35b4f495641b2f75483604f4aaad15317c958
5
5
  SHA512:
6
- metadata.gz: 0bb6e91cfb9999706f47393e06448e224406685d9e521979f63c269bd1bc2e459b78360e7e760b95cdbc11673816af35f71d073ee7a5307aa00366b2c4dbde62
7
- data.tar.gz: cdd4007eccd3a48170d35a8ad11688d5f42ee26d9b08a61244e41f5108eb0b0f17ab09784941a5e659c114df9852a702a180fe30ab6a0e5ad7c8398fbd6e86c6
6
+ metadata.gz: e4a00858f0dc2061fbde8b6159b23682855d4162e6c2114a78f945a4e6e8cd7ef5e39ef71974043598d5b9e6d59c72ffe246687932613a8698ee0a6dd0f39ff9
7
+ data.tar.gz: 8aff03b52debea2854e0a0c7152f9a3f63c1be87e117d95f7360d81b0ed9685734277252ac433a1169756c7119518761dd178db80d549184eace019afbb57ad2
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.6](https://github.com/TerraformToolbox/terradoc/compare/v0.1.5...v0.1.6)
9
+
10
+ > Released on March, 18th 2020
11
+
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)
13
+
8
14
  ### [v0.1.5](https://github.com/TerraformToolbox/terradoc/compare/v0.1.4...v0.1.5)
9
15
 
10
16
  > Released on March, 18th 2020
11
17
 
12
- - Update the readme ready for release [`[830805a]`](https://github.com/TerraformToolbox/terradoc/commit/830805a455387532a39abb52bec7b634eb83ab67) [`[TGWolf]`](https://github.com/TGWolf)
18
+ - Update the readme ready for release [`[5d370ce]`](https://github.com/TerraformToolbox/terradoc/commit/5d370ceec1df0ed3b519ad51a3fdddf708e6565c) [`[TGWolf]`](https://github.com/TGWolf)
13
19
 
14
20
  - Fairly big internal review to make use of hcl2json, and additional outputs [`[b528f93]`](https://github.com/TerraformToolbox/terradoc/commit/b528f9385eb98ee4756f7feb9c2a9b481e302ff8) [`[TGWolf]`](https://github.com/TGWolf)
15
21
 
data/README.md CHANGED
@@ -82,6 +82,10 @@ There are a number tags that you need to add to your README in order for terrado
82
82
 
83
83
  Now you can simply run ```terradoc``` and it will generate the output.
84
84
 
85
+ ## Known Errors
86
+
87
+ If you see an error similiar to ```Error: nesting of 257 is too deep ``` then you should review your code as you have very high levels of nesting. The code will cope with 256 levels.
88
+
85
89
  ## Contributing to Terradoc
86
90
 
87
91
  ### Setup
data/TEST ADDED
@@ -0,0 +1,87 @@
1
+ # Some example README
2
+
3
+ ## Data Sources
4
+ <!--Terradoc-data-sources-start-->
5
+ > No data found
6
+ <!--Terradoc-data-sources-end-->
7
+
8
+ ## Modules
9
+ <!--Terradoc-modules-start-->
10
+ > No data found
11
+ <!--Terradoc-modules-end-->
12
+
13
+ ## Outputs
14
+ <!--Terradoc-outputs-start-->
15
+ | Name | Description |
16
+ | ---- | ----------- |
17
+ | automated\_testing\_account\_alias | The account alias for the automated testing account |
18
+ | automated\_testing\_account\_email | The account email for the automated testing account |
19
+ | automated\_testing\_account\_id | The account id for the automated testing account |
20
+ | automated\_testing\_account\_name | The account name for the automated testing account |
21
+ | development\_account\_alias | The account alias for the development account |
22
+ | development\_account\_email | The account email for the development account |
23
+ | development\_account\_id | The account id for the development account |
24
+ | development\_account\_name | The account name for the development account |
25
+ | development\_collector\_account\_alias | The account alias for the development collect account |
26
+ | development\_collector\_account\_email | The account email for the development collect account |
27
+ | development\_collector\_account\_id | The account id for the development collect account |
28
+ | development\_collector\_account\_name | The account name for the development collect account |
29
+ | infradev\_account\_alias | The account alias for the infradev account |
30
+ | infradev\_account\_email | The account email for the infradev account |
31
+ | infradev\_account\_id | The account id for the infradev account |
32
+ | infradev\_account\_name | The account name for the infradev account |
33
+ | logging\_account\_alias | The account alias for the logging account |
34
+ | logging\_account\_email | The account email for the logging account |
35
+ | logging\_account\_id | The account id for the logging account |
36
+ | logging\_account\_name | The account id for the logging account |
37
+ | messaging\_account\_alias | The account alias for the messaging account |
38
+ | messaging\_account\_email | The account email for the messaging account |
39
+ | messaging\_account\_id | The account id for the messaging account |
40
+ | messaging\_account\_name | The account name for the messaging account |
41
+ | organisation\_account\_alias | The account alias for the organisation account |
42
+ | organisation\_account\_email | The account email for the organisation account |
43
+ | organisation\_account\_id | The account id for the organisation account |
44
+ | organisation\_account\_name | The account name for the organisation account |
45
+ | production\_account\_alias | The account alias for the production account |
46
+ | production\_account\_email | The account email for the production account |
47
+ | production\_account\_id | The account id for the production account |
48
+ | production\_account\_name | The account name for the production account |
49
+ | production\_collector\_account\_alias | The account alias for the production collector account |
50
+ | production\_collector\_account\_email | The account email for the production collector account |
51
+ | production\_collector\_account\_id | The account id for the production collector account |
52
+ | production\_collector\_account\_name | The account name for the production collector account |
53
+ | reporting\_account\_alias | The account alias for the reporting account |
54
+ | reporting\_account\_email | The account email for the reporting account |
55
+ | reporting\_account\_id | The account id for the reporting account |
56
+ | reporting\_account\_name | The account name for the reporting account |
57
+ | testing\_account\_alias | The account alias for the testing account |
58
+ | testing\_account\_email | The account email for the testing account |
59
+ | testing\_account\_id | The account id for the testing account |
60
+ | testing\_account\_name | The account name for the testing account |
61
+ | testing\_collector\_account\_alias | The account alias for the testing collector account |
62
+ | testing\_collector\_account\_email | The account email for the testing collector account |
63
+ | testing\_collector\_account\_id | The account id for the testing collector account |
64
+ | testing\_collector\_account\_name | The account name for the testing collector account |
65
+ | tooling\_account\_alias | The account alias for the tooling account |
66
+ | tooling\_account\_email | The account email for the tooling account |
67
+ | tooling\_account\_id | The account id for the tooling account |
68
+ | tooling\_account\_name | The account name for the tooling account |
69
+ <!--Terradoc-outputs-end-->
70
+
71
+ ## Providers
72
+ <!--Terradoc-providers-start-->
73
+ <!--Terradoc-providers-end-->
74
+
75
+ ## Resources
76
+ <!--Terradoc-resources-start-->
77
+ > No data found
78
+ <!--Terradoc-resources-end-->
79
+
80
+ ## Variables
81
+ <!--Terradoc-variables-start-->
82
+ | Name | Description | Type | Default | Required? |
83
+ | ---- | ----------- |:----:|:-------:|:---------:|
84
+ | account\_emails | A list of account email addresses | list(string) | | Yes |
85
+ | account\_ids | A list of account id | list(string) | | Yes |
86
+ | account\_names | A list of account names | list(string) | | Yes |
87
+ <!--Terradoc-variables-end-->
data/VERSION.txt CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
data/lib/terradoc.rb CHANGED
@@ -141,7 +141,7 @@ class Terradoc
141
141
  Open3.popen3("hcl2json #{file}") do |_stdin, stdout, _stderr, _wait_thr|
142
142
  stdout_str = stdout.read
143
143
 
144
- json = JSON.parse(stdout_str)
144
+ json = JSON.parse(stdout_str, max_nesting: 256)
145
145
  @raw_results = @raw_results.merge(json)
146
146
  end
147
147
  end
@@ -189,10 +189,10 @@ class Terradoc
189
189
  @raw_results['variable'].each do |key, value|
190
190
  name = key.gsub('_', '\_')
191
191
  default = value['default'].to_s.gsub('_', '\_')
192
- required = if value.key?(:default)
193
- 'No'
194
- else
192
+ required = if default.empty?
195
193
  'Yes'
194
+ else
195
+ 'No'
196
196
  end
197
197
  @config['variables']['raw_results'] << { :name => name, :description => value['description'], :type => value['type'], :default => default, :required => required }
198
198
  end
@@ -1,3 +1,3 @@
1
1
  class Terradoc
2
- VERSION = '0.1.5'.freeze
2
+ VERSION = '0.1.6'.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.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Gurney aka Wolf
@@ -102,6 +102,7 @@ files:
102
102
  - LICENSE.md
103
103
  - README.md
104
104
  - Rakefile
105
+ - TEST
105
106
  - VERSION.txt
106
107
  - bin/console
107
108
  - bin/setup