beaker-rspec 8.2.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +3 -3
- data/.github/workflows/test.yml +13 -11
- data/.rubocop_todo.yml +6 -36
- data/CHANGELOG.md +16 -0
- data/Gemfile +2 -0
- data/beaker-rspec.gemspec +8 -6
- data/lib/beaker-rspec/beaker_shim.rb +2 -0
- data/lib/beaker-rspec/helpers/serverspec.rb +3 -38
- data/lib/beaker-rspec/rake_task.rb +2 -0
- data/lib/beaker-rspec/spec_helper.rb +4 -0
- data/lib/beaker-rspec/version.rb +3 -1
- data/lib/beaker-rspec.rb +2 -0
- data/spec/acceptance/example_spec.rb +3 -1
- data/spec/spec_helper.rb +3 -1
- metadata +7 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d0a7f04c69a6173d2ce221249d63d8cc7f89921c60b150625c2a07d2d959bd8
|
4
|
+
data.tar.gz: 0634aaf5431a951b2c9a8b2114471aa8f997392edfc5b3895fa0d46a6d5a00fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1767b40fff985cc37a7c13ad032bf908d76e9a3829ddb29f01cd61c6048b7151bcfa573998434d2f40bf73ae11f8cec67fb9153546591cfb75c843b36651d089
|
7
|
+
data.tar.gz: 17732231fb3ed5fb615b74c45b83eaa7e7af4ce85bb8826612d06f5e215d22ce30e6062ec1a9c8d30cdb8f02bb31c299b95f30bb9a9ae762b570416ad9f21bfa
|
@@ -7,14 +7,14 @@ on:
|
|
7
7
|
|
8
8
|
jobs:
|
9
9
|
release:
|
10
|
-
runs-on: ubuntu-
|
10
|
+
runs-on: ubuntu-24.04
|
11
11
|
if: github.repository_owner == 'voxpupuli'
|
12
12
|
steps:
|
13
13
|
- uses: actions/checkout@v4
|
14
|
-
- name: Install Ruby 3.
|
14
|
+
- name: Install Ruby 3.4
|
15
15
|
uses: ruby/setup-ruby@v1
|
16
16
|
with:
|
17
|
-
ruby-version: '3.
|
17
|
+
ruby-version: '3.4'
|
18
18
|
bundler: 'none'
|
19
19
|
- name: Build gem
|
20
20
|
run: gem build --strict --verbose *.gemspec
|
data/.github/workflows/test.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
---
|
1
2
|
name: Test
|
2
3
|
|
3
4
|
on:
|
@@ -11,28 +12,29 @@ env:
|
|
11
12
|
BEAKER_HYPERVISOR: docker
|
12
13
|
|
13
14
|
jobs:
|
14
|
-
|
15
|
-
runs-on: ubuntu-
|
15
|
+
rubocop_and_matrix:
|
16
|
+
runs-on: ubuntu-24.04
|
17
|
+
outputs:
|
18
|
+
ruby: ${{ steps.ruby.outputs.versions }}
|
16
19
|
steps:
|
17
20
|
- uses: actions/checkout@v4
|
18
21
|
- name: Install Ruby ${{ matrix.ruby }}
|
19
22
|
uses: ruby/setup-ruby@v1
|
20
23
|
with:
|
21
|
-
ruby-version: "3.
|
24
|
+
ruby-version: "3.4"
|
22
25
|
bundler-cache: true
|
23
26
|
- name: Run Rubocop
|
24
27
|
run: bundle exec rake rubocop
|
28
|
+
- id: ruby
|
29
|
+
uses: voxpupuli/ruby-version@v1
|
30
|
+
|
25
31
|
build:
|
26
|
-
runs-on: ubuntu-
|
32
|
+
runs-on: ubuntu-24.04
|
33
|
+
needs: rubocop_and_matrix
|
27
34
|
strategy:
|
28
35
|
fail-fast: false
|
29
36
|
matrix:
|
30
|
-
ruby:
|
31
|
-
- "2.7"
|
32
|
-
- "3.0"
|
33
|
-
- "3.1"
|
34
|
-
- "3.2"
|
35
|
-
- "3.3"
|
37
|
+
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
|
36
38
|
name: Ruby ${{ matrix.ruby }}
|
37
39
|
steps:
|
38
40
|
- uses: actions/checkout@v4
|
@@ -48,7 +50,7 @@ jobs:
|
|
48
50
|
|
49
51
|
tests:
|
50
52
|
needs:
|
51
|
-
-
|
53
|
+
- rubocop_and_matrix
|
52
54
|
- build
|
53
55
|
runs-on: ubuntu-latest
|
54
56
|
name: Test suite
|
data/.rubocop_todo.yml
CHANGED
@@ -1,18 +1,11 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2025-05-27 12:15:34 UTC using RuboCop version 1.75.7.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count: 3
|
10
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
11
|
-
# Configuration parameters: AutoCorrect.
|
12
|
-
Lint/UselessAssignment:
|
13
|
-
Exclude:
|
14
|
-
- 'lib/beaker-rspec/helpers/serverspec.rb'
|
15
|
-
|
16
9
|
# Offense count: 1
|
17
10
|
Naming/AccessorMethodName:
|
18
11
|
Exclude:
|
@@ -34,14 +27,6 @@ Naming/MethodParameterName:
|
|
34
27
|
Exclude:
|
35
28
|
- 'lib/beaker-rspec/beaker_shim.rb'
|
36
29
|
|
37
|
-
# Offense count: 1
|
38
|
-
# This cop supports safe autocorrection (--autocorrect).
|
39
|
-
# Configuration parameters: EnforcedStyle.
|
40
|
-
# SupportedStyles: be_a, be_kind_of
|
41
|
-
RSpec/ClassCheck:
|
42
|
-
Exclude:
|
43
|
-
- 'spec/acceptance/example_spec.rb'
|
44
|
-
|
45
30
|
# Offense count: 3
|
46
31
|
# Configuration parameters: Prefixes, AllowedPatterns.
|
47
32
|
# Prefixes: when, with, without
|
@@ -75,10 +60,12 @@ Style/AndOr:
|
|
75
60
|
Exclude:
|
76
61
|
- 'lib/beaker-rspec/helpers/serverspec.rb'
|
77
62
|
|
78
|
-
# Offense count:
|
63
|
+
# Offense count: 6
|
79
64
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
80
|
-
# Configuration parameters: EnforcedStyle.
|
65
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForClasses, EnforcedStyleForModules.
|
81
66
|
# SupportedStyles: nested, compact
|
67
|
+
# SupportedStylesForClasses: ~, nested, compact
|
68
|
+
# SupportedStylesForModules: ~, nested, compact
|
82
69
|
Style/ClassAndModuleChildren:
|
83
70
|
Exclude:
|
84
71
|
- 'lib/beaker-rspec/helpers/serverspec.rb'
|
@@ -88,7 +75,7 @@ Style/ClassVars:
|
|
88
75
|
Exclude:
|
89
76
|
- 'lib/beaker-rspec/helpers/serverspec.rb'
|
90
77
|
|
91
|
-
# Offense count:
|
78
|
+
# Offense count: 9
|
92
79
|
# Configuration parameters: AllowedConstants.
|
93
80
|
Style/Documentation:
|
94
81
|
Exclude:
|
@@ -97,23 +84,6 @@ Style/Documentation:
|
|
97
84
|
- 'lib/beaker-rspec.rb'
|
98
85
|
- 'lib/beaker-rspec/helpers/serverspec.rb'
|
99
86
|
|
100
|
-
# Offense count: 10
|
101
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
102
|
-
# Configuration parameters: EnforcedStyle.
|
103
|
-
# SupportedStyles: always, always_true, never
|
104
|
-
Style/FrozenStringLiteralComment:
|
105
|
-
Exclude:
|
106
|
-
- 'Gemfile'
|
107
|
-
- 'beaker-rspec.gemspec'
|
108
|
-
- 'lib/beaker-rspec.rb'
|
109
|
-
- 'lib/beaker-rspec/beaker_shim.rb'
|
110
|
-
- 'lib/beaker-rspec/helpers/serverspec.rb'
|
111
|
-
- 'lib/beaker-rspec/rake_task.rb'
|
112
|
-
- 'lib/beaker-rspec/spec_helper.rb'
|
113
|
-
- 'lib/beaker-rspec/version.rb'
|
114
|
-
- 'spec/acceptance/example_spec.rb'
|
115
|
-
- 'spec/spec_helper.rb'
|
116
|
-
|
117
87
|
# Offense count: 1
|
118
88
|
Style/MissingRespondToMissing:
|
119
89
|
Exclude:
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,22 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [8.3.0](https://github.com/voxpupuli/beaker-rspec/tree/8.3.0) (2025-05-27)
|
6
|
+
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/8.2.0...8.3.0)
|
8
|
+
|
9
|
+
**Implemented enhancements:**
|
10
|
+
|
11
|
+
- Use the backend variable inside the loop [\#145](https://github.com/voxpupuli/beaker-rspec/pull/145) ([ekohl](https://github.com/ekohl))
|
12
|
+
- Remove redundant Specinfra::Runner.run definition [\#144](https://github.com/voxpupuli/beaker-rspec/pull/144) ([ekohl](https://github.com/ekohl))
|
13
|
+
- Remove unused get\_windows\_cmd method [\#143](https://github.com/voxpupuli/beaker-rspec/pull/143) ([ekohl](https://github.com/ekohl))
|
14
|
+
- Add Ruby 3.4 to CI / generate matrix automatically [\#142](https://github.com/voxpupuli/beaker-rspec/pull/142) ([bastelfreak](https://github.com/bastelfreak))
|
15
|
+
- Vagrant: Add options to configure memsize/cpu cores [\#139](https://github.com/voxpupuli/beaker-rspec/pull/139) ([bastelfreak](https://github.com/bastelfreak))
|
16
|
+
|
17
|
+
**Merged pull requests:**
|
18
|
+
|
19
|
+
- fakefs: Allow 3.x [\#146](https://github.com/voxpupuli/beaker-rspec/pull/146) ([bastelfreak](https://github.com/bastelfreak))
|
20
|
+
|
5
21
|
## [8.2.0](https://github.com/voxpupuli/beaker-rspec/tree/8.2.0) (2024-05-28)
|
6
22
|
|
7
23
|
[Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/8.1.0...8.2.0)
|
data/Gemfile
CHANGED
data/beaker-rspec.gemspec
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
$:.push File.expand_path('lib', __dir__)
|
2
4
|
require 'beaker-rspec/version'
|
3
5
|
|
@@ -18,14 +20,14 @@ Gem::Specification.new do |s|
|
|
18
20
|
s.require_paths = ['lib']
|
19
21
|
|
20
22
|
# Testing dependencies
|
21
|
-
s.add_development_dependency 'fakefs', '>= 0.6', '<
|
23
|
+
s.add_development_dependency 'fakefs', '>= 0.6', '< 4'
|
22
24
|
s.add_development_dependency 'minitest', '~> 5.4'
|
23
25
|
s.add_development_dependency 'rake', '~> 13.0'
|
24
|
-
s.add_development_dependency 'voxpupuli-rubocop', '~>
|
26
|
+
s.add_development_dependency 'voxpupuli-rubocop', '~> 3.1.0'
|
25
27
|
|
26
28
|
# Run time dependencies
|
27
|
-
s.
|
28
|
-
s.
|
29
|
-
s.
|
30
|
-
s.
|
29
|
+
s.add_dependency 'beaker', '>= 4.0', '< 7'
|
30
|
+
s.add_dependency 'rspec', '~> 3.0'
|
31
|
+
s.add_dependency 'serverspec', '~> 2'
|
32
|
+
s.add_dependency 'specinfra', '~> 2'
|
31
33
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'serverspec'
|
2
4
|
require 'specinfra'
|
3
5
|
require 'specinfra/backend/powershell/script_helper'
|
@@ -79,38 +81,13 @@ module Specinfra::Helper::Os
|
|
79
81
|
Specinfra::Helper::DetectOs.subclasses.each do |c|
|
80
82
|
res = c.detect
|
81
83
|
if res
|
82
|
-
res[:arch] ||=
|
84
|
+
res[:arch] ||= backend.run_command('uname -m').stdout.strip
|
83
85
|
return res
|
84
86
|
end
|
85
87
|
end
|
86
88
|
end
|
87
89
|
end
|
88
90
|
|
89
|
-
class Specinfra::CommandFactory
|
90
|
-
class << self
|
91
|
-
# Force creation of a windows command
|
92
|
-
def get_windows_cmd(meth, *args)
|
93
|
-
action, resource_type, subaction = breakdown(meth)
|
94
|
-
method = action
|
95
|
-
method += "_#{subaction}" if subaction
|
96
|
-
|
97
|
-
common_class = Specinfra::Command
|
98
|
-
base_class = common_class.const_get(:Base)
|
99
|
-
os_class = common_class.const_get(:Windows)
|
100
|
-
version_class = os_class.const_get(:Base)
|
101
|
-
command_class = version_class.const_get(resource_type.to_camel_case)
|
102
|
-
|
103
|
-
command_class = command_class.create
|
104
|
-
unless command_class.respond_to?(method)
|
105
|
-
raise NotImplementedError,
|
106
|
-
"#{method} is not implemented in #{command_class}"
|
107
|
-
end
|
108
|
-
|
109
|
-
command_class.send(method, *args)
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
91
|
module Specinfra
|
115
92
|
# Rewrite the runner to use the appropriate backend based upon platform information
|
116
93
|
class Runner
|
@@ -132,18 +109,6 @@ module Specinfra
|
|
132
109
|
run(meth, *args)
|
133
110
|
end
|
134
111
|
end
|
135
|
-
|
136
|
-
def self.run(meth, *args)
|
137
|
-
backend = Specinfra.backend
|
138
|
-
cmd = Specinfra.command.get(meth, *args)
|
139
|
-
backend = Specinfra.backend
|
140
|
-
ret = backend.run_command(cmd)
|
141
|
-
if meth.to_s.start_with?('check')
|
142
|
-
ret.success?
|
143
|
-
else
|
144
|
-
ret
|
145
|
-
end
|
146
|
-
end
|
147
112
|
end
|
148
113
|
end
|
149
114
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'beaker-rspec/beaker_shim'
|
2
4
|
require 'beaker-rspec/helpers/serverspec'
|
3
5
|
include BeakerRSpec::BeakerShim
|
@@ -32,6 +34,8 @@ RSpec.configure do |c|
|
|
32
34
|
debug: ENV['BEAKER_DEBUG'] || ENV['BEAKER_debug'] || ENV.fetch('RS_DEBUG', nil),
|
33
35
|
destroy: ENV['BEAKER_DESTROY'] || ENV['BEAKER_destroy'] || ENV.fetch('RS_DESTROY', nil),
|
34
36
|
optionsfile: ENV['BEAKER_OPTIONS_FILE'] || ENV['BEAKER_options_file'] || ENV.fetch('RS_OPTIONS_FILE', nil),
|
37
|
+
vagrant_memsize: ENV.fetch('BEAKER_VAGRANT_MEMSIZE', nil),
|
38
|
+
vagrant_cpus: ENV.fetch('BEAKER_VAGRANT_CPUS', nil),
|
35
39
|
}.compact
|
36
40
|
# combine defaults and env_vars to determine overall options
|
37
41
|
options = defaults.merge(env_vars)
|
data/lib/beaker-rspec/version.rb
CHANGED
data/lib/beaker-rspec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe 'ignore' do
|
@@ -21,7 +23,7 @@ describe 'ignore' do
|
|
21
23
|
end
|
22
24
|
|
23
25
|
example 'access the options' do
|
24
|
-
expect(options).to
|
26
|
+
expect(options).to be_a(Hash)
|
25
27
|
end
|
26
28
|
|
27
29
|
example 'create a beaker dsl::step' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: fakefs
|
@@ -19,7 +18,7 @@ dependencies:
|
|
19
18
|
version: '0.6'
|
20
19
|
- - "<"
|
21
20
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
21
|
+
version: '4'
|
23
22
|
type: :development
|
24
23
|
prerelease: false
|
25
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +28,7 @@ dependencies:
|
|
29
28
|
version: '0.6'
|
30
29
|
- - "<"
|
31
30
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
31
|
+
version: '4'
|
33
32
|
- !ruby/object:Gem::Dependency
|
34
33
|
name: minitest
|
35
34
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,14 +63,14 @@ dependencies:
|
|
64
63
|
requirements:
|
65
64
|
- - "~>"
|
66
65
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
66
|
+
version: 3.1.0
|
68
67
|
type: :development
|
69
68
|
prerelease: false
|
70
69
|
version_requirements: !ruby/object:Gem::Requirement
|
71
70
|
requirements:
|
72
71
|
- - "~>"
|
73
72
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
73
|
+
version: 3.1.0
|
75
74
|
- !ruby/object:Gem::Dependency
|
76
75
|
name: beaker
|
77
76
|
requirement: !ruby/object:Gem::Requirement
|
@@ -166,7 +165,6 @@ homepage: https://github.com/voxpupuli/beaker-rspec
|
|
166
165
|
licenses:
|
167
166
|
- Apache-2.0
|
168
167
|
metadata: {}
|
169
|
-
post_install_message:
|
170
168
|
rdoc_options: []
|
171
169
|
require_paths:
|
172
170
|
- lib
|
@@ -184,8 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
182
|
- !ruby/object:Gem::Version
|
185
183
|
version: '0'
|
186
184
|
requirements: []
|
187
|
-
rubygems_version: 3.
|
188
|
-
signing_key:
|
185
|
+
rubygems_version: 3.6.7
|
189
186
|
specification_version: 4
|
190
187
|
summary: RSpec bindings for beaker
|
191
188
|
test_files: []
|