rspec-terraform 0.1.0.pre.35 → 0.1.0.pre.38

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: a226d5e44bff499db64ed0323d44b3f754cac7c8818d4d15e269ed304d5719bf
4
- data.tar.gz: c2094b23729ee6021e0f464160f2fa4c664ec23dbd05b0d8726ce433601f31da
3
+ metadata.gz: e3e05eb03fa7646e942de57b9dace527769ff3f82d29a8558e296c633e4781f5
4
+ data.tar.gz: a48852eace306d90abed4dceae0b3ae6967fde6206c884817690f78161a11f70
5
5
  SHA512:
6
- metadata.gz: 3d7d81c7fd0f3013a86859604f00bd63281b41b0e7c2dea112a8bf8273440d331b415f7deaeaa8c6a73fb2d5316408aae6b06532ef21ca238ef55f6fcb0edabf
7
- data.tar.gz: 126edceadcb3baa031b85c1875d3ab44a3363be3d8fa6d86d41b28313f645885ec06f78dee889765c85503cef29d7350f3bc3a169207ed06d1093e3241df8149
6
+ metadata.gz: 3e9bfbef08d1a36d6484543bc98e63ca2a1dbea26787c4460798aa0bd03a0155d5d68e077b357467d56c2e9f15ee7913df44c879f397375afa4eb6df1e9fb836
7
+ data.tar.gz: 9e1d4703dcd59209d1141da61361a5503021416a11c29d772777d97b8bca316ef73282cefb1db1b8a4f8e990c69b0fb39602946f79d5df51dd134d6650ffed68
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-terraform (0.1.0.pre.35)
4
+ rspec-terraform (0.1.0.pre.38)
5
5
  confidante (>= 0.27)
6
6
  rspec (>= 3.0)
7
- ruby-terraform (= 1.7.0.pre.15)
7
+ ruby-terraform (= 1.7.0.pre.16)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -113,7 +113,7 @@ GEM
113
113
  colored2 (~> 3.1)
114
114
  rake_factory (~> 0.23)
115
115
  sshkey (~> 2.0)
116
- rb-fsevent (0.11.1)
116
+ rb-fsevent (0.11.2)
117
117
  rb-inotify (0.10.1)
118
118
  ffi (~> 1.0)
119
119
  regexp_parser (2.5.0)
@@ -148,7 +148,7 @@ GEM
148
148
  rubocop-rspec (2.12.1)
149
149
  rubocop (~> 1.31)
150
150
  ruby-progressbar (1.11.0)
151
- ruby-terraform (1.7.0.pre.15)
151
+ ruby-terraform (1.7.0.pre.16)
152
152
  immutable-struct (~> 2.4)
153
153
  lino (~> 3.0)
154
154
  ruby2_keywords (0.0.5)
@@ -32,10 +32,8 @@ module RSpec
32
32
  init(parameters)
33
33
  plan_file = plan(parameters)
34
34
  plan_contents = show(parameters, plan_file)
35
-
36
- RubyTerraform::Models::Plan.new(
37
- JSON.parse(plan_contents, symbolize_names: true)
38
- )
35
+ remove(parameters, plan_file)
36
+ parse(plan_contents)
39
37
  end
40
38
 
41
39
  private
@@ -105,6 +103,18 @@ module RSpec
105
103
  stdout.string
106
104
  end
107
105
 
106
+ def parse(plan_contents)
107
+ RubyTerraform::Models::Plan.new(
108
+ JSON.parse(plan_contents, symbolize_names: true)
109
+ )
110
+ end
111
+
112
+ def remove(parameters, plan_file)
113
+ FileUtils.rm_f(
114
+ File.join(parameters[:configuration_directory], plan_file)
115
+ )
116
+ end
117
+
108
118
  def init_command
109
119
  RubyTerraform::Commands::Init.new(binary: binary)
110
120
  end
@@ -135,7 +145,8 @@ module RSpec
135
145
  plan_parameters =
136
146
  parameters.merge(
137
147
  chdir: parameters[:configuration_directory],
138
- out: parameters[:plan_file_name] || SecureRandom.hex(10),
148
+ out: parameters[:plan_file_name] ||
149
+ "#{SecureRandom.hex[0, 10]}.tfplan",
139
150
  input: false
140
151
  )
141
152
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module Terraform
5
- VERSION = '0.1.0.pre.35'
5
+ VERSION = '0.1.0.pre.38'
6
6
  end
7
7
  end
@@ -20,7 +20,7 @@ require_relative 'terraform/helpers'
20
20
 
21
21
  RSpec.configure do |config|
22
22
  config.include(RSpec::Terraform::Matchers)
23
- config.include(RSpec::Terraform::Helpers)
23
+ config.prepend(RSpec::Terraform::Helpers)
24
24
 
25
25
  config.add_setting(:terraform_binary, default: 'terraform')
26
26
  config.add_setting(:terraform_execution_mode, default: :in_place)
@@ -29,3 +29,6 @@ RSpec.configure do |config|
29
29
  default: RSpec::Terraform::Configuration.identity_provider
30
30
  )
31
31
  end
32
+
33
+ RSpec::Core::AnonymousExampleGroup
34
+ .include(RSpec::Terraform::Helpers)
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
39
39
 
40
40
  spec.add_dependency 'confidante', '>= 0.27'
41
41
  spec.add_dependency 'rspec', '>= 3.0'
42
- spec.add_dependency 'ruby-terraform', '1.7.0.pre.15'
42
+ spec.add_dependency 'ruby-terraform', '1.7.0.pre.16'
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: rspec-terraform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.35
4
+ version: 0.1.0.pre.38
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-29 00:00:00.000000000 Z
11
+ date: 2022-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: confidante
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 1.7.0.pre.15
47
+ version: 1.7.0.pre.16
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 1.7.0.pre.15
54
+ version: 1.7.0.pre.16
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement