serverspec 0.5.7 → 0.5.8

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.
@@ -36,7 +36,7 @@ module Serverspec
36
36
  def build_command(cmd)
37
37
  path = Serverspec.configuration.path || RSpec.configuration.path
38
38
  if path
39
- cmd = "PATH=#{path}:$PATH #{cmd}"
39
+ cmd = "env PATH=#{path}:$PATH #{cmd}"
40
40
  end
41
41
  cmd
42
42
  end
@@ -45,7 +45,7 @@ module Serverspec
45
45
  path = Serverspec.configuration.path || RSpec.configuration.path
46
46
  if Serverspec.configuration.pre_command
47
47
  cmd = "#{Serverspec.configuration.pre_command} && #{cmd}"
48
- cmd = "PATH=#{path}:$PATH #{cmd}" if path
48
+ cmd = "env PATH=#{path}:$PATH #{cmd}" if path
49
49
  end
50
50
  cmd
51
51
  end
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.5.7"
2
+ VERSION = "0.5.8"
3
3
  end
@@ -13,7 +13,7 @@ end
13
13
  describe 'path is set' do
14
14
  let(:path) { '/sbin:/usr/sbin' }
15
15
  context package('httpd') do
16
- its(:command) { should eq 'PATH=/sbin:/usr/sbin:$PATH command' }
16
+ its(:command) { should eq 'env PATH=/sbin:/usr/sbin:$PATH command' }
17
17
  end
18
18
  end
19
19
 
@@ -28,6 +28,6 @@ describe 'path and pre_command are set' do
28
28
  let(:path) { '/sbin:/usr/sbin' }
29
29
  let(:pre_command) { 'source ~/.zshrc' }
30
30
  context package('httpd') do
31
- its(:command) { should eq 'PATH=/sbin:/usr/sbin:$PATH source ~/.zshrc && PATH=/sbin:/usr/sbin:$PATH command' }
31
+ its(:command) { should eq 'env PATH=/sbin:/usr/sbin:$PATH source ~/.zshrc && env PATH=/sbin:/usr/sbin:$PATH command' }
32
32
  end
33
33
  end
@@ -29,7 +29,7 @@ describe 'path is set' do
29
29
 
30
30
  let(:path) { '/sbin:/usr/sbin' }
31
31
  context package('httpd') do
32
- its(:command) { should eq 'PATH=/sbin:/usr/sbin:$PATH command' }
32
+ its(:command) { should eq 'env PATH=/sbin:/usr/sbin:$PATH command' }
33
33
  end
34
34
  end
35
35
 
@@ -86,7 +86,7 @@ describe 'path pre_command and set and user is non-root' do
86
86
  let(:path) { '/sbin:/usr/sbin' }
87
87
  let(:pre_command) { 'source ~/.zshrc' }
88
88
  context package('httpd') do
89
- its(:command) { should eq 'sudo PATH=/sbin:/usr/sbin:$PATH source ~/.zshrc && sudo PATH=/sbin:/usr/sbin:$PATH command' }
89
+ its(:command) { should eq 'sudo env PATH=/sbin:/usr/sbin:$PATH source ~/.zshrc && sudo env PATH=/sbin:/usr/sbin:$PATH command' }
90
90
  end
91
91
  end
92
92
 
@@ -101,6 +101,6 @@ describe 'path pre_command and set and user is non-root' do
101
101
  let(:path) { '/sbin:/usr/sbin' }
102
102
  let(:pre_command) { 'source ~/.zshrc' }
103
103
  context package('httpd') do
104
- its(:command) { should eq 'PATH=/sbin:/usr/sbin:$PATH source ~/.zshrc && PATH=/sbin:/usr/sbin:$PATH command' }
104
+ its(:command) { should eq 'env PATH=/sbin:/usr/sbin:$PATH source ~/.zshrc && env PATH=/sbin:/usr/sbin:$PATH command' }
105
105
  end
106
106
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: