serverspec 2.22.0 → 2.23.0

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: 4fe870a4f62eab55bcd338386a1b3a411cf3555d
4
- data.tar.gz: 930d1b761744265d1a5e9d7de697a16d05d6cedd
3
+ metadata.gz: 705b4d622f116fbfed3b96df2f953bc6ee30a6bd
4
+ data.tar.gz: 2256ecca97ef36a6f2a3d66e991cfcb88cc56dd0
5
5
  SHA512:
6
- metadata.gz: da7f45792568ae16f82f7077163106f10f2926fd075cf4a7365100db08026a8707780a1e10f800d8dca1aba5b0ea259cc8a564f5633217ba3467b9aba20f12a6
7
- data.tar.gz: 16d6e83b2339c43d0fec1cc21d747f2c789565bff83926312f5c68036e3c046ca46cb72df49234e169f9997cfb15364d4ee994ed339910910ec91186cf6d7066
6
+ metadata.gz: 2a835bf90047183d9856594134f4bb78afc6c84c3f5916fcb53e487cc4e237645d285161c0b0b7d1af9d1daf7fb69b3d37dd15c3695588fac181eff3a6264a43
7
+ data.tar.gz: 8d905cfe1827b3cf0b1901efbe0001b38ae1b758e11f2910f801b2a5a5b91f82bd8daed0b9ee2a0c6db9fcf80af23bdf8a2c7ee4a63f65f8bd550b9ca63cc61c
@@ -15,6 +15,10 @@ require 'serverspec/matcher/be_reachable'
15
15
  # package
16
16
  require 'serverspec/matcher/be_installed'
17
17
 
18
+ # selinux
19
+ require 'serverspec/matcher/be_enforcing'
20
+ require 'serverspec/matcher/be_permissive'
21
+
18
22
  # service
19
23
  require 'serverspec/matcher/be_enabled'
20
24
  require 'serverspec/matcher/be_running'
@@ -0,0 +1,10 @@
1
+ RSpec::Matchers.define :be_enforcing do
2
+ match do |selinux|
3
+ selinux.enforcing?(@with_policy)
4
+ end
5
+
6
+ chain :with_policy do |with_policy|
7
+ @with_policy = with_policy
8
+ end
9
+
10
+ end
@@ -0,0 +1,10 @@
1
+ RSpec::Matchers.define :be_permissive do
2
+ match do |selinux|
3
+ selinux.permissive?(@with_policy)
4
+ end
5
+
6
+ chain :with_policy do |with_policy|
7
+ @with_policy = with_policy
8
+ end
9
+
10
+ end
@@ -4,12 +4,12 @@ module Serverspec::Type
4
4
  @runner.check_selinux_has_mode('disabled')
5
5
  end
6
6
 
7
- def enforcing?
8
- @runner.check_selinux_has_mode('enforcing')
7
+ def enforcing?(with_policy)
8
+ @runner.check_selinux_has_mode('enforcing', with_policy)
9
9
  end
10
10
 
11
- def permissive?
12
- @runner.check_selinux_has_mode('permissive')
11
+ def permissive?(with_policy)
12
+ @runner.check_selinux_has_mode('permissive', with_policy)
13
13
  end
14
14
 
15
15
  def to_s
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "2.22.0"
2
+ VERSION = "2.23.0"
3
3
  end
data/serverspec.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_runtime_dependency "rspec", "~> 3.0"
22
22
  spec.add_runtime_dependency "rspec-its"
23
23
  spec.add_runtime_dependency "multi_json"
24
- spec.add_runtime_dependency "specinfra", "~> 2.42"
24
+ spec.add_runtime_dependency "specinfra", "~> 2.43"
25
25
  spec.add_development_dependency "bundler", "~> 1.3"
26
26
  spec.add_development_dependency "rake", "~> 10.1.1"
27
27
  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: 2.22.0
4
+ version: 2.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.42'
61
+ version: '2.43'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '2.42'
68
+ version: '2.43'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -120,10 +120,12 @@ files:
120
120
  - lib/serverspec/helper/type.rb
121
121
  - lib/serverspec/matcher.rb
122
122
  - lib/serverspec/matcher/be_enabled.rb
123
+ - lib/serverspec/matcher/be_enforcing.rb
123
124
  - lib/serverspec/matcher/be_executable.rb
124
125
  - lib/serverspec/matcher/be_installed.rb
125
126
  - lib/serverspec/matcher/be_listening.rb
126
127
  - lib/serverspec/matcher/be_mounted.rb
128
+ - lib/serverspec/matcher/be_permissive.rb
127
129
  - lib/serverspec/matcher/be_reachable.rb
128
130
  - lib/serverspec/matcher/be_readable.rb
129
131
  - lib/serverspec/matcher/be_resolvable.rb