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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af967bd1654ad4ac3ca616ca3e4b56be905558ca996c9fe4ab1db5ad718be9d4
4
- data.tar.gz: 897b7d15f20cb025e62ffd607a403ad5e40967e96c2c12c855d931a2096d8d62
3
+ metadata.gz: 46af867d37983390d0e1b49e6a3d80e655be1ef915170b7315882d63b64676fd
4
+ data.tar.gz: 9e27f72aec9a39d94cc477dc4f8546db50b89e03449edb3c28c431933001b262
5
5
  SHA512:
6
- metadata.gz: a16cde319da6274402e6106d2a97c69623b96981739ea8487850667c5775ebd4fc3a329678928fb62333258e6351558a2211dfd77a6422605f19624aef8abc00
7
- data.tar.gz: 98bd7218655e8104b964d789da17bd7cff8cbeb5449b4e2b0b035b192ad387d267988e406b78179a2dcfd529b39f632a9728470ee484975d4bf58ed26e7ea5dd
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
- Naming/AccessorMethodName:
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.3)
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.6.3)
11
+ json (2.7.0)
12
12
  keycutter (1.0.2)
13
13
  kramdown (2.4.0)
14
14
  rexml
@@ -1,3 +1,3 @@
1
1
  module TerraformSynthesizer
2
- VERSION = %(0.0.5).freeze
2
+ VERSION = %(0.0.7).freeze
3
3
  end
@@ -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
  ...
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraform-synthesizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - drzthslnt@gmail.com