ruby-terraform 1.7.0.pre.14 → 1.7.0.pre.15

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: 7fcda0b6d4fbc93f030c39f132c06e2285b04f766e210ed502e16407eb9b6401
4
- data.tar.gz: 8d0c33a5ec5742d7d0b06ec5248936e1f18a28fbfbb398bf10b121d8befdef31
3
+ metadata.gz: f305e100ebe0c04e59b784fffc17d6289db42c5cd58b4d0900df02d4224b2c60
4
+ data.tar.gz: e3020b1de0eacdeec7bdb5f74ece20c409aed5bd9b5261cbe6c3bf0ae3495431
5
5
  SHA512:
6
- metadata.gz: e0f5ef8b7d6341edd90d054438244ca87ce812a2b676561dd1dde3590a5c6324ac2c4a075e972733c312b90d0259fcb18e76a06ceeb61722af69cb04577cfacc
7
- data.tar.gz: 2d45bcaa311ce4e1c52cdee3ee4da5846d94b85754a9dad214efc8f0c648744d0d31dceaefe076d1ef15cc182a2ff2d6e5a8731be3a7963968ea1cd1593aa032
6
+ metadata.gz: 6e823ee667f15cbddbe3dc4620d2f12293f046da1323a77a2ddafc5261363fb2d8bd84ef6215697cd4c01bc234388339705c494a0964790b8eef79bf88478334
7
+ data.tar.gz: e9c4616d6c048bb6d537b00ea1332257729b93e6c265a5edc3a9d5faa30ccedf417ae74c913d1f9c86a50b14d28334388e1352e35b04d36a444955ac78a28721
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-terraform (1.7.0.pre.14)
4
+ ruby-terraform (1.7.0.pre.15)
5
5
  immutable-struct (~> 2.4)
6
6
  lino (~> 3.0)
7
7
 
@@ -9,7 +9,7 @@ module RubyTerraform
9
9
  include ValueEquality
10
10
 
11
11
  def initialize(content)
12
- @content = content
12
+ @content = symbolise_keys(content)
13
13
  end
14
14
 
15
15
  def actions
@@ -99,6 +99,16 @@ module RubyTerraform
99
99
  def state
100
100
  [@content]
101
101
  end
102
+
103
+ private
104
+
105
+ def symbolise_keys(object)
106
+ if object.is_a?(Hash)
107
+ object.to_h { |k, v| [k.to_sym, symbolise_keys(v)] }
108
+ else
109
+ object
110
+ end
111
+ end
102
112
  end
103
113
  end
104
114
  end
@@ -8,11 +8,13 @@ module RubyTerraform
8
8
  class OutputChange
9
9
  include ValueEquality
10
10
 
11
- attr_reader(:name)
12
-
13
11
  def initialize(name, content)
14
- @name = name
15
- @content = content
12
+ @name = name.to_sym
13
+ @content = symbolise_keys(content)
14
+ end
15
+
16
+ def name
17
+ @name.to_s
16
18
  end
17
19
 
18
20
  def change
@@ -54,6 +56,16 @@ module RubyTerraform
54
56
  def state
55
57
  [@name, @content]
56
58
  end
59
+
60
+ private
61
+
62
+ def symbolise_keys(object)
63
+ if object.is_a?(Hash)
64
+ object.to_h { |k, v| [k.to_sym, symbolise_keys(v)] }
65
+ else
66
+ object
67
+ end
68
+ end
57
69
  end
58
70
  end
59
71
  end
@@ -10,7 +10,7 @@ module RubyTerraform
10
10
  include ValueEquality
11
11
 
12
12
  def initialize(content)
13
- @content = content
13
+ @content = symbolise_keys(content)
14
14
  end
15
15
 
16
16
  def format_version
@@ -68,6 +68,16 @@ module RubyTerraform
68
68
  def state
69
69
  [@content]
70
70
  end
71
+
72
+ private
73
+
74
+ def symbolise_keys(object)
75
+ if object.is_a?(Hash)
76
+ object.to_h { |k, v| [k.to_sym, symbolise_keys(v)] }
77
+ else
78
+ object
79
+ end
80
+ end
71
81
  end
72
82
  end
73
83
  end
@@ -9,7 +9,7 @@ module RubyTerraform
9
9
  include ValueEquality
10
10
 
11
11
  def initialize(content)
12
- @content = content
12
+ @content = symbolise_keys(content)
13
13
  end
14
14
 
15
15
  def address
@@ -95,6 +95,16 @@ module RubyTerraform
95
95
  def state
96
96
  [@content]
97
97
  end
98
+
99
+ private
100
+
101
+ def symbolise_keys(object)
102
+ if object.is_a?(Hash)
103
+ object.to_h { |k, v| [k.to_sym, symbolise_keys(v)] }
104
+ else
105
+ object
106
+ end
107
+ end
98
108
  end
99
109
  end
100
110
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyTerraform
4
- VERSION = '1.7.0.pre.14'
4
+ VERSION = '1.7.0.pre.15'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-terraform
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0.pre.14
4
+ version: 1.7.0.pre.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfraBlocks Maintainers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-22 00:00:00.000000000 Z
11
+ date: 2022-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: immutable-struct