rails-auth 2.0.3 → 2.1.0

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: 64b07b9bd8dd9957bc0762d864c405c3d6c04da5
4
- data.tar.gz: 4b87e9e0994d8d02b51c16efc1c98e3bad4402a2
3
+ metadata.gz: 5841a5acf2e89eabd90d64340e33bdc3ea0e58e1
4
+ data.tar.gz: 8164f1e5bb970598eb7e5025eeb97d5b58db1843
5
5
  SHA512:
6
- metadata.gz: 3bf4cb730c096d16d98b31223d726a8885e7df1ce4178ba90549c02111dcd944a894378e54ec43a1636f9467400529c84fdd8f819561378a9f2ef60875d19d4a
7
- data.tar.gz: 7151a42a23717f89a3bc00c6c6e2298148b0b98154ac909ba2969c40c17164380b02c23a1827aef1eee6a0455c7d52c9cb4972e63db7518668a7cf1a9e54ab66
6
+ metadata.gz: 12470181f902863a261a6482076f1f2506b28bbb8cf9e522156268d4bb8889fbdee9ddf21e8e54faa1b6cd51b2d0219b380da8ab47ec63384bf3eda3f6f9f116
7
+ data.tar.gz: 9cbdb91c99af7ca524b72b79162457a982a907beb0277394d232bcff1f488cff930fec3b48f9d7a1f3857550b97322ea55d19ca87324037786b0d09ad5ad2219
data/CHANGES.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 2.1.0 (2016-09-24)
2
+
3
+ * [#40](https://github.com/square/rails-auth/pull/40)
4
+ Add Rails router constraint for checking rails-auth is installed.
5
+ ([@drcapulet])
6
+
1
7
  ### 2.0.3 (2016-07-20)
2
8
 
3
9
  * [#39](https://github.com/square/rails-auth/pull/39)
@@ -156,3 +162,4 @@
156
162
 
157
163
  [@tarcieri]: https://github.com/tarcieri
158
164
  [@ewr]: https://github.com/ewr
165
+ [@drcapulet]: https://github.com/drcapulet
@@ -8,3 +8,6 @@ require "rails/auth/config_builder"
8
8
 
9
9
  # Rails controller method support
10
10
  require "rails/auth/controller_methods"
11
+
12
+ # Rails router constraint
13
+ require "rails/auth/installed_constraint"
@@ -0,0 +1,14 @@
1
+ module Rails
2
+ module Auth
3
+ # Rails constraint to make sure the ACLs have been installed
4
+ class InstalledConstraint
5
+ def initialize(config = Rails.application)
6
+ @config = config
7
+ end
8
+
9
+ def matches?(_request)
10
+ !@config.middleware.include?(Rails::Auth::ACL::Middleware)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -3,6 +3,6 @@
3
3
  module Rails
4
4
  # Pluggable authentication and authorization for Rack/Rails
5
5
  module Auth
6
- VERSION = "2.0.3".freeze
6
+ VERSION = "2.1.0".freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-20 00:00:00.000000000 Z
11
+ date: 2016-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -90,6 +90,7 @@ files:
90
90
  - lib/rails/auth/error_page/middleware.rb
91
91
  - lib/rails/auth/exceptions.rb
92
92
  - lib/rails/auth/helpers.rb
93
+ - lib/rails/auth/installed_constraint.rb
93
94
  - lib/rails/auth/monitor/middleware.rb
94
95
  - lib/rails/auth/rack.rb
95
96
  - lib/rails/auth/rspec.rb