philae 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rack/philae_rack.rb +16 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 707a119eee0ecc09e66ced7697e524cc62b16152
|
4
|
+
data.tar.gz: 6e2d7473196edc923604cd09674b4400181b77ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2b666b3f40f4c92d910b107b258ee0b11dfa934acf89ce44fbb900d33de4a6f1df7e0c26306febb44191d516f30e927379ee340d522046aef4d00a16a7d41e9
|
7
|
+
data.tar.gz: 46333b2d80f2600501155ef1b2412a4aa7bcdd4579f72fbab3a3bb6be929c2a823ac8817fea9817599fde4abf5b61d010cc9166c925d643a636b38ba20af3714
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Rack
|
2
|
+
class PhilaeRack
|
3
|
+
def initialize(app, prober)
|
4
|
+
@app = app
|
5
|
+
@prober = prober
|
6
|
+
end
|
7
|
+
|
8
|
+
def call(env)
|
9
|
+
if env['PATH_INFO'] == '/_health'
|
10
|
+
[200, { 'Content-type' => 'application/json' }, [@prober.check.to_json]]
|
11
|
+
else
|
12
|
+
@app.call(env)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: philae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- leo@scalingo.com
|
@@ -66,6 +66,7 @@ files:
|
|
66
66
|
- lib/philae/nsq_probe.rb
|
67
67
|
- lib/philae/philae_probe.rb
|
68
68
|
- lib/philae/prober.rb
|
69
|
+
- lib/rack/philae_rack.rb
|
69
70
|
homepage: https://scalingo.com
|
70
71
|
licenses:
|
71
72
|
- BSD-3-Clause
|