specinfra 1.13.1 → 1.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/command/base.rb +4 -0
- data/lib/specinfra/command/ubuntu.rb +8 -2
- data/lib/specinfra/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 889ec3f197231cdaf1fb4641bd6f86186766ab1c
|
4
|
+
data.tar.gz: 94b1cd8b4b41bdf1734535e2e7009d41f66ceeb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b9cb54c3c577cda964b261b6259c0ea8f49419b21f245a3064fba32ac0f32a05b62d3f4da9788edcaa091a0ba49a66672f5e4e67f8992a99dde2bc8e7355b9c
|
7
|
+
data.tar.gz: f93a0ffa3cbd463d7a1869c11144317ec4ae1d2029b5cebd0f6ed50d1f4687d29f2b387b58781c1633c39e16955f16d85a3d0052b43fe25b65f583ca0aa7f733
|
@@ -121,6 +121,10 @@ module SpecInfra
|
|
121
121
|
"ps aux | grep -w -- #{escape(process)} | grep -qv grep"
|
122
122
|
end
|
123
123
|
|
124
|
+
def check_process_count(process, count)
|
125
|
+
"test $(ps aux | grep -w -- #{escape(process)} | grep -v grep | wc -l) -eq #{escape(count)}"
|
126
|
+
end
|
127
|
+
|
124
128
|
def get_process(process, opts)
|
125
129
|
"ps -C #{escape(process)} -o #{opts[:format]} | head -1"
|
126
130
|
end
|
@@ -6,11 +6,17 @@ module SpecInfra
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def check_ppa(package)
|
9
|
-
|
9
|
+
%Q{find /etc/apt/ -name \*.list | xargs grep -o "deb http://ppa.launchpad.net/#{to_apt_line_uri(package)}"}
|
10
10
|
end
|
11
11
|
|
12
12
|
def check_ppa_enabled(package)
|
13
|
-
|
13
|
+
%Q{find /etc/apt/ -name \*.list | xargs grep -o "^deb http://ppa.launchpad.net/#{to_apt_line_uri(package)}"}
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def to_apt_line_uri(repo)
|
19
|
+
escape(repo.gsub(/^ppa:/,''))
|
14
20
|
end
|
15
21
|
end
|
16
22
|
end
|
data/lib/specinfra/version.rb
CHANGED