prx_auth-rails 0.0.1 → 0.0.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: 757d722c0a6a17be6aa47c344006ad4fa877877c
4
- data.tar.gz: 1b8b1d4122592c95e49299ba53f529ab0c2de98f
3
+ metadata.gz: 42a8438aa009e38379908de19f97e3dc9646b938
4
+ data.tar.gz: d6e41ddf633b6e8b39189e3e26cd9ba540ace8f4
5
5
  SHA512:
6
- metadata.gz: 3c2592aae7dd1823bbf04d1c5bd75850ba5e174e800b0669a9bd1a367f0ce6ea01d8229adecc7900ecb90ee113848a3125d62fc537a61c20f6e4f8a12691b1da
7
- data.tar.gz: ea0cec7d50f63339c8eca7420b2dd45dde5dc12c8cffac0b7a0ef438f5539bbc3d8a84f3daeb60fceff6d0878474f72be88be6a1d169ecb8118d21335d94cc55
6
+ metadata.gz: efd3e13e61606e7e79d9e5ffd8859abe73d385435888d05c35184a0b5339e35f556eaa48a8633bd652a7969922b8533ca3ccac5d3bb961200925fbda75ac5666
7
+ data.tar.gz: d27de777ed43e1a8b133e84fc33d3c9ce8830c991e2f7510c27f8b720a1f0fbfc0ca6a9029764be5a631ca9cba1d01f63d60e7a4c5ec20db3aa09b447abd7ae2
@@ -1,2 +1,10 @@
1
1
  require "prx_auth/rails/version"
2
2
  require "prx_auth/rails/railtie" if defined?(Rails)
3
+ module PrxAuth
4
+ module Rails
5
+ class << self
6
+ attr_accessor :middleware
7
+ self.middleware = true
8
+ end
9
+ end
10
+ end
@@ -2,15 +2,15 @@ require 'rails/railtie'
2
2
  require 'prx_auth/rails/ext/controller'
3
3
  require 'rack/prx_auth'
4
4
 
5
- module PrxAuth
6
- module Rails
7
- class Railtie < ::Rails::Railtie
8
- config.to_prepare do
9
- ApplicationController.send(:include, PrxAuth::Rails::Controller)
10
- end
5
+ module PrxAuth::Rails
6
+ class Railtie < ::Rails::Railtie
7
+ config.to_prepare do
8
+ ApplicationController.send(:include, PrxAuth::Rails::Controller)
9
+ end
11
10
 
12
- initializer 'prx_auth.insert_middleware' do |app|
13
- app.config.middleware.insert_before ActionDispatch::ParamsParser, 'Rack::PrxAuth'
11
+ initializer 'prx_auth.insert_middleware' do |app|
12
+ if PrxAuth::Rails.middleware
13
+ app.config.middleware.insert ActionDispatch::ParamsParser, Rack::PrxAuth
14
14
  end
15
15
  end
16
16
  end
@@ -1,5 +1,5 @@
1
1
  module PrxAuth
2
2
  module Rails
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prx_auth-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Rhoden