puppet_litmus 0.9.0 → 0.9.1

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: 0b35af75cfb29a6b0d69af360963c915baf0858a65141b0f5cd0d737ef89ca87
4
- data.tar.gz: ad7089e5bda00652105165a5e702667a0018c1900128905e62093966aedd5865
3
+ metadata.gz: bc193f9e3e7b23027e022082d77a4349e4db737fc36638d0ca8d9dca433d776d
4
+ data.tar.gz: 57e68de10c7c77f2b7059163e6ebd1b66852f058e203d3ce7a2d9656f1eb7bd7
5
5
  SHA512:
6
- metadata.gz: 3f5735b661f80558413f0a4df2f067992277253073e1713ddf651096d0fce951d349afc9d475ea839bb94ac990f071711028fc5d7ac05caa03e7c396e2e607c3
7
- data.tar.gz: 58b8442ccc3d8be07d3c24376b5af0067bafbbce1ecf5faa3534089bdbed0cb6bb99236fc340c650a2c2ce0fd612a7651c40e360ec449d17bf50723963b970cf
6
+ metadata.gz: f1b37b780a30f7cfca61513debb0d3931ee68524e72f25e4c2c963feeee4012ab56fc4dc7e32717f20de39d15cbefd076198f48659f227bd5bc98134280142cd
7
+ data.tar.gz: 6b910d580dbc673723f5cb2a0bcaca27f5b88462ffabf5190590c9d0dac3ac5efa18735dada0ea8831a59bf52121763a787e31da4d63af6bc9f4dcd1885302aa
@@ -108,7 +108,7 @@ namespace :litmus do
108
108
  provision_hash = YAML.load_file('./provision.yaml')
109
109
  provisioner = provision_hash[args[:key]]['provisioner']
110
110
  # Splat the params into environment variables to pass to the provision task but only in this runspace
111
- provision_hash[args[:key]]['params']&.each { |key, value| ENV["LITMUS_#{key.upcase}"] = value }
111
+ provision_hash[args[:key]]['params']&.each { |key, value| ENV[key.upcase] = value.to_s }
112
112
  failed_image_message = ''
113
113
  provision_hash[args[:key]]['images'].each do |image|
114
114
  # this is the only way to capture the stdout from the rake task, it will affect pry
@@ -358,7 +358,6 @@ namespace :litmus do
358
358
  puts 'No targets found'
359
359
  exit 0
360
360
  end
361
- spinners = TTY::Spinner::Multi.new("Running against #{targets.size} targets.[:spinner]", frames: ['.'], interval: 0.1)
362
361
  payloads = []
363
362
  # Generate list of targets to provision
364
363
  targets.each do |target|
@@ -379,12 +378,17 @@ namespace :litmus do
379
378
  if (ENV['CI'] == 'true') || !ENV['DISTELLI_BUILDNUM'].nil?
380
379
  # CI systems are strange beasts, we only output a '.' every wee while to keep the terminal alive.
381
380
  puts "Running against #{targets.size} targets.\n"
382
- spinner = TTY::Spinner.new(':spinner', frames: ['.'], interval: 0.1)
383
- spinner.auto_spin
381
+ progress = Thread.new do
382
+ loop do
383
+ printf '.'
384
+ sleep(10)
385
+ end
386
+ end
387
+
384
388
  results = Parallel.map(payloads) do |title, test, options|
385
389
  env = options[:env].nil? ? {} : options[:env]
386
390
  stdout, stderr, status = Open3.capture3(env, test)
387
- ["================\n#{title}\n", stdout, stderr, status]
391
+ ["\n================\n#{title}\n", stdout, stderr, status]
388
392
  end
389
393
  # because we cannot modify variables inside of Parallel
390
394
  results.each do |result|
@@ -394,7 +398,7 @@ namespace :litmus do
394
398
  failure_list.push(result.first.scan(%r{.*})[2])
395
399
  end
396
400
  end
397
- spinner.success
401
+ Thread.kill(progress)
398
402
  else
399
403
  spinners = TTY::Spinner::Multi.new("[:spinner] Running against #{targets.size} targets.")
400
404
  payloads.each do |title, test, options|
@@ -2,5 +2,5 @@
2
2
 
3
3
  # version of this gem
4
4
  module PuppetLitmus
5
- VERSION ||= '0.9.0'
5
+ VERSION ||= '0.9.1'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet_litmus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-23 00:00:00.000000000 Z
11
+ date: 2019-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bolt