simp-beaker-helpers 1.7.1 → 1.7.2

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: dc117cc7ef7fe6cd0d4ad6fe888ce698a178fbe7
4
- data.tar.gz: b3e0d8a3a7a7653be065d348e51bc989497461bb
3
+ metadata.gz: d4dc5e97b43efe34e806ff667363f93d9b550bb3
4
+ data.tar.gz: b37a65641c5255ba76ef3aae657fcf1da2c9130a
5
5
  SHA512:
6
- metadata.gz: 86a0760188dea3c8216856fdc3850b57512d9715308ab6eebdbd62a91a71754b3c6df42ff0607d05f9d998201e47385a9a8a86417555319ba929ec7abcb10106
7
- data.tar.gz: 253b1ea2a3278f8581737705800fa5763feb0c2a1fb9d4dbd9bb16b1542cfbee4d8becc16338fe15612b6fe2e1ef38cc9a1e47a7021f4b812d8ffc5cccff5267
6
+ metadata.gz: 3100502341f3d597b2bd2cd5f35d4dfeb6157592426c3d089006428bd72b93e14556097bb03709de7ce613faadc2c4ee9735fb342cc98313a07e3b1335b355e2
7
+ data.tar.gz: 1d140d0f353bf0373d8bfbfeb7baf8799b636ce62b4aa4abfa3b9db2d38547ef3a3b66b87575de502d85af482e75eff0f8920c9b5faf43fa11f4167c7a3e6a2b
@@ -1,5 +1,5 @@
1
1
  module Simp; end
2
2
 
3
3
  module Simp::BeakerHelpers
4
- VERSION = '1.7.1'
4
+ VERSION = '1.7.2'
5
5
  end
@@ -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 = on(
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 = on(ca_sut, 'puppet config print modulepath --environment production' ).output.chomp.split(':')
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.1
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-04-24 00:00:00.000000000 Z
12
+ date: 2017-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: beaker