serverspec 0.7.6 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/serverspec/commands/base.rb +8 -1
- data/lib/serverspec/version.rb +1 -1
- data/spec/darwin/file_spec.rb +5 -0
- data/spec/debian/file_spec.rb +5 -0
- data/spec/gentoo/file_spec.rb +5 -0
- data/spec/redhat/file_spec.rb +5 -0
- data/spec/solaris/file_spec.rb +5 -0
- data/spec/solaris11/file_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eac29c488fa7b1d1346c1110303f0d9a99d17a46
|
4
|
+
data.tar.gz: e904dba7761bac6160e428dd54d9d3e8f7d61e63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d11501b36ff63604cf5e2508df4d64bdc5729ad277232f82f69f942ad24c843bbb0cef562a577962d5bb3b589c88dea15ad939eec9ad0de9cd80b48af378b09d
|
7
|
+
data.tar.gz: 7936003b36cb17bf752cfd6e359dfce04141599f9db85c9c1357498b899a138e6375c1ac82275847f127119f1445fd1eeacef6aa2719d1469c1e9162831aed1d
|
@@ -6,7 +6,14 @@ module Serverspec
|
|
6
6
|
class NotImplementedError < Exception; end
|
7
7
|
|
8
8
|
def escape(target)
|
9
|
-
|
9
|
+
str = case target
|
10
|
+
when Regexp
|
11
|
+
target.source
|
12
|
+
else
|
13
|
+
target.to_s
|
14
|
+
end
|
15
|
+
|
16
|
+
Shellwords.shellescape(str)
|
10
17
|
end
|
11
18
|
|
12
19
|
def check_enabled(service, level=3)
|
data/lib/serverspec/version.rb
CHANGED
data/spec/darwin/file_spec.rb
CHANGED
@@ -34,6 +34,11 @@ describe file('/etc/ssh/sshd_config') do
|
|
34
34
|
its(:command) { should eq "grep -q -- This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
35
35
|
end
|
36
36
|
|
37
|
+
describe file('/etc/ssh/sshd_config') do
|
38
|
+
it { should contain /^This is the sshd server system-wide configuration file/ }
|
39
|
+
its(:command) { should eq "grep -q -- \\^This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
40
|
+
end
|
41
|
+
|
37
42
|
describe file('/etc/ssh/sshd_config') do
|
38
43
|
it { should_not contain 'This is invalid text!!' }
|
39
44
|
end
|
data/spec/debian/file_spec.rb
CHANGED
@@ -34,6 +34,11 @@ describe file('/etc/ssh/sshd_config') do
|
|
34
34
|
its(:command) { should eq "grep -q -- This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
35
35
|
end
|
36
36
|
|
37
|
+
describe file('/etc/ssh/sshd_config') do
|
38
|
+
it { should contain /^This is the sshd server system-wide configuration file/ }
|
39
|
+
its(:command) { should eq "grep -q -- \\^This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
40
|
+
end
|
41
|
+
|
37
42
|
describe file('/etc/ssh/sshd_config') do
|
38
43
|
it { should_not contain 'This is invalid text!!' }
|
39
44
|
end
|
data/spec/gentoo/file_spec.rb
CHANGED
@@ -34,6 +34,11 @@ describe file('/etc/ssh/sshd_config') do
|
|
34
34
|
its(:command) { should eq "grep -q -- This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
35
35
|
end
|
36
36
|
|
37
|
+
describe file('/etc/ssh/sshd_config') do
|
38
|
+
it { should contain /^This is the sshd server system-wide configuration file/ }
|
39
|
+
its(:command) { should eq "grep -q -- \\^This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
40
|
+
end
|
41
|
+
|
37
42
|
describe file('/etc/ssh/sshd_config') do
|
38
43
|
it { should_not contain 'This is invalid text!!' }
|
39
44
|
end
|
data/spec/redhat/file_spec.rb
CHANGED
@@ -34,6 +34,11 @@ describe file('/etc/ssh/sshd_config') do
|
|
34
34
|
its(:command) { should eq "grep -q -- This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
35
35
|
end
|
36
36
|
|
37
|
+
describe file('/etc/ssh/sshd_config') do
|
38
|
+
it { should contain /^This is the sshd server system-wide configuration file/ }
|
39
|
+
its(:command) { should eq "grep -q -- \\^This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
40
|
+
end
|
41
|
+
|
37
42
|
describe file('/etc/ssh/sshd_config') do
|
38
43
|
it { should_not contain 'This is invalid text!!' }
|
39
44
|
end
|
data/spec/solaris/file_spec.rb
CHANGED
@@ -34,6 +34,11 @@ describe file('/etc/ssh/sshd_config') do
|
|
34
34
|
its(:command) { should eq "grep -q -- This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
35
35
|
end
|
36
36
|
|
37
|
+
describe file('/etc/ssh/sshd_config') do
|
38
|
+
it { should contain /^This is the sshd server system-wide configuration file/ }
|
39
|
+
its(:command) { should eq "grep -q -- \\^This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
40
|
+
end
|
41
|
+
|
37
42
|
describe file('/etc/ssh/sshd_config') do
|
38
43
|
it { should_not contain 'This is invalid text!!' }
|
39
44
|
end
|
data/spec/solaris11/file_spec.rb
CHANGED
@@ -34,6 +34,11 @@ describe file('/etc/ssh/sshd_config') do
|
|
34
34
|
its(:command) { should eq "grep -q -- This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
35
35
|
end
|
36
36
|
|
37
|
+
describe file('/etc/ssh/sshd_config') do
|
38
|
+
it { should contain /^This is the sshd server system-wide configuration file/ }
|
39
|
+
its(:command) { should eq "grep -q -- \\^This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
|
40
|
+
end
|
41
|
+
|
37
42
|
describe file('/etc/ssh/sshd_config') do
|
38
43
|
it { should_not contain 'This is invalid text!!' }
|
39
44
|
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: 0.7.
|
4
|
+
version: 0.7.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|