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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cc6f0f36f82484e0a3ee844e0bc0c49e92cdc10fd79d1abb9fd57f595f47fe0
|
4
|
+
data.tar.gz: 71b71ee4b94f13f1d42abb41712a0f3ef7a0fa2acd259beb67c847649a16b509
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
@@ -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.
|
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-
|
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
|