beaker-vagrant 1.0.0 → 1.2.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 +21 -0
- data/Rakefile +1 -8
- data/beaker-vagrant.gemspec +2 -5
- 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 +16 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad3e004b7c1a2dd497d2e1e6a2ad657888f9197349385c458d359c034cca393f
|
4
|
+
data.tar.gz: 90307a775cd0d87ab5c45a46906379610358009794ef5b092b9b4b428d4e4a8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bf0e47364ea0fff8c2f6b14bd5f1a0f6829b3426861fcac23c27deb23b829e5bf499d2d1152fc27629c3b62a2628bdd9d243cf6768e88c832143817abec9d87
|
7
|
+
data.tar.gz: 4d172b71383ef108ecd3026d2f6374c765e4f4c3aca53c5f4097769575cc7a1339fed1ad7dbb64ec77b758722beb86d5f9022619ca42cd37e4500eeff2180a2f
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.2.0](https://github.com/voxpupuli/beaker-vagrant/tree/1.2.0) (2023-04-28)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-vagrant/compare/1.1.0...1.2.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Allow beaker 4 again [\#75](https://github.com/voxpupuli/beaker-vagrant/pull/75) ([ekohl](https://github.com/ekohl))
|
10
|
+
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- Switch to voxpupuli-rubocop + Rake task from voxpupuli-rubocop [\#69](https://github.com/voxpupuli/beaker-vagrant/pull/69) ([bastelfreak](https://github.com/bastelfreak))
|
14
|
+
|
15
|
+
## [1.1.0](https://github.com/voxpupuli/beaker-vagrant/tree/1.1.0) (2023-04-28)
|
16
|
+
|
17
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-vagrant/compare/1.0.0...1.1.0)
|
18
|
+
|
19
|
+
**Implemented enhancements:**
|
20
|
+
|
21
|
+
- Use Bundler to clean the environment [\#73](https://github.com/voxpupuli/beaker-vagrant/pull/73) ([ekohl](https://github.com/ekohl))
|
22
|
+
- Switch to voxpupuli-rubocop [\#72](https://github.com/voxpupuli/beaker-vagrant/pull/72) ([bastelfreak](https://github.com/bastelfreak))
|
23
|
+
|
3
24
|
## [1.0.0](https://github.com/voxpupuli/beaker-vagrant/tree/1.0.0) (2023-03-27)
|
4
25
|
|
5
26
|
[Full Changelog](https://github.com/voxpupuli/beaker-vagrant/compare/0.7.1...1.0.0)
|
data/Rakefile
CHANGED
@@ -48,16 +48,9 @@ task test: 'test:spec'
|
|
48
48
|
task default: :test
|
49
49
|
|
50
50
|
begin
|
51
|
-
require 'rubocop/
|
51
|
+
require 'voxpupuli/rubocop/rake'
|
52
52
|
rescue LoadError
|
53
53
|
# RuboCop is an optional group
|
54
|
-
else
|
55
|
-
RuboCop::RakeTask.new(:rubocop) do |task|
|
56
|
-
# These make the rubocop experience maybe slightly less terrible
|
57
|
-
task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
|
58
|
-
# Use Rubocop's Github Actions formatter if possible
|
59
|
-
task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true'
|
60
|
-
end
|
61
54
|
end
|
62
55
|
|
63
56
|
begin
|
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
|
-
s.add_runtime_dependency 'beaker', '
|
33
|
+
s.add_runtime_dependency 'beaker', '>= 4', '< 6'
|
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.2.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,21 +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
|
79
|
+
name: simplecov
|
94
80
|
requirement: !ruby/object:Gem::Requirement
|
95
81
|
requirements:
|
96
82
|
- - ">="
|
@@ -104,61 +90,39 @@ dependencies:
|
|
104
90
|
- !ruby/object:Gem::Version
|
105
91
|
version: '0'
|
106
92
|
- !ruby/object:Gem::Dependency
|
107
|
-
name: rubocop
|
93
|
+
name: voxpupuli-rubocop
|
108
94
|
requirement: !ruby/object:Gem::Requirement
|
109
95
|
requirements:
|
110
|
-
- - "
|
96
|
+
- - "~>"
|
111
97
|
- !ruby/object:Gem::Version
|
112
|
-
version: '
|
98
|
+
version: '1.1'
|
113
99
|
type: :development
|
114
100
|
prerelease: false
|
115
101
|
version_requirements: !ruby/object:Gem::Requirement
|
116
102
|
requirements:
|
117
|
-
- - "
|
103
|
+
- - "~>"
|
118
104
|
- !ruby/object:Gem::Version
|
119
|
-
version: '
|
105
|
+
version: '1.1'
|
120
106
|
- !ruby/object:Gem::Dependency
|
121
|
-
name:
|
107
|
+
name: beaker
|
122
108
|
requirement: !ruby/object:Gem::Requirement
|
123
109
|
requirements:
|
124
110
|
- - ">="
|
125
111
|
- !ruby/object:Gem::Version
|
126
|
-
version: '
|
127
|
-
|
128
|
-
prerelease: false
|
129
|
-
version_requirements: !ruby/object:Gem::Requirement
|
130
|
-
requirements:
|
131
|
-
- - ">="
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version: '0'
|
134
|
-
- !ruby/object:Gem::Dependency
|
135
|
-
name: simplecov
|
136
|
-
requirement: !ruby/object:Gem::Requirement
|
137
|
-
requirements:
|
138
|
-
- - ">="
|
112
|
+
version: '4'
|
113
|
+
- - "<"
|
139
114
|
- !ruby/object:Gem::Version
|
140
|
-
version: '
|
141
|
-
type: :
|
115
|
+
version: '6'
|
116
|
+
type: :runtime
|
142
117
|
prerelease: false
|
143
118
|
version_requirements: !ruby/object:Gem::Requirement
|
144
119
|
requirements:
|
145
120
|
- - ">="
|
146
121
|
- !ruby/object:Gem::Version
|
147
|
-
version: '
|
148
|
-
-
|
149
|
-
name: beaker
|
150
|
-
requirement: !ruby/object:Gem::Requirement
|
151
|
-
requirements:
|
152
|
-
- - "~>"
|
153
|
-
- !ruby/object:Gem::Version
|
154
|
-
version: '5'
|
155
|
-
type: :runtime
|
156
|
-
prerelease: false
|
157
|
-
version_requirements: !ruby/object:Gem::Requirement
|
158
|
-
requirements:
|
159
|
-
- - "~>"
|
122
|
+
version: '4'
|
123
|
+
- - "<"
|
160
124
|
- !ruby/object:Gem::Version
|
161
|
-
version: '
|
125
|
+
version: '6'
|
162
126
|
description: For use for the Beaker acceptance testing tool
|
163
127
|
email: voxpupuli@groups.io
|
164
128
|
executables:
|