beaker-vmware 1.0.0 → 2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60f7f50dce24d1ebc8f1a54b7764f0d640915e8b5fbcee24b7775e798e065f3c
4
- data.tar.gz: cc69b9a923c68bd3cf2c5ec0e24f00cab54acf38533253529a9df8be76d12a96
3
+ metadata.gz: '08785ad75325b14676664b01b6f1e06d1bc71db1e1b282be476c5c153278bfc1'
4
+ data.tar.gz: 22e42b6dd8ddbcbf1da8ee9615ff1bb131e644691f58ec555774f086ac17f0de
5
5
  SHA512:
6
- metadata.gz: b780022ef4f50cd6811225dec75532f6a333d0df4a40bf4335e351800d6a67e02a8248ae26e34ba81f9d7c6c43a9c9820e7078a68029dbee852e452826ac59ac
7
- data.tar.gz: 5487718187e70b29b3d0a2eba7546171b736e601d28da8f98cf63c9155560967125bd13f9f8cffd536c460d3d09350d67a46d24e59dd4f01390d96866c54c1c8
6
+ metadata.gz: 9464ebff95eb0ef4ae8c4afae38db526a99997112b28eff6d1ca5e088dc0d3bd35c101491f6ead2de832849861c906cf9880e1575d7cb0de3e0ef5288acf4cdf
7
+ data.tar.gz: c0f5e43b93c8376f9c4af45d955a1a7417448315f2df6f1e5ca41ec8e0feca30fe7d04a0740b4bda913e04c6948e9a1a3715b646979d5af64015399e764a31cd
@@ -1,8 +1,18 @@
1
+ ---
1
2
  version: 2
2
3
  updates:
3
- - package-ecosystem: bundler
4
- directory: "/"
5
- schedule:
6
- interval: daily
7
- time: "13:00"
8
- open-pull-requests-limit: 10
4
+ # raise PRs for gem updates
5
+ - package-ecosystem: bundler
6
+ directory: "/"
7
+ schedule:
8
+ interval: daily
9
+ time: "13:00"
10
+ open-pull-requests-limit: 10
11
+
12
+ # Maintain dependencies for GitHub Actions
13
+ - package-ecosystem: github-actions
14
+ directory: "/"
15
+ schedule:
16
+ interval: daily
17
+ time: "13:00"
18
+ open-pull-requests-limit: 10
@@ -10,15 +10,15 @@ jobs:
10
10
  runs-on: ubuntu-latest
11
11
  if: github.repository_owner == 'voxpupuli'
12
12
  steps:
13
- - uses: actions/checkout@v2
14
- - name: Install Ruby 3.0
13
+ - uses: actions/checkout@v4
14
+ - name: Install Ruby 3.3
15
15
  uses: ruby/setup-ruby@v1
16
16
  with:
17
- ruby-version: '3.0'
17
+ ruby-version: '3.3'
18
18
  env:
19
19
  BUNDLE_WITHOUT: release
20
20
  - name: Build gem
21
- run: gem build *.gemspec
21
+ run: gem build --strict --verbose *.gemspec
22
22
  - name: Publish gem to rubygems.org
23
23
  run: gem push *.gem
24
24
  env:
@@ -1,29 +1,43 @@
1
1
  name: Test
2
2
 
3
3
  on:
4
- - pull_request
5
- - push
4
+ pull_request: {}
5
+ push:
6
+ branches:
7
+ - master
6
8
 
7
9
  env:
8
10
  BUNDLE_WITHOUT: release
9
11
 
10
12
  jobs:
13
+ rubocop:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - name: Install Ruby ${{ matrix.ruby }}
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: "3.3"
21
+ bundler-cache: true
22
+ - name: Run Rubocop
23
+ run: bundle exec rake rubocop
24
+
11
25
  test:
12
26
  runs-on: ubuntu-latest
13
27
  strategy:
14
28
  fail-fast: false
15
29
  matrix:
16
30
  include:
17
- - ruby: "2.4"
18
- - ruby: "2.5"
19
- - ruby: "2.6"
20
31
  - ruby: "2.7"
21
32
  - ruby: "3.0"
22
33
  coverage: "yes"
34
+ - ruby: "3.1"
35
+ - ruby: "3.2"
36
+ - ruby: "3.3"
23
37
  env:
24
38
  COVERAGE: ${{ matrix.coverage }}
25
39
  steps:
26
- - uses: actions/checkout@v2
40
+ - uses: actions/checkout@v4
27
41
  - name: Install Ruby ${{ matrix.ruby }}
28
42
  uses: ruby/setup-ruby@v1
29
43
  with:
@@ -32,4 +46,13 @@ jobs:
32
46
  - name: Run tests
33
47
  run: bundle exec rake
34
48
  - name: Build gem
35
- run: gem build *.gemspec
49
+ run: gem build --strict --verbose *.gemspec
50
+
51
+ tests:
52
+ needs:
53
+ - rubocop
54
+ - test
55
+ runs-on: ubuntu-latest
56
+ name: Test suite
57
+ steps:
58
+ - run: echo Test suite completed
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ ---
2
+ inherit_from: .rubocop_todo.yml
3
+
4
+ inherit_gem:
5
+ voxpupuli-rubocop: rubocop.yml
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,260 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2023-09-26 11:32:50 UTC using RuboCop version 1.54.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ # This cop supports unsafe autocorrection (--autocorrect-all).
11
+ # Configuration parameters: AllowSafeAssignment.
12
+ Lint/AssignmentInCondition:
13
+ Exclude:
14
+ - 'lib/beaker/hypervisor/vsphere.rb'
15
+
16
+ # Offense count: 2
17
+ Lint/DuplicateMethods:
18
+ Exclude:
19
+ - 'spec/mock_vsphere_helper.rb'
20
+
21
+ # Offense count: 2
22
+ # Configuration parameters: AllowedParentClasses.
23
+ Lint/MissingSuper:
24
+ Exclude:
25
+ - 'lib/beaker/hypervisor/fusion.rb'
26
+ - 'lib/beaker/hypervisor/vsphere.rb'
27
+
28
+ # Offense count: 4
29
+ Naming/AccessorMethodName:
30
+ Exclude:
31
+ - 'spec/mock_fission.rb'
32
+ - 'spec/mock_vsphere.rb'
33
+ - 'spec/mock_vsphere_helper.rb'
34
+
35
+ # Offense count: 1
36
+ # Configuration parameters: ForbiddenDelimiters.
37
+ # ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
38
+ Naming/HeredocDelimiterNaming:
39
+ Exclude:
40
+ - 'Rakefile'
41
+
42
+ # Offense count: 30
43
+ # Configuration parameters: EnforcedStyle, AllowedPatterns.
44
+ # SupportedStyles: snake_case, camelCase
45
+ Naming/MethodName:
46
+ Exclude:
47
+ - 'spec/mock_vsphere.rb'
48
+ - 'spec/mock_vsphere_helper.rb'
49
+
50
+ # Offense count: 11
51
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
52
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
53
+ Naming/MethodParameterName:
54
+ Exclude:
55
+ - 'lib/beaker/hypervisor/vsphere_helper.rb'
56
+ - 'spec/mock_vsphere.rb'
57
+ - 'spec/mock_vsphere_helper.rb'
58
+
59
+ # Offense count: 28
60
+ # Configuration parameters: EnforcedStyle, AllowedIdentifiers, AllowedPatterns.
61
+ # SupportedStyles: snake_case, camelCase
62
+ Naming/VariableName:
63
+ Exclude:
64
+ - 'lib/beaker/hypervisor/vsphere_helper.rb'
65
+ - 'spec/mock_vsphere.rb'
66
+ - 'spec/mock_vsphere_helper.rb'
67
+
68
+ # Offense count: 1
69
+ # Configuration parameters: MinSize.
70
+ Performance/CollectionLiteralInLoop:
71
+ Exclude:
72
+ - 'lib/beaker/hypervisor/vsphere_helper.rb'
73
+
74
+ # Offense count: 1
75
+ RSpec/AnyInstance:
76
+ Exclude:
77
+ - 'spec/beaker/hypervisor/fusion_spec.rb'
78
+
79
+ # Offense count: 12
80
+ # This cop supports unsafe autocorrection (--autocorrect-all).
81
+ # Configuration parameters: SkipBlocks, EnforcedStyle.
82
+ # SupportedStyles: described_class, explicit
83
+ RSpec/DescribedClass:
84
+ Exclude:
85
+ - 'spec/beaker/hypervisor/fusion_spec.rb'
86
+ - 'spec/beaker/hypervisor/vsphere_helper_spec.rb'
87
+ - 'spec/beaker/hypervisor/vsphere_spec.rb'
88
+
89
+ # Offense count: 6
90
+ # Configuration parameters: CountAsOne.
91
+ RSpec/ExampleLength:
92
+ Max: 8
93
+
94
+ # Offense count: 1
95
+ # Configuration parameters: .
96
+ # SupportedStyles: have_received, receive
97
+ RSpec/MessageSpies:
98
+ EnforcedStyle: receive
99
+
100
+ # Offense count: 1
101
+ # Configuration parameters: AllowedPatterns.
102
+ # AllowedPatterns: ^expect_, ^assert_
103
+ RSpec/NoExpectationExample:
104
+ Exclude:
105
+ - 'spec/beaker/hypervisor/fusion_spec.rb'
106
+
107
+ # Offense count: 5
108
+ RSpec/UnspecifiedException:
109
+ Exclude:
110
+ - 'spec/beaker/hypervisor/fusion_spec.rb'
111
+ - 'spec/beaker/hypervisor/vsphere_helper_spec.rb'
112
+ - 'spec/beaker/hypervisor/vsphere_spec.rb'
113
+
114
+ # Offense count: 1
115
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
116
+ RSpec/VerifiedDoubles:
117
+ Exclude:
118
+ - 'spec/beaker/hypervisor/vsphere_helper_spec.rb'
119
+
120
+ # Offense count: 3
121
+ RSpec/VoidExpect:
122
+ Exclude:
123
+ - 'spec/beaker/hypervisor/vsphere_spec.rb'
124
+
125
+ # Offense count: 3
126
+ # This cop supports safe autocorrection (--autocorrect).
127
+ Rake/Desc:
128
+ Exclude:
129
+ - 'Rakefile'
130
+
131
+ # Offense count: 2
132
+ # This cop supports unsafe autocorrection (--autocorrect-all).
133
+ # Configuration parameters: EnforcedStyle.
134
+ # SupportedStyles: always, conditionals
135
+ Style/AndOr:
136
+ Exclude:
137
+ - 'lib/beaker/hypervisor/fusion.rb'
138
+ - 'lib/beaker/hypervisor/vsphere_helper.rb'
139
+
140
+ # Offense count: 12
141
+ # This cop supports safe autocorrection (--autocorrect).
142
+ # Configuration parameters: AllowOnConstant, AllowOnSelfClass.
143
+ Style/CaseEquality:
144
+ Exclude:
145
+ - 'spec/beaker/hypervisor/vsphere_helper_spec.rb'
146
+
147
+ # Offense count: 7
148
+ Style/ClassVars:
149
+ Exclude:
150
+ - 'spec/mock_fission.rb'
151
+ - 'spec/mock_vsphere_helper.rb'
152
+
153
+ # Offense count: 1
154
+ # This cop supports unsafe autocorrection (--autocorrect-all).
155
+ Style/CommentedKeyword:
156
+ Exclude:
157
+ - 'lib/beaker/hypervisor/fusion.rb'
158
+
159
+ # Offense count: 3
160
+ # Configuration parameters: AllowedConstants.
161
+ Style/Documentation:
162
+ Exclude:
163
+ - 'spec/**/*'
164
+ - 'test/**/*'
165
+ - 'lib/beaker/hypervisor/fusion.rb'
166
+ - 'lib/beaker/hypervisor/vsphere.rb'
167
+ - 'lib/beaker/hypervisor/vsphere_helper.rb'
168
+
169
+ # Offense count: 3
170
+ # This cop supports safe autocorrection (--autocorrect).
171
+ # Configuration parameters: EnforcedStyle.
172
+ # SupportedStyles: format, sprintf, percent
173
+ Style/FormatString:
174
+ Exclude:
175
+ - 'lib/beaker/hypervisor/fusion.rb'
176
+ - 'lib/beaker/hypervisor/vsphere.rb'
177
+
178
+ # Offense count: 16
179
+ # This cop supports unsafe autocorrection (--autocorrect-all).
180
+ # Configuration parameters: EnforcedStyle.
181
+ # SupportedStyles: always, always_true, never
182
+ Style/FrozenStringLiteralComment:
183
+ Enabled: false
184
+
185
+ # Offense count: 3
186
+ # This cop supports safe autocorrection (--autocorrect).
187
+ Style/IfUnlessModifier:
188
+ Exclude:
189
+ - 'lib/beaker/hypervisor/fusion.rb'
190
+
191
+ # Offense count: 1
192
+ # This cop supports unsafe autocorrection (--autocorrect-all).
193
+ Style/InfiniteLoop:
194
+ Exclude:
195
+ - 'lib/beaker/hypervisor/vsphere_helper.rb'
196
+
197
+ # Offense count: 2
198
+ # This cop supports unsafe autocorrection (--autocorrect-all).
199
+ Style/LineEndConcatenation:
200
+ Exclude:
201
+ - 'lib/beaker/hypervisor/vsphere.rb'
202
+
203
+ # Offense count: 2
204
+ # This cop supports unsafe autocorrection (--autocorrect-all).
205
+ # Configuration parameters: EnforcedStyle.
206
+ # SupportedStyles: literals, strict
207
+ Style/MutableConstant:
208
+ Exclude:
209
+ - 'bin/beaker-vmware'
210
+ - 'lib/beaker-vmware/version.rb'
211
+
212
+ # Offense count: 2
213
+ Style/OpenStructUse:
214
+ Exclude:
215
+ - 'spec/mock_vsphere.rb'
216
+
217
+ # Offense count: 1
218
+ # Configuration parameters: AllowedMethods.
219
+ # AllowedMethods: respond_to_missing?
220
+ Style/OptionalBooleanParameter:
221
+ Exclude:
222
+ - 'spec/mock_vsphere.rb'
223
+
224
+ # Offense count: 2
225
+ # This cop supports unsafe autocorrection (--autocorrect-all).
226
+ # Configuration parameters: EnforcedStyle.
227
+ # SupportedStyles: short, verbose
228
+ Style/PreferredHashMethods:
229
+ Exclude:
230
+ - 'spec/mock_vsphere_helper.rb'
231
+
232
+ # Offense count: 2
233
+ # This cop supports unsafe autocorrection (--autocorrect-all).
234
+ # Configuration parameters: AllowComments.
235
+ Style/RedundantInitialize:
236
+ Exclude:
237
+ - 'spec/mock_vsphere.rb'
238
+ - 'spec/mock_vsphere_helper.rb'
239
+
240
+ # Offense count: 2
241
+ # This cop supports unsafe autocorrection (--autocorrect-all).
242
+ # Configuration parameters: Mode.
243
+ Style/StringConcatenation:
244
+ Exclude:
245
+ - 'spec/mock_vsphere.rb'
246
+
247
+ # Offense count: 1
248
+ # This cop supports unsafe autocorrection (--autocorrect-all).
249
+ # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
250
+ # AllowedMethods: define_method
251
+ Style/SymbolProc:
252
+ Exclude:
253
+ - 'lib/beaker/hypervisor/fusion.rb'
254
+
255
+ # Offense count: 5
256
+ # This cop supports safe autocorrection (--autocorrect).
257
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
258
+ # URISchemes: http, https
259
+ Layout/LineLength:
260
+ Max: 152
data/.simplecov CHANGED
@@ -6,4 +6,4 @@ SimpleCov.configure do
6
6
  end
7
7
  end
8
8
 
9
- SimpleCov.start if ENV['BEAKER_VMWARE_COVERAGE']
9
+ SimpleCov.start if ENV['BEAKER_VMWARE_COVERAGE']
data/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.0](https://github.com/voxpupuli/beaker-vmware/tree/2.1.0) (2024-04-23)
4
+
5
+ [Full Changelog](https://github.com/voxpupuli/beaker-vmware/compare/2.0.0...2.1.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Add Ruby 3.3 to CI matrix [\#43](https://github.com/voxpupuli/beaker-vmware/pull/43) ([bastelfreak](https://github.com/bastelfreak))
10
+ - Replace dead dependency rbvmomi with rbvmomi2 [\#41](https://github.com/voxpupuli/beaker-vmware/pull/41) ([bastelfreak](https://github.com/bastelfreak))
11
+ - Add Ruby 3.2 support [\#33](https://github.com/voxpupuli/beaker-vmware/pull/33) ([bastelfreak](https://github.com/bastelfreak))
12
+
13
+ **Merged pull requests:**
14
+
15
+ - rubocop: Use task from voxpupuli-rubocop [\#42](https://github.com/voxpupuli/beaker-vmware/pull/42) ([bastelfreak](https://github.com/bastelfreak))
16
+ - rubocop: safe autocorrection [\#38](https://github.com/voxpupuli/beaker-vmware/pull/38) ([bastelfreak](https://github.com/bastelfreak))
17
+ - Update voxpupuli-rubocop requirement from ~\> 1.2 to ~\> 2.0 [\#36](https://github.com/voxpupuli/beaker-vmware/pull/36) ([dependabot[bot]](https://github.com/apps/dependabot))
18
+ - GCG: Add faraday-retry dep [\#34](https://github.com/voxpupuli/beaker-vmware/pull/34) ([bastelfreak](https://github.com/bastelfreak))
19
+ - switch to voxpupuli-rubocop & Build gems with verbosity and strictness [\#32](https://github.com/voxpupuli/beaker-vmware/pull/32) ([bastelfreak](https://github.com/bastelfreak))
20
+
21
+ ## [2.0.0](https://github.com/voxpupuli/beaker-vmware/tree/2.0.0) (2023-03-28)
22
+
23
+ [Full Changelog](https://github.com/voxpupuli/beaker-vmware/compare/1.0.0...2.0.0)
24
+
25
+ **Breaking changes:**
26
+
27
+ - Drop Ruby 2.4/2.5/2.6 support; Add 3.1 [\#25](https://github.com/voxpupuli/beaker-vmware/pull/25) ([bastelfreak](https://github.com/bastelfreak))
28
+
29
+ **Implemented enhancements:**
30
+
31
+ - Implement rubocop [\#26](https://github.com/voxpupuli/beaker-vmware/pull/26) ([bastelfreak](https://github.com/bastelfreak))
32
+
33
+ **Merged pull requests:**
34
+
35
+ - Update fakefs requirement from ~\> 0.6 to ~\> 2.4 [\#23](https://github.com/voxpupuli/beaker-vmware/pull/23) ([dependabot[bot]](https://github.com/apps/dependabot))
36
+ - CI: Apply Vox Pupuli best practices [\#22](https://github.com/voxpupuli/beaker-vmware/pull/22) ([bastelfreak](https://github.com/bastelfreak))
37
+ - dependabot: check for github actions and gems [\#20](https://github.com/voxpupuli/beaker-vmware/pull/20) ([bastelfreak](https://github.com/bastelfreak))
38
+ - Update rbvmomi requirement from ~\> 1.9 to \>= 1.9, \< 4.0 [\#12](https://github.com/voxpupuli/beaker-vmware/pull/12) ([dependabot[bot]](https://github.com/apps/dependabot))
39
+
3
40
  ## [1.0.0](https://github.com/voxpupuli/beaker-vmware/tree/1.0.0) (2021-08-09)
4
41
 
5
42
  [Full Changelog](https://github.com/voxpupuli/beaker-vmware/compare/0.3.0...1.0.0)
data/Gemfile CHANGED
@@ -1,31 +1,13 @@
1
- source ENV['GEM_SOURCE'] || "https://rubygems.org"
1
+ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
-
6
-
7
- def location_for(place, fake_version = nil)
8
- if place =~ /^git:([^#]*)#(.*)/
9
- [fake_version, { :git => $1, :branch => $2, :require => false }].compact
10
- elsif place =~ /^file:\/\/(.*)/
11
- ['>= 0', { :path => File.expand_path($1), :require => false }]
12
- else
13
- [place, { :require => false }]
14
- end
15
- end
16
-
17
-
18
- # We don't put beaker in as a test dependency because we
19
- # don't want to create a transitive dependency
20
- group :acceptance_testing do
21
- gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 3.0')
22
- end
23
-
24
5
  group :release do
25
- gem 'github_changelog_generator', require: false
6
+ gem 'faraday-retry', '~> 2.1', require: false
7
+ gem 'github_changelog_generator', '~> 1.16.4', require: false
26
8
  end
27
9
 
28
- group :coverage, optional: ENV['COVERAGE']!='yes' do
29
- gem 'simplecov-console', :require => false
30
- gem 'codecov', :require => false
10
+ group :coverage, optional: ENV['COVERAGE'] != 'yes' do
11
+ gem 'codecov', require: false
12
+ gem 'simplecov-console', require: false
31
13
  end
data/Rakefile CHANGED
@@ -1,46 +1,39 @@
1
1
  require 'rspec/core/rake_task'
2
2
 
3
3
  namespace :test do
4
-
5
4
  namespace :spec do
6
-
7
- desc "Run spec tests"
5
+ desc 'Run spec tests'
8
6
  RSpec::Core::RakeTask.new(:run) do |t|
9
7
  t.rspec_opts = ['--color']
10
8
  t.pattern = 'spec/'
11
9
  end
12
10
 
13
- desc "Run spec tests with coverage"
11
+ desc 'Run spec tests with coverage'
14
12
  RSpec::Core::RakeTask.new(:coverage) do |t|
15
13
  ENV['BEAKER_VMWARE_COVERAGE'] = 'y'
16
14
  t.rspec_opts = ['--color']
17
15
  t.pattern = 'spec/'
18
16
  end
19
-
20
17
  end
21
18
 
22
19
  namespace :acceptance do
23
-
24
- desc <<-EOS
25
- A quick acceptance test, named because it has no pre-suites to run
20
+ desc <<~EOS
21
+ A quick acceptance test, named because it has no pre-suites to run
26
22
  EOS
27
23
  task :quick do
28
-
29
24
  # setup & load_path of beaker's acceptance base and lib directory
30
25
  beaker_gem_spec = Gem::Specification.find_by_name('beaker')
31
26
  beaker_gem_dir = beaker_gem_spec.gem_dir
32
27
  beaker_test_base_dir = File.join(beaker_gem_dir, 'acceptance/tests/base')
33
28
  load_path_option = File.join(beaker_gem_dir, 'acceptance/lib')
34
29
 
35
- sh("beaker",
36
- "--hosts", "acceptance/config/nodes/test-nodes.yml",
37
- "--tests", beaker_test_base_dir,
38
- "--log-level", "debug",
39
- "--load-path", load_path_option)
30
+ sh('beaker',
31
+ '--hosts', 'acceptance/config/nodes/test-nodes.yml',
32
+ '--tests', beaker_test_base_dir,
33
+ '--log-level', 'debug',
34
+ '--load-path', load_path_option)
40
35
  end
41
-
42
36
  end
43
-
44
37
  end
45
38
 
46
39
  # namespace-named default tasks.
@@ -50,125 +43,26 @@ task 'test:spec' => 'test:spec:run'
50
43
  task 'test:acceptance' => 'test:acceptance:quick'
51
44
 
52
45
  # global defaults
53
- task :test => 'test:spec'
54
- task :default => :test
55
-
56
- ###########################################################
57
- #
58
- # Documentation Tasks
59
- #
60
- ###########################################################
61
- DOCS_DAEMON = "yard server --reload --daemon --server thin"
62
- FOREGROUND_SERVER = 'bundle exec yard server --reload --verbose --server thin lib/beaker'
63
-
64
- def running?( cmdline )
65
- ps = `ps -ef`
66
- found = ps.lines.grep( /#{Regexp.quote( cmdline )}/ )
67
- if found.length > 1
68
- raise StandardError, "Found multiple YARD Servers. Don't know what to do."
69
- end
70
-
71
- yes = found.empty? ? false : true
72
- return yes, found.first
73
- end
74
-
75
- def pid_from( output )
76
- output.squeeze(' ').strip.split(' ')[1]
77
- end
78
-
79
- desc 'Start the documentation server in the foreground'
80
- task :docs => 'docs:clear' do
81
- original_dir = Dir.pwd
82
- Dir.chdir( File.expand_path(File.dirname(__FILE__)) )
83
- sh FOREGROUND_SERVER
84
- Dir.chdir( original_dir )
85
- end
86
-
87
- namespace :docs do
88
-
89
- desc 'Clear the generated documentation cache'
90
- task :clear do
91
- original_dir = Dir.pwd
92
- Dir.chdir( File.expand_path(File.dirname(__FILE__)) )
93
- sh 'rm -rf docs'
94
- Dir.chdir( original_dir )
95
- end
96
-
97
- desc 'Generate static documentation'
98
- task :gen => 'docs:clear' do
99
- original_dir = Dir.pwd
100
- Dir.chdir( File.expand_path(File.dirname(__FILE__)) )
101
- output = `bundle exec yard doc`
102
- puts output
103
- if output =~ /\[warn\]|\[error\]/
104
- fail "Errors/Warnings during yard documentation generation"
105
- end
106
- Dir.chdir( original_dir )
107
- end
108
-
109
- desc 'Run the documentation server in the background, alias `bg`'
110
- task :background => 'docs:clear' do
111
- yes, output = running?( DOCS_DAEMON )
112
- if yes
113
- puts "Not starting a new YARD Server..."
114
- puts "Found one running with pid #{pid_from( output )}."
115
- else
116
- original_dir = Dir.pwd
117
- Dir.chdir( File.expand_path(File.dirname(__FILE__)) )
118
- sh "bundle exec #{DOCS_DAEMON}"
119
- Dir.chdir( original_dir )
120
- end
121
- end
122
-
123
- task(:bg) { Rake::Task['docs:background'].invoke }
124
-
125
- desc 'Check the status of the documentation server'
126
- task :status do
127
- yes, output = running?( DOCS_DAEMON )
128
- if yes
129
- pid = pid_from( output )
130
- puts "Found a YARD Server running with pid #{pid}"
131
- else
132
- puts "Could not find a running YARD Server."
133
- end
134
- end
135
-
136
- desc "Stop a running YARD Server"
137
- task :stop do
138
- yes, output = running?( DOCS_DAEMON )
139
- if yes
140
- pid = pid_from( output )
141
- puts "Found a YARD Server running with pid #{pid}"
142
- `kill #{pid}`
143
- puts "Stopping..."
144
- yes, output = running?( DOCS_DAEMON )
145
- if yes
146
- `kill -9 #{pid}`
147
- yes, output = running?( DOCS_DAEMON )
148
- if yes
149
- puts "Could not Stop Server!"
150
- else
151
- puts "Server stopped."
152
- end
153
- else
154
- puts "Server stopped."
155
- end
156
- else
157
- puts "Could not find a running YARD Server"
158
- end
159
- end
160
- end
46
+ task test: 'test:spec'
47
+ task default: :test
161
48
 
162
49
  begin
163
50
  require 'rubygems'
164
51
  require 'github_changelog_generator/task'
165
- rescue LoadError # rubocop:disable Lint/HandleExceptions
52
+ rescue LoadError
53
+ # github_changelog_generator is an optional group
166
54
  else
167
55
  GitHubChangelogGenerator::RakeTask.new :changelog do |config|
168
- config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog]
56
+ config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog github_actions]
169
57
  config.user = 'voxpupuli'
170
58
  config.project = 'beaker-vmware'
171
59
  gem_version = Gem::Specification.load("#{config.project}.gemspec").version
172
60
  config.future_release = gem_version
173
61
  end
174
62
  end
63
+
64
+ begin
65
+ require 'voxpupuli/rubocop/rake'
66
+ rescue LoadError
67
+ # the voxpupuli-rubocop gem is optional
68
+ end