wrenchmode-rack 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -1
  3. data/lib/wrenchmode/rack.rb +8 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ccb59a94d3d137c81e5b44e48da0a61e8630140
4
- data.tar.gz: 2f38fbee1aedb078d943c3c4be08fa4504cc7b24
3
+ metadata.gz: 2dd2749eec02c2d5c16e784efa8bb2ab9539908b
4
+ data.tar.gz: cb18692255965736a0f7c92d9b2c84d9d35664c5
5
5
  SHA512:
6
- metadata.gz: 43244f5734e25bc8647436e70d5feed98619f61255bb4f2b1bc3c0a2ebe7c05bf51ad5847c314572e998ba3c5774c44e213ee90b5fdd1b1e2f124829fa6454d9
7
- data.tar.gz: 1721f404e4aab526e9ffb7ac99c4b77bff69e451cbc60d881ab182ab611994048cc59b38b02cac0b0aa4a4a7c010cb017c827c31cbe161d59dc04b612b41de03
6
+ metadata.gz: 6aff89edcc2009d8e4f28164ae34ea50930c4fcfc4738b0a5ea3914d34ac3bbfe1aa3af73f28ed171ef89dbdc8d59801484abf505bf40905f206f6d6c98b2dbb
7
+ data.tar.gz: a6662ef459ad6bcf6c912b52334198670453d4b04176708fe55b0ddf86fc53d349bfa8c931d23365badbe878f456a619cf98ba3eabf99507c098f04bcfd52544
data/README.md CHANGED
@@ -4,6 +4,28 @@
4
4
 
5
5
  This is a [Rack Middleware](http://rack.github.io/) for managing maintenance mode on your Ruby/Rack/Rails web application using [Wrenchmode](http://wrenchmode.com).
6
6
 
7
+ ## Installation: Heroku Add-on (Coming soon...)
8
+
9
+ (Note: We are still waiting on final approval from Heroku for our add-on)
10
+
11
+ Add the [Wrenchmode Heroku add-on](https://elements.heroku.com/addons) to your application's list of add-ons.
12
+
13
+ And then add this line to your application's Gemfile:
14
+
15
+ ```ruby
16
+ gem 'wrenchmode-rack'
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ $ bundle
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install wrenchmode-rack
26
+
27
+ The gem will automatically pull everything it needs from your application's Heroku environment.
28
+
7
29
  ## Installation
8
30
 
9
31
  Add this line to your application's Gemfile:
@@ -20,7 +42,15 @@ Or install it yourself as:
20
42
 
21
43
  $ gem install wrenchmode-rack
22
44
 
23
- ## Usage
45
+ ## Usage: Heroku Add-on (Coming soon...)
46
+
47
+ (Note: We are still waiting on final approval from Heroku for our add-on)
48
+
49
+ Add the [Wrenchmode Heroku add-on](https://elements.heroku.com/addons) to your application's list of add-ons. Deploy your application after installing the gem (see Installation above).
50
+
51
+ On deployment, the wrenchmode-rack gem will automatically pick up everything it needs from your application's Heroku environment.
52
+
53
+ ## Usage: Manual Installation
24
54
 
25
55
  ### In a Rails application
26
56
 
@@ -6,7 +6,10 @@ require 'ipaddr'
6
6
  module Wrenchmode
7
7
  class Rack
8
8
  CLIENT_NAME = "wrenchmode-rack"
9
- VERSION = '0.0.12'
9
+ VERSION = '0.0.13'
10
+
11
+ # The ENV var set on Heroku where we can retrieve the JWT
12
+ HEROKU_JWT_VAR = "WRENCHMODE_PROJECT_JWT"
10
13
 
11
14
  SWITCH_URL_KEY = "switch_url"
12
15
  TEST_MODE_KEY = "test_mode"
@@ -31,7 +34,10 @@ module Wrenchmode
31
34
  read_timeout_secs: 3
32
35
  }.merge(opts)
33
36
 
34
- @jwt = opts[:jwt]
37
+ # The JWT can be set either explicity, or implicitly if Wrenchmode is added as a Heroku add-on
38
+ # The WRENCHMODE_PROJECT_JWT variable is set as part of the Heroku add-on provisioning process
39
+ @jwt = opts[:jwt] || ENV[HEROKU_JWT_VAR]
40
+
35
41
  @ignore_test_mode = opts[:ignore_test_mode]
36
42
  @disable_reverse_proxy = opts[:disable_local_wrench]
37
43
  @force_open = opts[:force_open]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wrenchmode-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Wedemeyer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-27 00:00:00.000000000 Z
11
+ date: 2016-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack