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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 910bd1387e77159f6c75c7f4ab3f96b4b02434d2
|
4
|
+
data.tar.gz: 4507ac82b294370809a5bf4e0c0873e9b2145458
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 525fd01d92ffe72fc5eb009d00936bd0e269aa77822698705d15b330b050d855b4539b1d8845037fec0eba1b59a56ee27afabe825ec57a675dec0de64574d55b
|
7
|
+
data.tar.gz: 4ee0713c3d72adae1e494cc49a30d28a1c3ea658a9196383cb19d8b30f659c052fe5cafa94f5ef7395d3b9fd25697cab443cf0ee45c23ba6e4307935b8b19e73
|
data/lib/specinfra/command.rb
CHANGED
@@ -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
|
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
|
-
#
|
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})_?(.+)?$/)
|
data/lib/specinfra/version.rb
CHANGED
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.
|
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-
|
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
|