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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8dce4e86b84179092d0bf63b787374d0cc38b7e6
4
- data.tar.gz: ed43fa1414a39edca1459b5adb94b05d3583d891
3
+ metadata.gz: 8d0e94326e10e8838a093f4a2c1933fc19234e22
4
+ data.tar.gz: e4611fc653f06aad2bafa91be2e24b4830944915
5
5
  SHA512:
6
- metadata.gz: 0bc46ed517a84561dc1b0254dafd59157501d92e43627b1127c0acaf37e5039bd33fbf8938e7ad2b531ea73f9ba02574d2871f3c16b68eee76c7c854f2e09ceb
7
- data.tar.gz: a39d75293aaa0f171dc526da9200651d7b8f58a08882523abf8e182ca5ba0749e9cc8537df63b2323d6ff6fcf02f4b28cce7ab04408ec02a31a04c675cc2e062
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 = `#{build_command(cmd)} 2>&1`
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
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.11.4"
2
+ VERSION = "0.11.5"
3
3
  end
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
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-18 00:00:00.000000000 Z
11
+ date: 2013-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh