ruby-terraform 1.7.0.pre.12 → 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: 05123f700040ce4359f0e819a83b13f20020e769b5614a3b195ec5b6aff2e705
4
- data.tar.gz: ba42dbfa723acad552ecd6121d1c14164d37446ea5a86a0d619d62a78276cecb
3
+ metadata.gz: f305e100ebe0c04e59b784fffc17d6289db42c5cd58b4d0900df02d4224b2c60
4
+ data.tar.gz: e3020b1de0eacdeec7bdb5f74ece20c409aed5bd9b5261cbe6c3bf0ae3495431
5
5
  SHA512:
6
- metadata.gz: e8ab4f65fad178ae5b67c022a252b8f6cd74d3c7b1241accfce4634f237c4b46dccd1d63f16f9da9de5be17af2d669a48c946c570dbaa4aa53b72541408f62bf
7
- data.tar.gz: e21b15e098bf83323f860478accd9baf769f41dd9e2823a41a3d0710582f15265db009278556b9e9cc5b2bc595c06ac3d975d6c9bab0215ac603d1ff4a9d43bb
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.12)
4
+ ruby-terraform (1.7.0.pre.15)
5
5
  immutable-struct (~> 2.4)
6
6
  lino (~> 3.0)
7
7
 
@@ -69,7 +69,7 @@ GEM
69
69
  sawyer (~> 0.9)
70
70
  open4 (1.3.4)
71
71
  parallel (1.22.1)
72
- parser (3.1.2.0)
72
+ parser (3.1.2.1)
73
73
  ast (~> 2.4.1)
74
74
  pry (0.14.1)
75
75
  coderay (~> 1.1)
@@ -115,17 +115,17 @@ GEM
115
115
  diff-lcs (>= 1.2.0, < 2.0)
116
116
  rspec-support (~> 3.11.0)
117
117
  rspec-support (3.11.0)
118
- rubocop (1.32.0)
118
+ rubocop (1.35.1)
119
119
  json (~> 2.3)
120
120
  parallel (~> 1.10)
121
- parser (>= 3.1.0.0)
121
+ parser (>= 3.1.2.1)
122
122
  rainbow (>= 2.2.2, < 4.0)
123
123
  regexp_parser (>= 1.8, < 3.0)
124
124
  rexml (>= 3.2.5, < 4.0)
125
- rubocop-ast (>= 1.19.1, < 2.0)
125
+ rubocop-ast (>= 1.20.1, < 2.0)
126
126
  ruby-progressbar (~> 1.7)
127
127
  unicode-display_width (>= 1.4.0, < 3.0)
128
- rubocop-ast (1.19.1)
128
+ rubocop-ast (1.21.0)
129
129
  parser (>= 3.1.1.0)
130
130
  rubocop-rake (0.6.0)
131
131
  rubocop (~> 1.0)
@@ -180,4 +180,4 @@ DEPENDENCIES
180
180
  yard
181
181
 
182
182
  BUNDLED WITH
183
- 2.3.19
183
+ 2.3.20
@@ -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
@@ -1,13 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative '../value_equality'
3
4
  require_relative 'resource_change'
4
5
  require_relative 'output_change'
5
6
 
6
7
  module RubyTerraform
7
8
  module Models
8
9
  class Plan
10
+ include ValueEquality
11
+
9
12
  def initialize(content)
10
- @content = content
13
+ @content = symbolise_keys(content)
11
14
  end
12
15
 
13
16
  def format_version
@@ -61,6 +64,20 @@ module RubyTerraform
61
64
  def to_h
62
65
  @content
63
66
  end
67
+
68
+ def state
69
+ [@content]
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
64
81
  end
65
82
  end
66
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
@@ -76,6 +76,14 @@ module RubyTerraform
76
76
  change.delete?
77
77
  end
78
78
 
79
+ def present_before?
80
+ no_op? || read? || update? || replace? || delete?
81
+ end
82
+
83
+ def present_after?
84
+ no_op? || read? || create? || update? || replace?
85
+ end
86
+
79
87
  def inspect
80
88
  @content.inspect
81
89
  end
@@ -87,6 +95,16 @@ module RubyTerraform
87
95
  def state
88
96
  [@content]
89
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
90
108
  end
91
109
  end
92
110
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyTerraform
4
- VERSION = '1.7.0.pre.12'
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.12
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-04 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