Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for rails 3 #898

Merged
merged 1 commit into from
Dec 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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