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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7857f7f542d40c25cd7138efdd6d5aefa7fbd7a
4
- data.tar.gz: 13c98e2dfdca6e367b3f1b09b786fd081ab80b19
3
+ metadata.gz: 889ec3f197231cdaf1fb4641bd6f86186766ab1c
4
+ data.tar.gz: 94b1cd8b4b41bdf1734535e2e7009d41f66ceeb4
5
5
  SHA512:
6
- metadata.gz: f4be82be5167d8df79e2cfe96b8060dad85579ce9221c051ef74ad085046ad3767b2727911106660f93e6388ff086a3082371ee80c538fdd83d64d37b4a5050c
7
- data.tar.gz: 445ce20f467f67007be13da2bd2a7ead00604a535f874d32c46aba277c930e4b82317af8aa68e21f13131716d25863a919d11a6db1c3b094cad98580ab62409f
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
- "find /etc/apt/ -name \*.list | xargs grep -o \"deb http://ppa.launchpad.net/#{escape(package)}\""
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
- "find /etc/apt/ -name \*.list | xargs grep -o \"^deb http://ppa.launchpad.net/#{escape(package)}\""
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
@@ -1,3 +1,3 @@
1
1
  module SpecInfra
2
- VERSION = "1.13.1"
2
+ VERSION = "1.14.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.1
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita