stoplight-admin 0.2.1 → 0.2.2

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: 944587e0c8997010343182749c29cc46b2319f02
4
- data.tar.gz: 7ccc70e70f24087052b8e0e85420b6bfeb3cb508
3
+ metadata.gz: e9f140e657d88757817855ced488e386bb61ae60
4
+ data.tar.gz: df54e15cd69ca5a87f5b66f8d117cc4e5a9a4421
5
5
  SHA512:
6
- metadata.gz: c69a0da21be4865804e20aa81cf17196ff3929fe2d97c07d92683bbf1229ee889646af1786a663dc01ded615f35754ef2d1389b8fb91282df4d6ef23b54db7bf
7
- data.tar.gz: ffa74510eec93b8004a3baccc808368f1df7187cb59304d982d8b335bdc8b3c1542360072f5a490694eb89ac287d08358e4ff611a2f43bacced99eab3eec230e
6
+ metadata.gz: 14ec1ff53c5503fdc8ad5ce64df7ffa668d2791f3f588b411b63d790575560595898cafcc9bac72315225a3156a171eedea47a2b70bb972a611caddc21014dfe
7
+ data.tar.gz: 5a58765b512e87cb57fd6996a74d96929970f8aade3990dc2568c28694b8cee78a8dc79e37842f09762ce48d953a9838dc04a9f24db2f89d915228a30b0aba9b
data/README.md CHANGED
@@ -18,7 +18,7 @@ First you'll need a `Gemfile`:
18
18
  ``` rb
19
19
  source 'https://rubygems.org'
20
20
 
21
- gem 'stoplight-admin', '~> 0.2.1'
21
+ gem 'stoplight-admin', '~> 0.2.2'
22
22
  ```
23
23
 
24
24
  Run [Bundler][3] to install the dependencies:
@@ -41,6 +41,18 @@ redis = Redis.new(url: 'redis://localhost:6379')
41
41
  set :data_store, Stoplight::DataStore::Redis.new(redis)
42
42
  ```
43
43
 
44
+ ## Reverse Proxying
45
+
46
+ If you run Stoplight Admin behind a reverse proxy (nginx, for
47
+ instance) at a URL other than root, you'll need to add the following
48
+ lines to your `app.rb` file:
49
+
50
+ ``` rb
51
+ use Rack::Config do |env|
52
+ env['SCRIPT_NAME'] = 'your/prefix/here'
53
+ end
54
+ ```
55
+
44
56
  ## Usage
45
57
 
46
58
  ``` sh
@@ -5,9 +5,9 @@
5
5
  .main
6
6
  - if lights.any?
7
7
  .btn-group
8
- %form{method: 'post', action: '/green_all'}
8
+ %form{method: 'post', action: url('/green_all')}
9
9
  %button.btn-lg.btn.btn-success{type: 'submit', disabled: failure_count > 0 ? nil : 'disabled'} Greenify All
10
- %form{method: 'post', action: '/purge'}
10
+ %form{method: 'post', action: url('/purge')}
11
11
  %button.btn-lg.btn.btn-default{type: 'submit'} Purge Lights
12
12
 
13
13
  .progress
@@ -33,25 +33,25 @@
33
33
  %tr
34
34
  %td.indicator
35
35
  - if l[:green]
36
- %form{method: 'post', action: '/red'}
36
+ %form{method: 'post', action: url('/red')}
37
37
  %input{type: 'hidden', name: 'names', value: URI.escape(l[:name])}
38
38
  %button{type: 'submit', class: 'btn btn-success'}
39
39
  G
40
40
  %span.hidden-xs> REEN
41
41
  - else
42
- %form{method: 'post', action: '/green'}
42
+ %form{method: 'post', action: url('/green')}
43
43
  %input{type: 'hidden', name: 'names', value: URI.escape(l[:name])}
44
44
  %button{type: 'submit', class: 'btn btn-danger'}
45
45
  R
46
46
  %span.hidden-xs> ED
47
47
  %td.locked
48
48
  - if l[:locked]
49
- %form{method: 'post', action: '/unlock'}
49
+ %form{method: 'post', action: url('/unlock')}
50
50
  %input{type: 'hidden', name: 'names', value: URI.escape(l[:name])}
51
51
  %button{type: 'submit', class: 'btn btn-link'}
52
52
  %span{class: 'glyphicon glyphicon-lock'}
53
53
  - else
54
- %form{method: 'post', action: '/lock'}
54
+ %form{method: 'post', action: url('/lock')}
55
55
  %input{type: 'hidden', name: 'names', value: URI.escape(l[:name])}
56
56
  %button{type: 'submit', class: 'btn btn-link'}
57
57
  %span{class: 'glyphicon glyphicon-minus'}
@@ -48,7 +48,7 @@
48
48
  .navbar.navbar-inverse.navbar-fixed-top{role: 'navigation'}
49
49
  .container
50
50
  .navbar-header
51
- %a{class: 'navbar-brand', href: '/'} Stoplight Admin
51
+ %a{class: 'navbar-brand', href: url('/')} Stoplight Admin
52
52
 
53
53
  .container{role: 'main'}
54
54
  = yield
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'stoplight-admin'
5
- spec.version = '0.2.1'
5
+ spec.version = '0.2.2'
6
6
  spec.authors = ['Cameron Desautels', 'Taylor Fausak']
7
7
  spec.email = %w(camdez@gmail.com taylor@fausak.me)
8
8
  spec.summary = %q{A simple administration interface for the stoplight gem.}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stoplight-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Desautels
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-18 00:00:00.000000000 Z
12
+ date: 2014-08-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler