beaker-module_install_helper 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: 69a2c6ed3022d19e60e1d0384af079f91e88ca41
4
- data.tar.gz: a735093e505f4b2bd462068f0bc51d1b2758f516
3
+ metadata.gz: 8842d6e64dfcbb76640dd4b108b9bb4b4fbb05e3
4
+ data.tar.gz: 8e8f8f4b8c02d126ee573897a010733771da65dd
5
5
  SHA512:
6
- metadata.gz: 9b1776180ebfaa84699217d459e6edb6da441ab2521b53c6095767d944577f2e07432ea536cc83403e8bfa404b981e8a3112c80b7a58fe38bd8f9ff11a7f7dc7
7
- data.tar.gz: 25239feb1592cdee1a638ca2fec9c463d6590c913e0ecdacd8c391942466e7b8bcaaff43569408ade407fb6af396ba761cbe46e1289705f86f6fadcd0460d0bd
6
+ metadata.gz: 8f7dd4d97c7d19fa656cda404ba7777aad1f34a4f2bd942b6b37462c0367b670f52cd2c9acefae34c1f3b4941b0cec3dda6a7da61a921584fcc94efbbc118e5d
7
+ data.tar.gz: a410e06926548aa30c40b4e5a35ca3bbe00ae1e4205573053a854661ec67a5432bd48aa57e19a9cdb5ccb233de636013249d1f96785865296adc5de5a368a887
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.1.6]
8
+ ### Fixed
9
+ - (BKR-1254) Update for Unix::Host does not allow each
10
+ - Rubocop failures
11
+
7
12
  ## [0.1.5]
8
13
  ### Fixed
9
14
  - Documentation language updates
@@ -12,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
12
17
 
13
18
 
14
19
  [Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/0.1.5...HEAD
20
+ [0.1.6]: https://github.com/olivierlacan/keep-a-changelog/compare/0.1.5...0.1.6
15
21
  [0.1.5]: https://github.com/olivierlacan/keep-a-changelog/compare/0.1.4...0.1.5
16
22
  [0.1.4]: https://github.com/olivierlacan/keep-a-changelog/compare/0.1.3...0.1.4
17
23
  [0.1.3]: https://github.com/olivierlacan/keep-a-changelog/compare/0.1.2...0.1.3
@@ -1,11 +1,9 @@
1
- # coding: utf-8
2
-
3
1
  lib = File.expand_path('../lib', __FILE__)
4
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
3
 
6
4
  Gem::Specification.new do |spec|
7
5
  spec.name = 'beaker-module_install_helper'
8
- spec.version = '0.1.5'
6
+ spec.version = '0.1.6'
9
7
  spec.authors = ['Puppet']
10
8
  spec.email = ['wilson@puppet.com']
11
9
 
@@ -16,7 +14,7 @@ Gem::Specification.new do |spec|
16
14
  'module under test and its dependencies on the system ' \
17
15
  'under test'
18
16
  spec.homepage = 'https://github.com/puppetlabs/beaker-module_install_helper'
19
- spec.license = 'Apache-2'
17
+ spec.license = 'Apache-2.0'
20
18
 
21
19
  spec.files = `git ls-files`.split("\n")
22
20
  spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -29,5 +27,5 @@ Gem::Specification.new do |spec|
29
27
  spec.add_development_dependency 'rspec'
30
28
 
31
29
  # Run time dependencies
32
- spec.add_runtime_dependency 'beaker', '>= 2.0'
30
+ spec.add_runtime_dependency 'beaker', '~> 2.0'
33
31
  end
@@ -29,6 +29,7 @@ module Beaker::ModuleInstallHelper
29
29
  # specified host(s) from the dependencies list in metadata.json
30
30
  def install_module_dependencies_on(hsts, deps = nil)
31
31
  hsts = [hsts] if hsts.is_a?(Hash)
32
+ hsts = [hsts] unless hsts.respond_to?(:each)
32
33
  deps = deps.nil? ? module_dependencies_from_metadata : deps
33
34
 
34
35
  fh = ENV['BEAKER_FORGE_HOST']
@@ -1,8 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Beaker::ModuleInstallHelper do
4
- context 'hosts_to_install_module_on' do
5
- context 'on split master/agent setup' do
4
+ describe 'hosts_to_install_module_on' do
5
+ context 'with a split master/agent setup' do
6
6
  let(:hosts) do
7
7
  [
8
8
  { 'roles' => %w[master database dashboard classifier] },
@@ -15,7 +15,7 @@ describe Beaker::ModuleInstallHelper do
15
15
  end
16
16
  end
17
17
 
18
- context 'on split agent only setup' do
18
+ context 'with a split agent only setup' do
19
19
  let(:hosts) { [{ 'roles' => ['agent'] }] }
20
20
 
21
21
  it 'returns a node with master role' do
@@ -24,7 +24,7 @@ describe Beaker::ModuleInstallHelper do
24
24
  end
25
25
  end
26
26
 
27
- context 'module_name_from_metadata' do
27
+ describe 'module_name_from_metadata' do
28
28
  let(:module_metadata) { { 'name' => 'puppetlabs-vcsrepo' } }
29
29
 
30
30
  it 'Removes author from name' do
@@ -33,7 +33,7 @@ describe Beaker::ModuleInstallHelper do
33
33
  end
34
34
  end
35
35
 
36
- context 'module_metadata' do
36
+ describe 'module_metadata' do
37
37
  before do
38
38
  $module_source_dir = '/a/b/c/d'
39
39
  allow(File).to receive(:exist?)
@@ -44,12 +44,12 @@ describe Beaker::ModuleInstallHelper do
44
44
  .and_return('{"name": "puppetlabs-vcsrepo"}')
45
45
  end
46
46
 
47
- it 'Returns hash with correct data' do
47
+ it 'returns hash with correct data' do
48
48
  expect(module_metadata['name']).to eq('puppetlabs-vcsrepo')
49
49
  end
50
50
  end
51
51
 
52
- context 'get_module_source_directory' do
52
+ describe 'get_module_source_directory' do
53
53
  let(:call_stack) { ['/a/b/c/d/e/f/g/spec_helper_acceptance.rb'] }
54
54
  let(:call_stack_no_metadata) { ['/test/test/test/spec_helper_acceptance.rb'] }
55
55
 
@@ -67,7 +67,7 @@ describe Beaker::ModuleInstallHelper do
67
67
  end
68
68
  end
69
69
 
70
- context 'install_module_on' do
70
+ describe 'install_module_on' do
71
71
  let(:module_source_dir) { '/a/b/c/d' }
72
72
  let(:host) { { 'roles' => %w[master database dashboard classifier] } }
73
73
 
@@ -92,7 +92,7 @@ describe Beaker::ModuleInstallHelper do
92
92
  end
93
93
  end
94
94
 
95
- context 'module_version_matching_requirement' do
95
+ describe 'module_version_matching_requirement' do
96
96
  context 'with simple version requirement, no upper bound' do
97
97
  it 'return latest matching version' do
98
98
  res = module_version_from_requirement('puppetlabs-ntp', '= 6.0.0')
@@ -109,14 +109,14 @@ describe Beaker::ModuleInstallHelper do
109
109
  end
110
110
  end
111
111
 
112
- context 'module_dependencies_from_metadata' do
112
+ describe 'module_dependencies_from_metadata' do
113
113
  before do
114
114
  allow_any_instance_of(described_class)
115
115
  .to receive(:module_metadata)
116
116
  .and_return(input_metadata)
117
117
  end
118
118
 
119
- context 'multiple dependencies with versions' do
119
+ context 'with multiple dependencies with versions' do
120
120
  let(:input_metadata) do
121
121
  {
122
122
  'name' => 'puppetlabs-vcsrepo',
@@ -145,7 +145,7 @@ describe Beaker::ModuleInstallHelper do
145
145
  end
146
146
  end
147
147
 
148
- context 'multiple dependencies without versions' do
148
+ context 'with multiple dependencies without versions' do
149
149
  let(:input_metadata) do
150
150
  {
151
151
  'name' => 'puppetlabs-vcsrepo',
@@ -169,7 +169,7 @@ describe Beaker::ModuleInstallHelper do
169
169
  end
170
170
  end
171
171
 
172
- context 'empty dependencies' do
172
+ context 'with empty dependencies' do
173
173
  let(:input_metadata) do
174
174
  {
175
175
  'name' => 'puppetlabs-vcsrepo',
@@ -184,7 +184,7 @@ describe Beaker::ModuleInstallHelper do
184
184
  end
185
185
  end
186
186
 
187
- context 'no dependencies' do
187
+ context 'with no dependencies' do
188
188
  let(:input_metadata) { { 'name' => 'puppetlabs-vcsrepo' } }
189
189
  let(:desired) { [] }
190
190
 
@@ -195,7 +195,7 @@ describe Beaker::ModuleInstallHelper do
195
195
  end
196
196
  end
197
197
 
198
- context 'version_requirements_from_string' do
198
+ describe 'version_requirements_from_string' do
199
199
  context 'with simple version requirement containing lower bound' do
200
200
  let(:lower_bound) { '>= 2.0.0' }
201
201
 
@@ -217,7 +217,7 @@ describe Beaker::ModuleInstallHelper do
217
217
  end
218
218
  end
219
219
 
220
- context 'forge_host' do
220
+ describe 'forge_host' do
221
221
  context 'without env variables specified' do
222
222
  it 'returns production forge host' do
223
223
  allow(ENV).to receive(:[]).with('BEAKER_FORGE_HOST').and_return(nil)
@@ -235,7 +235,7 @@ describe Beaker::ModuleInstallHelper do
235
235
  end
236
236
  end
237
237
 
238
- context 'forge_api' do
238
+ describe 'forge_api' do
239
239
  context 'without env variables specified' do
240
240
  it 'returns production forge api' do
241
241
  allow(ENV).to receive(:[]).with('BEAKER_FORGE_HOST').and_return(nil)
@@ -255,7 +255,7 @@ describe Beaker::ModuleInstallHelper do
255
255
  end
256
256
  end
257
257
 
258
- context 'install_module_dependencies_on' do
258
+ describe 'install_module_dependencies_on' do
259
259
  before do
260
260
  allow_any_instance_of(described_class)
261
261
  .to receive(:module_metadata)
@@ -279,14 +279,12 @@ describe Beaker::ModuleInstallHelper do
279
279
  }
280
280
  end
281
281
 
282
- before do
282
+ it 'installs the modules' do
283
283
  expect_any_instance_of(Beaker::DSL::InstallUtils::ModuleUtils)
284
284
  .to receive(:install_puppet_module_via_pmt_on)
285
285
  .with(a_host, dependency)
286
286
  .exactly(1)
287
- end
288
287
 
289
- it 'installs the modules' do
290
288
  install_module_dependencies_on(a_host)
291
289
  end
292
290
  end
@@ -305,7 +303,7 @@ describe Beaker::ModuleInstallHelper do
305
303
  let(:dependency1) { { module_name: 'puppetlabs-concat' } }
306
304
  let(:dependency2) { { module_name: 'puppetlabs-stdlib' } }
307
305
 
308
- before do
306
+ it 'installs both modules' do # rubocop:disable RSpec/ExampleLength,RSpec/MultipleExpectations
309
307
  expect_any_instance_of(Beaker::DSL::InstallUtils::ModuleUtils)
310
308
  .to receive(:install_puppet_module_via_pmt_on)
311
309
  .with(a_host, dependency1)
@@ -315,28 +313,24 @@ describe Beaker::ModuleInstallHelper do
315
313
  .to receive(:install_puppet_module_via_pmt_on)
316
314
  .with(a_host, dependency2)
317
315
  .exactly(1)
318
- end
319
316
 
320
- it 'installs both modules' do
321
317
  install_module_dependencies_on(a_host)
322
318
  end
323
319
  end
324
320
  end
325
321
 
326
- context 'install_module_from_forge_on' do
322
+ describe 'install_module_from_forge_on' do
327
323
  let(:a_host) { { name: 'a_host' } }
328
324
  let(:dependency) { { module_name: 'puppetlabs-stdlib', version: '4.14.0' } }
329
325
  let(:input_module_name) { 'puppetlabs/stdlib' }
330
326
  let(:input_module_version_requirement) { '>= 4.13.1 <= 4.14.0' }
331
327
 
332
- before do
328
+ it 'installs the module' do
333
329
  expect_any_instance_of(Beaker::DSL::InstallUtils::ModuleUtils)
334
330
  .to receive(:install_puppet_module_via_pmt_on)
335
331
  .with(a_host, dependency)
336
332
  .exactly(1)
337
- end
338
333
 
339
- it 'installs the module' do
340
334
  install_module_from_forge_on(a_host, input_module_name, input_module_version_requirement)
341
335
  end
342
336
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-module_install_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-26 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: beaker
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.0'
41
41
  description: A helper gem for use in a Puppet Modules spec_helper_acceptance.rb file
@@ -62,7 +62,7 @@ files:
62
62
  - spec/unit/beaker/module_install_helper_spec.rb
63
63
  homepage: https://github.com/puppetlabs/beaker-module_install_helper
64
64
  licenses:
65
- - Apache-2
65
+ - Apache-2.0
66
66
  metadata: {}
67
67
  post_install_message:
68
68
  rdoc_options: []
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.5.1
83
+ rubygems_version: 2.6.8
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: A helper gem for use in a Puppet Modules spec_helper_acceptance.rb file