beaker-vagrant 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/beaker-vagrant.gemspec +1 -4
- data/lib/beaker/hypervisor/vagrant.rb +17 -7
- data/lib/beaker-vagrant/version.rb +1 -1
- data/spec/beaker/hypervisor/vagrant_spec.rb +1 -2
- metadata +8 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4bfe72ab33270c079167a135018d74d635a97e411ae7c1e3ffbb9e45e4327f7
|
4
|
+
data.tar.gz: 3bb7311957731fdc2a3495f3f705c799e03a6742ed07b671b6e235f4f090ec3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aad14f82ab29d6e0ed9d3a619a5d07bc4b7c23318044a0a5fe56e60893b6fccc2f8d7d1b98b81ca7ae3cd7f2efe6fe5577fedb34fecd7b26c3b560d1e4de525
|
7
|
+
data.tar.gz: a129e63622c95c58b869bce63da00268d5eb1049b9f86215345b522dff516cd525893845477a94475962f8485da55e33a5a3ae7451dd4337d8612be7fa9eed9a
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.1.0](https://github.com/voxpupuli/beaker-vagrant/tree/1.1.0) (2023-04-28)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-vagrant/compare/1.0.0...1.1.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Use Bundler to clean the environment [\#73](https://github.com/voxpupuli/beaker-vagrant/pull/73) ([ekohl](https://github.com/ekohl))
|
10
|
+
- Switch to voxpupuli-rubocop [\#72](https://github.com/voxpupuli/beaker-vagrant/pull/72) ([bastelfreak](https://github.com/bastelfreak))
|
11
|
+
|
3
12
|
## [1.0.0](https://github.com/voxpupuli/beaker-vagrant/tree/1.0.0) (2023-03-27)
|
4
13
|
|
5
14
|
[Full Changelog](https://github.com/voxpupuli/beaker-vagrant/compare/0.7.1...1.0.0)
|
data/beaker-vagrant.gemspec
CHANGED
@@ -27,11 +27,8 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_development_dependency 'pry', '~> 0.10'
|
28
28
|
s.add_development_dependency 'rake', '~> 13.0'
|
29
29
|
s.add_development_dependency 'rspec', '~> 3.0'
|
30
|
-
s.add_development_dependency 'rubocop', '~> 1.48.1'
|
31
|
-
s.add_development_dependency 'rubocop-performance'
|
32
|
-
s.add_development_dependency 'rubocop-rake'
|
33
|
-
s.add_development_dependency 'rubocop-rspec'
|
34
30
|
s.add_development_dependency 'simplecov'
|
31
|
+
s.add_development_dependency 'voxpupuli-rubocop', '~> 1.1'
|
35
32
|
|
36
33
|
s.add_runtime_dependency 'beaker', '~> 5'
|
37
34
|
end
|
@@ -181,7 +181,7 @@ module Beaker
|
|
181
181
|
return unless Dir.exist?(@vagrant_path)
|
182
182
|
|
183
183
|
ssh_config = Dir.chdir(@vagrant_path) do
|
184
|
-
stdout, _, status = Open3.capture3(@vagrant_env, 'vagrant', 'ssh-config', host.name)
|
184
|
+
stdout, _, status = with_unbundled_env { Open3.capture3(@vagrant_env, 'vagrant', 'ssh-config', host.name) }
|
185
185
|
raise "Failed to 'vagrant ssh-config' for #{host.name}" unless status.success?
|
186
186
|
|
187
187
|
Tempfile.create do |f|
|
@@ -207,7 +207,7 @@ module Beaker
|
|
207
207
|
@vagrant_path = File.expand_path(File.join('.vagrant', 'beaker_vagrant_files',
|
208
208
|
'beaker_' + File.basename(options[:hosts_file])))
|
209
209
|
@vagrant_file = File.expand_path(File.join(@vagrant_path, 'Vagrantfile'))
|
210
|
-
@vagrant_env = {
|
210
|
+
@vagrant_env = {}
|
211
211
|
end
|
212
212
|
|
213
213
|
def configure(opts = {})
|
@@ -261,12 +261,14 @@ module Beaker
|
|
261
261
|
def vagrant_cmd(args)
|
262
262
|
Dir.chdir(@vagrant_path) do
|
263
263
|
retries ||= 0
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
264
|
+
with_unbundled_env do
|
265
|
+
Open3.popen3(@vagrant_env, "vagrant #{args}") do |stdin, stdout, stderr, wait_thr|
|
266
|
+
while line = stdout.gets
|
267
|
+
@logger.info(line)
|
268
|
+
end
|
268
269
|
|
269
|
-
|
270
|
+
raise "Failed to exec 'vagrant #{args}'. Error was #{stderr.read}" unless wait_thr.value.success?
|
271
|
+
end
|
270
272
|
end
|
271
273
|
rescue StandardError => e
|
272
274
|
if e.to_s =~ /WinRM/m
|
@@ -306,5 +308,13 @@ module Beaker
|
|
306
308
|
def set_host_default_ip(host)
|
307
309
|
host['ip'] ||= randip(host.host_hash[:hypervisor]) # use the existing ip, otherwise default to a random ip
|
308
310
|
end
|
311
|
+
|
312
|
+
def with_unbundled_env(&block)
|
313
|
+
if defined?(::Bundler)
|
314
|
+
Bundler.with_unbundled_env(&block)
|
315
|
+
else
|
316
|
+
yield
|
317
|
+
end
|
318
|
+
end
|
309
319
|
end
|
310
320
|
end
|
@@ -433,8 +433,7 @@ module Beaker
|
|
433
433
|
vagrant.instance_variable_set(:@vagrant_path, dir)
|
434
434
|
state = double('state')
|
435
435
|
allow(state).to receive(:success?).and_return(true)
|
436
|
-
allow(Open3).to receive(:capture3).with({ '
|
437
|
-
name).and_return([out, '', state])
|
436
|
+
allow(Open3).to receive(:capture3).with({}, 'vagrant', 'ssh-config', name).and_return([out, '', state])
|
438
437
|
|
439
438
|
vagrant.set_ssh_config(host, 'root')
|
440
439
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2023-
|
14
|
+
date: 2023-04-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: fakefs
|
@@ -76,49 +76,7 @@ dependencies:
|
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '3.0'
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
requirements:
|
82
|
-
- - "~>"
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: 1.48.1
|
85
|
-
type: :development
|
86
|
-
prerelease: false
|
87
|
-
version_requirements: !ruby/object:Gem::Requirement
|
88
|
-
requirements:
|
89
|
-
- - "~>"
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: 1.48.1
|
92
|
-
- !ruby/object:Gem::Dependency
|
93
|
-
name: rubocop-performance
|
94
|
-
requirement: !ruby/object:Gem::Requirement
|
95
|
-
requirements:
|
96
|
-
- - ">="
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: '0'
|
99
|
-
type: :development
|
100
|
-
prerelease: false
|
101
|
-
version_requirements: !ruby/object:Gem::Requirement
|
102
|
-
requirements:
|
103
|
-
- - ">="
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version: '0'
|
106
|
-
- !ruby/object:Gem::Dependency
|
107
|
-
name: rubocop-rake
|
108
|
-
requirement: !ruby/object:Gem::Requirement
|
109
|
-
requirements:
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: '0'
|
113
|
-
type: :development
|
114
|
-
prerelease: false
|
115
|
-
version_requirements: !ruby/object:Gem::Requirement
|
116
|
-
requirements:
|
117
|
-
- - ">="
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version: '0'
|
120
|
-
- !ruby/object:Gem::Dependency
|
121
|
-
name: rubocop-rspec
|
79
|
+
name: simplecov
|
122
80
|
requirement: !ruby/object:Gem::Requirement
|
123
81
|
requirements:
|
124
82
|
- - ">="
|
@@ -132,19 +90,19 @@ dependencies:
|
|
132
90
|
- !ruby/object:Gem::Version
|
133
91
|
version: '0'
|
134
92
|
- !ruby/object:Gem::Dependency
|
135
|
-
name:
|
93
|
+
name: voxpupuli-rubocop
|
136
94
|
requirement: !ruby/object:Gem::Requirement
|
137
95
|
requirements:
|
138
|
-
- - "
|
96
|
+
- - "~>"
|
139
97
|
- !ruby/object:Gem::Version
|
140
|
-
version: '
|
98
|
+
version: '1.1'
|
141
99
|
type: :development
|
142
100
|
prerelease: false
|
143
101
|
version_requirements: !ruby/object:Gem::Requirement
|
144
102
|
requirements:
|
145
|
-
- - "
|
103
|
+
- - "~>"
|
146
104
|
- !ruby/object:Gem::Version
|
147
|
-
version: '
|
105
|
+
version: '1.1'
|
148
106
|
- !ruby/object:Gem::Dependency
|
149
107
|
name: beaker
|
150
108
|
requirement: !ruby/object:Gem::Requirement
|