serverspec 2.0.1 → 2.1.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: 825860011fe04382ba828513e795755252075183
4
- data.tar.gz: 49a22eb4a22d4c394e70d499f9c5decc84e64b54
3
+ metadata.gz: bd3bd738da245a8d57b9532757093bfc88d609af
4
+ data.tar.gz: 7161e72b363e811889c2da3e9642e39bdbcaef5d
5
5
  SHA512:
6
- metadata.gz: 2617a6cad98b547d6204cc322fef7d9c360dc006a43d84d7a791fed594486ce86d58c198656d6c5284c41835b1880a05be3be711773c2ddc2660cc60f32bd09e
7
- data.tar.gz: 38f22e104bbce0d1a0760bb15e4ad4427df8de8d876c8dffd168234bc27fad48f019c955281da42bfe118b5d0ae6c91713a7d6e387c226a445433038f314fe13
6
+ metadata.gz: 87ace5e258793d1a52e02aa50f0030a8994cc9c51800e6fd7cddb491d165052ba247232f6981860187e30fc4cb9117981337b020233dc77732eccd1381ae656e
7
+ data.tar.gz: fdf8b8ad55b7c3aa5803b27b1f476f949bf8469b082e0f38515839d4113804ad68ba8d922e1dcaa72a29ac999679de81278712443cf9b3835eaa03a102b85da1
@@ -5,9 +5,9 @@ module Serverspec
5
5
  base cgroup command cron default_gateway file group host
6
6
  iis_website iis_app_pool interface ipfilter ipnat iptables
7
7
  ip6tables kernel_module linux_kernel_parameter lxc mail_alias
8
- package php_config port ppa process routing_table selinux service
9
- user yumrepo windows_feature windows_hot_fix windows_registry_key
10
- windows_scheduled_task zfs
8
+ package php_config port ppa process routing_table selinux
9
+ selinux_module service user yumrepo windows_feature
10
+ windows_hot_fix windows_registry_key windows_scheduled_task zfs
11
11
  )
12
12
 
13
13
  types.each {|type| require "serverspec/type/#{type}" }
@@ -0,0 +1,11 @@
1
+ module Serverspec::Type
2
+ class SelinuxModule < Base
3
+ def enabled?
4
+ @runner.check_selinux_module_is_enabled(@name)
5
+ end
6
+
7
+ def installed?(name, version=nil)
8
+ @runner.check_selinux_module_is_installed(@name, version)
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "2.0.1"
2
+ VERSION = "2.1.0"
3
3
  end
data/serverspec.gemspec CHANGED
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_runtime_dependency "rspec", "~> 3.0.0"
21
+ spec.add_runtime_dependency "rspec", "~> 3.0"
22
22
  spec.add_runtime_dependency "rspec-its"
23
- spec.add_runtime_dependency "specinfra", "~> 2.0"
23
+ spec.add_runtime_dependency "specinfra", "~> 2.1"
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
25
25
  spec.add_development_dependency "rake", "~> 10.1.1"
26
26
  end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ set :os, :family => 'linux'
4
+
5
+ describe selinux_module('bootloader') do
6
+ it { should be_installed }
7
+ end
8
+
9
+ describe selinux_module('bootloader') do
10
+ it { should be_enabled }
11
+ 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.0.1
4
+ version: 2.1.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: 2014-10-04 00:00:00.000000000 Z
11
+ date: 2014-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0
19
+ version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 3.0.0
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec-its
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.0'
47
+ version: '2.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.0'
54
+ version: '2.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -149,6 +149,7 @@ files:
149
149
  - lib/serverspec/type/process.rb
150
150
  - lib/serverspec/type/routing_table.rb
151
151
  - lib/serverspec/type/selinux.rb
152
+ - lib/serverspec/type/selinux_module.rb
152
153
  - lib/serverspec/type/service.rb
153
154
  - lib/serverspec/type/user.rb
154
155
  - lib/serverspec/type/windows_feature.rb
@@ -208,6 +209,7 @@ files:
208
209
  - spec/type/linux/kernel_module_spec.rb
209
210
  - spec/type/linux/linux_kernel_parameter_spec.rb
210
211
  - spec/type/linux/lxc_container_spec.rb
212
+ - spec/type/linux/selinux_module_spec.rb
211
213
  - spec/type/linux/selinux_spec.rb
212
214
  - spec/type/linux/zfs_spec.rb
213
215
  - spec/type/nixos/package_spec.rb
@@ -339,6 +341,7 @@ test_files:
339
341
  - spec/type/linux/kernel_module_spec.rb
340
342
  - spec/type/linux/linux_kernel_parameter_spec.rb
341
343
  - spec/type/linux/lxc_container_spec.rb
344
+ - spec/type/linux/selinux_module_spec.rb
342
345
  - spec/type/linux/selinux_spec.rb
343
346
  - spec/type/linux/zfs_spec.rb
344
347
  - spec/type/nixos/package_spec.rb