beaker-docker 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec5e8da1c0bde0ac2d4fb47e3aa6e895dfa64c847601eb8ee2a81b6e6ddbcb99
4
- data.tar.gz: c9a290762c10c8353be0ac34c5d2d3a71560f2d872d04f6c524281518cf54c4b
3
+ metadata.gz: 68081b2882922ccbb645c18cd13793230a072aad07154d51da1fa5d1b2876186
4
+ data.tar.gz: 20894761944fb07007daacdaf6e466bc282a4a418d07d304776bdc77738a23d4
5
5
  SHA512:
6
- metadata.gz: 74aab6d73118cfea7aa6a29c7f1159c900dd392fe5de144f5440d6f0e9b4630f7c87010903b0342e2ed3edd7626efcdcd1f96d5aa6226a5db27a92be54e89b60
7
- data.tar.gz: 99a7fc569eea379541e5177432daa3e6c568773de88d6ba56047a69231fab107e76397167a024eae6192f296d9c09b235820df9d4c55f25f47050cbad9a25d5c
6
+ metadata.gz: 3d12134709510c8508550b7b1b33e68138632ce0c7bc3fe5ac5d72d3a2e5e106933c769f9e9901ce37f27bde1b52c2f6f5f183883246c2e5d96f71214a1f01eb
7
+ data.tar.gz: d075fae3a65f02084ebc54f6dd5059381d60849b603cb268d1d55dfe6ba46f50fb6345a21af05eca1f3652398bcafbf1100ffe7d966f69bd3f736f724caefd09
@@ -18,7 +18,7 @@ jobs:
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:
@@ -46,7 +46,7 @@ jobs:
46
46
  - name: spec tests
47
47
  run: bundle exec rake test:spec
48
48
  - name: Build gem
49
- run: gem build *.gemspec
49
+ run: gem build --strict --verbose *.gemspec
50
50
 
51
51
  docker:
52
52
  runs-on: ubuntu-latest
data/.rubocop.yml CHANGED
@@ -2,7 +2,7 @@
2
2
  inherit_from: .rubocop_todo.yml
3
3
 
4
4
  inherit_gem:
5
- beaker: rubocop.yml
5
+ voxpupuli-rubocop: rubocop.yml
6
6
 
7
7
  Naming/FileName:
8
8
  Description: Some files violates the snake_case convention
data/.rubocop_todo.yml CHANGED
@@ -1,16 +1,11 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2023-03-28 10:44:07 UTC using RuboCop version 1.48.1.
3
+ # on 2023-05-05 14:11:54 UTC using RuboCop version 1.50.2.
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: 4
10
- RSpec/AnyInstance:
11
- Exclude:
12
- - 'spec/beaker/hypervisor/docker_spec.rb'
13
-
14
9
  # Offense count: 23
15
10
  # Configuration parameters: CountAsOne.
16
11
  RSpec/ExampleLength:
@@ -31,12 +26,6 @@ RSpec/MultipleExpectations:
31
26
  RSpec/MultipleMemoizedHelpers:
32
27
  Max: 12
33
28
 
34
- # Offense count: 5
35
- # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
36
- RSpec/VerifiedDoubles:
37
- Exclude:
38
- - 'spec/beaker/hypervisor/docker_spec.rb'
39
-
40
29
  # Offense count: 26
41
30
  # This cop supports safe autocorrection (--autocorrect).
42
31
  # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.0](https://github.com/voxpupuli/beaker-docker/tree/2.1.0) (2023-05-05)
4
+
5
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/2.0.0...2.1.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - switch to voxpupuli-rubocop & restore beaker 4 support [\#120](https://github.com/voxpupuli/beaker-docker/pull/120) ([bastelfreak](https://github.com/bastelfreak))
10
+
11
+ **Closed issues:**
12
+
13
+ - Enable SSH Agent forwarding on MacOS [\#117](https://github.com/voxpupuli/beaker-docker/issues/117)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - GCG: Add faraday-retry dep [\#119](https://github.com/voxpupuli/beaker-docker/pull/119) ([bastelfreak](https://github.com/bastelfreak))
18
+ - CI: Build gems with strictness and verbosity [\#118](https://github.com/voxpupuli/beaker-docker/pull/118) ([bastelfreak](https://github.com/bastelfreak))
19
+ - rubocop: Fix RSpec/AnyInstance [\#116](https://github.com/voxpupuli/beaker-docker/pull/116) ([jay7x](https://github.com/jay7x))
20
+ - rubocop: Fix RSpec/VerifiedDoubles [\#115](https://github.com/voxpupuli/beaker-docker/pull/115) ([jay7x](https://github.com/jay7x))
21
+
3
22
  ## [2.0.0](https://github.com/voxpupuli/beaker-docker/tree/2.0.0) (2023-03-28)
4
23
 
5
24
  [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/1.5.0...2.0.0)
data/Gemfile CHANGED
@@ -10,5 +10,6 @@ group :coverage, optional: ENV['COVERAGE'] != 'yes' do
10
10
  end
11
11
 
12
12
  group :release do
13
+ gem 'faraday-retry', require: false
13
14
  gem 'github_changelog_generator', require: false
14
15
  end
@@ -28,13 +28,10 @@ Gem::Specification.new do |s|
28
28
  s.add_development_dependency 'fakefs', '>= 1.3', '< 3.0'
29
29
  s.add_development_dependency 'rake', '~> 13.0'
30
30
  s.add_development_dependency 'rspec', '~> 3.0'
31
- s.add_development_dependency 'rubocop', '~> 1.48.1'
32
- s.add_development_dependency 'rubocop-performance', '~> 1.10'
33
- s.add_development_dependency 'rubocop-rake', '~> 0.2'
34
- s.add_development_dependency 'rubocop-rspec', '>= 1.44'
31
+ s.add_development_dependency 'voxpupuli-rubocop', '~> 1.2'
35
32
 
36
33
  # Run time dependencies
37
- s.add_runtime_dependency 'beaker', '~> 5.0'
34
+ s.add_runtime_dependency 'beaker', '>= 4', '< 6'
38
35
  s.add_runtime_dependency 'docker-api', '~> 2.1'
39
36
  s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
40
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BeakerDocker
4
- VERSION = '2.0.0'
4
+ VERSION = '2.1.0'
5
5
  end
@@ -28,7 +28,7 @@ module Beaker
28
28
  end
29
29
 
30
30
  let(:logger) do
31
- logger = double('logger')
31
+ logger = instance_double(Logger)
32
32
  allow(logger).to receive(:debug)
33
33
  allow(logger).to receive(:info)
34
34
  allow(logger).to receive(:warn)
@@ -52,7 +52,7 @@ module Beaker
52
52
  end
53
53
 
54
54
  let(:image) do
55
- image = double('Docker::Image')
55
+ image = instance_double(::Docker::Image)
56
56
  allow(image).to receive(:id).and_return('zyxwvu')
57
57
  allow(image).to receive(:tag)
58
58
  image
@@ -87,7 +87,7 @@ module Beaker
87
87
  end
88
88
 
89
89
  let(:container) do
90
- container = double('Docker::Container')
90
+ container = instance_double(::Docker::Container)
91
91
  allow(container).to receive(:id).and_return('abcdef')
92
92
  allow(container).to receive(:start)
93
93
  allow(container).to receive(:stats)
@@ -129,32 +129,16 @@ module Beaker
129
129
 
130
130
  context 'with a working connection' do
131
131
  before do
132
- # Stub out all of the docker-api gem. we should never really call it
133
- # from these tests
134
- allow_any_instance_of(::Beaker::Docker).to receive(:require).with('docker')
132
+ # Stub out all of the docker-api gem. we should never really call it from these tests
135
133
  allow(::Docker).to receive(:options).and_return(docker_options)
136
- allow(::Docker).to receive(:options=)
137
- allow(::Docker).to receive(:logger=)
138
134
  allow(::Docker).to receive(:podman?).and_return(false)
139
135
  allow(::Docker).to receive(:version).and_return(version)
140
136
  allow(::Docker::Image).to receive(:build).and_return(image)
141
137
  allow(::Docker::Image).to receive(:create).and_return(image)
142
138
  allow(::Docker::Container).to receive(:create).and_return(container)
143
- allow_any_instance_of(::Docker::Container).to receive(:start)
144
139
  end
145
140
 
146
141
  describe '#initialize' do
147
- it 'requires the docker gem' do
148
- expect_any_instance_of(::Beaker::Docker).to receive(:require).with('docker').once
149
-
150
- docker
151
- end
152
-
153
- it 'fails when the gem is absent' do
154
- allow_any_instance_of(::Beaker::Docker).to receive(:require).with('docker').and_raise(LoadError)
155
- expect { docker }.to raise_error(LoadError)
156
- end
157
-
158
142
  it 'sets Docker options' do
159
143
  expect(::Docker).to receive(:options=).with({ write_timeout: 300, read_timeout: 300 }).once
160
144
 
@@ -183,7 +167,7 @@ module Beaker
183
167
  end
184
168
 
185
169
  describe '#install_ssh_components' do
186
- let(:test_container) { double('container') }
170
+ let(:test_container) { object_double(container) }
187
171
  let(:host) { hosts[0] }
188
172
 
189
173
  before do
@@ -756,7 +740,7 @@ module Beaker
756
740
  end
757
741
 
758
742
  describe '#fix_ssh' do
759
- let(:test_container) { double('container') }
743
+ let(:test_container) { object_double(container) }
760
744
  let(:host) { hosts[0] }
761
745
 
762
746
  before do
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: 2.0.0
4
+ version: 2.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-03-28 00:00:00.000000000 Z
14
+ date: 2023-05-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: fakefs
@@ -62,75 +62,39 @@ dependencies:
62
62
  - !ruby/object:Gem::Version
63
63
  version: '3.0'
64
64
  - !ruby/object:Gem::Dependency
65
- name: rubocop
65
+ name: voxpupuli-rubocop
66
66
  requirement: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: 1.48.1
70
+ version: '1.2'
71
71
  type: :development
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: 1.48.1
77
+ version: '1.2'
78
78
  - !ruby/object:Gem::Dependency
79
- name: rubocop-performance
80
- requirement: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - "~>"
83
- - !ruby/object:Gem::Version
84
- version: '1.10'
85
- type: :development
86
- prerelease: false
87
- version_requirements: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - "~>"
90
- - !ruby/object:Gem::Version
91
- version: '1.10'
92
- - !ruby/object:Gem::Dependency
93
- name: rubocop-rake
94
- requirement: !ruby/object:Gem::Requirement
95
- requirements:
96
- - - "~>"
97
- - !ruby/object:Gem::Version
98
- version: '0.2'
99
- type: :development
100
- prerelease: false
101
- version_requirements: !ruby/object:Gem::Requirement
102
- requirements:
103
- - - "~>"
104
- - !ruby/object:Gem::Version
105
- version: '0.2'
106
- - !ruby/object:Gem::Dependency
107
- name: rubocop-rspec
79
+ name: beaker
108
80
  requirement: !ruby/object:Gem::Requirement
109
81
  requirements:
110
82
  - - ">="
111
83
  - !ruby/object:Gem::Version
112
- version: '1.44'
113
- type: :development
114
- prerelease: false
115
- version_requirements: !ruby/object:Gem::Requirement
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- version: '1.44'
120
- - !ruby/object:Gem::Dependency
121
- name: beaker
122
- requirement: !ruby/object:Gem::Requirement
123
- requirements:
124
- - - "~>"
84
+ version: '4'
85
+ - - "<"
125
86
  - !ruby/object:Gem::Version
126
- version: '5.0'
87
+ version: '6'
127
88
  type: :runtime
128
89
  prerelease: false
129
90
  version_requirements: !ruby/object:Gem::Requirement
130
91
  requirements:
131
- - - "~>"
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '4'
95
+ - - "<"
132
96
  - !ruby/object:Gem::Version
133
- version: '5.0'
97
+ version: '6'
134
98
  - !ruby/object:Gem::Dependency
135
99
  name: docker-api
136
100
  requirement: !ruby/object:Gem::Requirement