simp-beaker-helpers 1.8.6 → 1.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simp/beaker_helpers.rb +10 -0
- data/lib/simp/beaker_helpers/inspec.rb +9 -1
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/rake/beaker.rb +1 -1
- 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: 99647061d2099c0d9753446de9ff5776748518c7
|
4
|
+
data.tar.gz: ba8cac3ea0d8d3e7afde6f7769c5a758d106da64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e476094d23239aa3d50b09f20e5d8b44e43cc9342d50f756ba844741af934166f573879582fe94b774ef5967a4ed722c854a0cfd14191d443a6913ddb447f635
|
7
|
+
data.tar.gz: 0a24d5762d9c3473915ae1341af2162039d03de1342e419ff290d446d9f7aa10623e315bb6c7bd6ca889ce8d92af6da588b18ba4244c9baf9572e7e3085fad56
|
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -33,6 +33,16 @@ module Simp::BeakerHelpers
|
|
33
33
|
|
34
34
|
%x(tar #{exclude_list.join(' ')} -hcf - -C "#{File.dirname(src)}" "#{File.basename(src)}" | docker exec -i "#{sut.hostname}" tar -C "#{dest}" -xf -)
|
35
35
|
elsif @has_rsync
|
36
|
+
# This makes rsync_to work like beaker and scp usually do
|
37
|
+
exclude_hack = %(__GARBAge__' -L --exclude '__GARBAge__)
|
38
|
+
opts[:ignore] ||= []
|
39
|
+
opts[:ignore] << exclude_hack
|
40
|
+
|
41
|
+
dest = File.join(dest, File.basename(src)) if File.directory?(src)
|
42
|
+
# End rsync hackery
|
43
|
+
|
44
|
+
sut.mkdir_p(dest)
|
45
|
+
|
36
46
|
rsync_to(sut, src, dest, opts)
|
37
47
|
else
|
38
48
|
scp_to(sut, src, dest, opts)
|
@@ -72,7 +72,15 @@ module Simp::BeakerHelpers
|
|
72
72
|
|
73
73
|
if File.exist?(local_inspec_results)
|
74
74
|
begin
|
75
|
-
|
75
|
+
# The output is occasionally broken from past experience. Need to
|
76
|
+
# fetch the line that actually looks like JSON
|
77
|
+
inspec_json = File.read(local_inspec_results).lines.find do |line|
|
78
|
+
line.strip!
|
79
|
+
|
80
|
+
line.start_with?('{') && line.end_with?('}')
|
81
|
+
end
|
82
|
+
|
83
|
+
@results = JSON.load(inspec_json) if inspec_json
|
76
84
|
rescue JSON::ParserError, JSON::GeneratorError
|
77
85
|
@results = nil
|
78
86
|
end
|
data/lib/simp/rake/beaker.rb
CHANGED
@@ -102,7 +102,7 @@ module Simp::Rake
|
|
102
102
|
'default_run' : <true|false> => Default: false
|
103
103
|
```
|
104
104
|
EOM
|
105
|
-
task :suites, [:suite, :nodeset] do |t,args|
|
105
|
+
task :suites, [:suite, :nodeset] => ['spec_prep'] do |t,args|
|
106
106
|
suite = args[:suite]
|
107
107
|
nodeset = args[:nodeset]
|
108
108
|
|
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.8.
|
4
|
+
version: 1.8.7
|
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-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|