serverspec_launcher 0.7.1 → 0.8.0

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: 20c633e2232040483eba9db68caeafbb9642591d831ebf26302c28618c90e919
4
- data.tar.gz: '0997c5f98d951f0a31cd7315019d9013d62b81927d8fdb37b0d949c1f4d27fe9'
3
+ metadata.gz: 9019d310ba975cfc57fe42b368d7ec33f13185118744af4cff3653d35a9b3828
4
+ data.tar.gz: 89a6d096b77f67b5c0cc11b5f9c3eec72223a9b05e10e2af1de6d8be6bd082af
5
5
  SHA512:
6
- metadata.gz: a8e803bf86263766950a3b98e28bf48fa93b748f92631255a3239fb72184ac522e75db26e7a3a60245e8ed7a332d74a58fc74ddc6d02dd728adbead8415fc5db
7
- data.tar.gz: 2059f0b9aa3c83a856519a932679ad6be0f2a3945c4dc9c980ffc18ee8757edd391472075171eceba72a5c1d96da784e68828c6f2569fdc9df123101812f379a
6
+ metadata.gz: 9f846a10fc898f8525f41613b9fe45810da1829f1f1feea27d25af989be12dee2fa5d9df858971bb8a16bf925c85fffedfdd1ca195f484a24b575b7aea115ad0
7
+ data.tar.gz: 233b98ad0c4e2ece56333f4c16a2c6d21940b68907d906e830d421eb78ece8674b2cab02dd816a365e058ecee2fe7f23e7f8302fe8abec61d45ec3356761c07b
data/README.md CHANGED
@@ -352,6 +352,10 @@ targets:
352
352
  # Run tests against a vagrant file
353
353
  vagrant-example:
354
354
  backend: vagrant
355
+ #Show output from vagrant up (default: false)
356
+ vagrant_output: true
357
+ #reprovision running vagrant box (default: false)
358
+ vagrant_reprovision: true
355
359
  roles:
356
360
  - debug::environment_vars
357
361
  environment:
@@ -139,7 +139,19 @@ class SpecHelper
139
139
 
140
140
  old_dir = Dir.pwd
141
141
  Dir.chdir(vagrant_dir) if vagrant_dir
142
- `vagrant up #{@host}`
142
+ reprovision = @target_properties[:vagrant_reprovision] ? '--provision' : ''
143
+ vagrant_up = "vagrant up #{@host} #{reprovision}"
144
+ if @target_properties[:vagrant_output]
145
+ Open3.popen2e vagrant_up do |_stdin, stdout_and_stderr, _wait_thr|
146
+ while (line = stdout_and_stderr.gets) do
147
+ puts line
148
+ end
149
+ end
150
+ elsif @target_properties[:vagrant_errors]
151
+ system(vagrant_up, out: File::NULL)
152
+ else
153
+ system(vagrant_up, out: File::NULL, err: File::NULL)
154
+ end
143
155
 
144
156
  config = Tempfile.new('', Dir.tmpdir)
145
157
  config.write(`vagrant ssh-config #{@host}`)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ServerspecLauncher
3
- VERSION = '0.7.1'
3
+ VERSION = '0.8.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverspec_launcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Wardrobe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-25 00:00:00.000000000 Z
11
+ date: 2019-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler