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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 871488e23cf718f9e13eb8bddd89098fb9951b82
4
- data.tar.gz: ee697e01f7d2456d7f9d803878ddce0f8a8d35f1
3
+ metadata.gz: 3a7d921ede6a7e56c74953e56112659b6ed54272
4
+ data.tar.gz: 6a2466a4b097cd936732538678f6bbfe3252a3a8
5
5
  SHA512:
6
- metadata.gz: afd1042bac8694192d66e19cc2058236cd26bff7796979a83beea0c56fa269e2116ce2b94e2ecefd10dd2a08c5fa919a977caa14ef75aa915b57276728395c03
7
- data.tar.gz: ac30b7c4403cab11501e67f75f12b9bd168ee296a36f681a6ca7da22b9815ff8243b2d672c2e792478c21a194aa881cb4b5732cb46eadd1da50448b5e8b71519
6
+ metadata.gz: 1fd423e23b3ad9e5fdfd35c2c2fcce39b99cb833ffc75b0963e435c477777746ac54567717635c49f5c48602bc39b87fd757e1a07b711c65d5c6a2b1ade496d9
7
+ data.tar.gz: eef43f3a9173ae8a910f3142ba6725a2b77a1a06192384140c56c24ad59c2c7c0a9bd6ca7116b0059d8f4a88cc546e12e82bce19fbc25f2d51a53c67adbcaed2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "hirefire-resource"
5
- gem.version = "0.3.7"
5
+ gem.version = "0.3.8"
6
6
  gem.platform = Gem::Platform::RUBY
7
7
  gem.authors = "Michael van Rooijen"
8
8
  gem.email = "michael@hirefire.io"
@@ -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, {"Content-Type" => "text/html"}, self ]
34
+ [ 200, TEST_HEADERS, self ]
26
35
  elsif info?
27
- [ 200, {"Content-Type" => "application/json"}, self ]
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.7
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-04-30 00:00:00.000000000 Z
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.