hirefire-resource 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hirefire-resource.gemspec +1 -1
- data/lib/hirefire/middleware.rb +11 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a7d921ede6a7e56c74953e56112659b6ed54272
|
4
|
+
data.tar.gz: 6a2466a4b097cd936732538678f6bbfe3252a3a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fd423e23b3ad9e5fdfd35c2c2fcce39b99cb833ffc75b0963e435c477777746ac54567717635c49f5c48602bc39b87fd757e1a07b711c65d5c6a2b1ade496d9
|
7
|
+
data.tar.gz: eef43f3a9173ae8a910f3142ba6725a2b77a1a06192384140c56c24ad59c2c7c0a9bd6ca7116b0059d8f4a88cc546e12e82bce19fbc25f2d51a53c67adbcaed2
|
data/hirefire-resource.gemspec
CHANGED
data/lib/hirefire/middleware.rb
CHANGED
@@ -2,6 +2,15 @@
|
|
2
2
|
|
3
3
|
module HireFire
|
4
4
|
class Middleware
|
5
|
+
|
6
|
+
# Frozen headers to save some memory
|
7
|
+
TEST_HEADERS = {
|
8
|
+
'Content-Type' => 'text/html'
|
9
|
+
}.freeze
|
10
|
+
INFO_HEADERS = {
|
11
|
+
'Content-Type' => 'application/json',
|
12
|
+
'Cache-Control' => 'must-revalidate, private, max-age=0'
|
13
|
+
}.freeze
|
5
14
|
|
6
15
|
# Initialize the HireFire::Middleware and store the `app` in `@app`
|
7
16
|
# and `ENV["HIREFIRE_TOKEN"]` in `@token` for convenience.
|
@@ -22,9 +31,9 @@ module HireFire
|
|
22
31
|
@env = env
|
23
32
|
|
24
33
|
if test?
|
25
|
-
[ 200,
|
34
|
+
[ 200, TEST_HEADERS, self ]
|
26
35
|
elsif info?
|
27
|
-
[ 200,
|
36
|
+
[ 200, INFO_HEADERS, self ]
|
28
37
|
else
|
29
38
|
@app.call(env)
|
30
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hirefire-resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael van Rooijen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Load-based scaling, schedule-based scaling, dyno crash recovery, for
|
14
14
|
web- and worker dynos.
|