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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74893a8d275ad181e28f562775399df8dcddaaa2
4
- data.tar.gz: 52d6f7397bdf03fa1d76647816686fcb522ce47e
3
+ metadata.gz: 99647061d2099c0d9753446de9ff5776748518c7
4
+ data.tar.gz: ba8cac3ea0d8d3e7afde6f7769c5a758d106da64
5
5
  SHA512:
6
- metadata.gz: 08a07f6733d21f52af60991cb5d5325cf0db75a441220c9a0e8164b47f2ec350a27dcf523c6a66faad2a1c1b20430fe3e9f96cca20120088a109cd9665f6986d
7
- data.tar.gz: 37e6e038510a9551cd93974527f1f0a67921e191c5177d0aabb83df1ac00e4c506d3d6a83f2baa74749cf7f37e071fb3b505d264c476354e8fa08d165b8428d3
6
+ metadata.gz: e476094d23239aa3d50b09f20e5d8b44e43cc9342d50f756ba844741af934166f573879582fe94b774ef5967a4ed722c854a0cfd14191d443a6913ddb447f635
7
+ data.tar.gz: 0a24d5762d9c3473915ae1341af2162039d03de1342e419ff290d446d9f7aa10623e315bb6c7bd6ca889ce8d92af6da588b18ba4244c9baf9572e7e3085fad56
@@ -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
- @results = JSON.load(File.read(local_inspec_results))
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
@@ -1,5 +1,5 @@
1
1
  module Simp; end
2
2
 
3
3
  module Simp::BeakerHelpers
4
- VERSION = '1.8.6'
4
+ VERSION = '1.8.7'
5
5
  end
@@ -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.6
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-09-26 00:00:00.000000000 Z
12
+ date: 2017-10-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: beaker