serverspec 0.7.4 → 0.7.5

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: 2a3700953c925debcbea16eab1e7d9a91119f8d0
4
- data.tar.gz: 3917363452032c05e21025078ff2b1da086aaf74
3
+ metadata.gz: 3f577a8b2bb4528167a44a24f77acaeefddcd033
4
+ data.tar.gz: b0e3f74bbaf8e8fad8179edb80c52b9081bca831
5
5
  SHA512:
6
- metadata.gz: 59d589134f92052fe138aea40c6b152c3f2736ea01f4948919d03095071cdcb9c80cd19934fb7fbcce0853bc8206f4bf6644872f73bed7d967ac3ddc46a327c5
7
- data.tar.gz: 4deab1fbd20b41beb3d5001afe5874d1f14ed44f6ae8e922bba0812f93cfa8193d4f1b00d1496bac637385edd385a1c7e6200d50a7da397da8412914e874f5be
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
- "md5sum #{escape(file)} | grep -iw -- ^#{escape(expected)}"
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
- "sha256sum #{escape(file)} | grep -iw -- ^#{escape(expected)}"
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
- cmd = "gem list --local | grep -w -- ^#{escape(name)}"
158
- if ! version.nil?
159
- cmd = "#{cmd} | grep -w -- #{escape(version)}"
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
- cmd = "pecl list | grep -w -- ^#{escape(name)}"
172
- if ! version.nil?
173
- cmd = "#{cmd} | grep -w -- #{escape(version)}"
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
 
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.7.4"
2
+ VERSION = "0.7.5"
3
3
  end
@@ -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 -- ^jekyll" }
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 -- ^jekyll | grep -w -- 1.1.1" }
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 -- ^mongo" }
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 -- ^mongo | grep -w -- 1.4.1" }
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
@@ -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 -- ^35435ea447c19f0ea5ef971837ab9ced" }
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 -- ^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
385
+ its(:command) { should eq "sha256sum /etc/services | grep -iw -- \\^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
386
386
  end
387
387
 
388
388
  describe file('invalid-file') do
@@ -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 -- ^jekyll" }
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 -- ^jekyll | grep -w -- 1.1.1" }
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 -- ^mongo" }
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 -- ^mongo | grep -w -- 1.4.1" }
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
@@ -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 -- ^35435ea447c19f0ea5ef971837ab9ced" }
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 -- ^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
385
+ its(:command) { should eq "sha256sum /etc/services | grep -iw -- \\^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
386
386
  end
387
387
 
388
388
  describe file('invalid-file') do
@@ -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 -- ^jekyll" }
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 -- ^jekyll | grep -w -- 1.1.1" }
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 -- ^mongo" }
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 -- ^mongo | grep -w -- 1.4.1" }
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
@@ -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 -- ^35435ea447c19f0ea5ef971837ab9ced" }
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 -- ^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
385
+ its(:command) { should eq "sha256sum /etc/services | grep -iw -- \\^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
386
386
  end
387
387
 
388
388
  describe file('invalid-file') do
@@ -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 -- ^jekyll" }
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 -- ^jekyll | grep -w -- 1.1.1" }
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 -- ^mongo" }
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 -- ^mongo | grep -w -- 1.4.1" }
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
@@ -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 -- ^35435ea447c19f0ea5ef971837ab9ced" }
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 -- ^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
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 -- ^jekyll" }
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 -- ^jekyll | grep -w -- 1.1.1" }
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 -- ^mongo" }
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 -- ^mongo | grep -w -- 1.4.1" }
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
@@ -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 -- ^35435ea447c19f0ea5ef971837ab9ced" }
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 -- ^0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
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 -- ^jekyll" }
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 -- ^jekyll | grep -w -- 1.1.1" }
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 -- ^mongo" }
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 -- ^mongo | grep -w -- 1.4.1" }
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
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-05 00:00:00.000000000 Z
11
+ date: 2013-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh