Drop support for Rails 3

This commit is contained in:
Gonzalo Rodriguez 2018-01-23 16:12:16 -03:00
parent 03ade2e056
commit 34ee066eac
3 changed files with 2 additions and 8 deletions

View file

@ -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

View file

@ -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

View file

@ -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