eye 0.6.2.pre → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZjNkZTlhODlmNzc5YmZjNzhlZDVmYmVmZDQ0MGFjYjBhYzY0NDYzYg==
5
- data.tar.gz: !binary |-
6
- MmNmM2ExMTcwMDMxOGI3NjEwNjAxYWFkNGZkY2MxNDIxNTNkYTI3Mw==
2
+ SHA1:
3
+ metadata.gz: 8695cf6cc62b0a083c7470bc0b3f338ce5e678f2
4
+ data.tar.gz: f0ed23ed079228bcb897149b265e8a7f2faa5774
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YjJlYzQwZWY4OTY2MzUzODAzYzUzZDg5ZDU4MTJmMTk5NTE1YWEzYmMzMDBl
10
- OGUwYmU0MjI0NjFiMjU3N2NlYjQ1N2E5YjZkMmZmMjhkZDRlYjVhMDRjMDY4
11
- ZDE3ZGE1NjVhNzBkMzY3NGEzZmM1NzNiMzhjMzEwMTZmNjk1YjQ=
12
- data.tar.gz: !binary |-
13
- NWVhZmIwZTcxOWY3N2RhMmFhM2JlN2M2NjU3OGQ1NjdkYjQxMDRiZWViYTQy
14
- YWFjOWU3MjdlMjZlZTRhOTczY2U2NWQ0ZmNlYjRjMWM4ZjgzZDg1NzM0YzNm
15
- MTYxYjcyOTBjZTg5NGYzNjczYzU4YTAzNTZkMTM2MTBkYjhkMDY=
6
+ metadata.gz: 36c299addb4c2dcf551930f02770f91842b9b896e86bafbaf485833b9fc489ceb4bdaecb1d35438e830afc6ff81d353ada49d6677a10ca0d6cb0a29f7b5957ea
7
+ data.tar.gz: 193455755372b1e5bed00a954c16ec79af9b531bc2c0574f58b7f75ff90951ccaedb62771bc9eae167883a617e481f18feb3a6d91c990681117d982f49b3e770
data/CHANGES.md CHANGED
@@ -1,3 +1,10 @@
1
+ 0.6.2
2
+ -----
3
+ * Add user defined command #65
4
+ * eye status PROCESS_NAME, now return exit status for process name (0: up, 3: unmonitored) #68
5
+ * test pid from pid_file for eye-lwp (hackety), probably fix #62
6
+ * fix exclusive `eye load`
7
+
1
8
  0.6.1
2
9
  ------
3
10
  * Add log rotation gem (https://github.com/kostya/eye-rotate)
data/lib/eye.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Eye
2
- VERSION = "0.6.2.pre"
2
+ VERSION = "0.6.2"
3
3
  ABOUT = "Eye v#{VERSION} (c) 2012-2014 @kostya"
4
4
  PROCLINE = "eye monitoring v#{VERSION}"
5
5
 
@@ -22,10 +22,12 @@ class Eye::Cli < Thor
22
22
  say
23
23
  end
24
24
 
25
- desc "status", "processes info (deprecated)"
26
- def status
27
- say ":status is deprecated, use :info instead", :yellow
28
- info
25
+ desc "status NAME", "return exit status for process name 0-up, 3-unmonitored"
26
+ def status(name)
27
+ res = cmd(:info_data, *Array(name))
28
+ es, msg = render_status(res)
29
+ say(msg, :red) if msg && !msg.empty?
30
+ exit(es)
29
31
  end
30
32
 
31
33
  desc "xinfo", "eye-deamon info (-c show current config)"
@@ -1,5 +1,19 @@
1
1
  module Eye::Cli::Render
2
2
  private
3
+ def render_status(data)
4
+ return [1, "unexpected server response #{data.inspect}"] unless data.is_a?(Hash)
5
+ data = data[:subtree]
6
+ return [1, "match #{data.size} objects (#{data.map{|d| d[:name]}}), but expected only 1 process"] if data.size != 1
7
+ process = data[0]
8
+ return [1, "unknown status for :#{process[:type]}=#{process[:name]}"] unless process[:type] == :process
9
+
10
+ state = process[:state].to_sym
11
+ return [0, ''] if state == :up
12
+ return [3, ''] if state == :unmonitored
13
+
14
+ [4, "process #{process[:name]} state :#{state}"]
15
+ end
16
+
3
17
  def render_info(data)
4
18
  error!("unexpected server response #{data.inspect}") unless data.is_a?(Hash)
5
19
 
metadata CHANGED
@@ -1,251 +1,251 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eye
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2.pre
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Makarchev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-08 00:00:00.000000000 Z
11
+ date: 2014-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: celluloid
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.15.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.15.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: celluloid-io
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.15.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.15.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: state_machine
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: thor
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sigar
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.7.2
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.7.2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - <
101
+ - - "<"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '2.14'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - <
108
+ - - "<"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '2.14'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rr
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ! '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ! '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: ruby-graphviz
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ! '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ! '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: forking
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ! '>='
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ! '>='
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: fakeweb
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ! '>='
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ! '>='
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: eventmachine
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ! '>='
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: 1.0.3
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ! '>='
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: 1.0.3
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: sinatra
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ! '>='
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ! '>='
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: thin
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ! '>='
199
+ - - ">="
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ! '>='
206
+ - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: xmpp4r
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - ! '>='
213
+ - - ">="
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - ! '>='
220
+ - - ">="
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: coveralls
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - ! '>='
227
+ - - ">="
228
228
  - !ruby/object:Gem::Version
229
229
  version: '0'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - ! '>='
234
+ - - ">="
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: simplecov
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - ! '>='
241
+ - - ">="
242
242
  - !ruby/object:Gem::Version
243
243
  version: 0.8.1
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - ! '>='
248
+ - - ">="
249
249
  - !ruby/object:Gem::Version
250
250
  version: 0.8.1
251
251
  description: Process monitoring tool. Inspired from Bluepill and God. Requires Ruby(MRI)
@@ -258,9 +258,9 @@ executables:
258
258
  extensions: []
259
259
  extra_rdoc_files: []
260
260
  files:
261
- - .gitignore
262
- - .rspec
263
- - .travis.yml
261
+ - ".gitignore"
262
+ - ".rspec"
263
+ - ".travis.yml"
264
264
  - CHANGES.md
265
265
  - Gemfile
266
266
  - LICENSE
@@ -380,12 +380,12 @@ require_paths:
380
380
  - lib
381
381
  required_ruby_version: !ruby/object:Gem::Requirement
382
382
  requirements:
383
- - - ! '>='
383
+ - - ">="
384
384
  - !ruby/object:Gem::Version
385
385
  version: 1.9.2
386
386
  required_rubygems_version: !ruby/object:Gem::Requirement
387
387
  requirements:
388
- - - ! '>='
388
+ - - ">="
389
389
  - !ruby/object:Gem::Version
390
390
  version: 1.3.6
391
391
  requirements: []