terraform-synthesizer 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +7 -8
- data/Gemfile.lock +2 -2
- data/lib/terraform-synthesizer/version.rb +1 -1
- data/lib/terraform-synthesizer.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46af867d37983390d0e1b49e6a3d80e655be1ef915170b7315882d63b64676fd
|
4
|
+
data.tar.gz: 9e27f72aec9a39d94cc477dc4f8546db50b89e03449edb3c28c431933001b262
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58d1ce3959de38e69b504c07da65d8abfde3e232a93084a27ccfcb44056a381f6626a60e760b1d83912b2e26fd1be7f5c842eb8d2fd2cdd54abcc2d53c0a838d
|
7
|
+
data.tar.gz: 000eeecf43a0696723a56156a73e406242a5f9d7b081e205fd78fe887757220006ba4a74cdc6ca161ed039364f8930fb9ba75ad2a97a9f40d3b0a350ed821b5c
|
data/.rubocop.yml
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: '3.0'
|
3
2
|
NewCops: enable
|
4
3
|
|
5
|
-
Gemspec/RequiredRubyVersion:
|
6
|
-
Enabled: false
|
7
|
-
|
8
4
|
Style/FrozenStringLiteralComment:
|
9
5
|
Enabled: false
|
10
6
|
|
@@ -23,9 +19,6 @@ Style/StringConcatenation:
|
|
23
19
|
Metrics/MethodLength:
|
24
20
|
Enabled: false
|
25
21
|
|
26
|
-
Metrics/ModuleLength:
|
27
|
-
Enabled: false
|
28
|
-
|
29
22
|
Metrics/AbcSize:
|
30
23
|
Enabled: false
|
31
24
|
|
@@ -50,5 +43,11 @@ Metrics/ClassLength:
|
|
50
43
|
Metrics/BlockLength:
|
51
44
|
Enabled: false
|
52
45
|
|
53
|
-
|
46
|
+
Metrics/ModuleLength:
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
Naming/FileName:
|
50
|
+
Enabled: false
|
51
|
+
|
52
|
+
Lint/EmptyClass:
|
54
53
|
Enabled: false
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
abstract-synthesizer (0.0.
|
4
|
+
abstract-synthesizer (0.0.4)
|
5
5
|
ast (2.4.2)
|
6
6
|
backport (1.2.0)
|
7
7
|
benchmark (0.3.0)
|
8
8
|
diff-lcs (1.5.0)
|
9
9
|
e2mmap (0.1.0)
|
10
10
|
jaro_winkler (1.5.6)
|
11
|
-
json (2.
|
11
|
+
json (2.7.0)
|
12
12
|
keycutter (1.0.2)
|
13
13
|
kramdown (2.4.0)
|
14
14
|
rexml
|
@@ -2,6 +2,14 @@ require %(abstract-synthesizer)
|
|
2
2
|
|
3
3
|
class TerraformSynthesizer < AbstractSynthesizer
|
4
4
|
def method_missing(method_name, ...)
|
5
|
+
if method_name.to_s.eql?(%(locals))
|
6
|
+
@translation = {} if @translation.nil?
|
7
|
+
@translation[:template] = {} if @translation[:template].nil?
|
8
|
+
@translation[:template][:locals] = {} if @translation[:template][:locals].nil?
|
9
|
+
@translation[:template][:locals].merge!(instance_eval(yield)) if block_given?
|
10
|
+
else
|
11
|
+
return {}
|
12
|
+
end
|
5
13
|
abstract_method_missing(
|
6
14
|
method_name,
|
7
15
|
%i[
|
@@ -9,7 +17,6 @@ class TerraformSynthesizer < AbstractSynthesizer
|
|
9
17
|
resource
|
10
18
|
variable
|
11
19
|
output
|
12
|
-
locals
|
13
20
|
data
|
14
21
|
],
|
15
22
|
...
|