serverspec 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,7 +19,7 @@ module Serverspec
19
19
  end
20
20
 
21
21
  def check_selinux mode
22
- "getenforce | grep -i -- #{escape(mode)} && grep -i -- SELINUX=#{escape(mode)} /etc/selinux/config"
22
+ "getenforce | grep -i -- #{escape(mode)} && grep -i -- ^SELINUX=#{escape(mode)}$ /etc/selinux/config"
23
23
  end
24
24
  end
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
@@ -215,17 +215,17 @@ end
215
215
  shared_examples_for 'support command check_selinux' do
216
216
  context 'enforcing' do
217
217
  subject { commands.check_selinux('enforcing') }
218
- it { should eq "getenforce | grep -i -- enforcing && grep -i -- SELINUX=enforcing /etc/selinux/config" }
218
+ it { should eq "getenforce | grep -i -- enforcing && grep -i -- ^SELINUX=enforcing$ /etc/selinux/config" }
219
219
  end
220
220
 
221
221
  context 'permissive' do
222
222
  subject { commands.check_selinux('permissive') }
223
- it { should eq "getenforce | grep -i -- permissive && grep -i -- SELINUX=permissive /etc/selinux/config" }
223
+ it { should eq "getenforce | grep -i -- permissive && grep -i -- ^SELINUX=permissive$ /etc/selinux/config" }
224
224
  end
225
225
 
226
226
  context 'disabled' do
227
227
  subject { commands.check_selinux('disabled') }
228
- it { should eq "getenforce | grep -i -- disabled && grep -i -- SELINUX=disabled /etc/selinux/config" }
228
+ it { should eq "getenforce | grep -i -- disabled && grep -i -- ^SELINUX=disabled$ /etc/selinux/config" }
229
229
  end
230
230
  end
231
231
 
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.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-06 00:00:00.000000000 Z
12
+ date: 2013-06-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-ssh
@@ -354,7 +354,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
354
354
  version: '0'
355
355
  requirements: []
356
356
  rubyforge_project:
357
- rubygems_version: 1.8.25
357
+ rubygems_version: 1.8.23
358
358
  signing_key:
359
359
  specification_version: 3
360
360
  summary: RSpec tests for your servers provisioned by Puppet, Chef or anything else