beaker-docker 1.4.0 → 1.5.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: 0d52bba21bf02a7a3f1377a20e05315c36eb616bd37b5a1094c51718a2e0a770
4
- data.tar.gz: c21653ddc0b556a1e7be7adaf661c9943fd14a135248bd8ad5f13cc4d89e1d27
3
+ metadata.gz: 03132260cd467ad7af518c89aaddc34d3c089e49d52480ef23ada59e5d36fece
4
+ data.tar.gz: '083787caad790afa68a1b9b9217679ace4fecc4f65d4428d73df275260cb9680'
5
5
  SHA512:
6
- metadata.gz: 58d7e309ae26e61d7091d203ee393bd822557b765ba20bd2a5e1ab2905dacbb205bb11de64637c399fd057ae4b3950b58ba18f4e93f7c42f2a59183cd61936a7
7
- data.tar.gz: 7f172a3c5d75e09ca35128e466fa96e59b820cd75317c828330375ea712ebbcdf0eb2f9fc8ee86ef51e293b5b2370bcd86a12b84eb61542e8f6f1d042711bdbf
6
+ metadata.gz: 239659877406dea0df91dc8f15b51d4d0380fc40aa5dd91eed939d8ed4fc11e6fe287990645977f622c26d16d356b94de668fa49ac369f1037aa25e4d61993ec
7
+ data.tar.gz: 297b9d6d9a8919873cf97055e9b072f36553f4efcee4e770155374f201fc23505cff52068e860ca0db387478ae1d3c8248ea343a1e47d9fbf626741166b47620
data/.editorconfig ADDED
@@ -0,0 +1,10 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_size = 2
7
+ tab_width = 2
8
+ indent_style = space
9
+ insert_final_newline = true
10
+ trim_trailing_whitespace = true
@@ -1,35 +1,31 @@
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:
11
- lint:
13
+ rubocop:
12
14
  runs-on: ubuntu-latest
13
- strategy:
14
- fail-fast: true
15
- matrix:
16
- include:
17
- - ruby: "2.7"
18
- name: Lint - Ruby ${{ matrix.ruby }}
19
15
  steps:
20
16
  - uses: actions/checkout@v3
21
- - name: Install Ruby ${{ matrix.ruby }}
17
+ - name: Install Ruby 3.2
22
18
  uses: ruby/setup-ruby@v1
23
19
  with:
24
- ruby-version: ${{ matrix.ruby }}
20
+ ruby-version: "3.2"
25
21
  bundler-cache: true
26
- - name: lint
27
- run: bundle exec rake lint
22
+ - name: Run Rubocop
23
+ run: bundle exec rake rubocop
28
24
 
29
25
  rspec:
30
26
  runs-on: ubuntu-latest
31
27
  strategy:
32
- fail-fast: true
28
+ fail-fast: false
33
29
  matrix:
34
30
  include:
35
31
  - ruby: "2.4"
@@ -38,6 +34,8 @@ jobs:
38
34
  - ruby: "2.7"
39
35
  - ruby: "3.0"
40
36
  coverage: "yes"
37
+ - ruby: "3.1"
38
+ - ruby: "3.2"
41
39
  env:
42
40
  COVERAGE: ${{ matrix.coverage }}
43
41
  name: RSpec - Ruby ${{ matrix.ruby }}
@@ -55,33 +53,14 @@ jobs:
55
53
 
56
54
  docker:
57
55
  runs-on: ubuntu-latest
58
- strategy:
59
- fail-fast: true
60
- matrix:
61
- ruby:
62
- - "2.6"
63
- name: Docker - Ruby ${{ matrix.ruby }}
56
+ name: Docker
64
57
  steps:
65
58
  - uses: actions/checkout@v3
66
- - name: Install Ruby ${{ matrix.ruby }}
59
+ - name: Install Ruby 3.2
67
60
  uses: ruby/setup-ruby@v1
68
61
  with:
69
- ruby-version: ${{ matrix.ruby }}
62
+ ruby-version: "3.2"
70
63
  bundler-cache: true
71
- - name: install bundler
72
- run: |
73
- gem install bundler -v '~> 1.17.3'
74
- bundle update
75
- - name: install container runtime
76
- run: |
77
- sudo apt-get remove -y docker docker-engine docker.io containerd runc ||:
78
- sudo apt-get update -y
79
- sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
80
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
81
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
82
- sudo apt-get update -y
83
- sudo apt-get install -y docker-ce docker-ce-cli containerd.io
84
- sudo systemctl start docker
85
64
  - name: Run acceptance tests
86
65
  run: bundle exec rake test:acceptance
87
66
 
@@ -105,31 +84,25 @@ jobs:
105
84
 
106
85
  podman:
107
86
  runs-on: ubuntu-latest
108
- strategy:
109
- fail-fast: true
110
- matrix:
111
- ruby:
112
- - "2.6"
113
- name: Podman - Ruby ${{ matrix.ruby }}
87
+ name: Podman
114
88
  steps:
115
89
  - uses: actions/checkout@v3
116
- - name: Install Ruby ${{ matrix.ruby }}
90
+ - name: Install Ruby 3.2
117
91
  uses: ruby/setup-ruby@v1
118
92
  with:
119
- ruby-version: ${{ matrix.ruby }}
93
+ ruby-version: "3.2"
120
94
  bundler-cache: true
121
- - name: install bundler
122
- run: |
123
- gem install bundler -v '~> 1.17.3'
124
- bundle update
125
- # We need the latest version of podman for this to work
126
- - name: install container runtime
127
- run: |
128
- . /etc/os-release
129
- curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
130
- echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/podman.list > /dev/null
131
- sudo apt-get update
132
- sudo apt-get -y install podman
133
- sudo systemctl start podman
134
95
  - name: Run acceptance tests
135
96
  run: bundle exec rake test:acceptance
97
+
98
+ tests:
99
+ needs:
100
+ - docker
101
+ - beaker_in_container
102
+ - podman
103
+ - rubocop
104
+ - rspec
105
+ runs-on: ubuntu-latest
106
+ name: Test suite
107
+ steps:
108
+ - run: echo Test suite completed
data/.gitignore CHANGED
@@ -12,6 +12,7 @@ coverage
12
12
  .bundle
13
13
  .vendor
14
14
  _vendor
15
+ vendor
15
16
  tmp/
16
17
  doc
17
18
  # JetBrains IDEA
data/.rubocop.yml CHANGED
@@ -25,6 +25,24 @@ AllCops:
25
25
  Exclude:
26
26
  - vendor/**/*
27
27
 
28
- # Disable temporarily
28
+ Metrics:
29
+ Description: Metrics cops are rarely useful
30
+ Enabled: false
31
+
29
32
  Style/HashSyntax:
33
+ Description: Disable temporarily (FIXME)
34
+ EnforcedStyle: ruby19
35
+ Enabled: false
36
+
37
+ Naming/FileName:
38
+ Description: Some files violates the snake_case convention
39
+ Exclude:
40
+ - 'lib/beaker-docker.rb'
41
+
42
+ # Style enforcements
43
+ Style/TrailingCommaInArrayLiteral:
44
+ EnforcedStyleForMultiline: consistent_comma
45
+ Style/IfUnlessModifier:
46
+ Enabled: false
47
+ Style/StringLiterals:
30
48
  Enabled: false
data/.rubocop_todo.yml CHANGED
@@ -6,22 +6,6 @@
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: 1
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12
- # Include: **/*.gemfile, **/Gemfile, **/gems.rb
13
- Bundler/OrderedGems:
14
- Exclude:
15
- - 'Gemfile'
16
-
17
- # Offense count: 3
18
- # Cop supports --auto-correct.
19
- # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
20
- # Include: **/*.gemspec
21
- Gemspec/OrderedDependencies:
22
- Exclude:
23
- - 'beaker-docker.gemspec'
24
-
25
9
  # Offense count: 1
26
10
  # Configuration parameters: Include.
27
11
  # Include: **/*.gemspec
@@ -37,43 +21,22 @@ Layout/ArgumentAlignment:
37
21
  Exclude:
38
22
  - 'lib/beaker/hypervisor/docker.rb'
39
23
 
40
- # Offense count: 1
41
- # Cop supports --auto-correct.
42
- # Configuration parameters: IndentationWidth.
43
- Layout/AssignmentIndentation:
44
- Exclude:
45
- - 'bin/beaker-docker'
46
-
47
24
  # Offense count: 2
48
25
  # Cop supports --auto-correct.
49
26
  Layout/BlockEndNewline:
50
27
  Exclude:
51
28
  - 'spec/beaker/hypervisor/docker_spec.rb'
52
29
 
53
- # Offense count: 1
54
- # Cop supports --auto-correct.
55
- Layout/CommentIndentation:
56
- Exclude:
57
- - 'Rakefile'
58
-
59
30
  # Offense count: 2
60
31
  # Cop supports --auto-correct.
61
32
  Layout/EmptyLineAfterGuardClause:
62
33
  Exclude:
63
- - 'Rakefile'
64
34
  - 'lib/beaker/hypervisor/docker.rb'
65
35
 
66
- # Offense count: 1
67
- # Cop supports --auto-correct.
68
- Layout/EmptyLineAfterMagicComment:
69
- Exclude:
70
- - 'beaker-docker.gemspec'
71
-
72
36
  # Offense count: 5
73
37
  # Cop supports --auto-correct.
74
38
  Layout/EmptyLines:
75
39
  Exclude:
76
- - 'bin/beaker-docker'
77
40
  - 'spec/beaker/hypervisor/docker_spec.rb'
78
41
 
79
42
  # Offense count: 5
@@ -82,7 +45,6 @@ Layout/EmptyLines:
82
45
  # SupportedStyles: empty_lines, no_empty_lines
83
46
  Layout/EmptyLinesAroundBlockBody:
84
47
  Exclude:
85
- - 'Rakefile'
86
48
  - 'spec/beaker/hypervisor/docker_spec.rb'
87
49
 
88
50
  # Offense count: 1
@@ -107,12 +69,6 @@ Layout/ExtraSpacing:
107
69
  Layout/FirstHashElementIndentation:
108
70
  EnforcedStyle: consistent
109
71
 
110
- # Offense count: 1
111
- # Cop supports --auto-correct.
112
- Layout/HeredocIndentation:
113
- Exclude:
114
- - 'Rakefile'
115
-
116
72
  # Offense count: 5
117
73
  # Cop supports --auto-correct.
118
74
  # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
@@ -171,7 +127,6 @@ Layout/SpaceAroundOperators:
171
127
  # SupportedStylesForEmptyBraces: space, no_space
172
128
  Layout/SpaceBeforeBlockBraces:
173
129
  Exclude:
174
- - 'beaker-docker.gemspec'
175
130
  - 'spec/beaker/hypervisor/docker_spec.rb'
176
131
 
177
132
  # Offense count: 2
@@ -191,7 +146,6 @@ Layout/SpaceInsideArrayLiteralBrackets:
191
146
  Layout/SpaceInsideBlockBraces:
192
147
  Exclude:
193
148
  - 'spec/beaker/hypervisor/docker_spec.rb'
194
- - 'spec/spec_helper.rb'
195
149
 
196
150
  # Offense count: 25
197
151
  # Cop supports --auto-correct.
@@ -209,16 +163,9 @@ Layout/SpaceInsideHashLiteralBraces:
209
163
  # SupportedStyles: space, no_space
210
164
  Layout/SpaceInsideParens:
211
165
  Exclude:
212
- - 'Rakefile'
213
166
  - 'lib/beaker/hypervisor/docker.rb'
214
167
  - 'spec/beaker/hypervisor/docker_spec.rb'
215
168
 
216
- # Offense count: 1
217
- # Cop supports --auto-correct.
218
- Lint/DeprecatedClassMethods:
219
- Exclude:
220
- - 'Gemfile'
221
-
222
169
  # Offense count: 1
223
170
  # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
224
171
  Lint/DuplicateBranch:
@@ -236,12 +183,6 @@ Lint/MissingSuper:
236
183
  Exclude:
237
184
  - 'lib/beaker/hypervisor/docker.rb'
238
185
 
239
- # Offense count: 1
240
- # Cop supports --auto-correct.
241
- Lint/NonDeterministicRequireOrder:
242
- Exclude:
243
- - 'spec/spec_helper.rb'
244
-
245
186
  # Offense count: 3
246
187
  # Cop supports --auto-correct.
247
188
  Lint/ParenthesesAsGroupedExpression:
@@ -249,12 +190,6 @@ Lint/ParenthesesAsGroupedExpression:
249
190
  - 'lib/beaker/hypervisor/docker.rb'
250
191
  - 'spec/beaker/hypervisor/docker_spec.rb'
251
192
 
252
- # Offense count: 1
253
- # Configuration parameters: AllowComments, AllowNil.
254
- Lint/SuppressedException:
255
- Exclude:
256
- - 'Rakefile'
257
-
258
193
  # Offense count: 1
259
194
  # Cop supports --auto-correct.
260
195
  # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
@@ -265,7 +200,6 @@ Lint/UnusedMethodArgument:
265
200
  # Offense count: 6
266
201
  Lint/UselessAssignment:
267
202
  Exclude:
268
- - 'Rakefile'
269
203
  - 'lib/beaker/hypervisor/docker.rb'
270
204
 
271
205
  # Offense count: 8
@@ -309,13 +243,6 @@ Metrics/ModuleLength:
309
243
  Metrics/PerceivedComplexity:
310
244
  Max: 39
311
245
 
312
- # Offense count: 1
313
- # Configuration parameters: ForbiddenDelimiters.
314
- # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
315
- Naming/HeredocDelimiterNaming:
316
- Exclude:
317
- - 'Rakefile'
318
-
319
246
  # Offense count: 2
320
247
  # Cop supports --auto-correct.
321
248
  Performance/Detect:
@@ -328,13 +255,6 @@ Performance/RedundantSplitRegexpArgument:
328
255
  Exclude:
329
256
  - 'lib/beaker/hypervisor/docker.rb'
330
257
 
331
- # Offense count: 3
332
- # Cop supports --auto-correct.
333
- Performance/RegexpMatch:
334
- Exclude:
335
- - 'Rakefile'
336
- - 'lib/beaker/hypervisor/docker.rb'
337
-
338
258
  # Offense count: 8
339
259
  # Cop supports --auto-correct.
340
260
  Performance/StringInclude:
@@ -354,17 +274,6 @@ RSpec/ContextWording:
354
274
  Exclude:
355
275
  - 'spec/beaker/hypervisor/docker_spec.rb'
356
276
 
357
- # Offense count: 1
358
- # Configuration parameters: IgnoredMetadata.
359
- RSpec/DescribeClass:
360
- Exclude:
361
- - 'acceptance/tests/00_default_spec.rb'
362
-
363
- # Offense count: 1
364
- RSpec/EmptyExampleGroup:
365
- Exclude:
366
- - 'acceptance/tests/00_default_spec.rb'
367
-
368
277
  # Offense count: 2
369
278
  # Cop supports --auto-correct.
370
279
  RSpec/EmptyLineAfterFinalLet:
@@ -447,17 +356,6 @@ RSpec/VerifiedDoubles:
447
356
  Exclude:
448
357
  - 'spec/beaker/hypervisor/docker_spec.rb'
449
358
 
450
- # Offense count: 4
451
- # Cop supports --auto-correct.
452
- Rake/Desc:
453
- Exclude:
454
- - 'Rakefile'
455
-
456
- # Offense count: 1
457
- Security/Eval:
458
- Exclude:
459
- - 'Gemfile'
460
-
461
359
  # Offense count: 3
462
360
  # Cop supports --auto-correct.
463
361
  # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
@@ -492,12 +390,6 @@ Style/ConditionalAssignment:
492
390
  Exclude:
493
391
  - 'lib/beaker/hypervisor/docker.rb'
494
392
 
495
- # Offense count: 4
496
- # Cop supports --auto-correct.
497
- Style/Dir:
498
- Exclude:
499
- - 'Rakefile'
500
-
501
393
  # Offense count: 1
502
394
  # Configuration parameters: AllowedConstants.
503
395
  Style/Documentation:
@@ -506,34 +398,14 @@ Style/Documentation:
506
398
  - 'test/**/*'
507
399
  - 'lib/beaker/hypervisor/docker.rb'
508
400
 
509
- # Offense count: 1
510
- # Cop supports --auto-correct.
511
- Style/Encoding:
512
- Exclude:
513
- - 'beaker-docker.gemspec'
514
-
515
- # Offense count: 1
516
- # Cop supports --auto-correct.
517
- Style/ExpandPathArguments:
518
- Exclude:
519
- - 'beaker-docker.gemspec'
520
-
521
401
  # Offense count: 10
522
402
  # Cop supports --auto-correct.
523
403
  # Configuration parameters: EnforcedStyle.
524
404
  # SupportedStyles: always, always_true, never
525
405
  Style/FrozenStringLiteralComment:
526
406
  Exclude:
527
- - '.simplecov'
528
- - 'Gemfile'
529
- - 'Rakefile'
530
- - 'acceptance/tests/00_default_spec.rb'
531
- - 'beaker-docker.gemspec'
532
- - 'bin/beaker-docker'
533
- - 'lib/beaker-docker/version.rb'
534
407
  - 'lib/beaker/hypervisor/docker.rb'
535
408
  - 'spec/beaker/hypervisor/docker_spec.rb'
536
- - 'spec/spec_helper.rb'
537
409
 
538
410
  # Offense count: 2
539
411
  # Configuration parameters: MinBodyLength.
@@ -552,35 +424,15 @@ Style/IfInsideElse:
552
424
  # Cop supports --auto-correct.
553
425
  Style/IfUnlessModifier:
554
426
  Exclude:
555
- - 'Gemfile'
556
- - 'Rakefile'
557
427
  - 'lib/beaker/hypervisor/docker.rb'
558
428
  - 'spec/beaker/hypervisor/docker_spec.rb'
559
429
 
560
- # Offense count: 1
561
- # Cop supports --auto-correct.
562
- # Configuration parameters: AllowedMethods.
563
- # AllowedMethods: nonzero?
564
- Style/IfWithBooleanLiteralBranches:
565
- Exclude:
566
- - 'Rakefile'
567
-
568
430
  # Offense count: 1
569
431
  # Cop supports --auto-correct.
570
432
  Style/LineEndConcatenation:
571
433
  Exclude:
572
434
  - 'lib/beaker/hypervisor/docker.rb'
573
435
 
574
- # Offense count: 4
575
- # Cop supports --auto-correct.
576
- # Configuration parameters: EnforcedStyle.
577
- # SupportedStyles: literals, strict
578
- Style/MutableConstant:
579
- Exclude:
580
- - 'Rakefile'
581
- - 'bin/beaker-docker'
582
- - 'lib/beaker-docker/version.rb'
583
-
584
436
  # Offense count: 1
585
437
  # Cop supports --auto-correct.
586
438
  # Configuration parameters: EnforcedStyle, MinBodyLength.
@@ -608,8 +460,6 @@ Style/ParenthesesAroundCondition:
608
460
  # Configuration parameters: PreferredDelimiters.
609
461
  Style/PercentLiteralDelimiters:
610
462
  Exclude:
611
- - 'Rakefile'
612
- - 'beaker-docker.gemspec'
613
463
  - 'lib/beaker/hypervisor/docker.rb'
614
464
 
615
465
  # Offense count: 2
@@ -625,7 +475,6 @@ Style/PreferredHashMethods:
625
475
  # Configuration parameters: Methods.
626
476
  Style/RedundantArgument:
627
477
  Exclude:
628
- - 'Rakefile'
629
478
  - 'lib/beaker/hypervisor/docker.rb'
630
479
 
631
480
  # Offense count: 1
@@ -640,12 +489,6 @@ Style/RedundantException:
640
489
  Exclude:
641
490
  - 'lib/beaker/hypervisor/docker.rb'
642
491
 
643
- # Offense count: 2
644
- # Cop supports --auto-correct.
645
- Style/RedundantPercentQ:
646
- Exclude:
647
- - 'beaker-docker.gemspec'
648
-
649
492
  # Offense count: 2
650
493
  # Cop supports --auto-correct.
651
494
  Style/RedundantRegexpEscape:
@@ -657,7 +500,6 @@ Style/RedundantRegexpEscape:
657
500
  # Configuration parameters: AllowMultipleReturnValues.
658
501
  Style/RedundantReturn:
659
502
  Exclude:
660
- - 'Rakefile'
661
503
  - 'lib/beaker/hypervisor/docker.rb'
662
504
 
663
505
  # Offense count: 1
@@ -668,20 +510,11 @@ Style/RegexpLiteral:
668
510
  Exclude:
669
511
  - 'lib/beaker/hypervisor/docker.rb'
670
512
 
671
- # Offense count: 1
672
- # Cop supports --auto-correct.
673
- # Configuration parameters: EnforcedStyle.
674
- # SupportedStyles: only_raise, only_fail, semantic
675
- Style/SignalException:
676
- Exclude:
677
- - 'Rakefile'
678
-
679
513
  # Offense count: 2
680
514
  # Cop supports --auto-correct.
681
515
  Style/StringConcatenation:
682
516
  Exclude:
683
517
  - 'lib/beaker/hypervisor/docker.rb'
684
- - 'spec/spec_helper.rb'
685
518
 
686
519
  # Offense count: 64
687
520
  # Cop supports --auto-correct.
@@ -689,8 +522,6 @@ Style/StringConcatenation:
689
522
  # SupportedStyles: single_quotes, double_quotes
690
523
  Style/StringLiterals:
691
524
  Exclude:
692
- - 'Rakefile'
693
- - 'beaker-docker.gemspec'
694
525
  - 'lib/beaker/hypervisor/docker.rb'
695
526
  - 'spec/beaker/hypervisor/docker_spec.rb'
696
527
 
@@ -709,7 +540,6 @@ Style/TernaryParentheses:
709
540
  Style/TrailingCommaInArrayLiteral:
710
541
  Exclude:
711
542
  - 'spec/beaker/hypervisor/docker_spec.rb'
712
- - 'spec/spec_helper.rb'
713
543
 
714
544
  # Offense count: 25
715
545
  # Cop supports --auto-correct.
data/.simplecov CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  SimpleCov.configure do
2
4
  add_filter 'spec/'
3
5
  add_filter 'vendor/'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,35 @@
1
1
  # Changelog
2
2
 
3
- ## [1.4.0](https://github.com/voxpupuli/beaker-docker/tree/1.4.0) (2023-03-09)
3
+ ## [1.5.0](https://github.com/voxpupuli/beaker-docker/tree/1.5.0) (2023-03-24)
4
+
5
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/1.4.0...1.5.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Ruby 3.2 compatibility [\#100](https://github.com/voxpupuli/beaker-docker/pull/100) ([ekohl](https://github.com/ekohl))
10
+ - Set required Ruby version to 2.4+ [\#99](https://github.com/voxpupuli/beaker-docker/pull/99) ([ekohl](https://github.com/ekohl))
11
+ - Simplify port detection code [\#95](https://github.com/voxpupuli/beaker-docker/pull/95) ([ekohl](https://github.com/ekohl))
12
+ - Add Ruby 3.1 to CI matrix [\#87](https://github.com/voxpupuli/beaker-docker/pull/87) ([bastelfreak](https://github.com/bastelfreak))
13
+ - Use ssh-keygen -A on Red Hat-based distros & SuSE/SLES [\#73](https://github.com/voxpupuli/beaker-docker/pull/73) ([ekohl](https://github.com/ekohl))
14
+
15
+ **Fixed bugs:**
16
+
17
+ - Deal with docker\_cmd being an array and remove use of =~ [\#93](https://github.com/voxpupuli/beaker-docker/pull/93) ([ekohl](https://github.com/ekohl))
18
+
19
+ **Merged pull requests:**
20
+
21
+ - Remove Gemfile.local from git [\#104](https://github.com/voxpupuli/beaker-docker/pull/104) ([ekohl](https://github.com/ekohl))
22
+ - Fix rubocop Naming/FileName [\#103](https://github.com/voxpupuli/beaker-docker/pull/103) ([jay7x](https://github.com/jay7x))
23
+ - cleanup GitHub actions [\#102](https://github.com/voxpupuli/beaker-docker/pull/102) ([bastelfreak](https://github.com/bastelfreak))
24
+ - Remove unused rspec-its dependency [\#98](https://github.com/voxpupuli/beaker-docker/pull/98) ([ekohl](https://github.com/ekohl))
25
+ - Allow fakefs 2.x [\#97](https://github.com/voxpupuli/beaker-docker/pull/97) ([ekohl](https://github.com/ekohl))
26
+ - Remove yard rake tasks [\#96](https://github.com/voxpupuli/beaker-docker/pull/96) ([ekohl](https://github.com/ekohl))
27
+ - rubocop: fix dependency ordering [\#94](https://github.com/voxpupuli/beaker-docker/pull/94) ([bastelfreak](https://github.com/bastelfreak))
28
+ - GHA: Use builtin podman [\#86](https://github.com/voxpupuli/beaker-docker/pull/86) ([bastelfreak](https://github.com/bastelfreak))
29
+ - GHA: Use builtin docker [\#85](https://github.com/voxpupuli/beaker-docker/pull/85) ([bastelfreak](https://github.com/bastelfreak))
30
+ - Fix rubocop-related issues \(part 1\) [\#75](https://github.com/voxpupuli/beaker-docker/pull/75) ([jay7x](https://github.com/jay7x))
31
+
32
+ ## [1.4.0](https://github.com/voxpupuli/beaker-docker/tree/1.4.0) (2023-03-10)
4
33
 
5
34
  [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/1.3.0...1.4.0)
6
35
 
data/Gemfile CHANGED
@@ -1,14 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2
4
 
3
5
  gemspec
4
6
 
5
- if File.exists? "#{__FILE__}.local"
6
- eval(File.read("#{__FILE__}.local"), binding)
7
+ group :acceptance_testing do
8
+ gem 'beaker-rspec'
7
9
  end
8
10
 
9
11
  group :coverage, optional: ENV['COVERAGE'] != 'yes' do
10
- gem 'simplecov-console', require: false
11
12
  gem 'codecov', require: false
13
+ gem 'simplecov-console', require: false
12
14
  end
13
15
 
14
16
  group :release do
data/Rakefile CHANGED
@@ -1,24 +1,29 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rspec/core/rake_task'
2
4
 
3
- namespace :lint do
5
+ begin
4
6
  require 'rubocop/rake_task'
7
+ rescue LoadError
8
+ # RuboCop is an optional group
9
+ else
5
10
  RuboCop::RakeTask.new(:rubocop) do |task|
6
- # Use Rubocop's Github Actions formatter
7
- if ENV['GITHUB_ACTIONS'] == 'true'
8
- task.formatters << 'github'
9
- end
11
+ # These make the rubocop experience maybe slightly less terrible
12
+ task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
13
+ # Use Rubocop's Github Actions formatter if possible
14
+ task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true'
10
15
  end
11
16
  end
12
17
 
13
18
  namespace :test do
14
19
  namespace :spec do
15
- desc "Run spec tests"
20
+ desc 'Run spec tests'
16
21
  RSpec::Core::RakeTask.new(:run) do |t|
17
22
  t.rspec_opts = ['--color', '--format documentation']
18
23
  t.pattern = 'spec/'
19
24
  end
20
25
 
21
- desc "Run spec tests with coverage"
26
+ desc 'Run spec tests with coverage'
22
27
  RSpec::Core::RakeTask.new(:coverage) do |t|
23
28
  ENV['BEAKER_DOCKER_COVERAGE'] = 'y'
24
29
  t.rspec_opts = ['--color', '--format documentation']
@@ -27,26 +32,25 @@ namespace :test do
27
32
  end
28
33
 
29
34
  namespace :acceptance do
30
- desc <<-EOS
31
- A quick acceptance test, named because it has no pre-suites to run
32
- EOS
35
+ desc 'A quick acceptance test, named because it has no pre-suites to run'
33
36
  task :quick do
34
-
35
- # setup & load_path of beaker's acceptance base and lib directory
36
- beaker_gem_spec = Gem::Specification.find_by_name('beaker')
37
- beaker_gem_dir = beaker_gem_spec.gem_dir
38
- beaker_test_base_dir = File.join(beaker_gem_dir, 'acceptance/tests/base')
39
- load_path_option = File.join(beaker_gem_dir, 'acceptance/lib')
40
-
41
- ENV['BEAKER_setfile'] = 'acceptance/config/nodes/hosts.yaml' unless ENV.key?('BEAKER_setfile')
42
- sh("beaker",
43
- # We can't run these tests until the rsync support in the main
44
- # beaker/host.rb is updated to work with passwords.
45
- # "--tests", beaker_test_base_dir,
46
- # "--load-path", load_path_option,
47
- "--tests", 'acceptance/tests/',
48
- "--log-level", "debug",
49
- "--debug")
37
+ ## setup & load_path of beaker's acceptance base and lib directory
38
+ ## see below for the reason why it's commented out atm
39
+ # beaker_gem_spec = Gem::Specification.find_by_name('beaker')
40
+ # beaker_gem_dir = beaker_gem_spec.gem_dir
41
+ # beaker_test_base_dir = File.join(beaker_gem_dir, 'acceptance/tests/base')
42
+ # load_path_option = File.join(beaker_gem_dir, 'acceptance/lib')
43
+
44
+ ENV['BEAKER_setfile'] = 'acceptance/config/nodes/hosts.yaml'
45
+ sh('beaker',
46
+ '--hosts', 'acceptance/config/nodes/hosts.yaml',
47
+ ## We can't run these tests until the rsync support in the main
48
+ ## beaker/host.rb is updated to work with passwords.
49
+ # '--tests', beaker_test_base_dir,
50
+ # '--load-path', load_path_option,
51
+ '--tests', 'acceptance/tests/',
52
+ '--log-level', 'debug',
53
+ '--debug')
50
54
  end
51
55
  end
52
56
  end
@@ -54,126 +58,22 @@ end
54
58
  # namespace-named default tasks.
55
59
  # these are the default tasks invoked when only the namespace is referenced.
56
60
  # they're needed because `task :default` in those blocks doesn't work as expected.
57
- task 'test:spec' => 'test:spec:run'
58
- task 'test:acceptance' => 'test:acceptance:quick'
61
+ task 'test:spec': %i[test:spec:run]
62
+ task 'test:acceptance': %i[test:acceptance:quick]
59
63
 
60
64
  # global defaults
61
- task :lint => %i[lint:rubocop]
62
- task :test => 'test:spec'
63
- task :default => :test
64
-
65
- ###########################################################
66
- #
67
- # Documentation Tasks
68
- #
69
- ###########################################################
70
- DOCS_DAEMON = "yard server --reload --daemon --server thin"
71
- FOREGROUND_SERVER = 'bundle exec yard server --reload --verbose --server thin lib/beaker'
72
-
73
- def running?( cmdline )
74
- ps = `ps -ef`
75
- found = ps.lines.grep( /#{Regexp.quote( cmdline )}/ )
76
- if found.length > 1
77
- raise StandardError, "Found multiple YARD Servers. Don't know what to do."
78
- end
79
-
80
- yes = found.empty? ? false : true
81
- return yes, found.first
82
- end
83
-
84
- def pid_from( output )
85
- output.squeeze(' ').strip.split(' ')[1]
86
- end
87
-
88
- desc 'Start the documentation server in the foreground'
89
- task :docs => 'docs:clear' do
90
- original_dir = Dir.pwd
91
- Dir.chdir( File.expand_path(File.dirname(__FILE__)) )
92
- sh FOREGROUND_SERVER
93
- Dir.chdir( original_dir )
94
- end
95
-
96
- namespace :docs do
97
- desc 'Clear the generated documentation cache'
98
- task :clear do
99
- original_dir = Dir.pwd
100
- Dir.chdir( File.expand_path(File.dirname(__FILE__)) )
101
- sh 'rm -rf docs'
102
- Dir.chdir( original_dir )
103
- end
104
-
105
- desc 'Generate static documentation'
106
- task :gen => 'docs:clear' do
107
- original_dir = Dir.pwd
108
- Dir.chdir( File.expand_path(File.dirname(__FILE__)) )
109
- output = `bundle exec yard doc`
110
- puts output
111
- if output =~ /\[warn\]|\[error\]/
112
- fail "Errors/Warnings during yard documentation generation"
113
- end
114
- Dir.chdir( original_dir )
115
- end
116
-
117
- desc 'Run the documentation server in the background, alias `bg`'
118
- task :background => 'docs:clear' do
119
- yes, output = running?( DOCS_DAEMON )
120
- if yes
121
- puts "Not starting a new YARD Server..."
122
- puts "Found one running with pid #{pid_from( output )}."
123
- else
124
- original_dir = Dir.pwd
125
- Dir.chdir( File.expand_path(File.dirname(__FILE__)) )
126
- sh "bundle exec #{DOCS_DAEMON}"
127
- Dir.chdir( original_dir )
128
- end
129
- end
130
-
131
- task(:bg) { Rake::Task['docs:background'].invoke }
132
-
133
- desc 'Check the status of the documentation server'
134
- task :status do
135
- yes, output = running?( DOCS_DAEMON )
136
- if yes
137
- pid = pid_from( output )
138
- puts "Found a YARD Server running with pid #{pid}"
139
- else
140
- puts "Could not find a running YARD Server."
141
- end
142
- end
143
-
144
- desc "Stop a running YARD Server"
145
- task :stop do
146
- yes, output = running?( DOCS_DAEMON )
147
- if yes
148
- pid = pid_from( output )
149
- puts "Found a YARD Server running with pid #{pid}"
150
- `kill #{pid}`
151
- puts "Stopping..."
152
- yes, output = running?( DOCS_DAEMON )
153
- if yes
154
- `kill -9 #{pid}`
155
- yes, output = running?( DOCS_DAEMON )
156
- if yes
157
- puts "Could not Stop Server!"
158
- else
159
- puts "Server stopped."
160
- end
161
- else
162
- puts "Server stopped."
163
- end
164
- else
165
- puts "Could not find a running YARD Server"
166
- end
167
- end
168
- end
65
+ task lint: %i[lint:rubocop]
66
+ task test: %i[test:spec]
67
+ task default: %i[test]
169
68
 
170
69
  begin
171
70
  require 'rubygems'
172
71
  require 'github_changelog_generator/task'
173
72
  rescue LoadError
73
+ # Do nothing if no required gem installed
174
74
  else
175
75
  GitHubChangelogGenerator::RakeTask.new :changelog do |config|
176
- config.exclude_labels = %w{duplicate question invalid wontfix wont-fix skip-changelog}
76
+ config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog]
177
77
  config.user = 'voxpupuli'
178
78
  config.project = 'beaker-docker'
179
79
  gem_version = Gem::Specification.load("#{config.project}.gemspec").version
@@ -1,10 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'beaker'
2
- require 'beaker-rspec'
3
4
 
4
- RSpec.describe 'it can connect' do
5
+ test_name 'Ensure docker container is accessible' do
5
6
  hosts.each do |host|
6
- context "on #{host}" do
7
- on(host, 'ls /tmp')
7
+ step "on #{host}" do
8
+ on(host, 'true')
8
9
  end
9
10
  end
10
11
  end
@@ -1,39 +1,41 @@
1
- # -*- encoding: utf-8 -*-
2
- $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift File.expand_path('lib', __dir__)
3
4
  require 'beaker-docker/version'
4
5
 
5
6
  Gem::Specification.new do |s|
6
- s.name = "beaker-docker"
7
+ s.name = 'beaker-docker'
7
8
  s.version = BeakerDocker::VERSION
8
9
  s.authors = [
9
- "Vox Pupuli",
10
- "Rishi Javia",
11
- "Kevin Imber",
12
- "Tony Vu"
10
+ 'Vox Pupuli',
11
+ 'Rishi Javia',
12
+ 'Kevin Imber',
13
+ 'Tony Vu',
13
14
  ]
14
- s.email = ["voxpupuli@groups.io"]
15
- s.homepage = "https://github.com/voxpupuli/beaker-docker"
16
- s.summary = %q{Beaker DSL Extension Helpers!}
17
- s.description = %q{For use for the Beaker acceptance testing tool}
15
+ s.email = ['voxpupuli@groups.io']
16
+ s.homepage = 'https://github.com/voxpupuli/beaker-docker'
17
+ s.summary = 'Docker hypervisor for Beaker acceptance testing framework'
18
+ s.description = 'Allows running Beaker tests using Docker'
18
19
  s.license = 'Apache-2.0'
19
20
 
20
21
  s.files = `git ls-files`.split("\n")
21
22
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
22
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
23
- s.require_paths = ["lib"]
23
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
24
+ s.require_paths = ['lib']
25
+
26
+ s.required_ruby_version = '>= 2.4', '< 4'
24
27
 
25
28
  # Testing dependencies
26
- s.add_development_dependency 'rspec', '~> 3.0'
27
- s.add_development_dependency 'rspec-its', '~> 1.3'
28
- s.add_development_dependency 'fakefs', '~> 1.3'
29
+ s.add_development_dependency 'fakefs', '>= 1.3', '< 3.0'
29
30
  s.add_development_dependency 'rake', '~> 13.0'
31
+ s.add_development_dependency 'rspec', '~> 3.0'
30
32
  s.add_development_dependency 'rubocop', '~> 1.12.0'
31
33
  s.add_development_dependency 'rubocop-performance', '~> 1.10'
32
34
  s.add_development_dependency 'rubocop-rake', '~> 0.2'
33
35
  s.add_development_dependency 'rubocop-rspec', '>= 1.44'
34
36
 
35
37
  # Run time dependencies
36
- s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
37
- s.add_runtime_dependency 'docker-api', '~> 2.1'
38
38
  s.add_runtime_dependency 'beaker', '>= 4.34'
39
+ s.add_runtime_dependency 'docker-api', '~> 2.1'
40
+ s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
39
41
  end
data/bin/beaker-docker CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'rubygems' unless defined?(Gem)
4
5
  require 'beaker-docker'
5
6
 
6
- VERSION_STRING =
7
- "
7
+ VERSION_STRING = <<'VER'
8
8
  _ .--.
9
9
  ( ` )
10
10
  beaker-docker .-' `--,
@@ -14,19 +14,17 @@ VERSION_STRING =
14
14
  ;| _| _| _| '-'__,--'`--'
15
15
  | _| _| _| _| |
16
16
  _ || _| _| _| _| %s
17
- _( `--.\\_| _| _| _|/
17
+ _( `--.\_| _| _| _|/
18
18
  .-' )--,| _| _|.`
19
19
  (__, (_ ) )_| _| /
20
- `-.__.\\ _,--'\\|__|__/
20
+ `-.__.\ _,--'\|__|__/
21
21
  ;____;
22
- \\YT/
22
+ \YT/
23
23
  ||
24
- |\"\"|
24
+ |""|
25
25
  '=='
26
- "
26
+ VER
27
27
 
28
-
29
-
30
- puts BeakerDocker::VERSION
28
+ puts VERSION_STRING % BeakerDocker::VERSION
31
29
 
32
30
  exit 0
@@ -37,7 +37,7 @@ module Beaker
37
37
  ::Docker.logger = @logger
38
38
 
39
39
  # Find out what kind of remote instance we are talking against
40
- if @docker_version['Version'] =~ /swarm/
40
+ if /swarm/.match?(@docker_version['Version'])
41
41
  @docker_type = 'swarm'
42
42
  unless ENV['DOCKER_REGISTRY']
43
43
  raise "Using Swarm with beaker requires a private registry. Please setup the private registry and set the 'DOCKER_REGISTRY' env var"
@@ -58,7 +58,7 @@ module Beaker
58
58
 
59
59
  # If the container is running ssh as its init process then this method
60
60
  # will cause issues.
61
- if host[:docker_cmd] =~ /sshd/
61
+ if /sshd/.match?(Array(host[:docker_cmd]).first)
62
62
  def host.ssh_service_restart
63
63
  self[:docker_container].exec(%w(kill -1 1))
64
64
  end
@@ -170,23 +170,19 @@ module Beaker
170
170
 
171
171
  # Container to container
172
172
  unless ip && port
173
- ip = nil
174
- port = nil
175
-
176
173
  ip = network_settings['IPAddress']
177
- port = 22 if ip && !ip.empty?
174
+ port = ip && !ip.empty? ? 22 : nil
178
175
  end
179
176
 
180
177
  # Container through gateway
181
178
  unless ip && port
182
- ip = nil
183
- port = nil
184
-
185
179
  ip = network_settings['Gateway']
186
180
 
187
181
  if ip && !ip.empty?
188
182
  port22 = network_settings.dig('PortBindings','22/tcp')
189
183
  port = port22[0]['HostPort'] if port22
184
+ else
185
+ port = nil
190
186
  end
191
187
  end
192
188
 
@@ -538,23 +534,20 @@ module Beaker
538
534
  dockerfile += <<~DF
539
535
  RUN dnf clean all \
540
536
  && dnf install -y sudo openssh-server openssh-clients #{additional_packages.join(' ')} \
541
- && ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key \
542
- && ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key \
537
+ && ssh-keygen -A \
543
538
  && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/*
544
539
  DF
545
540
  when /^el-/, /centos/, /fedora/, /redhat/, /eos/
546
541
  dockerfile += <<~DF
547
542
  RUN yum clean all \
548
543
  && yum install -y sudo openssh-server openssh-clients #{additional_packages.join(' ')} \
549
- && ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key \
550
- && ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key \
544
+ && ssh-keygen -A \
551
545
  && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/*
552
546
  DF
553
547
  when /opensuse/, /sles/
554
548
  dockerfile += <<~DF
555
549
  RUN zypper -n in openssh #{additional_packages.join(' ')} \
556
- && ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key \
557
- && ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key \
550
+ && ssh-keygen -A \
558
551
  && sed -ri 's/^#?UsePAM .*/UsePAM no/' /etc/ssh/sshd_config \
559
552
  && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/*
560
553
  DF
@@ -622,7 +615,7 @@ module Beaker
622
615
  '-e', 's/^#?UseDNS .*/UseDNS no/',
623
616
  # Unbreak users with a bunch of SSH keys loaded in their keyring.
624
617
  '-e', 's/^#?MaxAuthTries.*/MaxAuthTries 1000/',
625
- '/etc/ssh/sshd_config'])
618
+ '/etc/ssh/sshd_config',])
626
619
 
627
620
  return unless host
628
621
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BeakerDocker
2
- VERSION = '1.4.0'
4
+ VERSION = '1.5.0'
3
5
  end
@@ -0,0 +1 @@
1
+ # frozen_string_literal: true
@@ -688,7 +688,7 @@ module Beaker
688
688
  'platform' => platform,
689
689
  'image' => 'foobar',
690
690
  })
691
- expect( dockerfile ).to be =~ /ENV container docker/
691
+ expect( dockerfile ).to match(/ENV container docker/)
692
692
  end
693
693
  end
694
694
 
@@ -705,7 +705,7 @@ module Beaker
705
705
  ]
706
706
  })
707
707
 
708
- expect( dockerfile ).to be =~ /RUN special one\nRUN special two\nRUN special three/
708
+ expect( dockerfile ).to match(/RUN special one\nRUN special two\nRUN special three/)
709
709
  end
710
710
  end
711
711
 
@@ -722,7 +722,7 @@ module Beaker
722
722
  ]
723
723
  })
724
724
 
725
- expect( dockerfile ).to be =~ /RUN special one\nRUN special two\nRUN special three/
725
+ expect( dockerfile ).to match(/RUN special one\nRUN special two\nRUN special three/)
726
726
  end
727
727
  end
728
728
 
@@ -735,7 +735,7 @@ module Beaker
735
735
  'docker_image_entrypoint' => '/bin/bash'
736
736
  })
737
737
 
738
- expect( dockerfile ).to be =~ %r{ENTRYPOINT /bin/bash}
738
+ expect( dockerfile ).to match(%r{ENTRYPOINT /bin/bash})
739
739
  end
740
740
  end
741
741
 
@@ -746,7 +746,7 @@ module Beaker
746
746
  'image' => 'foobar',
747
747
  })
748
748
 
749
- expect( dockerfile ).to be =~ /zypper -n in openssh/
749
+ expect( dockerfile ).to match(/zypper -n in openssh/)
750
750
  end
751
751
 
752
752
  (22..39).to_a.each do | fedora_release |
@@ -757,7 +757,7 @@ module Beaker
757
757
  'image' => 'foobar',
758
758
  })
759
759
 
760
- expect( dockerfile ).to be =~ /dnf install -y sudo/
760
+ expect( dockerfile ).to match(/dnf install -y sudo/)
761
761
  end
762
762
  end
763
763
 
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,5 @@
1
- require 'rspec/its'
1
+ # frozen_string_literal: true
2
+
2
3
  require 'beaker'
3
4
 
4
5
  begin
@@ -6,17 +7,17 @@ begin
6
7
  require 'simplecov-console'
7
8
  require 'codecov'
8
9
  rescue LoadError
10
+ # Do nothing if no required gem installed
9
11
  else
10
12
  SimpleCov.start do
11
13
  track_files 'lib/**/*.rb'
12
14
 
13
15
  add_filter '/spec'
14
-
15
- enable_coverage :branch
16
-
17
16
  # do not track vendored files
18
17
  add_filter '/vendor'
19
18
  add_filter '/.vendor'
19
+
20
+ enable_coverage :branch
20
21
  end
21
22
 
22
23
  SimpleCov.formatters = [
@@ -25,7 +26,7 @@ else
25
26
  ]
26
27
  end
27
28
 
28
- Dir.glob(Dir.pwd + '/lib/beaker/hypervisor/*.rb') {|file| require file}
29
+ Dir['./lib/beaker/hypervisor/*.rb'].sort.each { |file| require file }
29
30
 
30
31
  # setup & require beaker's spec_helper.rb
31
32
  beaker_gem_spec = Gem::Specification.find_by_name('beaker')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
@@ -11,64 +11,56 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-03-10 00:00:00.000000000 Z
14
+ date: 2023-03-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: rspec
17
+ name: fakefs
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - "~>"
20
+ - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: '3.0'
23
- type: :development
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - "~>"
22
+ version: '1.3'
23
+ - - "<"
28
24
  - !ruby/object:Gem::Version
29
25
  version: '3.0'
30
- - !ruby/object:Gem::Dependency
31
- name: rspec-its
32
- requirement: !ruby/object:Gem::Requirement
33
- requirements:
34
- - - "~>"
35
- - !ruby/object:Gem::Version
36
- version: '1.3'
37
26
  type: :development
38
27
  prerelease: false
39
28
  version_requirements: !ruby/object:Gem::Requirement
40
29
  requirements:
41
- - - "~>"
30
+ - - ">="
42
31
  - !ruby/object:Gem::Version
43
32
  version: '1.3'
33
+ - - "<"
34
+ - !ruby/object:Gem::Version
35
+ version: '3.0'
44
36
  - !ruby/object:Gem::Dependency
45
- name: fakefs
37
+ name: rake
46
38
  requirement: !ruby/object:Gem::Requirement
47
39
  requirements:
48
40
  - - "~>"
49
41
  - !ruby/object:Gem::Version
50
- version: '1.3'
42
+ version: '13.0'
51
43
  type: :development
52
44
  prerelease: false
53
45
  version_requirements: !ruby/object:Gem::Requirement
54
46
  requirements:
55
47
  - - "~>"
56
48
  - !ruby/object:Gem::Version
57
- version: '1.3'
49
+ version: '13.0'
58
50
  - !ruby/object:Gem::Dependency
59
- name: rake
51
+ name: rspec
60
52
  requirement: !ruby/object:Gem::Requirement
61
53
  requirements:
62
54
  - - "~>"
63
55
  - !ruby/object:Gem::Version
64
- version: '13.0'
56
+ version: '3.0'
65
57
  type: :development
66
58
  prerelease: false
67
59
  version_requirements: !ruby/object:Gem::Requirement
68
60
  requirements:
69
61
  - - "~>"
70
62
  - !ruby/object:Gem::Version
71
- version: '13.0'
63
+ version: '3.0'
72
64
  - !ruby/object:Gem::Dependency
73
65
  name: rubocop
74
66
  requirement: !ruby/object:Gem::Requirement
@@ -126,19 +118,19 @@ dependencies:
126
118
  - !ruby/object:Gem::Version
127
119
  version: '1.44'
128
120
  - !ruby/object:Gem::Dependency
129
- name: stringify-hash
121
+ name: beaker
130
122
  requirement: !ruby/object:Gem::Requirement
131
123
  requirements:
132
- - - "~>"
124
+ - - ">="
133
125
  - !ruby/object:Gem::Version
134
- version: 0.0.0
126
+ version: '4.34'
135
127
  type: :runtime
136
128
  prerelease: false
137
129
  version_requirements: !ruby/object:Gem::Requirement
138
130
  requirements:
139
- - - "~>"
131
+ - - ">="
140
132
  - !ruby/object:Gem::Version
141
- version: 0.0.0
133
+ version: '4.34'
142
134
  - !ruby/object:Gem::Dependency
143
135
  name: docker-api
144
136
  requirement: !ruby/object:Gem::Requirement
@@ -154,20 +146,20 @@ dependencies:
154
146
  - !ruby/object:Gem::Version
155
147
  version: '2.1'
156
148
  - !ruby/object:Gem::Dependency
157
- name: beaker
149
+ name: stringify-hash
158
150
  requirement: !ruby/object:Gem::Requirement
159
151
  requirements:
160
- - - ">="
152
+ - - "~>"
161
153
  - !ruby/object:Gem::Version
162
- version: '4.34'
154
+ version: 0.0.0
163
155
  type: :runtime
164
156
  prerelease: false
165
157
  version_requirements: !ruby/object:Gem::Requirement
166
158
  requirements:
167
- - - ">="
159
+ - - "~>"
168
160
  - !ruby/object:Gem::Version
169
- version: '4.34'
170
- description: For use for the Beaker acceptance testing tool
161
+ version: 0.0.0
162
+ description: Allows running Beaker tests using Docker
171
163
  email:
172
164
  - voxpupuli@groups.io
173
165
  executables:
@@ -175,6 +167,7 @@ executables:
175
167
  extensions: []
176
168
  extra_rdoc_files: []
177
169
  files:
170
+ - ".editorconfig"
178
171
  - ".github/dependabot.yml"
179
172
  - ".github/workflows/release.yml"
180
173
  - ".github/workflows/test.yml"
@@ -184,7 +177,6 @@ files:
184
177
  - ".simplecov"
185
178
  - CHANGELOG.md
186
179
  - Gemfile
187
- - Gemfile.local
188
180
  - LICENSE
189
181
  - README.md
190
182
  - Rakefile
@@ -193,6 +185,7 @@ files:
193
185
  - beaker-docker.gemspec
194
186
  - bin/beaker-docker
195
187
  - docker.md
188
+ - lib/beaker-docker.rb
196
189
  - lib/beaker-docker/version.rb
197
190
  - lib/beaker/hypervisor/docker.rb
198
191
  - spec/beaker/hypervisor/docker_spec.rb
@@ -209,7 +202,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
209
202
  requirements:
210
203
  - - ">="
211
204
  - !ruby/object:Gem::Version
212
- version: '0'
205
+ version: '2.4'
206
+ - - "<"
207
+ - !ruby/object:Gem::Version
208
+ version: '4'
213
209
  required_rubygems_version: !ruby/object:Gem::Requirement
214
210
  requirements:
215
211
  - - ">="
@@ -219,5 +215,5 @@ requirements: []
219
215
  rubygems_version: 3.2.33
220
216
  signing_key:
221
217
  specification_version: 4
222
- summary: Beaker DSL Extension Helpers!
218
+ summary: Docker hypervisor for Beaker acceptance testing framework
223
219
  test_files: []
data/Gemfile.local DELETED
@@ -1,3 +0,0 @@
1
- group :acceptance_testing do
2
- gem "beaker-rspec"
3
- end