serverspec 0.7.4 → 0.7.5
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 +10 -10
- data/lib/serverspec/version.rb +1 -1
- data/spec/darwin/package_spec.rb +4 -4
- data/spec/debian/file_spec.rb +2 -2
- data/spec/debian/package_spec.rb +4 -4
- data/spec/gentoo/file_spec.rb +2 -2
- data/spec/gentoo/package_spec.rb +4 -4
- data/spec/redhat/file_spec.rb +2 -2
- data/spec/redhat/package_spec.rb +4 -4
- data/spec/solaris/file_spec.rb +2 -2
- data/spec/solaris/package_spec.rb +4 -4
- data/spec/solaris11/file_spec.rb +2 -2
- data/spec/solaris11/package_spec.rb +4 -4
- 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: 3f577a8b2bb4528167a44a24f77acaeefddcd033
|
4
|
+
data.tar.gz: b0e3f74bbaf8e8fad8179edb80c52b9081bca831
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92234c676e5d4160ce1bc76f0e27784f8efb26ed2fabaab9769cafcbb4c31debe56ef73f33392b13c03f127611f86a240736a525d423a1a7d6021eea2416fc13
|
7
|
+
data.tar.gz: f0d15cc2a79aa5308aa69c0ff2a1cbac040ef64b4edac9e4f728eb7ddcebc3bdff96238b1212c0524498fa4cd35c3314dd1c864cf5bd1732fac660f65768c222
|
@@ -111,11 +111,13 @@ module Serverspec
|
|
111
111
|
end
|
112
112
|
|
113
113
|
def check_file_md5checksum(file, expected)
|
114
|
-
|
114
|
+
regexp = "^#{expected}"
|
115
|
+
"md5sum #{escape(file)} | grep -iw -- #{escape(regexp)}"
|
115
116
|
end
|
116
117
|
|
117
118
|
def check_file_sha256checksum(file, expected)
|
118
|
-
|
119
|
+
regexp = "^#{expected}"
|
120
|
+
"sha256sum #{escape(file)} | grep -iw -- #{escape(regexp)}"
|
119
121
|
end
|
120
122
|
|
121
123
|
def check_file_contain_within(file, expected_pattern, from=nil, to=nil)
|
@@ -154,10 +156,9 @@ module Serverspec
|
|
154
156
|
end
|
155
157
|
|
156
158
|
def check_installed_by_gem(name, version=nil)
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
end
|
159
|
+
regexp = "^#{name}"
|
160
|
+
cmd = "gem list --local | grep -w -- #{escape(regexp)}"
|
161
|
+
cmd = "#{cmd} | grep -w -- #{escape(version)}" unless version.nil?
|
161
162
|
cmd
|
162
163
|
end
|
163
164
|
|
@@ -168,10 +169,9 @@ module Serverspec
|
|
168
169
|
end
|
169
170
|
|
170
171
|
def check_installed_by_pecl(name, version=nil)
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
end
|
172
|
+
regexp = "^#{name}"
|
173
|
+
cmd = "pecl list | grep -w -- #{escape(regexp)}"
|
174
|
+
cmd = "#{cmd} | grep -w -- #{escape(version)}" unless version.nil?
|
175
175
|
cmd
|
176
176
|
end
|
177
177
|
|
data/lib/serverspec/version.rb
CHANGED
data/spec/darwin/package_spec.rb
CHANGED
@@ -4,7 +4,7 @@ include Serverspec::Helper::Darwin
|
|
4
4
|
|
5
5
|
describe package('jekyll') do
|
6
6
|
it { should be_installed.by('gem') }
|
7
|
-
its(:command) { should eq "gem list --local | grep -w --
|
7
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll" }
|
8
8
|
end
|
9
9
|
|
10
10
|
describe package('invalid-gem') do
|
@@ -13,7 +13,7 @@ end
|
|
13
13
|
|
14
14
|
describe package('jekyll') do
|
15
15
|
it { should be_installed.by('gem').with_version('1.1.1') }
|
16
|
-
its(:command) { should eq "gem list --local | grep -w --
|
16
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll | grep -w -- 1.1.1" }
|
17
17
|
end
|
18
18
|
|
19
19
|
describe package('jekyll') do
|
@@ -41,7 +41,7 @@ end
|
|
41
41
|
|
42
42
|
describe package('mongo') do
|
43
43
|
it { should be_installed.by('pecl') }
|
44
|
-
its(:command) { should eq "pecl list | grep -w --
|
44
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo" }
|
45
45
|
end
|
46
46
|
|
47
47
|
describe package('invalid-pecl') do
|
@@ -50,7 +50,7 @@ end
|
|
50
50
|
|
51
51
|
describe package('mongo') do
|
52
52
|
it { should be_installed.by('pecl').with_version('1.4.1') }
|
53
|
-
its(:command) { should eq "pecl list | grep -w --
|
53
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo | grep -w -- 1.4.1" }
|
54
54
|
end
|
55
55
|
|
56
56
|
describe package('mongo') do
|
data/spec/debian/file_spec.rb
CHANGED
@@ -373,7 +373,7 @@ end
|
|
373
373
|
|
374
374
|
describe file('/etc/services') do
|
375
375
|
it { should match_md5checksum '35435ea447c19f0ea5ef971837ab9ced' }
|
376
|
-
its(:command) { should eq "md5sum /etc/services | grep -iw --
|
376
|
+
its(:command) { should eq "md5sum /etc/services | grep -iw -- \\^35435ea447c19f0ea5ef971837ab9ced" }
|
377
377
|
end
|
378
378
|
|
379
379
|
describe file('invalid-file') do
|
@@ -382,7 +382,7 @@ end
|
|
382
382
|
|
383
383
|
describe file('/etc/services') do
|
384
384
|
it { should match_sha256checksum '0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a' }
|
385
|
-
its(:command) { should eq "sha256sum /etc/services | grep -iw --
|
385
|
+
its(:command) { should eq "sha256sum /etc/services | grep -iw -- \\^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
|
386
386
|
end
|
387
387
|
|
388
388
|
describe file('invalid-file') do
|
data/spec/debian/package_spec.rb
CHANGED
@@ -13,7 +13,7 @@ end
|
|
13
13
|
|
14
14
|
describe package('jekyll') do
|
15
15
|
it { should be_installed.by('gem') }
|
16
|
-
its(:command) { should eq "gem list --local | grep -w --
|
16
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll" }
|
17
17
|
end
|
18
18
|
|
19
19
|
describe package('invalid-gem') do
|
@@ -22,7 +22,7 @@ end
|
|
22
22
|
|
23
23
|
describe package('jekyll') do
|
24
24
|
it { should be_installed.by('gem').with_version('1.1.1') }
|
25
|
-
its(:command) { should eq "gem list --local | grep -w --
|
25
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll | grep -w -- 1.1.1" }
|
26
26
|
end
|
27
27
|
|
28
28
|
describe package('jekyll') do
|
@@ -50,7 +50,7 @@ end
|
|
50
50
|
|
51
51
|
describe package('mongo') do
|
52
52
|
it { should be_installed.by('pecl') }
|
53
|
-
its(:command) { should eq "pecl list | grep -w --
|
53
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo" }
|
54
54
|
end
|
55
55
|
|
56
56
|
describe package('invalid-pecl') do
|
@@ -59,7 +59,7 @@ end
|
|
59
59
|
|
60
60
|
describe package('mongo') do
|
61
61
|
it { should be_installed.by('pecl').with_version('1.4.1') }
|
62
|
-
its(:command) { should eq "pecl list | grep -w --
|
62
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo | grep -w -- 1.4.1" }
|
63
63
|
end
|
64
64
|
|
65
65
|
describe package('mongo') do
|
data/spec/gentoo/file_spec.rb
CHANGED
@@ -373,7 +373,7 @@ end
|
|
373
373
|
|
374
374
|
describe file('/etc/services') do
|
375
375
|
it { should match_md5checksum '35435ea447c19f0ea5ef971837ab9ced' }
|
376
|
-
its(:command) { should eq "md5sum /etc/services | grep -iw --
|
376
|
+
its(:command) { should eq "md5sum /etc/services | grep -iw -- \\^35435ea447c19f0ea5ef971837ab9ced" }
|
377
377
|
end
|
378
378
|
|
379
379
|
describe file('invalid-file') do
|
@@ -382,7 +382,7 @@ end
|
|
382
382
|
|
383
383
|
describe file('/etc/services') do
|
384
384
|
it { should match_sha256checksum '0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a' }
|
385
|
-
its(:command) { should eq "sha256sum /etc/services | grep -iw --
|
385
|
+
its(:command) { should eq "sha256sum /etc/services | grep -iw -- \\^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
|
386
386
|
end
|
387
387
|
|
388
388
|
describe file('invalid-file') do
|
data/spec/gentoo/package_spec.rb
CHANGED
@@ -13,7 +13,7 @@ end
|
|
13
13
|
|
14
14
|
describe package('jekyll') do
|
15
15
|
it { should be_installed.by('gem') }
|
16
|
-
its(:command) { should eq "gem list --local | grep -w --
|
16
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll" }
|
17
17
|
end
|
18
18
|
|
19
19
|
describe package('invalid-gem') do
|
@@ -22,7 +22,7 @@ end
|
|
22
22
|
|
23
23
|
describe package('jekyll') do
|
24
24
|
it { should be_installed.by('gem').with_version('1.1.1') }
|
25
|
-
its(:command) { should eq "gem list --local | grep -w --
|
25
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll | grep -w -- 1.1.1" }
|
26
26
|
end
|
27
27
|
|
28
28
|
describe package('jekyll') do
|
@@ -50,7 +50,7 @@ end
|
|
50
50
|
|
51
51
|
describe package('mongo') do
|
52
52
|
it { should be_installed.by('pecl') }
|
53
|
-
its(:command) { should eq "pecl list | grep -w --
|
53
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo" }
|
54
54
|
end
|
55
55
|
|
56
56
|
describe package('invalid-pecl') do
|
@@ -59,7 +59,7 @@ end
|
|
59
59
|
|
60
60
|
describe package('mongo') do
|
61
61
|
it { should be_installed.by('pecl').with_version('1.4.1') }
|
62
|
-
its(:command) { should eq "pecl list | grep -w --
|
62
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo | grep -w -- 1.4.1" }
|
63
63
|
end
|
64
64
|
|
65
65
|
describe package('mongo') do
|
data/spec/redhat/file_spec.rb
CHANGED
@@ -373,7 +373,7 @@ end
|
|
373
373
|
|
374
374
|
describe file('/etc/services') do
|
375
375
|
it { should match_md5checksum '35435ea447c19f0ea5ef971837ab9ced' }
|
376
|
-
its(:command) { should eq "md5sum /etc/services | grep -iw --
|
376
|
+
its(:command) { should eq "md5sum /etc/services | grep -iw -- \\^35435ea447c19f0ea5ef971837ab9ced" }
|
377
377
|
end
|
378
378
|
|
379
379
|
describe file('invalid-file') do
|
@@ -382,7 +382,7 @@ end
|
|
382
382
|
|
383
383
|
describe file('/etc/services') do
|
384
384
|
it { should match_sha256checksum '0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a' }
|
385
|
-
its(:command) { should eq "sha256sum /etc/services | grep -iw --
|
385
|
+
its(:command) { should eq "sha256sum /etc/services | grep -iw -- \\^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
|
386
386
|
end
|
387
387
|
|
388
388
|
describe file('invalid-file') do
|
data/spec/redhat/package_spec.rb
CHANGED
@@ -31,7 +31,7 @@ end
|
|
31
31
|
|
32
32
|
describe package('jekyll') do
|
33
33
|
it { should be_installed.by('gem') }
|
34
|
-
its(:command) { should eq "gem list --local | grep -w --
|
34
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll" }
|
35
35
|
end
|
36
36
|
|
37
37
|
describe package('invalid-gem') do
|
@@ -40,7 +40,7 @@ end
|
|
40
40
|
|
41
41
|
describe package('jekyll') do
|
42
42
|
it { should be_installed.by('gem').with_version('1.1.1') }
|
43
|
-
its(:command) { should eq "gem list --local | grep -w --
|
43
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll | grep -w -- 1.1.1" }
|
44
44
|
end
|
45
45
|
|
46
46
|
describe package('jekyll') do
|
@@ -68,7 +68,7 @@ end
|
|
68
68
|
|
69
69
|
describe package('mongo') do
|
70
70
|
it { should be_installed.by('pecl') }
|
71
|
-
its(:command) { should eq "pecl list | grep -w --
|
71
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo" }
|
72
72
|
end
|
73
73
|
|
74
74
|
describe package('invalid-pecl') do
|
@@ -77,7 +77,7 @@ end
|
|
77
77
|
|
78
78
|
describe package('mongo') do
|
79
79
|
it { should be_installed.by('pecl').with_version('1.4.1') }
|
80
|
-
its(:command) { should eq "pecl list | grep -w --
|
80
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo | grep -w -- 1.4.1" }
|
81
81
|
end
|
82
82
|
|
83
83
|
describe package('mongo') do
|
data/spec/solaris/file_spec.rb
CHANGED
@@ -373,7 +373,7 @@ end
|
|
373
373
|
|
374
374
|
describe file('/etc/services') do
|
375
375
|
it { should match_md5checksum '35435ea447c19f0ea5ef971837ab9ced' }
|
376
|
-
its(:command) { should eq "md5sum /etc/services | grep -iw --
|
376
|
+
its(:command) { should eq "md5sum /etc/services | grep -iw -- \\^35435ea447c19f0ea5ef971837ab9ced" }
|
377
377
|
end
|
378
378
|
|
379
379
|
describe file('invalid-file') do
|
@@ -382,7 +382,7 @@ end
|
|
382
382
|
|
383
383
|
describe file('/etc/services') do
|
384
384
|
it { should match_sha256checksum '0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a' }
|
385
|
-
its(:command) { should eq "sha256sum /etc/services | grep -iw --
|
385
|
+
its(:command) { should eq "sha256sum /etc/services | grep -iw -- \\^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
|
386
386
|
end
|
387
387
|
|
388
388
|
describe file('invalid-file') do
|
@@ -22,7 +22,7 @@ end
|
|
22
22
|
|
23
23
|
describe package('jekyll') do
|
24
24
|
it { should be_installed.by('gem') }
|
25
|
-
its(:command) { should eq "gem list --local | grep -w --
|
25
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll" }
|
26
26
|
end
|
27
27
|
|
28
28
|
describe package('invalid-gem') do
|
@@ -31,7 +31,7 @@ end
|
|
31
31
|
|
32
32
|
describe package('jekyll') do
|
33
33
|
it { should be_installed.by('gem').with_version('1.1.1') }
|
34
|
-
its(:command) { should eq "gem list --local | grep -w --
|
34
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll | grep -w -- 1.1.1" }
|
35
35
|
end
|
36
36
|
|
37
37
|
describe package('jekyll') do
|
@@ -59,7 +59,7 @@ end
|
|
59
59
|
|
60
60
|
describe package('mongo') do
|
61
61
|
it { should be_installed.by('pecl') }
|
62
|
-
its(:command) { should eq "pecl list | grep -w --
|
62
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo" }
|
63
63
|
end
|
64
64
|
|
65
65
|
describe package('invalid-pecl') do
|
@@ -68,7 +68,7 @@ end
|
|
68
68
|
|
69
69
|
describe package('mongo') do
|
70
70
|
it { should be_installed.by('pecl').with_version('1.4.1') }
|
71
|
-
its(:command) { should eq "pecl list | grep -w --
|
71
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo | grep -w -- 1.4.1" }
|
72
72
|
end
|
73
73
|
|
74
74
|
describe package('mongo') do
|
data/spec/solaris11/file_spec.rb
CHANGED
@@ -373,7 +373,7 @@ end
|
|
373
373
|
|
374
374
|
describe file('/etc/services') do
|
375
375
|
it { should match_md5checksum '35435ea447c19f0ea5ef971837ab9ced' }
|
376
|
-
its(:command) { should eq "md5sum /etc/services | grep -iw --
|
376
|
+
its(:command) { should eq "md5sum /etc/services | grep -iw -- \\^35435ea447c19f0ea5ef971837ab9ced" }
|
377
377
|
end
|
378
378
|
|
379
379
|
describe file('invalid-file') do
|
@@ -382,7 +382,7 @@ end
|
|
382
382
|
|
383
383
|
describe file('/etc/services') do
|
384
384
|
it { should match_sha256checksum '0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a' }
|
385
|
-
its(:command) { should eq "sha256sum /etc/services | grep -iw --
|
385
|
+
its(:command) { should eq "sha256sum /etc/services | grep -iw -- \\^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
|
386
386
|
end
|
387
387
|
|
388
388
|
describe file('invalid-file') do
|
@@ -22,7 +22,7 @@ end
|
|
22
22
|
|
23
23
|
describe package('jekyll') do
|
24
24
|
it { should be_installed.by('gem') }
|
25
|
-
its(:command) { should eq "gem list --local | grep -w --
|
25
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll" }
|
26
26
|
end
|
27
27
|
|
28
28
|
describe package('invalid-gem') do
|
@@ -31,7 +31,7 @@ end
|
|
31
31
|
|
32
32
|
describe package('jekyll') do
|
33
33
|
it { should be_installed.by('gem').with_version('1.1.1') }
|
34
|
-
its(:command) { should eq "gem list --local | grep -w --
|
34
|
+
its(:command) { should eq "gem list --local | grep -w -- \\^jekyll | grep -w -- 1.1.1" }
|
35
35
|
end
|
36
36
|
|
37
37
|
describe package('jekyll') do
|
@@ -59,7 +59,7 @@ end
|
|
59
59
|
|
60
60
|
describe package('mongo') do
|
61
61
|
it { should be_installed.by('pecl') }
|
62
|
-
its(:command) { should eq "pecl list | grep -w --
|
62
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo" }
|
63
63
|
end
|
64
64
|
|
65
65
|
describe package('invalid-pecl') do
|
@@ -68,7 +68,7 @@ end
|
|
68
68
|
|
69
69
|
describe package('mongo') do
|
70
70
|
it { should be_installed.by('pecl').with_version('1.4.1') }
|
71
|
-
its(:command) { should eq "pecl list | grep -w --
|
71
|
+
its(:command) { should eq "pecl list | grep -w -- \\^mongo | grep -w -- 1.4.1" }
|
72
72
|
end
|
73
73
|
|
74
74
|
describe package('mongo') do
|
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.5
|
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-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|