runit-man 1.9.6 → 1.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/runit-man/app.rb +2 -2
- data/lib/runit-man/service_info.rb +6 -2
- metadata +4 -4
data/lib/runit-man/app.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'fileutils'
|
2
|
-
require 'yajl
|
2
|
+
require 'yajl'
|
3
3
|
require 'erubis'
|
4
4
|
require 'sinatra/base'
|
5
5
|
require 'sinatra/r18n'
|
@@ -50,7 +50,7 @@ class RunitMan < Sinatra::Base
|
|
50
50
|
end
|
51
51
|
|
52
52
|
get '/services.json' do
|
53
|
-
service_infos
|
53
|
+
Yajl::Encoder.encode(service_infos)
|
54
54
|
end
|
55
55
|
|
56
56
|
def log_of_service(name, count)
|
@@ -12,7 +12,7 @@ class ServiceInfo
|
|
12
12
|
@log_status = ServiceStatus.new(data_from_file(File.join(log_supervise_folder, 'status')))
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
15
|
+
def to_hash
|
16
16
|
data = {}
|
17
17
|
[
|
18
18
|
:name, :stat, :active?, :logged?, :switchable?,
|
@@ -28,7 +28,11 @@ class ServiceInfo
|
|
28
28
|
].each do |sym|
|
29
29
|
data[sym] = @status.send(sym)
|
30
30
|
end
|
31
|
-
data
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
def to_json(*args)
|
35
|
+
Yajl::Encoder.encode(to_hash, *args)
|
32
36
|
end
|
33
37
|
|
34
38
|
def logged?
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runit-man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 1.9.
|
9
|
+
- 7
|
10
|
+
version: 1.9.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Akzhan Abdulin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-25 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|