mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Drop support for Rails 3
This commit is contained in:
parent
03ade2e056
commit
34ee066eac
3 changed files with 2 additions and 8 deletions
|
|
@ -26,7 +26,7 @@ Install the [rack-attack](http://rubygems.org/gems/rack-attack) gem; or add it t
|
|||
gem 'rack-attack'
|
||||
```
|
||||
Tell your app to use the Rack::Attack middleware.
|
||||
For Rails 3+ apps:
|
||||
For Rails apps:
|
||||
|
||||
```ruby
|
||||
# In config/application.rb
|
||||
|
|
|
|||
|
|
@ -15,11 +15,8 @@ class Rack::Attack
|
|||
end
|
||||
|
||||
PathNormalizer = if defined?(::ActionDispatch::Journey::Router::Utils)
|
||||
# For Rails 4+ apps
|
||||
# For Rails apps
|
||||
::ActionDispatch::Journey::Router::Utils
|
||||
elsif defined?(::Journey::Router::Utils)
|
||||
# for Rails 3.2
|
||||
::Journey::Router::Utils
|
||||
else
|
||||
FallbackPathNormalizer
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ require "rack/test"
|
|||
require 'active_support'
|
||||
require 'action_dispatch'
|
||||
|
||||
# Load Journey for Rails 3.2
|
||||
require 'journey' if ActionPack::VERSION::MAJOR == 3
|
||||
|
||||
require "rack/attack"
|
||||
|
||||
begin
|
||||
|
|
|
|||
Loading…
Reference in a new issue