serverspec 0.7.11 → 0.7.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec/commands/base.rb +7 -0
- data/lib/serverspec/type/base.rb +2 -0
- data/lib/serverspec/version.rb +1 -1
- data/spec/darwin/package_spec.rb +9 -0
- data/spec/debian/package_spec.rb +9 -0
- data/spec/gentoo/package_spec.rb +9 -0
- data/spec/redhat/package_spec.rb +9 -0
- data/spec/solaris/package_spec.rb +9 -0
- data/spec/solaris11/package_spec.rb +9 -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: a88006bcf12f56331752519df9b93cb4604d428a
|
4
|
+
data.tar.gz: eb22220b6e5551eaf1b58e8a3b9201beebc2620c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ff71ed86d2b78ef5c14e3c29b22b41b162efdc95fe094e51c0a2dfa46c57ef94f7cfbf97983535e5c0f2e175e8b30eae8262eebd0ee17ca3d967bd3aaf04977
|
7
|
+
data.tar.gz: a78383740ac905a4481d3c57bcebc77e1ab59edbba71f15e2731f09632d89e0e504f4bbff27f8d16f24df180b42eedea8333d2d4147da6829a092c41ee18cab5
|
@@ -192,6 +192,13 @@ module Serverspec
|
|
192
192
|
cmd
|
193
193
|
end
|
194
194
|
|
195
|
+
def check_installed_by_pip(name, version=nil)
|
196
|
+
regexp = "^#{name}"
|
197
|
+
cmd = "pip list | grep -w -- #{escape(regexp)}"
|
198
|
+
cmd = "#{cmd} | grep -w -- #{escape(version)}" if version
|
199
|
+
cmd
|
200
|
+
end
|
201
|
+
|
195
202
|
def check_belonging_group(user, group)
|
196
203
|
"id #{escape(user)} | awk '{print $3}' | grep -- #{escape(group)}"
|
197
204
|
end
|
data/lib/serverspec/type/base.rb
CHANGED
data/lib/serverspec/version.rb
CHANGED
data/spec/darwin/package_spec.rb
CHANGED
@@ -56,3 +56,12 @@ end
|
|
56
56
|
describe package('mongo') do
|
57
57
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
58
58
|
end
|
59
|
+
|
60
|
+
describe package('supervisor') do
|
61
|
+
it { should be_installed.by('pip').with_version('3.0') }
|
62
|
+
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
63
|
+
end
|
64
|
+
|
65
|
+
describe package('invalid-pip') do
|
66
|
+
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
67
|
+
end
|
data/spec/debian/package_spec.rb
CHANGED
@@ -74,3 +74,12 @@ end
|
|
74
74
|
describe package('mongo') do
|
75
75
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
76
76
|
end
|
77
|
+
|
78
|
+
describe package('supervisor') do
|
79
|
+
it { should be_installed.by('pip').with_version('3.0') }
|
80
|
+
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
81
|
+
end
|
82
|
+
|
83
|
+
describe package('invalid-pip') do
|
84
|
+
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
85
|
+
end
|
data/spec/gentoo/package_spec.rb
CHANGED
@@ -65,3 +65,12 @@ end
|
|
65
65
|
describe package('mongo') do
|
66
66
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
67
67
|
end
|
68
|
+
|
69
|
+
describe package('supervisor') do
|
70
|
+
it { should be_installed.by('pip').with_version('3.0') }
|
71
|
+
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
72
|
+
end
|
73
|
+
|
74
|
+
describe package('invalid-pip') do
|
75
|
+
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
76
|
+
end
|
data/spec/redhat/package_spec.rb
CHANGED
@@ -83,3 +83,12 @@ end
|
|
83
83
|
describe package('mongo') do
|
84
84
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
85
85
|
end
|
86
|
+
|
87
|
+
describe package('supervisor') do
|
88
|
+
it { should be_installed.by('pip').with_version('3.0') }
|
89
|
+
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
90
|
+
end
|
91
|
+
|
92
|
+
describe package('invalid-pip') do
|
93
|
+
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
94
|
+
end
|
@@ -74,3 +74,12 @@ end
|
|
74
74
|
describe package('mongo') do
|
75
75
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
76
76
|
end
|
77
|
+
|
78
|
+
describe package('supervisor') do
|
79
|
+
it { should be_installed.by('pip').with_version('3.0') }
|
80
|
+
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
81
|
+
end
|
82
|
+
|
83
|
+
describe package('invalid-pip') do
|
84
|
+
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
85
|
+
end
|
@@ -74,3 +74,12 @@ end
|
|
74
74
|
describe package('mongo') do
|
75
75
|
it { should_not be_installed.by('pecl').with_version('invalid-version') }
|
76
76
|
end
|
77
|
+
|
78
|
+
describe package('supervisor') do
|
79
|
+
it { should be_installed.by('pip').with_version('3.0') }
|
80
|
+
its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
|
81
|
+
end
|
82
|
+
|
83
|
+
describe package('invalid-pip') do
|
84
|
+
it { should_not be_installed.by('pip').with_version('invalid-version') }
|
85
|
+
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.12
|
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-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|