runit-man 2.4.1a1 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Changes
2
2
 
3
+ ### Version 2.4.1
4
+
5
+ * New *files to watch* feature that detects and shows watched files that modified since service startup.
6
+
3
7
  ### Version 2.4.0
4
8
 
5
9
  * LogLocationCache completely removed to keep codebase small and readable.
@@ -18,7 +18,7 @@ class ServiceInfo::Base
18
18
  data = {}
19
19
  [
20
20
  :name, :stat, :active?, :logged?, :switchable?,
21
- :log_file_location, :log_pid, :restart_dangerous?
21
+ :log_file_location, :log_pid, :watched_modified_files
22
22
  ].each do |sym|
23
23
  data[sym] = send(sym)
24
24
  end
@@ -109,10 +109,12 @@ class ServiceInfo::Base
109
109
  []
110
110
  end
111
111
 
112
- def restart_dangerous?
113
- ! ! files_to_watch.detect do |file|
114
- mtime = File.stat(file).mtime
115
- mtime > @status.started_at
112
+ def watched_modified_files
113
+ files_to_watch.map do |filepath|
114
+ mtime = File.stat(filepath).mtime.utc
115
+ { :path => filepath, :mtime => mtime }
116
+ end.select do |rec|
117
+ rec[:mtime] > @status.started_at
116
118
  end
117
119
  end
118
120
 
@@ -1,6 +1,6 @@
1
1
  # runit-man namespace.
2
2
  module RunitMan
3
3
  # runit-man version.
4
- VERSION = '2.4.1a1'.freeze
4
+ VERSION = '2.4.1'.freeze
5
5
  end
6
6
 
@@ -2,7 +2,10 @@
2
2
  %tr{:class=> even_or_odd ? 'even' : 'odd'}
3
3
  %td{:rowspan=> need_second_row ? 2 : 1}= h(service_info.pid)
4
4
  %th{:scope=>"row"}
5
- %span{:class=>service_info.restart_dangerous? ? "danger" : "ok"}
5
+ - unless service_info.watched_modified_files.empty?
6
+ %span.danger{:title => service_info.watched_modified_files.map { |rec| "#{rec[:path]} #{I18n.l(rec[:mtime])}" }.join(', ')}
7
+ = h(service_info.name)
8
+ - else
6
9
  = h(service_info.name)
7
10
  %td= service_info.started_at ? service_info.started_at.utc : ''
8
11
  %td= service_info.uptime ? ('%.2f' % service_info.uptime) : ''
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runit-man
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1a1
5
- prerelease: 5
4
+ version: 2.4.1
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Akzhan Abdulin
@@ -13,7 +13,7 @@ date: 2012-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yajl-ruby
16
- requirement: &2160877420 !ruby/object:Gem::Requirement
16
+ requirement: &2158008320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2160877420
24
+ version_requirements: *2158008320
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: haml
27
- requirement: &2160876900 !ruby/object:Gem::Requirement
27
+ requirement: &2158007780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2160876900
35
+ version_requirements: *2158007780
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sinatra
38
- requirement: &2160876320 !ruby/object:Gem::Requirement
38
+ requirement: &2158007260 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.3'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2160876320
46
+ version_requirements: *2158007260
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sinatra-content-for2
49
- requirement: &2160875660 !ruby/object:Gem::Requirement
49
+ requirement: &2158006760 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.2.4
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2160875660
57
+ version_requirements: *2158006760
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: i18n
60
- requirement: &2160875100 !ruby/object:Gem::Requirement
60
+ requirement: &2158006220 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0.5'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *2160875100
68
+ version_requirements: *2158006220
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: file-tail
71
- requirement: &2160874360 !ruby/object:Gem::Requirement
71
+ requirement: &2158005740 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 1.0.7
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *2160874360
79
+ version_requirements: *2158005740
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rake
82
- requirement: &2160872720 !ruby/object:Gem::Requirement
82
+ requirement: &2158005120 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: 0.9.0
91
91
  type: :development
92
92
  prerelease: false
93
- version_requirements: *2160872720
93
+ version_requirements: *2158005120
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: rspec-core
96
- requirement: &2160872000 !ruby/object:Gem::Requirement
96
+ requirement: &2158004160 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ! '>='
@@ -101,10 +101,10 @@ dependencies:
101
101
  version: '0'
102
102
  type: :development
103
103
  prerelease: false
104
- version_requirements: *2160872000
104
+ version_requirements: *2158004160
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: rspec-expectations
107
- requirement: &2160871240 !ruby/object:Gem::Requirement
107
+ requirement: &2158001760 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ! '>='
@@ -112,10 +112,10 @@ dependencies:
112
112
  version: '0'
113
113
  type: :development
114
114
  prerelease: false
115
- version_requirements: *2160871240
115
+ version_requirements: *2158001760
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: rr
118
- requirement: &2160870740 !ruby/object:Gem::Requirement
118
+ requirement: &2158001300 !ruby/object:Gem::Requirement
119
119
  none: false
120
120
  requirements:
121
121
  - - ! '>='
@@ -123,10 +123,10 @@ dependencies:
123
123
  version: '0'
124
124
  type: :development
125
125
  prerelease: false
126
- version_requirements: *2160870740
126
+ version_requirements: *2158001300
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: rack-test
129
- requirement: &2160870100 !ruby/object:Gem::Requirement
129
+ requirement: &2158000720 !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
132
  - - ! '>='
@@ -134,10 +134,10 @@ dependencies:
134
134
  version: '0'
135
135
  type: :development
136
136
  prerelease: false
137
- version_requirements: *2160870100
137
+ version_requirements: *2158000720
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: bundler
140
- requirement: &2160869460 !ruby/object:Gem::Requirement
140
+ requirement: &2157999200 !ruby/object:Gem::Requirement
141
141
  none: false
142
142
  requirements:
143
143
  - - ~>
@@ -148,10 +148,10 @@ dependencies:
148
148
  version: 1.0.10
149
149
  type: :development
150
150
  prerelease: false
151
- version_requirements: *2160869460
151
+ version_requirements: *2157999200
152
152
  - !ruby/object:Gem::Dependency
153
153
  name: yard
154
- requirement: &2160868120 !ruby/object:Gem::Requirement
154
+ requirement: &2157997640 !ruby/object:Gem::Requirement
155
155
  none: false
156
156
  requirements:
157
157
  - - ~>
@@ -159,10 +159,10 @@ dependencies:
159
159
  version: 0.7.5
160
160
  type: :development
161
161
  prerelease: false
162
- version_requirements: *2160868120
162
+ version_requirements: *2157997640
163
163
  - !ruby/object:Gem::Dependency
164
164
  name: redcarpet
165
- requirement: &2160866780 !ruby/object:Gem::Requirement
165
+ requirement: &2157996500 !ruby/object:Gem::Requirement
166
166
  none: false
167
167
  requirements:
168
168
  - - ~>
@@ -170,7 +170,7 @@ dependencies:
170
170
  version: 1.17.2
171
171
  type: :development
172
172
  prerelease: false
173
- version_requirements: *2160866780
173
+ version_requirements: *2157996500
174
174
  description: ! 'Simple runit (http://smarden.org/runit/) web management tool with
175
175
  i18n.
176
176
 
@@ -265,13 +265,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
265
265
  version: '0'
266
266
  segments:
267
267
  - 0
268
- hash: 706955117803235190
268
+ hash: -3669782654535481615
269
269
  required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  none: false
271
271
  requirements:
272
- - - ! '>'
272
+ - - ! '>='
273
273
  - !ruby/object:Gem::Version
274
- version: 1.3.1
274
+ version: '0'
275
+ segments:
276
+ - 0
277
+ hash: -3669782654535481615
275
278
  requirements:
276
279
  - none
277
280
  rubyforge_project: