Merge pull request #264 from grzuy/drop_support_for_rails_3

Drop support for unmaintaned Rails 3
This commit is contained in:
Corey Farwell 2018-01-23 17:45:29 -05:00 committed by GitHub
commit f91f3a403c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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