serverspec 2.0.0.beta12 → 2.0.0.beta13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec/type/file.rb +8 -8
- data/lib/serverspec/type/interface.rb +1 -1
- data/lib/serverspec/type/selinux.rb +5 -3
- data/lib/serverspec/type/user.rb +2 -2
- data/lib/serverspec/version.rb +1 -1
- data/serverspec.gemspec +1 -1
- data/spec/type/base/user_spec.rb +4 -0
- data/wercker.yml +3 -11
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfe900aaf63d9ca678daab329a9f1a8bf938e158
|
4
|
+
data.tar.gz: 979acbe1e6086adbf4dfaedce62ea1467c9b04ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ac4886d3067ee1491102ea4e2072d7083e0fd0f41eab7342fce6a797fa7974243a8fc24a0a5ef71bd940e23362f65e4bcdf9a5a3d46bd93079b18717baa4c30
|
7
|
+
data.tar.gz: 4ec79e587099951c3f1c721d747491f76636f06940f5ce34f02b3ea00ccb96b894825b159a361b95eafcccd806c0c5d84889692ffa5dda1a676ec8f7536b9539
|
data/lib/serverspec/type/file.rb
CHANGED
@@ -19,18 +19,18 @@ module Serverspec
|
|
19
19
|
|
20
20
|
def contain(pattern, from, to)
|
21
21
|
if pattern.is_a?(Array)
|
22
|
-
@runner.
|
22
|
+
@runner.check_file_contains_lines(@name, pattern, from, to)
|
23
23
|
else
|
24
24
|
if (from || to).nil?
|
25
|
-
@runner.
|
25
|
+
@runner.check_file_contains(@name, pattern)
|
26
26
|
else
|
27
|
-
@runner.
|
27
|
+
@runner.check_file_contains_within(@name, pattern, from, to)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
32
|
def mode?(mode)
|
33
|
-
@runner.
|
33
|
+
@runner.check_file_has_mode(@name, mode)
|
34
34
|
end
|
35
35
|
|
36
36
|
def owned_by?(owner)
|
@@ -47,7 +47,7 @@ module Serverspec
|
|
47
47
|
|
48
48
|
def readable?(by_whom, by_user)
|
49
49
|
if by_user != nil
|
50
|
-
@runner.
|
50
|
+
@runner.check_file_is_accessible_by_user(@name, by_user, 'r')
|
51
51
|
else
|
52
52
|
@runner.check_file_is_readable(@name, by_whom)
|
53
53
|
end
|
@@ -55,7 +55,7 @@ module Serverspec
|
|
55
55
|
|
56
56
|
def writable?(by_whom, by_user)
|
57
57
|
if by_user != nil
|
58
|
-
@runner.
|
58
|
+
@runner.check_file_is_accessible_by_user(@name, by_user, 'w')
|
59
59
|
else
|
60
60
|
@runner.check_file_is_writable(@name, by_whom)
|
61
61
|
end
|
@@ -63,7 +63,7 @@ module Serverspec
|
|
63
63
|
|
64
64
|
def executable?(by_whom, by_user)
|
65
65
|
if by_user != nil
|
66
|
-
@runner.
|
66
|
+
@runner.check_file_is_accessible_by_user(@name, by_user, 'x')
|
67
67
|
else
|
68
68
|
@runner.check_file_is_executable(@name, by_whom)
|
69
69
|
end
|
@@ -97,7 +97,7 @@ module Serverspec
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def version?(version)
|
100
|
-
@runner.
|
100
|
+
@runner.check_file_has_version(@name, version)
|
101
101
|
end
|
102
102
|
|
103
103
|
def mtime
|
@@ -2,15 +2,15 @@ module Serverspec
|
|
2
2
|
module Type
|
3
3
|
class Selinux < Base
|
4
4
|
def disabled?
|
5
|
-
@runner.
|
5
|
+
@runner.check_selinux_has_mode('disabled')
|
6
6
|
end
|
7
7
|
|
8
8
|
def enforcing?
|
9
|
-
@runner.
|
9
|
+
@runner.check_selinux_has_mode('enforcing')
|
10
10
|
end
|
11
11
|
|
12
12
|
def permissive?
|
13
|
-
@runner.
|
13
|
+
@runner.check_selinux_has_mode('permissive')
|
14
14
|
end
|
15
15
|
|
16
16
|
def to_s
|
@@ -19,3 +19,5 @@ module Serverspec
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
+
|
23
|
+
|
data/lib/serverspec/type/user.rb
CHANGED
@@ -6,11 +6,11 @@ module Serverspec
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def belongs_to_group?(group)
|
9
|
-
@runner.
|
9
|
+
@runner.check_user_belongs_to_group(@name, group)
|
10
10
|
end
|
11
11
|
|
12
12
|
def belongs_to_primary_group?(group)
|
13
|
-
backend.
|
13
|
+
backend.check_user_belongs_to_primary_group(@name, group)
|
14
14
|
end
|
15
15
|
|
16
16
|
def has_uid?(uid)
|
data/lib/serverspec/version.rb
CHANGED
data/serverspec.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_runtime_dependency "rspec", "~> 3.0.0"
|
22
22
|
spec.add_runtime_dependency "rspec-its"
|
23
|
-
spec.add_runtime_dependency "specinfra", "~> 2.0.0.
|
23
|
+
spec.add_runtime_dependency "specinfra", "~> 2.0.0.beta12"
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.1.1"
|
26
26
|
end
|
data/spec/type/base/user_spec.rb
CHANGED
data/wercker.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
box: mizzy/serverspec-base
|
1
|
+
box: mizzy/serverspec-base@0.0.3
|
2
2
|
build:
|
3
3
|
steps:
|
4
4
|
- script:
|
@@ -61,16 +61,8 @@ build:
|
|
61
61
|
|
62
62
|
after-steps:
|
63
63
|
- script:
|
64
|
-
name: Run vagrant destroy
|
65
|
-
code: vagrant destroy
|
66
|
-
cwd: $WORKING_DIR
|
67
|
-
- script:
|
68
|
-
name: Run vagrant destroy centos70
|
69
|
-
code: vagrant destroy centos70 --force
|
70
|
-
cwd: $WORKING_DIR
|
71
|
-
- script:
|
72
|
-
name: Run vagrant destroy ubuntu1404
|
73
|
-
code: vagrant destroy ubuntu1404 --force
|
64
|
+
name: Run vagrant destroy
|
65
|
+
code: vagrant destroy --force
|
74
66
|
cwd: $WORKING_DIR
|
75
67
|
- 1syo/idobata-notify@0.1.1:
|
76
68
|
token: $IDOBATA_TOKEN
|
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.0.
|
4
|
+
version: 2.0.0.beta13
|
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-07-
|
11
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.0.0.
|
47
|
+
version: 2.0.0.beta12
|
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.0.
|
54
|
+
version: 2.0.0.beta12
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|