serverspec 0.9.6 → 0.9.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/Gemfile +0 -4
- data/README.md +1 -1
- data/lib/serverspec/commands/base.rb +14 -0
- data/lib/serverspec/version.rb +1 -1
- data/spec/aix/package_spec.rb +15 -0
- data/spec/darwin/package_spec.rb +15 -0
- data/spec/debian/package_spec.rb +15 -0
- data/spec/freebsd/package_spec.rb +15 -0
- data/spec/gentoo/package_spec.rb +15 -0
- data/spec/redhat/package_spec.rb +15 -0
- data/spec/solaris/package_spec.rb +15 -0
- data/spec/solaris11/package_spec.rb +15 -0
- data/spec/spec_helper.rb +0 -3
- 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: a52eb25a3bfc9d4be5218ea9d580488f4b25b36b
|
4
|
+
data.tar.gz: 6aedd1f9331a001dab115cef2e21582aa13e8231
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa754a7d31353711232856190abd8fc89b482fb27e97ae0b517572821fba2478a56804702e575e820e2594e456a2164286c05b81ed35a0c10c006153120a2aa2
|
7
|
+
data.tar.gz: 2b2c0875c5c0ad842c8c118714de8869c222df3f5501dfffaf859cd1ec1c05e11e8a0e6a2c3ba2a2520fb9c3b0d76326985e7deec9fb1a51453d7333fe4dde0f
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Serverspec [](http://badge.fury.io/rb/serverspec) [](http://travis-ci.org/serverspec/serverspec) [](http://badge.fury.io/rb/serverspec) [](http://travis-ci.org/serverspec/serverspec) [](https://codeclimate.com/github/serverspec/serverspec)
|
2
2
|
|
3
3
|
RSpec tests for your servers configured by Puppet, Chef or anything else
|
4
4
|
|
@@ -192,6 +192,13 @@ module Serverspec
|
|
192
192
|
cmd
|
193
193
|
end
|
194
194
|
|
195
|
+
def check_installed_by_pear(name, version=nil)
|
196
|
+
regexp = "^#{name}"
|
197
|
+
cmd = "pear list | grep -w -- #{escape(regexp)}"
|
198
|
+
cmd = "#{cmd} | grep -w -- #{escape(version)}" if version
|
199
|
+
cmd
|
200
|
+
end
|
201
|
+
|
195
202
|
def check_installed_by_pip(name, version=nil)
|
196
203
|
regexp = "^#{name}"
|
197
204
|
cmd = "pip list | grep -w -- #{escape(regexp)}"
|
@@ -199,6 +206,13 @@ module Serverspec
|
|
199
206
|
cmd
|
200
207
|
end
|
201
208
|
|
209
|
+
def check_installed_by_cpan(name, version=nil)
|
210
|
+
regexp = "^#{name}"
|
211
|
+
cmd = "cpan -l | grep -w -- #{escape(regexp)}"
|
212
|
+
cmd = "#{cmd} | grep -w -- #{escape(version)}" if version
|
213
|
+
cmd
|
214
|
+
end
|
215
|
+
|
202
216
|
def check_belonging_group(user, group)
|
203
217
|
"id #{escape(user)} | awk '{print $3}' | grep -- #{escape(group)}"
|
204
218
|
end
|
data/lib/serverspec/version.rb
CHANGED
data/spec/aix/package_spec.rb
CHANGED
@@ -81,6 +81,11 @@ describe package('mongo') do
|
|
81
81
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
82
82
|
end
|
83
83
|
|
84
|
+
describe package('XML_Util') do
|
85
|
+
it { should be_installed.by('pear').with_version('1.2.1') }
|
86
|
+
its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
|
87
|
+
end
|
88
|
+
|
84
89
|
describe package('supervisor') do
|
85
90
|
it { should be_installed.by('pip').with_version('3.0') }
|
86
91
|
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
@@ -89,3 +94,13 @@ end
|
|
89
94
|
describe package('invalid-pip') do
|
90
95
|
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
91
96
|
end
|
97
|
+
|
98
|
+
describe package('App::Ack') do
|
99
|
+
it { should be_installed.by('cpan') }
|
100
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
|
101
|
+
end
|
102
|
+
|
103
|
+
describe package('App::Ack') do
|
104
|
+
it { should be_installed.by('cpan').with_version('2.04') }
|
105
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
|
106
|
+
end
|
data/spec/darwin/package_spec.rb
CHANGED
@@ -59,6 +59,11 @@ describe package('mongo') do
|
|
59
59
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
60
60
|
end
|
61
61
|
|
62
|
+
describe package('XML_Util') do
|
63
|
+
it { should be_installed.by('pear').with_version('1.2.1') }
|
64
|
+
its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
|
65
|
+
end
|
66
|
+
|
62
67
|
describe package('supervisor') do
|
63
68
|
it { should be_installed.by('pip').with_version('3.0') }
|
64
69
|
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
@@ -67,3 +72,13 @@ end
|
|
67
72
|
describe package('invalid-pip') do
|
68
73
|
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
69
74
|
end
|
75
|
+
|
76
|
+
describe package('App::Ack') do
|
77
|
+
it { should be_installed.by('cpan') }
|
78
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
|
79
|
+
end
|
80
|
+
|
81
|
+
describe package('App::Ack') do
|
82
|
+
it { should be_installed.by('cpan').with_version('2.04') }
|
83
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
|
84
|
+
end
|
data/spec/debian/package_spec.rb
CHANGED
@@ -77,6 +77,11 @@ describe package('mongo') do
|
|
77
77
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
78
78
|
end
|
79
79
|
|
80
|
+
describe package('XML_Util') do
|
81
|
+
it { should be_installed.by('pear').with_version('1.2.1') }
|
82
|
+
its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
|
83
|
+
end
|
84
|
+
|
80
85
|
describe package('supervisor') do
|
81
86
|
it { should be_installed.by('pip').with_version('3.0') }
|
82
87
|
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
@@ -85,3 +90,13 @@ end
|
|
85
90
|
describe package('invalid-pip') do
|
86
91
|
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
87
92
|
end
|
93
|
+
|
94
|
+
describe package('App::Ack') do
|
95
|
+
it { should be_installed.by('cpan') }
|
96
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
|
97
|
+
end
|
98
|
+
|
99
|
+
describe package('App::Ack') do
|
100
|
+
it { should be_installed.by('cpan').with_version('2.04') }
|
101
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
|
102
|
+
end
|
@@ -73,6 +73,11 @@ describe package('mongo') do
|
|
73
73
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
74
74
|
end
|
75
75
|
|
76
|
+
describe package('XML_Util') do
|
77
|
+
it { should be_installed.by('pear').with_version('1.2.1') }
|
78
|
+
its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
|
79
|
+
end
|
80
|
+
|
76
81
|
describe package('supervisor') do
|
77
82
|
it { should be_installed.by('pip').with_version('3.0') }
|
78
83
|
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
@@ -81,3 +86,13 @@ end
|
|
81
86
|
describe package('invalid-pip') do
|
82
87
|
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
83
88
|
end
|
89
|
+
|
90
|
+
describe package('App::Ack') do
|
91
|
+
it { should be_installed.by('cpan') }
|
92
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
|
93
|
+
end
|
94
|
+
|
95
|
+
describe package('App::Ack') do
|
96
|
+
it { should be_installed.by('cpan').with_version('2.04') }
|
97
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
|
98
|
+
end
|
data/spec/gentoo/package_spec.rb
CHANGED
@@ -68,6 +68,11 @@ describe package('mongo') do
|
|
68
68
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
69
69
|
end
|
70
70
|
|
71
|
+
describe package('XML_Util') do
|
72
|
+
it { should be_installed.by('pear').with_version('1.2.1') }
|
73
|
+
its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
|
74
|
+
end
|
75
|
+
|
71
76
|
describe package('supervisor') do
|
72
77
|
it { should be_installed.by('pip').with_version('3.0') }
|
73
78
|
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
@@ -76,3 +81,13 @@ end
|
|
76
81
|
describe package('invalid-pip') do
|
77
82
|
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
78
83
|
end
|
84
|
+
|
85
|
+
describe package('App::Ack') do
|
86
|
+
it { should be_installed.by('cpan') }
|
87
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
|
88
|
+
end
|
89
|
+
|
90
|
+
describe package('App::Ack') do
|
91
|
+
it { should be_installed.by('cpan').with_version('2.04') }
|
92
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
|
93
|
+
end
|
data/spec/redhat/package_spec.rb
CHANGED
@@ -86,6 +86,11 @@ describe package('mongo') do
|
|
86
86
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
87
87
|
end
|
88
88
|
|
89
|
+
describe package('XML_Util') do
|
90
|
+
it { should be_installed.by('pear').with_version('1.2.1') }
|
91
|
+
its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
|
92
|
+
end
|
93
|
+
|
89
94
|
describe package('supervisor') do
|
90
95
|
it { should be_installed.by('pip').with_version('3.0') }
|
91
96
|
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
@@ -94,3 +99,13 @@ end
|
|
94
99
|
describe package('invalid-pip') do
|
95
100
|
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
96
101
|
end
|
102
|
+
|
103
|
+
describe package('App::Ack') do
|
104
|
+
it { should be_installed.by('cpan') }
|
105
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
|
106
|
+
end
|
107
|
+
|
108
|
+
describe package('App::Ack') do
|
109
|
+
it { should be_installed.by('cpan').with_version('2.04') }
|
110
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
|
111
|
+
end
|
@@ -75,6 +75,11 @@ describe package('mongo') do
|
|
75
75
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
76
76
|
end
|
77
77
|
|
78
|
+
describe package('XML_Util') do
|
79
|
+
it { should be_installed.by('pear').with_version('1.2.1') }
|
80
|
+
its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
|
81
|
+
end
|
82
|
+
|
78
83
|
describe package('supervisor') do
|
79
84
|
it { should be_installed.by('pip').with_version('3.0') }
|
80
85
|
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
@@ -83,3 +88,13 @@ end
|
|
83
88
|
describe package('invalid-pip') do
|
84
89
|
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
85
90
|
end
|
91
|
+
|
92
|
+
describe package('App::Ack') do
|
93
|
+
it { should be_installed.by('cpan') }
|
94
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
|
95
|
+
end
|
96
|
+
|
97
|
+
describe package('App::Ack') do
|
98
|
+
it { should be_installed.by('cpan').with_version('2.04') }
|
99
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
|
100
|
+
end
|
@@ -77,6 +77,11 @@ describe package('mongo') do
|
|
77
77
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
78
78
|
end
|
79
79
|
|
80
|
+
describe package('XML_Util') do
|
81
|
+
it { should be_installed.by('pear').with_version('1.2.1') }
|
82
|
+
its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
|
83
|
+
end
|
84
|
+
|
80
85
|
describe package('supervisor') do
|
81
86
|
it { should be_installed.by('pip').with_version('3.0') }
|
82
87
|
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
@@ -85,3 +90,13 @@ end
|
|
85
90
|
describe package('invalid-pip') do
|
86
91
|
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
87
92
|
end
|
93
|
+
|
94
|
+
describe package('App::Ack') do
|
95
|
+
it { should be_installed.by('cpan') }
|
96
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
|
97
|
+
end
|
98
|
+
|
99
|
+
describe package('App::Ack') do
|
100
|
+
it { should be_installed.by('cpan').with_version('2.04') }
|
101
|
+
its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
|
102
|
+
end
|
data/spec/spec_helper.rb
CHANGED
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.9.
|
4
|
+
version: 0.9.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-
|
11
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|