rspec-terraform 0.1.0.pre.41 → 0.1.0.pre.42

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: 6abf52967c937d8a7761aab1289a1a244ed440bd735311360d3888c3746d8e39
4
- data.tar.gz: ef8e4d1ed48f86632623785b6fafa69bef6bc38c63d902c3897ea8083c31bc7a
3
+ metadata.gz: cbb48dde98e84c35ba49c8416a4363ee64388ad4912e0758392d5f8a9228ef21
4
+ data.tar.gz: 4eb898798fb7090a3211bada0de62d0087becf44b51ff8cb8736eb9171d55c6c
5
5
  SHA512:
6
- metadata.gz: 2034dd4ce31339bd6e6e834adfba4d0fc7ca894e532e2e0ef1e4e06efd24c3596d5daf2317933c5d4ee50c0da88ee3188840ed141a9a20492f9ba5d66c97ac1f
7
- data.tar.gz: d41ffaa70e27cedc9f6dcaceb2aeec825be58c9bb41cc8344e9780d7cc1f9db77b8f44dba89da6cb159beabcfa6febac2c0ea93d76bd831f33a163b380bd39eb
6
+ metadata.gz: 57f20880cfd73436cede9c132204ec6dc5c6f329850eba87c56be738554f2c1c6b5f925307d9284b2ab3b2aec19349b244519b1f0cb18d01d3914f097fc4d103
7
+ data.tar.gz: d4dc0cb70c7977d85a3bdbf98aa47dcd078e9babeb75b77b91f89677d1f4bdc3c3ecae9a11408db387fc580e607ce60d270a5285ec6ba6dba4ec427747489b8a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-terraform (0.1.0.pre.41)
4
+ rspec-terraform (0.1.0.pre.42)
5
5
  confidante (>= 0.27)
6
6
  rspec (>= 3.0)
7
7
  ruby-terraform (= 1.7.0.pre.16)
@@ -7,15 +7,26 @@ require_relative '../configuration/var_captor'
7
7
  module RSpec
8
8
  module Terraform
9
9
  module Helpers
10
+ # rubocop:disable Metrics/ClassLength
10
11
  class Apply
11
12
  attr_reader(
12
- :configuration_provider, :binary, :execution_mode
13
+ :configuration_provider,
14
+ :binary,
15
+ :logger,
16
+ :stdin,
17
+ :stdout,
18
+ :stderr,
19
+ :execution_mode
13
20
  )
14
21
 
15
22
  def initialize(opts = {})
16
23
  @configuration_provider =
17
24
  opts[:configuration_provider] || Configuration.identity_provider
18
25
  @binary = opts[:binary] || 'terraform'
26
+ @logger = opts[:logger]
27
+ @stdin = opts[:stdin]
28
+ @stdout = opts[:stdout]
29
+ @stderr = opts[:stderr]
19
30
  @execution_mode = opts[:execution_mode] || :in_place
20
31
  end
21
32
 
@@ -97,11 +108,11 @@ module RSpec
97
108
  end
98
109
 
99
110
  def init_command
100
- RubyTerraform::Commands::Init.new(binary: binary)
111
+ RubyTerraform::Commands::Init.new(command_options)
101
112
  end
102
113
 
103
114
  def apply_command
104
- RubyTerraform::Commands::Apply.new(binary: binary)
115
+ RubyTerraform::Commands::Apply.new(command_options)
105
116
  end
106
117
 
107
118
  def init_parameters(parameters)
@@ -134,7 +145,18 @@ module RSpec
134
145
  apply_parameters
135
146
  end
136
147
  # rubocop:enable Metrics/MethodLength
148
+
149
+ def command_options
150
+ {
151
+ binary: binary,
152
+ logger: logger,
153
+ stdin: stdin,
154
+ stdout: stdout,
155
+ stderr: stderr
156
+ }
157
+ end
137
158
  end
159
+ # rubocop:enable Metrics/ClassLength
138
160
  end
139
161
  end
140
162
  end
@@ -7,15 +7,26 @@ require_relative '../configuration/var_captor'
7
7
  module RSpec
8
8
  module Terraform
9
9
  module Helpers
10
+ # rubocop:disable Metrics/ClassLength
10
11
  class Destroy
11
12
  attr_reader(
12
- :configuration_provider, :binary, :execution_mode
13
+ :configuration_provider,
14
+ :binary,
15
+ :logger,
16
+ :stdin,
17
+ :stdout,
18
+ :stderr,
19
+ :execution_mode
13
20
  )
14
21
 
15
22
  def initialize(opts = {})
16
23
  @configuration_provider =
17
24
  opts[:configuration_provider] || Configuration.identity_provider
18
25
  @binary = opts[:binary] || 'terraform'
26
+ @logger = opts[:logger]
27
+ @stdin = opts[:stdin]
28
+ @stdout = opts[:stdout]
29
+ @stderr = opts[:stderr]
19
30
  @execution_mode = opts[:execution_mode] || :in_place
20
31
  end
21
32
 
@@ -89,19 +100,18 @@ module RSpec
89
100
  end
90
101
 
91
102
  def init_command
92
- RubyTerraform::Commands::Init.new(binary: binary)
103
+ RubyTerraform::Commands::Init.new(command_options)
93
104
  end
94
105
 
95
106
  def destroy_command
96
- RubyTerraform::Commands::Destroy.new(binary: binary)
107
+ RubyTerraform::Commands::Destroy.new(command_options)
97
108
  end
98
109
 
99
110
  def init_parameters(parameters)
100
- init_parameters =
101
- parameters.merge(
102
- chdir: parameters[:configuration_directory],
103
- input: false
104
- )
111
+ init_parameters = parameters.merge(
112
+ chdir: parameters[:configuration_directory],
113
+ input: false
114
+ )
105
115
  if execution_mode == :isolated
106
116
  init_parameters =
107
117
  init_parameters.merge(from_module: parameters[:source_directory])
@@ -127,7 +137,18 @@ module RSpec
127
137
  destroy_parameters
128
138
  end
129
139
  # rubocop:enable Metrics/MethodLength
140
+
141
+ def command_options
142
+ {
143
+ binary: binary,
144
+ logger: logger,
145
+ stdin: stdin,
146
+ stdout: stdout,
147
+ stderr: stderr
148
+ }
149
+ end
130
150
  end
151
+ # rubocop:enable Metrics/ClassLength
131
152
  end
132
153
  end
133
154
  end
@@ -5,15 +5,26 @@ require 'ruby_terraform'
5
5
  module RSpec
6
6
  module Terraform
7
7
  module Helpers
8
+ # rubocop:disable Metrics/ClassLength
8
9
  class Output
9
10
  attr_reader(
10
- :configuration_provider, :binary, :execution_mode
11
+ :configuration_provider,
12
+ :binary,
13
+ :logger,
14
+ :stdin,
15
+ :stdout,
16
+ :stderr,
17
+ :execution_mode
11
18
  )
12
19
 
13
20
  def initialize(opts = {})
14
21
  @configuration_provider =
15
22
  opts[:configuration_provider] || Configuration.identity_provider
16
23
  @binary = opts[:binary] || 'terraform'
24
+ @logger = opts[:logger]
25
+ @stdin = opts[:stdin]
26
+ @stdout = opts[:stdout]
27
+ @stderr = opts[:stderr]
17
28
  @execution_mode = opts[:execution_mode] || :in_place
18
29
  end
19
30
 
@@ -90,11 +101,11 @@ module RSpec
90
101
  end
91
102
 
92
103
  def init_command
93
- RubyTerraform::Commands::Init.new(binary: binary)
104
+ RubyTerraform::Commands::Init.new(command_options)
94
105
  end
95
106
 
96
107
  def output_command(opts = {})
97
- RubyTerraform::Commands::Output.new(opts.merge(binary: binary))
108
+ RubyTerraform::Commands::Output.new(command_options.merge(opts))
98
109
  end
99
110
 
100
111
  def init_parameters(parameters)
@@ -123,7 +134,18 @@ module RSpec
123
134
 
124
135
  output_parameters
125
136
  end
137
+
138
+ def command_options
139
+ {
140
+ binary: binary,
141
+ logger: logger,
142
+ stdin: stdin,
143
+ stdout: stdout,
144
+ stderr: stderr
145
+ }
146
+ end
126
147
  end
127
148
  end
149
+ # rubocop:enable Metrics/ClassLength
128
150
  end
129
151
  end
@@ -12,13 +12,23 @@ module RSpec
12
12
  # rubocop:disable Metrics/ClassLength
13
13
  class Plan
14
14
  attr_reader(
15
- :configuration_provider, :binary, :execution_mode
15
+ :configuration_provider,
16
+ :binary,
17
+ :logger,
18
+ :stdin,
19
+ :stdout,
20
+ :stderr,
21
+ :execution_mode
16
22
  )
17
23
 
18
24
  def initialize(opts = {})
19
25
  @configuration_provider =
20
26
  opts[:configuration_provider] || Configuration.identity_provider
21
27
  @binary = opts[:binary] || 'terraform'
28
+ @logger = opts[:logger]
29
+ @stdin = opts[:stdin]
30
+ @stdout = opts[:stdout]
31
+ @stderr = opts[:stderr]
22
32
  @execution_mode = opts[:execution_mode] || :in_place
23
33
  end
24
34
 
@@ -116,15 +126,15 @@ module RSpec
116
126
  end
117
127
 
118
128
  def init_command
119
- RubyTerraform::Commands::Init.new(binary: binary)
129
+ RubyTerraform::Commands::Init.new(command_options)
120
130
  end
121
131
 
122
132
  def plan_command
123
- RubyTerraform::Commands::Plan.new(binary: binary)
133
+ RubyTerraform::Commands::Plan.new(command_options)
124
134
  end
125
135
 
126
136
  def show_command(opts = {})
127
- RubyTerraform::Commands::Show.new(opts.merge(binary: binary))
137
+ RubyTerraform::Commands::Show.new(command_options.merge(opts))
128
138
  end
129
139
 
130
140
  def init_parameters(parameters)
@@ -167,6 +177,16 @@ module RSpec
167
177
  json: true
168
178
  )
169
179
  end
180
+
181
+ def command_options
182
+ {
183
+ binary: binary,
184
+ logger: logger,
185
+ stdin: stdin,
186
+ stdout: stdout,
187
+ stderr: stderr
188
+ }
189
+ end
170
190
  end
171
191
  # rubocop:enable Metrics/ClassLength
172
192
  end
@@ -46,6 +46,10 @@ module RSpec
46
46
 
47
47
  {
48
48
  binary: config.terraform_binary,
49
+ logger: config.terraform_logger,
50
+ stdin: config.terraform_stdin,
51
+ stdout: config.terraform_stdout,
52
+ stderr: config.terraform_stderr,
49
53
  execution_mode: config.terraform_execution_mode,
50
54
  configuration_provider: config.terraform_configuration_provider
51
55
  }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module Terraform
5
- VERSION = '0.1.0.pre.41'
5
+ VERSION = '0.1.0.pre.42'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-terraform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.41
4
+ version: 0.1.0.pre.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfraBlocks Maintainers