datacenter 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/datacenter/process.rb +5 -9
- data/lib/datacenter/version.rb +1 -1
- data/spec/commands.yml +2 -2
- metadata +55 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99a3accef6b707554c34a137f923ca48ad2f6c21
|
4
|
+
data.tar.gz: 4d1b56aa1f896624834cd467c21bc0f82078287a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4f8c38f8d0e19e2700649f881c8d9d44da264373b853c0996f911814e90afa36bcbbdb6bfa53e106c70689a2999c49011fecf398b43152deaec044fe0e7f9fe
|
7
|
+
data.tar.gz: 1519b77f585514c3d7cf70726ca808482e6ff311efb4880f446dbece554331709636fd274fb065887c3833e97a860913a9a3fc62526388141acca967862be0d4
|
data/lib/datacenter/process.rb
CHANGED
@@ -30,15 +30,7 @@ module Datacenter
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def alive?
|
33
|
-
|
34
|
-
true
|
35
|
-
rescue Errno::ESRCH
|
36
|
-
false
|
37
|
-
end
|
38
|
-
|
39
|
-
def send_signal(signal)
|
40
|
-
out = shell.run("kill -s #{signal} #{pid}")
|
41
|
-
raise Errno::ESRCH, pid.to_s if out.match 'No such process'
|
33
|
+
shell.run("ls /proc | grep #{pid}") == pid.to_s
|
42
34
|
end
|
43
35
|
|
44
36
|
def stop
|
@@ -54,6 +46,10 @@ module Datacenter
|
|
54
46
|
|
55
47
|
attr_reader :shell
|
56
48
|
|
49
|
+
def send_signal(signal)
|
50
|
+
shell.run "kill -s #{signal} #{pid}"
|
51
|
+
end
|
52
|
+
|
57
53
|
def info
|
58
54
|
@cache.fetch(:info) do
|
59
55
|
ps = shell.run('ps aux').scan(/.*#{pid}.*/)[0].split
|
data/lib/datacenter/version.rb
CHANGED
data/spec/commands.yml
CHANGED
metadata
CHANGED
@@ -1,113 +1,113 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datacenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Naiman
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
15
|
-
version_requirements: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
15
|
requirement: !ruby/object:Gem::Requirement
|
21
16
|
requirements:
|
22
|
-
- -
|
17
|
+
- - ">="
|
23
18
|
- !ruby/object:Gem::Version
|
24
19
|
version: '0'
|
25
|
-
prerelease: false
|
26
20
|
type: :runtime
|
27
|
-
|
28
|
-
name: bundler
|
21
|
+
prerelease: false
|
29
22
|
version_requirements: !ruby/object:Gem::Requirement
|
30
23
|
requirements:
|
31
|
-
- -
|
24
|
+
- - ">="
|
32
25
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
34
29
|
requirement: !ruby/object:Gem::Requirement
|
35
30
|
requirements:
|
36
|
-
- - ~>
|
31
|
+
- - "~>"
|
37
32
|
- !ruby/object:Gem::Version
|
38
33
|
version: '1.3'
|
39
|
-
prerelease: false
|
40
34
|
type: :development
|
41
|
-
|
42
|
-
name: rake
|
35
|
+
prerelease: false
|
43
36
|
version_requirements: !ruby/object:Gem::Requirement
|
44
37
|
requirements:
|
45
|
-
- -
|
38
|
+
- - "~>"
|
46
39
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
40
|
+
version: '1.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
44
|
requirements:
|
50
|
-
- -
|
45
|
+
- - ">="
|
51
46
|
- !ruby/object:Gem::Version
|
52
47
|
version: '0'
|
53
|
-
prerelease: false
|
54
48
|
type: :development
|
55
|
-
|
56
|
-
name: minitest
|
49
|
+
prerelease: false
|
57
50
|
version_requirements: !ruby/object:Gem::Requirement
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
62
57
|
requirement: !ruby/object:Gem::Requirement
|
63
58
|
requirements:
|
64
|
-
- - ~>
|
59
|
+
- - "~>"
|
65
60
|
- !ruby/object:Gem::Version
|
66
61
|
version: '4.7'
|
67
|
-
prerelease: false
|
68
62
|
type: :development
|
69
|
-
|
70
|
-
name: turn
|
63
|
+
prerelease: false
|
71
64
|
version_requirements: !ruby/object:Gem::Requirement
|
72
65
|
requirements:
|
73
|
-
- - ~>
|
66
|
+
- - "~>"
|
74
67
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
68
|
+
version: '4.7'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: turn
|
76
71
|
requirement: !ruby/object:Gem::Requirement
|
77
72
|
requirements:
|
78
|
-
- - ~>
|
73
|
+
- - "~>"
|
79
74
|
- !ruby/object:Gem::Version
|
80
75
|
version: '0.9'
|
81
|
-
prerelease: false
|
82
76
|
type: :development
|
83
|
-
|
84
|
-
name: simplecov
|
77
|
+
prerelease: false
|
85
78
|
version_requirements: !ruby/object:Gem::Requirement
|
86
79
|
requirements:
|
87
|
-
- -
|
80
|
+
- - "~>"
|
88
81
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
82
|
+
version: '0.9'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
90
85
|
requirement: !ruby/object:Gem::Requirement
|
91
86
|
requirements:
|
92
|
-
- -
|
87
|
+
- - ">="
|
93
88
|
- !ruby/object:Gem::Version
|
94
89
|
version: '0'
|
95
|
-
prerelease: false
|
96
90
|
type: :development
|
97
|
-
|
98
|
-
name: pry-nav
|
91
|
+
prerelease: false
|
99
92
|
version_requirements: !ruby/object:Gem::Requirement
|
100
93
|
requirements:
|
101
|
-
- -
|
94
|
+
- - ">="
|
102
95
|
- !ruby/object:Gem::Version
|
103
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry-nav
|
104
99
|
requirement: !ruby/object:Gem::Requirement
|
105
100
|
requirements:
|
106
|
-
- -
|
101
|
+
- - ">="
|
107
102
|
- !ruby/object:Gem::Version
|
108
103
|
version: '0'
|
109
|
-
prerelease: false
|
110
104
|
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
111
|
description: Manage and monitor servers and processes
|
112
112
|
email:
|
113
113
|
- gabynaiman@gmail.com
|
@@ -115,11 +115,11 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
-
- .coveralls.yml
|
119
|
-
- .gitignore
|
120
|
-
- .ruby-gemset
|
121
|
-
- .ruby-version
|
122
|
-
- .travis.yml
|
118
|
+
- ".coveralls.yml"
|
119
|
+
- ".gitignore"
|
120
|
+
- ".ruby-gemset"
|
121
|
+
- ".ruby-version"
|
122
|
+
- ".travis.yml"
|
123
123
|
- Gemfile
|
124
124
|
- LICENSE.txt
|
125
125
|
- README.md
|
@@ -144,24 +144,24 @@ homepage: https://github.com/gabynaiman/datacenter
|
|
144
144
|
licenses:
|
145
145
|
- MIT
|
146
146
|
metadata: {}
|
147
|
-
post_install_message:
|
147
|
+
post_install_message:
|
148
148
|
rdoc_options: []
|
149
149
|
require_paths:
|
150
150
|
- lib
|
151
151
|
required_ruby_version: !ruby/object:Gem::Requirement
|
152
152
|
requirements:
|
153
|
-
- -
|
153
|
+
- - ">="
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: '0'
|
156
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- -
|
158
|
+
- - ">="
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
|
-
rubyforge_project:
|
162
|
+
rubyforge_project:
|
163
163
|
rubygems_version: 2.2.2
|
164
|
-
signing_key:
|
164
|
+
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: Manage and monitor servers and processes
|
167
167
|
test_files:
|