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 Ruby 2.2/2.3 & Rails 4.0/4.1 + run tests against Rails 6 #89

Merged
merged 6 commits into from
Sep 18, 2019
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
7 changes: 0 additions & 7 deletions .ci/prepare

This file was deleted.

33 changes: 8 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,27 @@ sudo: false

cache: bundler

before_install:
- ruby .ci/prepare

script:
- "ruby -e \"RUBY_VERSION == '2.6.3' ? system('bundle exec rubocop') : exit(0)\""
- "ruby -e \"RUBY_VERSION == '2.6.4' ? system('bundle exec rubocop') : exit(0)\""
- bundle exec rake spec

rvm:
- 2.2.10
- 2.3.8
- 2.4.6
- 2.5.5
- 2.6.3
- 2.4.7
- 2.5.6
- 2.6.4

gemfile:
- gemfiles/rails_4.0.gemfile
- gemfiles/rails_4.1.gemfile
- gemfiles/rails_4.2.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
- gemfiles/rails_6.0.gemfile

matrix:
exclude:
# Rails 4.0 and 4.1 requires an old version of `json` gem, which isn't compatible with Ruby 2.4+
# https://github.com/flori/json/issues/308
- rvm: 2.4.6
gemfile: gemfiles/rails_4.0.gemfile
- rvm: 2.4.6
gemfile: gemfiles/rails_4.1.gemfile
- rvm: 2.5.5
gemfile: gemfiles/rails_4.0.gemfile
- rvm: 2.5.5
gemfile: gemfiles/rails_4.1.gemfile
- rvm: 2.6.3
gemfile: gemfiles/rails_4.0.gemfile
- rvm: 2.6.3
gemfile: gemfiles/rails_4.1.gemfile
# Rails 6 requires Ruby 2.5+
- rvm: 2.4.7
gemfile: gemfiles/rails_6.0.gemfile

addons:
code_climate:
Expand Down
2 changes: 1 addition & 1 deletion Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require 'json'
rails_versions = JSON.parse(Net::HTTP.get(URI('https://rubygems.org/api/v1/versions/rails.json')))
.group_by { |version| version['number'] }.keys.reject { |key| key =~ /rc|racecar|beta|pre/ }

%w[4.0 4.1 4.2 5.0 5.1 5.2].each do |version|
%w[4.2 5.0 5.1 5.2 6.0].each do |version|
appraise "rails_#{version}" do
current_version = rails_versions
.select { |key| key.match(/\A#{version}/) }
Expand Down
28 changes: 15 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ PATH
remote: .
specs:
enumerate_it (2.0.0)
activesupport (>= 4.0.0)
activesupport (>= 4.2.0)

GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.3)
activesupport (6.0.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.1, >= 2.1.8)
appraisal (2.2.0)
bundler
rake
Expand All @@ -22,31 +23,31 @@ GEM
diff-lcs (1.3)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.2)
jaro_winkler (1.5.3)
method_source (0.9.2)
minitest (5.11.3)
parallel (1.17.0)
parser (2.6.3.0)
parser (2.6.4.1)
ast (~> 2.4.0)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
rainbow (3.0.0)
rake (12.3.2)
rake (12.3.3)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-core (3.8.2)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.3)
rspec-expectations (3.8.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
rspec-mocks (3.8.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubocop (0.69.0)
rspec-support (3.8.2)
rubocop (0.74.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.6)
Expand All @@ -55,13 +56,14 @@ GEM
unicode-display_width (>= 1.4.0, < 1.7)
rubocop-rspec (1.33.0)
rubocop (>= 0.60.0)
ruby-progressbar (1.10.0)
ruby-progressbar (1.10.1)
thor (0.20.3)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.6.0)
wwtd (1.3.0)
wwtd (1.4.0)
zeitwerk (2.1.10)

PLATFORMS
ruby
Expand All @@ -78,4 +80,4 @@ DEPENDENCIES
wwtd

BUNDLED WITH
2.0.1
2.0.2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ Changes are maintained under [Releases page](https://github.com/lucascaton/enume
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so we don't break it in a future version unintentionally.
* [Optional] Run the tests agaist a specific Gemfile: `$ bundle exec appraisal rails_5.2 rake spec`.
* [Optional] Run the tests agaist a specific Gemfile: `$ bundle exec appraisal rails_6.0 rake spec`.
* Run the tests agaist all supported versions: `$ bundle exec rake` (or `$ bundle exec wwtd`)
* Commit, but please do not mess with `Rakefile`, version, or history.
* Send a Pull Request. Bonus points for topic branches.
Expand Down
4 changes: 2 additions & 2 deletions enumerate_it.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Gem::Specification.new do |gem|
gem.name = 'enumerate_it'
gem.require_paths = ['lib']
gem.version = EnumerateIt::VERSION
gem.required_ruby_version = '>= 2.2.0'
gem.required_ruby_version = '>= 2.4.7'

gem.metadata = {
'source_code_uri' => 'https://github.com/lucascaton/enumerate_it',
'changelog_uri' => 'https://github.com/lucascaton/enumerate_it/releases'
}

gem.add_dependency 'activesupport', '>= 4.0.0'
gem.add_dependency 'activesupport', '>= 4.2.0'

gem.add_development_dependency 'appraisal'
gem.add_development_dependency 'bundler'
Expand Down
9 changes: 0 additions & 9 deletions gemfiles/rails_4.1.gemfile

This file was deleted.

6 changes: 3 additions & 3 deletions gemfiles/rails_4.0.gemfile → gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

source 'https://rubygems.org'

gem 'activerecord', '~> 4.0.13'
gem 'activesupport', '~> 4.0.13'
gem 'sqlite3', '< 1.4'
gem 'activerecord', '~> 6.0.0'
gem 'activesupport', '~> 6.0.0'
gem 'sqlite3', '~> 1.4.1'

gemspec path: '../'