beaker-puppet 1.19.1 → 1.19.2

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: bc5e436579b044d7871baa411fec87ed9d88857ba28aded3745fe55cf1faf511
4
- data.tar.gz: 02ef74bf29b9638f6ed641585218f9291b677eb6280512fccdea2f94a9886915
3
+ metadata.gz: 4cc6f0f36f82484e0a3ee844e0bc0c49e92cdc10fd79d1abb9fd57f595f47fe0
4
+ data.tar.gz: 71b71ee4b94f13f1d42abb41712a0f3ef7a0fa2acd259beb67c847649a16b509
5
5
  SHA512:
6
- metadata.gz: 1d05b9cdc0d812e0ab7b504396c588dfd266f9001405299d9feb1878643b3c71996d303752c2feff220a52a699923dc6bcec3701b81a634385dac851f4663721
7
- data.tar.gz: 7e247b0faa831bb120733f5a5cae43715cc38d49dc66e3cd51fa2f565ce8ff2b0ad3be5b2e3dd1d1ecf7e8625c10332250a77a493f13348b00669d0c8999af29
6
+ metadata.gz: 5980d84a0db730cb94fbb3f2921792227806785bd9335310feeadc4be1c4bda2209c00c433824dd6e4e4b0e23bb9a2830b8df793ed04dc8ddc190cbd18d78f92
7
+ data.tar.gz: 1f5e8bedf15b63a475ea3470fb12aa7952ef197effed6375b292cfa073f5daea8a1213f872fbd61f7963e7a52afa6a7b60899487b16bd7a94066ab1c20d08ced
@@ -7,7 +7,11 @@ module Beaker
7
7
  module HostHelpers
8
8
 
9
9
  def ruby_command(host)
10
- "env PATH=\"#{host['privatebindir']}:${PATH}\" ruby"
10
+ if host['platform'] =~ /windows/ && !host.is_cygwin?
11
+ "cmd /V /C \"set PATH=#{host['privatebindir']};!PATH! && ruby\""
12
+ else
13
+ "env PATH=\"#{host['privatebindir']}:${PATH}\" ruby"
14
+ end
11
15
  end
12
16
 
13
17
  # Returns an array containing the owner, group and mode of
@@ -1,3 +1,3 @@
1
1
  module BeakerPuppet
2
- VERSION = '1.19.1'
2
+ VERSION = '1.19.2'
3
3
  end
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+
3
+ class ClassMixedWithDSLHelpers
4
+ include Beaker::DSL::Helpers::HostHelpers
5
+ end
6
+
7
+ describe ClassMixedWithDSLHelpers do
8
+ let(:privatebindir) { 'C:\\Program Files\\Puppet Labs\\Puppet\\bin' }
9
+
10
+ context 'when platform is windows and non cygwin' do
11
+ let(:winhost) { make_host('winhost_non_cygwin', { :platform => 'windows',
12
+ :privatebindir => privatebindir,
13
+ :is_cygwin => 'false' }) }
14
+
15
+ it 'run the correct ruby_command' do
16
+ expect(subject.ruby_command(winhost)).to eq("cmd /V /C \"set PATH=#{privatebindir};!PATH! && ruby\"")
17
+ end
18
+ end
19
+
20
+ context 'when platform is windows and cygwin' do
21
+ let(:winhost) { make_host('winhost', { :platform => Beaker::Platform.new('windows-2016-a64'),
22
+ :privatebindir => privatebindir,
23
+ :is_cygwin => true }) }
24
+
25
+ it 'run the correct ruby_command' do
26
+ expect(subject.ruby_command(winhost)).to eq("env PATH=\"#{privatebindir}:${PATH}\" ruby")
27
+ end
28
+ end
29
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.1
4
+ version: 1.19.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-07 00:00:00.000000000 Z
11
+ date: 2020-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -275,6 +275,7 @@ files:
275
275
  - setup/git/060_InstallModules.rb
276
276
  - setup/git/070_InstallCACerts.rb
277
277
  - spec/beaker-puppet/helpers/facter_helpers_spec.rb
278
+ - spec/beaker-puppet/helpers/host_helpers_spec.rb
278
279
  - spec/beaker-puppet/helpers/puppet_helpers_spec.rb
279
280
  - spec/beaker-puppet/helpers/tk_helpers_spec.rb
280
281
  - spec/beaker-puppet/install_utils/ezbake_utils_spec.rb