Skip to content

Commit

Permalink
Drop support for rails 3
Browse files Browse the repository at this point in the history
In #895, Sean asked:

> .. since it looks like the next version is planned to be 6.0.0, how would
> you feel about dropping support for Rails 3 in that version? It has
> reached end of life, meaning it no longer receives security patches. We
> don't recommend that gem authors continue to support it.

To which, I responded:

> We could continue maintaining PT 5 if we had to, so I think it's
> fine to drop support for rails 3 in PT 6. If Ben agrees, I'd be
> happy to make that change. I'll just update the gemspec and drop
> testing support, for starters. We can clean up the conditionals in
> the code over time.
  • Loading branch information
jaredbeck committed Nov 30, 2016
1 parent b7da365 commit 94bf3e0
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 65 deletions.
22 changes: 8 additions & 14 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,11 @@ Install gems with `bundle exec appraisal install`.

Testing is a little awkward because the test suite:

1. Supports three major versions of rails: 3, 4, 5
1. Supports multiple versions of rails
1. Contains a "dummy" rails app with three databases (test, foo, and bar)
1. Supports three different RDBMS': sqlite, mysql, and postgres

Test against rails 3:

```
bundle exec appraisal ar3 rake
```

Run tests with sqlite:
### Run tests with sqlite

```
# Create the appropriate database config. file
Expand All @@ -47,10 +41,10 @@ RAILS_ENV=bar bundle exec rake db:setup
cd ../..
# Run tests
DB=sqlite bundle exec appraisal ar5 rake
DB=sqlite bundle exec appraisal ar-5.0 rake
```

Run tests with mysql:
### Run tests with mysql

```
# Create the appropriate database config. file
Expand All @@ -65,10 +59,10 @@ RAILS_ENV=bar bundle exec rake db:setup
cd ../..
# Run tests
DB=mysql bundle exec appraisal ar5 rake
DB=mysql bundle exec appraisal ar-5.0 rake
```

Run tests with postgres:
### Run tests with postgres

```
# Create the appropriate database config. file
Expand All @@ -85,10 +79,10 @@ cd ../..
# Run tests
DB=postgres bundle exec rake
DB=postgres bundle exec appraisal ar5 rake
DB=postgres bundle exec appraisal ar-5.0 rake
```

### Releases
## Releases

1. Set the version in lib/paper_trail/version_number.rb
- Set PRE to nil unless it's a pre-release (beta, rc, etc.)
Expand Down
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,16 @@ before_script:
- sh -c "if [ \"$DB\" = 'postgres' ]; then psql -c 'create database paper_trail_foo;' -U postgres; fi"

gemfile:
- gemfiles/ar3.gemfile
- gemfiles/ar4.gemfile
- gemfiles/ar5.gemfile
- gemfiles/ar_4.2.gemfile
- gemfiles/ar_5.0.gemfile
- gemfiles/ar_master.gemfile

matrix:
fast_finish: true
exclude:
- gemfile: gemfiles/ar5.gemfile
- gemfile: gemfiles/ar_5.0.gemfile
rvm: 1.9.3
- gemfile: gemfiles/ar5.gemfile
- gemfile: gemfiles/ar_5.0.gemfile
rvm: jruby-19mode
allow_failures:
- gemfile: gemfiles/ar_master.gemfile
Expand Down
19 changes: 2 additions & 17 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,12 @@
# > the version from the appraisal takes precedence.
# > https://github.com/thoughtbot/appraisal

appraise "ar3" do
gem "activerecord", "~> 3.2.22"
gem "i18n", "~> 0.6.11"
gem "request_store", "~> 1.1.0"
gem "sinatra", "~> 1.4.6"

group :development, :test do
gem 'railties', '~> 3.2.22'
gem 'test-unit', '~> 3.1.5'
platforms :ruby do
gem 'mysql2', '~> 0.3.20'
end
end
end

appraise "ar4" do
appraise "ar-4.2" do
gem "activerecord", "~> 4.2"
gem "sinatra", "~> 1.4.6"
end

appraise "ar5" do
appraise "ar-5.0" do
gem "activerecord", "~> 5.0.0"
gem "rspec-rails", "~> 3.5.1"
gem 'rails-controller-testing'
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
This project follows [semver 2.0.0](http://semver.org/spec/v2.0.0.html) and the
recommendations of [keepachangelog.com](http://keepachangelog.com/).

## Unreleased
## 6.0.0 (Unreleased)

Now with less model pollution! About 40 methods that were polluting your models'
namespaces have been removed, reducing the chances of a name conflict with your
methods.

### Breaking Changes

- Dropped support for rails 3
- [#864](https://github.com/airblade/paper_trail/pull/864) - The model methods
deprecated in 5.2.0 have been removed. Use `paper_trail.x` instead of `x`.
- [#861](https://github.com/airblade/paper_trail/pull/861) - `timestamp_field=`
Expand All @@ -23,6 +24,7 @@ methods.

### Added

- Support for rails 5.1
- [#881](https://github.com/airblade/paper_trail/pull/881) - Add RSpec matcher
`have_a_version_with_changes` for easier testing.

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ has been destroyed.

### 1.a. Compatibility

| paper_trail | branch | tags | ruby | activerecord |
| -------------- | ---------- | ------ | -------- | ------------ |
| 6 (unreleased) | master | | >= 1.9.3 | >= 3.0, < 6 |
| 5 | 5-stable | v5.x | >= 1.9.3 | >= 3.0, < 6 |
| 4 | 4-stable | v4.x | >= 1.8.7 | >= 3.0, < 6 |
| 3 | 3.0-stable | v3.x | >= 1.8.7 | >= 3.0, < 5 |
| 2 | 2.7-stable | v2.x | >= 1.8.7 | >= 3.0, < 4 |
| 1 | rails2 | v1.x | >= 1.8.7 | >= 2.3, < 3 |
| paper_trail | branch | tags | ruby | activerecord |
| -------------- | ---------- | ------ | -------- | ------------- |
| 6 (unreleased) | master | | >= 1.9.3 | >= 4.0, < 6 |
| 5 | 5-stable | v5.x | >= 1.9.3 | >= 3.0, < 5.1 |
| 4 | 4-stable | v4.x | >= 1.8.7 | >= 3.0, < 5.1 |
| 3 | 3.0-stable | v3.x | >= 1.8.7 | >= 3.0, < 5 |
| 2 | 2.7-stable | v2.x | >= 1.8.7 | >= 3.0, < 4 |
| 1 | rails2 | v1.x | >= 1.8.7 | >= 2.3, < 3 |

### 1.b. Installation

Expand Down
19 changes: 0 additions & 19 deletions gemfiles/ar3.gemfile

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion paper_trail.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gem::Specification.new do |s|
# (https://github.com/rails/rails/pull/25337) which is pretty important
# to PT. I haven't found good instructions yet on how to upgrade, but
# Sean Griffin described it as easy, on his podcast (http://bikeshed.fm/87).
s.add_dependency "activerecord", [">= 3.0", "< 5.1"]
s.add_dependency "activerecord", [">= 4.0", "< 5.1"]
s.add_dependency "request_store", "~> 1.1"

s.add_development_dependency "appraisal", "~> 2.1"
Expand Down

0 comments on commit 94bf3e0

Please sign in to comment.