specinfra 2.71.1 → 2.71.2

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: ebe788a051676564bc601eaaccc3bf269f3e1d8d
4
- data.tar.gz: b270094d769ee9eeab865dbdd6e4206137e721c4
3
+ metadata.gz: 910bd1387e77159f6c75c7f4ab3f96b4b02434d2
4
+ data.tar.gz: 4507ac82b294370809a5bf4e0c0873e9b2145458
5
5
  SHA512:
6
- metadata.gz: 8b96ae856255f81a3c8adefa8daa7dbee07e86d19e725f3833693914ecffbf299d82b7abdcf62c224a28f53a6cea3d5e94e7d2d9427e2c502f5952c9c71d0108
7
- data.tar.gz: 9ff71b000596a7050818bd9c76c31be3d7e195c993a40440b65c9e38f6c241613cfbe10e2335176df5d195bb3e38517eb23aa258793113da1a91f1a53e98c7b5
6
+ metadata.gz: 525fd01d92ffe72fc5eb009d00936bd0e269aa77822698705d15b330b050d855b4539b1d8845037fec0eba1b59a56ee27afabe825ec57a675dec0de64574d55b
7
+ data.tar.gz: 4ee0713c3d72adae1e494cc49a30d28a1c3ea658a9196383cb19d8b30f659c052fe5cafa94f5ef7395d3b9fd25697cab443cf0ee45c23ba6e4307935b8b19e73
@@ -245,6 +245,7 @@ require 'specinfra/command/freebsd/base/inventory'
245
245
  require 'specinfra/command/freebsd/base/kernel_module'
246
246
  require 'specinfra/command/freebsd/base/package'
247
247
  require 'specinfra/command/freebsd/base/port'
248
+ require 'specinfra/command/freebsd/base/process'
248
249
  require 'specinfra/command/freebsd/base/service'
249
250
  require 'specinfra/command/freebsd/base/routing_table'
250
251
  require 'specinfra/command/freebsd/base/user'
@@ -0,0 +1,19 @@
1
+ class Specinfra::Command::Freebsd::Base::Process < Specinfra::Command::Base::Process
2
+ class << self
3
+ def get(process, opts)
4
+ "ps -p `pgrep -xn #{escape(process)}` -o #{opts[:format]}"
5
+ end
6
+
7
+ def count(process)
8
+ "pgrep #{escape(process)} | wc -l"
9
+ end
10
+
11
+ def check_is_running(process)
12
+ "pgrep -q #{escape(process)}"
13
+ end
14
+
15
+ def check_count(process,count)
16
+ "test `pgrep #{escape(process)} | wc -l` -eq #{escape(count)}"
17
+ end
18
+ end
19
+ end
@@ -4,7 +4,7 @@ class Specinfra::Command::Freebsd::Base::Service < Specinfra::Command::Base::Ser
4
4
  "service -e | grep -- #{escape(service)}"
5
5
  end
6
6
  def check_is_running_under_init(service)
7
- "service #{escape(service)} status | grep -E 'as \\(pid [0-9]+\\)'"
7
+ "service #{escape(service)} status | grep -E 'as (pid [0-9]+)'"
8
8
  end
9
9
  end
10
10
  end
@@ -59,7 +59,7 @@ class Specinfra::CommandFactory
59
59
  end
60
60
 
61
61
  def breakdown(meth)
62
- # Somtimes `selinux_module' type matches `selinux' and error occurs.
62
+ # Sometimes `selinux_module' type matches `selinux' and error occurs.
63
63
  # Reverse sorting is needed to avoid this problem.
64
64
  types = resource_types.map {|t| t.to_snake_case }.sort.reverse.join('|')
65
65
  md = meth.to_s.match(/^([^_]+)_(#{types})_?(.+)?$/)
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.71.1"
2
+ VERSION = "2.71.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.71.1
4
+ version: 2.71.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-31 00:00:00.000000000 Z
11
+ date: 2017-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-scp
@@ -304,6 +304,7 @@ files:
304
304
  - lib/specinfra/command/freebsd/base/kernel_module.rb
305
305
  - lib/specinfra/command/freebsd/base/package.rb
306
306
  - lib/specinfra/command/freebsd/base/port.rb
307
+ - lib/specinfra/command/freebsd/base/process.rb
307
308
  - lib/specinfra/command/freebsd/base/routing_table.rb
308
309
  - lib/specinfra/command/freebsd/base/service.rb
309
310
  - lib/specinfra/command/freebsd/base/user.rb