serverspec 0.6.10 → 0.6.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ module Serverspec
4
4
  module Commands
5
5
  class Linux < Base
6
6
  def check_access_by_user(file, user, access)
7
- "su -s sh -c \"test -#{access} #{file}\" #{user}"
7
+ "su -c \"test -#{access} #{file}\" #{user}"
8
8
  end
9
9
 
10
10
  def check_iptables_rule(rule, table=nil, chain=nil)
@@ -3,7 +3,7 @@ module Serverspec
3
3
  class RedHat < Linux
4
4
  def check_access_by_user(file, user, access)
5
5
  # Redhat-specific
6
- "runuser -s sh -c \"test -#{access} #{file}\" #{user}"
6
+ "runuser -c \"test -#{access} #{file}\" #{user}"
7
7
  end
8
8
 
9
9
  def check_enabled(service)
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.6.10"
2
+ VERSION = "0.6.11"
3
3
  end
@@ -94,16 +94,16 @@ end
94
94
  describe 'check_access_by_user' do
95
95
  context 'read access' do
96
96
  subject {commands.check_access_by_user '/tmp/something', 'dummyuser1', 'r'}
97
- it { should eq 'runuser -s sh -c "test -r /tmp/something" dummyuser1' }
97
+ it { should eq 'runuser -c "test -r /tmp/something" dummyuser1' }
98
98
  end
99
99
 
100
100
  context 'write access' do
101
101
  subject {commands.check_access_by_user '/tmp/somethingw', 'dummyuser2', 'w'}
102
- it { should eq 'runuser -s sh -c "test -w /tmp/somethingw" dummyuser2' }
102
+ it { should eq 'runuser -c "test -w /tmp/somethingw" dummyuser2' }
103
103
  end
104
104
 
105
105
  context 'execute access' do
106
106
  subject {commands.check_access_by_user '/tmp/somethingx', 'dummyuser3', 'x'}
107
- it { should eq 'runuser -s sh -c "test -x /tmp/somethingx" dummyuser3' }
107
+ it { should eq 'runuser -c "test -x /tmp/somethingx" dummyuser3' }
108
108
  end
109
109
  end
@@ -252,17 +252,17 @@ end
252
252
  shared_examples_for 'support command check_access_by_user' do
253
253
  context 'read access' do
254
254
  subject {commands.check_access_by_user '/tmp/something', 'dummyuser1', 'r'}
255
- it { should eq 'su -s sh -c "test -r /tmp/something" dummyuser1' }
255
+ it { should eq 'su -c "test -r /tmp/something" dummyuser1' }
256
256
  end
257
257
 
258
258
  context 'write access' do
259
259
  subject {commands.check_access_by_user '/tmp/somethingw', 'dummyuser2', 'w'}
260
- it { should eq 'su -s sh -c "test -w /tmp/somethingw" dummyuser2' }
260
+ it { should eq 'su -c "test -w /tmp/somethingw" dummyuser2' }
261
261
  end
262
262
 
263
263
  context 'execute access' do
264
264
  subject {commands.check_access_by_user '/tmp/somethingx', 'dummyuser3', 'x'}
265
- it { should eq 'su -s sh -c "test -x /tmp/somethingx" dummyuser3' }
265
+ it { should eq 'su -c "test -x /tmp/somethingx" dummyuser3' }
266
266
  end
267
267
  end
268
268
 
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.6.10
4
+ version: 0.6.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -324,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
324
  version: '0'
325
325
  requirements: []
326
326
  rubyforge_project:
327
- rubygems_version: 1.8.23
327
+ rubygems_version: 1.8.25
328
328
  signing_key:
329
329
  specification_version: 3
330
330
  summary: RSpec tests for your servers configured by Puppet, Chef or anything else