serverspec 0.11.4 → 0.11.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec/backend/exec.rb +13 -1
- data/lib/serverspec/version.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: 8d0e94326e10e8838a093f4a2c1933fc19234e22
|
4
|
+
data.tar.gz: e4611fc653f06aad2bafa91be2e24b4830944915
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81186006639054360b2fab02607e8f663efa81363db6a575dd1eeede8729291a40afb2bb4184a9c7754e5e941dd2ca0ec3db71c20d1c5030542698fa4593ad04
|
7
|
+
data.tar.gz: b51ce84ca5748afcc2f657cab24b57d4a4a034033910dfce8a835d02ee2021ec5a1f13a48dc76fecdec1b1fc9985f045c895a1d90cb675fdfa5f22d9b9f996d7
|
@@ -7,7 +7,9 @@ module Serverspec
|
|
7
7
|
def run_command(cmd, opts={})
|
8
8
|
cmd = build_command(cmd)
|
9
9
|
cmd = add_pre_command(cmd)
|
10
|
-
stdout =
|
10
|
+
stdout = run_with_no_ruby_environment do
|
11
|
+
`#{build_command(cmd)} 2>&1`
|
12
|
+
end
|
11
13
|
# In ruby 1.9, it is possible to use Open3.capture3, but not in 1.8
|
12
14
|
#stdout, stderr, status = Open3.capture3(cmd)
|
13
15
|
|
@@ -20,6 +22,16 @@ module Serverspec
|
|
20
22
|
:exit_status => $?.exitstatus, :exit_signal => nil }
|
21
23
|
end
|
22
24
|
|
25
|
+
def run_with_no_ruby_environment
|
26
|
+
keys = %w[BUNDLER_EDITOR BUNDLE_BIN_PATH BUNDLE_GEMFILE
|
27
|
+
RUBYOPT GEM_HOME GEM_PATH GEM_CACHE]
|
28
|
+
|
29
|
+
keys.each { |key| ENV["_SERVERSPEC_#{key}"] = ENV[key] ; ENV.delete(key) }
|
30
|
+
yield
|
31
|
+
ensure
|
32
|
+
keys.each { |key| ENV[key] = ENV.delete("_SERVERSPEC_#{key}") }
|
33
|
+
end
|
34
|
+
|
23
35
|
def build_command(cmd)
|
24
36
|
path = Serverspec.configuration.path || RSpec.configuration.path
|
25
37
|
if path
|
data/lib/serverspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|