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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e410ca837fb545befe15383be74a7a6f8e707cbf
4
- data.tar.gz: b9c28e075450809adf5e61542c944286e3db3318
3
+ metadata.gz: eac29c488fa7b1d1346c1110303f0d9a99d17a46
4
+ data.tar.gz: e904dba7761bac6160e428dd54d9d3e8f7d61e63
5
5
  SHA512:
6
- metadata.gz: 530b208fbdbbe3cbeb207db70a191380059ba31883b3a4c26f6fb0929e21ab0f001cda65be45410856fe4cd3dec92a1d7ed2f6811d1f376194987b40ca7af548
7
- data.tar.gz: 0499cc37663ba115ca7cef1d988d69e14bfe1ccf45d913ee0ae771a25f527150039f0b6a9f241808c60be85843d66e58f1859806f64ab434d172ffb19485b551
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
- Shellwords.shellescape(target.to_s())
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)
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.7.6"
2
+ VERSION = "0.7.7"
3
3
  end
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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.6
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-07 00:00:00.000000000 Z
11
+ date: 2013-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh