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.
- checksums.yaml +4 -4
- data/README.md +31 -1
- data/lib/wrenchmode/rack.rb +8 -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: 2dd2749eec02c2d5c16e784efa8bb2ab9539908b
|
4
|
+
data.tar.gz: cb18692255965736a0f7c92d9b2c84d9d35664c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/wrenchmode/rack.rb
CHANGED
@@ -6,7 +6,10 @@ require 'ipaddr'
|
|
6
6
|
module Wrenchmode
|
7
7
|
class Rack
|
8
8
|
CLIENT_NAME = "wrenchmode-rack"
|
9
|
-
VERSION = '0.0.
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2016-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|