ruby-terraform 1.8.0.pre.6 → 1.8.0.pre.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: 0b7d12b03b26947413167256d9b3ab7166c194a2a4369fb0d8c4f8b7504d835a
4
- data.tar.gz: 0ed4bb16cd32f63fe5fc899c6f9d14ca104c424e5308bec96ea9a924fcdd1859
3
+ metadata.gz: 36fc9d207f09fd5b4f339dc3457ba9c6fe8e6a62fa378402737e50818011356d
4
+ data.tar.gz: e02c7b49ad9c7dc67340b783ccfe0ed2c7069a04f992d62d432d3a78386a42c8
5
5
  SHA512:
6
- metadata.gz: 3048440e030494e01d28fddc4c863d2eab57db6d4c7b08910d55dfb1482a4c3cc6a4f74f388cc42de1d6742950ae8365f6015a9149052fdd8d3abd64aaacee1c
7
- data.tar.gz: f7003bd71eb21f4e29f99988879cf8a0c6cd1740a066c35a647b346b12c9b9890eecf90a99b73e8016aba0dfa9f5bb6c9aa4f0ee9ff0a0ccd4795cfe60898420
6
+ metadata.gz: 909dc06efb67d6d83ca2f1e4b26445d80beb3b8af6f8ec52ac9abb5391344ab21e2248237b97bfaa6e45ef23f850a0a670d6f11e773dbffcbf06047a7a0df8cf
7
+ data.tar.gz: b832fd4404b1f34e4377569c740d7a451040064160f4d440599f087aee8316f0a4cc4a416a1c70540bcade21cae362161bc8f4ad7fc8446280d21f6916ae7f19
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-terraform (1.8.0.pre.6)
4
+ ruby-terraform (1.8.0.pre.7)
5
5
  immutable-struct (~> 2.4)
6
- lino (~> 3.0)
6
+ lino (= 3.2.0.pre.7)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.1.1)
11
+ activesupport (7.1.3.4)
12
12
  base64
13
13
  bigdecimal
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -18,31 +18,31 @@ GEM
18
18
  minitest (>= 5.1)
19
19
  mutex_m
20
20
  tzinfo (~> 2.0)
21
- addressable (2.8.5)
22
- public_suffix (>= 2.0.2, < 6.0)
21
+ addressable (2.8.7)
22
+ public_suffix (>= 2.0.2, < 7.0)
23
23
  ast (2.4.2)
24
- base64 (0.1.1)
25
- bigdecimal (3.1.4)
24
+ base64 (0.2.0)
25
+ bigdecimal (3.1.8)
26
+ childprocess (5.0.0)
26
27
  coderay (1.1.3)
27
28
  colored2 (3.1.2)
28
- concurrent-ruby (1.2.2)
29
+ concurrent-ruby (1.3.3)
29
30
  connection_pool (2.4.1)
30
- diff-lcs (1.5.0)
31
+ diff-lcs (1.5.1)
31
32
  docile (1.4.0)
32
- drb (2.1.1)
33
- ruby2_keywords
34
- excon (0.104.0)
35
- faker (3.2.2)
33
+ drb (2.2.1)
34
+ excon (0.110.0)
35
+ faker (3.4.1)
36
36
  i18n (>= 1.8.11, < 2)
37
- faraday (2.7.11)
38
- base64
39
- faraday-net_http (>= 2.0, < 3.1)
40
- ruby2_keywords (>= 0.0.4)
41
- faraday-net_http (3.0.2)
42
- ffi (1.16.3)
37
+ faraday (2.10.0)
38
+ faraday-net_http (>= 2.0, < 3.2)
39
+ logger
40
+ faraday-net_http (3.1.0)
41
+ net-http
42
+ ffi (1.17.0)
43
43
  formatador (1.1.0)
44
44
  gem-release (2.2.2)
45
- git (1.18.0)
45
+ git (1.19.1)
46
46
  addressable (~> 2.8)
47
47
  rchardet (~> 1.8)
48
48
  guard (2.18.1)
@@ -61,40 +61,45 @@ GEM
61
61
  rspec (>= 2.99.0, < 4.0)
62
62
  hamster (3.0.0)
63
63
  concurrent-ruby (~> 1.0)
64
- i18n (1.14.1)
64
+ i18n (1.14.5)
65
65
  concurrent-ruby (~> 1.0)
66
66
  immutable-struct (2.4.1)
67
- json (2.6.3)
67
+ json (2.7.2)
68
68
  language_server-protocol (3.17.0.3)
69
- lino (3.1.0)
69
+ lino (3.2.0.pre.7)
70
+ childprocess (~> 5.0.0)
70
71
  hamster (~> 3.0)
71
72
  open4 (~> 1.3)
72
- listen (3.8.0)
73
+ listen (3.9.0)
73
74
  rb-fsevent (~> 0.10, >= 0.10.3)
74
75
  rb-inotify (~> 0.9, >= 0.9.10)
75
- lumberjack (1.2.9)
76
- method_source (1.0.0)
77
- minitest (5.20.0)
78
- mutex_m (0.1.2)
76
+ logger (1.6.0)
77
+ lumberjack (1.2.10)
78
+ method_source (1.1.0)
79
+ minitest (5.24.1)
80
+ mutex_m (0.2.0)
79
81
  nenv (0.3.0)
82
+ net-http (0.4.1)
83
+ uri
80
84
  notiffany (0.1.3)
81
85
  nenv (~> 0.1)
82
86
  shellany (~> 0.0)
83
- octokit (8.0.0)
87
+ octokit (8.1.0)
88
+ base64
84
89
  faraday (>= 1, < 3)
85
90
  sawyer (~> 0.9)
86
91
  open4 (1.3.4)
87
- parallel (1.23.0)
88
- parser (3.2.2.4)
92
+ parallel (1.25.1)
93
+ parser (3.3.3.0)
89
94
  ast (~> 2.4.1)
90
95
  racc
91
96
  pry (0.14.2)
92
97
  coderay (~> 1.1)
93
98
  method_source (~> 1.0)
94
- public_suffix (5.0.3)
95
- racc (1.7.3)
99
+ public_suffix (6.0.0)
100
+ racc (1.8.0)
96
101
  rainbow (3.1.1)
97
- rake (13.1.0)
102
+ rake (13.2.1)
98
103
  rake_circle_ci (0.11.0)
99
104
  colored2 (~> 3.1)
100
105
  excon (~> 0.72)
@@ -125,49 +130,43 @@ GEM
125
130
  rake_factory (~> 0.23)
126
131
  sshkey (~> 2.0)
127
132
  rb-fsevent (0.11.2)
128
- rb-inotify (0.10.1)
133
+ rb-inotify (0.11.1)
129
134
  ffi (~> 1.0)
130
135
  rchardet (1.8.0)
131
- regexp_parser (2.8.2)
132
- rexml (3.2.6)
133
- rspec (3.12.0)
134
- rspec-core (~> 3.12.0)
135
- rspec-expectations (~> 3.12.0)
136
- rspec-mocks (~> 3.12.0)
137
- rspec-core (3.12.2)
138
- rspec-support (~> 3.12.0)
139
- rspec-expectations (3.12.3)
136
+ regexp_parser (2.9.2)
137
+ rexml (3.3.1)
138
+ strscan
139
+ rspec (3.13.0)
140
+ rspec-core (~> 3.13.0)
141
+ rspec-expectations (~> 3.13.0)
142
+ rspec-mocks (~> 3.13.0)
143
+ rspec-core (3.13.0)
144
+ rspec-support (~> 3.13.0)
145
+ rspec-expectations (3.13.1)
140
146
  diff-lcs (>= 1.2.0, < 2.0)
141
- rspec-support (~> 3.12.0)
142
- rspec-mocks (3.12.6)
147
+ rspec-support (~> 3.13.0)
148
+ rspec-mocks (3.13.1)
143
149
  diff-lcs (>= 1.2.0, < 2.0)
144
- rspec-support (~> 3.12.0)
145
- rspec-support (3.12.1)
146
- rubocop (1.57.2)
150
+ rspec-support (~> 3.13.0)
151
+ rspec-support (3.13.1)
152
+ rubocop (1.64.1)
147
153
  json (~> 2.3)
148
154
  language_server-protocol (>= 3.17.0)
149
155
  parallel (~> 1.10)
150
- parser (>= 3.2.2.4)
156
+ parser (>= 3.3.0.2)
151
157
  rainbow (>= 2.2.2, < 4.0)
152
158
  regexp_parser (>= 1.8, < 3.0)
153
159
  rexml (>= 3.2.5, < 4.0)
154
- rubocop-ast (>= 1.28.1, < 2.0)
160
+ rubocop-ast (>= 1.31.1, < 2.0)
155
161
  ruby-progressbar (~> 1.7)
156
162
  unicode-display_width (>= 2.4.0, < 3.0)
157
- rubocop-ast (1.30.0)
158
- parser (>= 3.2.1.0)
159
- rubocop-capybara (2.19.0)
160
- rubocop (~> 1.41)
161
- rubocop-factory_bot (2.24.0)
162
- rubocop (~> 1.33)
163
+ rubocop-ast (1.31.3)
164
+ parser (>= 3.3.1.0)
163
165
  rubocop-rake (0.6.0)
164
166
  rubocop (~> 1.0)
165
- rubocop-rspec (2.25.0)
166
- rubocop (~> 1.40)
167
- rubocop-capybara (~> 2.17)
168
- rubocop-factory_bot (~> 2.22)
167
+ rubocop-rspec (3.0.2)
168
+ rubocop (~> 1.61)
169
169
  ruby-progressbar (1.13.0)
170
- ruby2_keywords (0.0.5)
171
170
  ruby_git_crypt (0.1.0.pre.4)
172
171
  immutable-struct (~> 2.4)
173
172
  lino (~> 3.0)
@@ -184,11 +183,13 @@ GEM
184
183
  simplecov-html (0.12.3)
185
184
  simplecov_json_formatter (0.1.4)
186
185
  sshkey (2.0.0)
187
- thor (1.3.0)
186
+ strscan (3.1.0)
187
+ thor (1.3.1)
188
188
  tzinfo (2.0.6)
189
189
  concurrent-ruby (~> 1.0)
190
190
  unicode-display_width (2.5.0)
191
- yard (0.9.34)
191
+ uri (0.13.0)
192
+ yard (0.9.36)
192
193
 
193
194
  PLATFORMS
194
195
  arm64-darwin-21
@@ -35,7 +35,7 @@ module RubyTerraform
35
35
  do_before(parameters)
36
36
  build_and_execute_command(parameters, invocation_options)
37
37
  do_after(parameters)
38
- rescue Open4::SpawnError
38
+ rescue Lino::Errors::ExecutionError
39
39
  message = "Failed while running '#{command_name}'."
40
40
  logger.error(message)
41
41
  raise Errors::ExecutionError, message
@@ -50,9 +50,9 @@ module RubyTerraform
50
50
 
51
51
  logger.debug("Running '#{command}'.")
52
52
  command.execute(
53
- stdin: stdin,
54
- stdout: stdout,
55
- stderr: stderr
53
+ stdin:,
54
+ stdout:,
55
+ stderr:
56
56
  )
57
57
  end
58
58
 
@@ -68,16 +68,16 @@ module RubyTerraform
68
68
 
69
69
  def build_command(parameters, invocation_options)
70
70
  parameters = resolve_parameters(parameters)
71
- environment = invocation_options[:environment] || {}
72
71
 
73
72
  Lino::CommandLineBuilder
74
73
  .for_command(@binary)
75
- .with_environment_variables(environment)
74
+ .with_environment_variables(invocation_options[:environment] || {})
76
75
  .with_options_after_subcommands
77
76
  .with_option_separator('=')
78
77
  .with_appliables(@options.resolve(options, parameters))
79
78
  .with_subcommands(subcommands)
80
- .with_arguments(arguments(parameters).compact.flatten).build
79
+ .with_arguments(arguments(parameters).compact.flatten)
80
+ .build
81
81
  end
82
82
 
83
83
  def resolve_parameters(parameters)
@@ -54,7 +54,7 @@ module RubyTerraform
54
54
  def render(level: 0, indent: ' ')
55
55
  return '[]' if empty?
56
56
 
57
- opts = { level: level + 1, indent: indent }
57
+ opts = { level: level + 1, indent: }
58
58
  extra = level.times.collect { |_| indent }.join
59
59
  lines =
60
60
  value
@@ -52,7 +52,7 @@ module RubyTerraform
52
52
 
53
53
  next_level = bare ? level : level + 1
54
54
  self_indent = bare ? '' : indent
55
- opts = { level: next_level, indent: indent }
55
+ opts = { level: next_level, indent: }
56
56
  extra = level.times.collect { |_| indent }.join
57
57
  lines =
58
58
  value
@@ -17,17 +17,17 @@ module RubyTerraform
17
17
  unknown = symbolised_or_native_empty(unknown, object)
18
18
  sensitive = symbolised_or_native_empty(sensitive, object)
19
19
 
20
- return Values.unknown(sensitive: sensitive) if unknown == true
20
+ return Values.unknown(sensitive:) if unknown == true
21
21
 
22
22
  unless object.is_a?(Hash) || object.is_a?(Array)
23
- return Values.known(object, sensitive: sensitive)
23
+ return Values.known(object, sensitive:)
24
24
  end
25
25
 
26
26
  boxed_unknown =
27
- box_unknown(unknown, sensitive: sensitive, initial: initial)
27
+ box_unknown(unknown, sensitive:, initial:)
28
28
 
29
29
  boxed_object =
30
- box_known(object, sensitive: sensitive, initial: boxed_unknown)
30
+ box_known(object, sensitive:, initial: boxed_unknown)
31
31
 
32
32
  boxed_object
33
33
  end
@@ -74,34 +74,34 @@ module RubyTerraform
74
74
  def box_unknown(unknown, sensitive: {}, initial: Values.empty_map)
75
75
  path_set = paths(unknown)
76
76
  unknown_values = unknown_values(
77
- path_set, unknown: unknown, sensitive: sensitive
77
+ path_set, unknown:, sensitive:
78
78
  )
79
79
  object(
80
- path_set, unknown_values, sensitive: sensitive, initial: initial
80
+ path_set, unknown_values, sensitive:, initial:
81
81
  )
82
82
  end
83
83
 
84
84
  def box_known(object, sensitive: {}, initial: Values.empty_map)
85
85
  path_set = paths(object)
86
86
  object_values = known_values(
87
- path_set, object: object, sensitive: sensitive
87
+ path_set, object:, sensitive:
88
88
  )
89
89
  object(
90
- path_set, object_values, sensitive: sensitive, initial: initial
90
+ path_set, object_values, sensitive:, initial:
91
91
  )
92
92
  end
93
93
 
94
94
  def update_all(object, path_values, sensitive = {})
95
95
  path_values.each_with_object(object) do |path_value, obj|
96
96
  path, value = path_value
97
- update_in(obj, path, value, sensitive: sensitive)
97
+ update_in(obj, path, value, sensitive:)
98
98
  end
99
99
  end
100
100
 
101
101
  def update_in(object, path, value, sensitive: {})
102
102
  path.traverse(object) do |obj, step|
103
103
  update_object_for_step(
104
- obj, step, value, sensitive: sensitive
104
+ obj, step, value, sensitive:
105
105
  )
106
106
  end
107
107
  end
@@ -128,16 +128,16 @@ module RubyTerraform
128
128
 
129
129
  def boxed_empty_by_key(key, sensitive: false)
130
130
  if key.is_a?(Numeric)
131
- Values.empty_list(sensitive: sensitive)
131
+ Values.empty_list(sensitive:)
132
132
  else
133
- Values.empty_map(sensitive: sensitive)
133
+ Values.empty_map(sensitive:)
134
134
  end
135
135
  end
136
136
 
137
137
  def boxed_empty_by_value(value, sensitive: false)
138
138
  case value
139
- when Array then Values.empty_list(sensitive: sensitive)
140
- when Hash then Values.empty_map(sensitive: sensitive)
139
+ when Array then Values.empty_list(sensitive:)
140
+ when Hash then Values.empty_map(sensitive:)
141
141
  end
142
142
  end
143
143
 
@@ -122,14 +122,14 @@ module RubyTerraform
122
122
 
123
123
  def initial_traversal_context(state)
124
124
  {
125
- state: state,
125
+ state:,
126
126
  step: TraversalStep.new(self.class.empty, first, drop(1))
127
127
  }
128
128
  end
129
129
 
130
130
  def next_traversal_context(state, position, step)
131
131
  {
132
- state: state,
132
+ state:,
133
133
  step: TraversalStep.new(position.seen.append(step),
134
134
  position.remaining.first,
135
135
  position.remaining.drop(1))
@@ -22,7 +22,7 @@ module RubyTerraform
22
22
  end
23
23
 
24
24
  def variables
25
- (@content[:variables] || {})
25
+ @content[:variables] || {}
26
26
  end
27
27
 
28
28
  def variable_values
@@ -11,31 +11,31 @@ module RubyTerraform
11
11
  module Values
12
12
  class << self
13
13
  def known(value, sensitive: false)
14
- KnownValue.new(value, sensitive: sensitive)
14
+ KnownValue.new(value, sensitive:)
15
15
  end
16
16
 
17
17
  def unknown(sensitive: false)
18
- UnknownValue.new(sensitive: sensitive)
18
+ UnknownValue.new(sensitive:)
19
19
  end
20
20
 
21
21
  def omitted(sensitive: false)
22
- OmittedValue.new(sensitive: sensitive)
22
+ OmittedValue.new(sensitive:)
23
23
  end
24
24
 
25
25
  def list(value, sensitive: false)
26
- List.new(value, sensitive: sensitive)
26
+ List.new(value, sensitive:)
27
27
  end
28
28
 
29
29
  def empty_list(sensitive: false)
30
- list([], sensitive: sensitive)
30
+ list([], sensitive:)
31
31
  end
32
32
 
33
33
  def map(value, sensitive: false)
34
- Map.new(value, sensitive: sensitive)
34
+ Map.new(value, sensitive:)
35
35
  end
36
36
 
37
37
  def empty_map(sensitive: false)
38
- map({}, sensitive: sensitive)
38
+ map({}, sensitive:)
39
39
  end
40
40
  end
41
41
  end
@@ -99,7 +99,7 @@ module RubyTerraform
99
99
  end
100
100
 
101
101
  def build_option(value)
102
- option_type.new(name, value, separator: separator, placement: placement)
102
+ option_type.new(name, value, separator:, placement:)
103
103
  end
104
104
 
105
105
  def build_value(value)
@@ -20,7 +20,7 @@ module RubyTerraform
20
20
  end
21
21
 
22
22
  def as_plural_key
23
- "#{snake_case}s".to_sym
23
+ :"#{snake_case}s"
24
24
  end
25
25
 
26
26
  private
@@ -8,7 +8,7 @@ module RubyTerraform
8
8
  :value
9
9
  )
10
10
  def initialize(name, value, **_opts)
11
- super(name: name, value: value)
11
+ super(name:, value:)
12
12
  end
13
13
 
14
14
  def apply(builder)
@@ -11,7 +11,7 @@ module RubyTerraform
11
11
  )
12
12
  def initialize(name, value, **opts)
13
13
  super(
14
- name: name, value: value,
14
+ name:, value:,
15
15
  separator: opts[:separator],
16
16
  placement: opts[:placement]
17
17
  )
@@ -21,8 +21,8 @@ module RubyTerraform
21
21
  builder.with_option(
22
22
  name,
23
23
  value.render,
24
- separator: separator,
25
- placement: placement
24
+ separator:,
25
+ placement:
26
26
  )
27
27
  end
28
28
  end
@@ -7,7 +7,7 @@ module RubyTerraform
7
7
  module Values
8
8
  class Base < ImmutableStruct.new(:value)
9
9
  def initialize(value)
10
- super(value: value)
10
+ super(value:)
11
11
  end
12
12
  end
13
13
  end
@@ -7,7 +7,7 @@ module RubyTerraform
7
7
  module Values
8
8
  class KeyValue < ImmutableStruct.new(:key, :value)
9
9
  def initialize(key, value)
10
- super(key: key, value: value)
10
+ super(key:, value:)
11
11
  end
12
12
 
13
13
  def resolve
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyTerraform
4
- VERSION = '1.8.0.pre.6'
4
+ VERSION = '1.8.0.pre.7'
5
5
  end
@@ -36,10 +36,10 @@ Gem::Specification.new do |spec|
36
36
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
37
37
  spec.require_paths = ['lib']
38
38
 
39
- spec.required_ruby_version = '>= 2.7'
39
+ spec.required_ruby_version = '>= 3.1'
40
40
 
41
41
  spec.add_dependency 'immutable-struct', '~> 2.4'
42
- spec.add_dependency 'lino', '~> 3.0'
42
+ spec.add_dependency 'lino', '3.2.0.pre.7'
43
43
 
44
44
  spec.add_development_dependency 'bundler'
45
45
  spec.add_development_dependency 'faker'
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.8.0.pre.6
4
+ version: 1.8.0.pre.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfraBlocks Maintainers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-06 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: immutable-struct
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: lino
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: 3.2.0.pre.7
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: 3.2.0.pre.7
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -391,14 +391,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
391
391
  requirements:
392
392
  - - ">="
393
393
  - !ruby/object:Gem::Version
394
- version: '2.7'
394
+ version: '3.1'
395
395
  required_rubygems_version: !ruby/object:Gem::Requirement
396
396
  requirements:
397
397
  - - ">"
398
398
  - !ruby/object:Gem::Version
399
399
  version: 1.3.1
400
400
  requirements: []
401
- rubygems_version: 3.1.6
401
+ rubygems_version: 3.3.7
402
402
  signing_key:
403
403
  specification_version: 4
404
404
  summary: A simple Ruby wrapper for invoking Terraform commands.