runit-man 1.10.0 → 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/runit-man/app.rb CHANGED
@@ -4,21 +4,25 @@ require 'erubis'
4
4
  require 'sinatra/base'
5
5
  require 'sinatra/r18n'
6
6
  require 'runit-man/helpers'
7
+ require 'runit-man/version'
7
8
 
8
- MIN_TAIL = 100
9
- MAX_TAIL = 10000
10
- GEM_FOLDER = File.expand_path(File.join('..', '..'), File.dirname(__FILE__)).freeze
11
- CONTENT_TYPES = {
12
- :html => 'text/html',
13
- :txt => 'text/plain',
14
- :css => 'text/css',
15
- :js => 'application/x-javascript',
16
- :json => 'application/json'
17
- }.freeze
18
9
 
19
- R18n::Filters.on :variables
20
10
 
21
11
  class RunitMan < Sinatra::Base
12
+ VERSION = RunitManVersion::VERSION
13
+ MIN_TAIL = 100
14
+ MAX_TAIL = 10000
15
+ GEM_FOLDER = File.expand_path(File.join('..', '..'), File.dirname(__FILE__)).freeze
16
+ CONTENT_TYPES = {
17
+ :html => 'text/html',
18
+ :txt => 'text/plain',
19
+ :css => 'text/css',
20
+ :js => 'application/x-javascript',
21
+ :json => 'application/json'
22
+ }.freeze
23
+
24
+ R18n::Filters.on :variables
25
+
22
26
  set :environment, :production
23
27
  set :static, true
24
28
  set :logging, true
@@ -38,6 +42,10 @@ class RunitMan < Sinatra::Base
38
42
  request.env['REQUEST_URI'] =~ /\.#{Regexp.escape(t.to_s)}$/
39
43
  end || :html
40
44
  content_type CONTENT_TYPES[base_content_type], :charset => 'utf-8'
45
+ headers({
46
+ 'X-Powered-By' => 'runit-man',
47
+ 'X-Version' => RunitMan::VERSION
48
+ })
41
49
  end
42
50
 
43
51
  get '/' do
@@ -5,6 +5,8 @@ RunitMan.set :active_services_directory, '/etc/service'
5
5
  RunitMan.set :all_services_directory, '/etc/sv'
6
6
 
7
7
  OptionParser.new { |op|
8
+ op.banner = 'Usage: runit-man <options>'
9
+ op.separator "Version: #{RunitMan::VERSION}"
8
10
  op.separator 'Server options:'
9
11
  op.on('-s server') { |val| RunitMan.set :server, val }
10
12
  op.on('-p port') { |val| RunitMan.set :port, val.to_i }
@@ -0,0 +1,4 @@
1
+ module RunitManVersion
2
+ VERSION = '1.10.1'.freeze
3
+ end
4
+
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runit-man
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 61
4
5
  prerelease: false
5
6
  segments:
6
7
  - 1
7
8
  - 10
8
- - 0
9
- version: 1.10.0
9
+ - 1
10
+ version: 1.10.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Akzhan Abdulin
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 3
28
30
  segments:
29
31
  - 0
30
32
  version: "0"
@@ -38,6 +40,7 @@ dependencies:
38
40
  requirements:
39
41
  - - ">="
40
42
  - !ruby/object:Gem::Version
43
+ hash: 3
41
44
  segments:
42
45
  - 0
43
46
  version: "0"
@@ -51,6 +54,7 @@ dependencies:
51
54
  requirements:
52
55
  - - ">="
53
56
  - !ruby/object:Gem::Version
57
+ hash: 13
54
58
  segments:
55
59
  - 1
56
60
  - 1
@@ -65,6 +69,7 @@ dependencies:
65
69
  requirements:
66
70
  - - ">="
67
71
  - !ruby/object:Gem::Version
72
+ hash: 31
68
73
  segments:
69
74
  - 0
70
75
  - 2
@@ -80,6 +85,7 @@ dependencies:
80
85
  requirements:
81
86
  - - ">="
82
87
  - !ruby/object:Gem::Version
88
+ hash: 11
83
89
  segments:
84
90
  - 0
85
91
  - 4
@@ -95,6 +101,7 @@ dependencies:
95
101
  requirements:
96
102
  - - ">="
97
103
  - !ruby/object:Gem::Version
104
+ hash: 3
98
105
  segments:
99
106
  - 0
100
107
  version: "0"
@@ -108,6 +115,7 @@ dependencies:
108
115
  requirements:
109
116
  - - ">="
110
117
  - !ruby/object:Gem::Version
118
+ hash: 3
111
119
  segments:
112
120
  - 0
113
121
  version: "0"
@@ -121,6 +129,7 @@ dependencies:
121
129
  requirements:
122
130
  - - ">="
123
131
  - !ruby/object:Gem::Version
132
+ hash: 3
124
133
  segments:
125
134
  - 0
126
135
  version: "0"
@@ -134,6 +143,7 @@ dependencies:
134
143
  requirements:
135
144
  - - ">="
136
145
  - !ruby/object:Gem::Version
146
+ hash: 3
137
147
  segments:
138
148
  - 0
139
149
  version: "0"
@@ -162,6 +172,7 @@ files:
162
172
  - lib/runit-man/runner.rb
163
173
  - lib/runit-man/service_info.rb
164
174
  - lib/runit-man/service_status.rb
175
+ - lib/runit-man/version.rb
165
176
  - public/css/runit-man.css
166
177
  - public/css/tripoli.simple.css
167
178
  - public/css/tripoli.simple.ie.css
@@ -196,6 +207,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
207
  requirements:
197
208
  - - ">="
198
209
  - !ruby/object:Gem::Version
210
+ hash: 3
199
211
  segments:
200
212
  - 0
201
213
  version: "0"
@@ -204,6 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
216
  requirements:
205
217
  - - ">="
206
218
  - !ruby/object:Gem::Version
219
+ hash: 3
207
220
  segments:
208
221
  - 0
209
222
  version: "0"