Skip to content

Commit

Permalink
Remove Rails 4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
feliperenan authored and tegon committed Feb 15, 2019
1 parent 45c6f5c commit 52d9853
Show file tree
Hide file tree
Showing 33 changed files with 58 additions and 642 deletions.
25 changes: 1 addition & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,9 @@ gemfile:
- gemfiles/Gemfile.rails-6.0-beta
- gemfiles/Gemfile.rails-5.2-stable
- gemfiles/Gemfile.rails-5.0-stable
- gemfiles/Gemfile.rails-4.2-stable
- gemfiles/Gemfile.rails-4.1-stable

matrix:
exclude:
- rvm: 2.1.10
gemfile: Gemfile
- rvm: 2.1.10
gemfile: gemfiles/Gemfile.rails-6.0-beta
- rvm: 2.1.10
gemfile: gemfiles/Gemfile.rails-5.2-stable
- rvm: 2.1.10
gemfile: gemfiles/Gemfile.rails-5.0-stable
- rvm: 2.2.10
gemfile: Gemfile
- rvm: 2.2.10
gemfile: gemfiles/Gemfile.rails-6.0-beta
Expand All @@ -40,15 +29,6 @@ matrix:
- rvm: 2.4.5
gemfile: gemfiles/Gemfile.rails-6.0-beta
- rvm: 2.5.3
gemfile: gemfiles/Gemfile.rails-4.1-stable
- rvm: 2.6.0
gemfile: gemfiles/Gemfile.rails-4.1-stable
- rvm: 2.6.0
gemfile: gemfiles/Gemfile.rails-4.2-stable
- rvm: ruby-head
gemfile: gemfiles/Gemfile.rails-4.1-stable
- rvm: ruby-head
gemfile: gemfiles/Gemfile.rails-4.2-stable
- env: DEVISE_ORM=mongoid
gemfile: Gemfile
- env: DEVISE_ORM=mongoid
Expand All @@ -73,10 +53,7 @@ env:
- DEVISE_ORM=active_record
- DEVISE_ORM=mongoid

before_install:
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
- gem install bundler -v '< 2'
- "rm ${BUNDLE_GEMFILE}.lock"
before_install: "rm ${BUNDLE_GEMFILE}.lock"

before_script: "bundle update"

Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PATH
devise (4.6.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 6.0)
railties (>= 5.0, < 6.0)
responders
warden (~> 1.2.3)

Expand Down Expand Up @@ -201,4 +201,4 @@ DEPENDENCIES
webrat (= 0.7.3)

BUNDLED WITH
1.17.1
1.17.2
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,17 @@ Please note that the command output will show the variable value being used.
### BUNDLE_GEMFILE
We can use this variable to tell bundler what Gemfile it should use (instead of the one in the current directory).
Inside the [gemfiles](https://github.com/plataformatec/devise/tree/master/gemfiles) directory, we have one for each version of Rails we support. When you send us a pull request, it may happen that the test suite breaks on Travis using some of them. If that's the case, you can simulate the same environment using the `BUNDLE_GEMFILE` variable.
For example, if the tests broke using Ruby 2.4.2 and Rails 4.1, you can do the following:
For example, if the tests broke using Ruby 2.5.0 and Rails 5.0, you can do the following:
```bash
rbenv shell 2.4.2 # or rvm use 2.4.2
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.1-stable bundle install
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.1-stable bin/test
rbenv shell 2.5.0 # or rvm use 2.5.0
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-5.0-stable bundle install
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-5.0-stable bin/test
```

You can also combine both of them if the tests broke for Mongoid:
```bash
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.1-stable bundle install
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.1-stable DEVISE_ORM=mongoid bin/test
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-5.0-stable bundle install
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-5.0-stable DEVISE_ORM=mongoid bin/test
```

### Running tests
Expand Down Expand Up @@ -179,7 +179,7 @@ Once you have solidified your understanding of Rails and authentication mechanis

## Getting started

Devise 4.0 works with Rails 4.1 onwards. Add the following line to your Gemfile:
Devise 5.0 works with Rails 5.0 onwards. Add the following line to your Gemfile:

```ruby
gem 'devise'
Expand Down
4 changes: 2 additions & 2 deletions devise.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Gem::Specification.new do |s|

s.files = Dir["{app,config,lib}/**/*", "CHANGELOG.md", "MIT-LICENSE", "README.md"]
s.require_paths = ["lib"]
s.required_ruby_version = '>= 2.1.0'
s.required_ruby_version = '>= 2.3.0'

s.add_dependency("warden", "~> 1.2.3")
s.add_dependency("orm_adapter", "~> 0.1")
s.add_dependency("bcrypt", "~> 3.0")
s.add_dependency("railties", ">= 4.1.0", "< 6.0")
s.add_dependency("railties", ">= 5.0", "< 6.0")
s.add_dependency("responders")
end
33 changes: 0 additions & 33 deletions gemfiles/Gemfile.rails-4.1-stable

This file was deleted.

173 changes: 0 additions & 173 deletions gemfiles/Gemfile.rails-4.1-stable.lock

This file was deleted.

Loading

0 comments on commit 52d9853

Please sign in to comment.