simp-beaker-helpers 1.7.1 → 1.7.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 +4 -4
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/beaker_helpers.rb +10 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4dc5e97b43efe34e806ff667363f93d9b550bb3
|
4
|
+
data.tar.gz: b37a65641c5255ba76ef3aae657fcf1da2c9130a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3100502341f3d597b2bd2cd5f35d4dfeb6157592426c3d089006428bd72b93e14556097bb03709de7ce613faadc2c4ee9735fb342cc98313a07e3b1335b355e2
|
7
|
+
data.tar.gz: 1d140d0f353bf0373d8bfbfeb7baf8799b636ce62b4aa4abfa3b9db2d38547ef3a3b66b87575de502d85af482e75eff0f8920c9b5faf43fa11f4167c7a3e6a2b
|
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -11,6 +11,13 @@ module Simp::BeakerHelpers
|
|
11
11
|
facts.fetch(fact_name)
|
12
12
|
end
|
13
13
|
|
14
|
+
# Returns the modulepath on the SUT, as an Array
|
15
|
+
def puppet_modulepath_on(sut, environment='production')
|
16
|
+
on(
|
17
|
+
sut, "puppet config print modulepath --environment #{environment}"
|
18
|
+
).output.lines.last.strip.split(':')
|
19
|
+
end
|
20
|
+
|
14
21
|
# Return the path to the 'spec/fixtures' directory
|
15
22
|
def fixtures_path
|
16
23
|
STDERR.puts ' ** fixtures_path' if ENV['BEAKER_helpers_verbose']
|
@@ -102,9 +109,7 @@ module Simp::BeakerHelpers
|
|
102
109
|
# cannot rely on `copy_module_to()` to choose a sane default for
|
103
110
|
# `target_module_path`. This workaround queries each SUT's
|
104
111
|
# `modulepath` and targets the first one.
|
105
|
-
target_module_path =
|
106
|
-
sut, 'puppet config print modulepath --environment production'
|
107
|
-
).output.chomp.split(':').first
|
112
|
+
target_module_path = puppet_modulepath_on(sut).first
|
108
113
|
|
109
114
|
mod_root = File.expand_path( "spec/fixtures/modules", File.dirname( fixtures_yml_path ))
|
110
115
|
|
@@ -416,7 +421,8 @@ done
|
|
416
421
|
# This simulates the output of FakeCA's gencerts_nopass.sh to keydist/
|
417
422
|
def copy_keydist_to( ca_sut = master, host_keydist_dir = nil )
|
418
423
|
if !host_keydist_dir
|
419
|
-
modulepath =
|
424
|
+
modulepath = puppet_modulepath_on(ca_sut)
|
425
|
+
|
420
426
|
host_keydist_dir = "#{modulepath.first}/pki/files/keydist"
|
421
427
|
end
|
422
428
|
on ca_sut, "rm -rf #{host_keydist_dir}/*"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simp-beaker-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Tessmer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-05-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|