flipper-ui 0.11.0.beta7 → 0.11.0.beta8

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: b75b59963577bcf50630c65a711268537768a554
4
- data.tar.gz: 2f3942bb87a08d5a4cf6dc6453f58e6781f8d9ae
3
+ metadata.gz: '0591a016ba0727084a82aee75f31b3a2f661dc0b'
4
+ data.tar.gz: 29b733e6f872bf8c7a81ebeb51d4f598fb164a69
5
5
  SHA512:
6
- metadata.gz: b5c6255bfcd73704bf70467cacc4830146f6f66f7dddf3f071fd1f2722632f757db446aa1ed8930762d797350e5ddec098f68072d85b9b22eed3e7064d7f29bd
7
- data.tar.gz: cba22ffff1e3a42be5daa423860eb35a357aec00a5b6ac8a2fe429711e61c2520c0a30c6609ebe3921e151c917b4507110cb76a0d4c79aaf6fff5a2af838c0d8
6
+ metadata.gz: bc04a272f7f16641f6bc40baa50cf85b302ee5b3a91df34ca4b0dc0150de0ab6a019883e111419cd15d3cdaa76e473090dd619ebcb23a76a93f3f7353f1bcb0e
7
+ data.tar.gz: 35e34edc3239d7f44fd7ab97b77da8d0914a633a6e0e13d0d91b90e73a87d00cb2b24f0db7f3005bd561590a3ea716cbd3b15931a28569286b99a4b477a9188c
data/docs/ui/README.md CHANGED
@@ -52,7 +52,24 @@ end
52
52
 
53
53
  #### Security
54
54
 
55
- You almost certainly want to limit access when using Flipper::UI in production. Using [routes constraints](http://guides.rubyonrails.org/routing.html#request-based-constraints) is one way to achieve this:
55
+ You almost certainly want to limit access when using Flipper::UI in production.
56
+
57
+ ##### Basic Authentication via Rack
58
+ The `Flipper::UI.app` method yields a builder instance prior to any predefined middleware. You can insert the `Rack::Auth::Basic` middleware, that'll prompt for a username and password when visiting the defined (i.e., `/flipper`) route.
59
+
60
+ ```ruby
61
+ # config/routes.rb
62
+
63
+ flipper_app = Flipper::UI.app(Flipper.instance) do |builder|
64
+ builder.use Rack::Auth::Basic do |username, password|
65
+ # Verify credentials
66
+ end
67
+ end
68
+ mount flipper_app, at: '/flipper'
69
+ ```
70
+
71
+ ##### Route Constraints
72
+ It is possible to use [routes constraints](http://guides.rubyonrails.org/routing.html#request-based-constraints) to limit access to routes:
56
73
 
57
74
  ```ruby
58
75
  # config/routes.rb
@@ -63,7 +80,7 @@ constraints flipper_constraint do
63
80
  end
64
81
  ```
65
82
 
66
- Another example of a route constrain using the current_user when using Devise or another warden based authentication system:
83
+ Another example is to use the `current_user` when using a gem-based authentication system (i.e., [warden](https://github.com/hassox/warden) or [devise](https://github.com/plataformatec/devise)):
67
84
 
68
85
  ```ruby
69
86
  # initializers/admin_access.rb
@@ -82,7 +99,6 @@ constraints CanAccessFlipperUI do
82
99
  end
83
100
  ```
84
101
 
85
-
86
102
  ### Standalone
87
103
 
88
104
  Minimal example for Rack:
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.11.0.beta7'.freeze
2
+ VERSION = '0.11.0.beta8'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0.beta7
4
+ version: 0.11.0.beta8
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-26 00:00:00.000000000 Z
11
+ date: 2017-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -56,14 +56,14 @@ dependencies:
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: 0.11.0.beta7
59
+ version: 0.11.0.beta8
60
60
  type: :runtime
61
61
  prerelease: false
62
62
  version_requirements: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - "~>"
65
65
  - !ruby/object:Gem::Version
66
- version: 0.11.0.beta7
66
+ version: 0.11.0.beta8
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: erubis
69
69
  requirement: !ruby/object:Gem::Requirement