Skip to content

Commit

Permalink
Merge pull request #111 from lucascaton/v4
Browse files Browse the repository at this point in the history
v4
  • Loading branch information
lucascaton authored Apr 26, 2024
2 parents dd14276 + bb48322 commit 3579244
Show file tree
Hide file tree
Showing 11 changed files with 114 additions and 167 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,15 @@ jobs:

matrix:
ruby:
- 2.5
- 2.6
- 2.7
- 3.0
- 3.1
- 3.2
- 3.3
gemfile:
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
- gemfiles/rails_6.0.gemfile
- gemfiles/rails_6.1.gemfile
- gemfiles/rails_7.0.gemfile
- gemfiles/rails_7.1.gemfile
exclude:
# Rails < 6 does not support Ruby 3+:
# https://github.com/rails/rails/issues/40938#issuecomment-751357907
- ruby: 3.0
gemfile: gemfiles/rails_5.0.gemfile
- ruby: 3.0
gemfile: gemfiles/rails_5.1.gemfile
- ruby: 3.0
gemfile: gemfiles/rails_5.2.gemfile
- ruby: 3.1
gemfile: gemfiles/rails_5.0.gemfile
- ruby: 3.1
gemfile: gemfiles/rails_5.1.gemfile
- ruby: 3.1
gemfile: gemfiles/rails_5.2.gemfile
- ruby: 3.2
gemfile: gemfiles/rails_5.0.gemfile
- ruby: 3.2
gemfile: gemfiles/rails_5.1.gemfile
- ruby: 3.2
gemfile: gemfiles/rails_5.2.gemfile
- ruby: 3.3
gemfile: gemfiles/rails_5.0.gemfile
- ruby: 3.3
gemfile: gemfiles/rails_5.1.gemfile
- ruby: 3.3
gemfile: gemfiles/rails_5.2.gemfile

# Rails 7.x requires Ruby 2.7+
- ruby: 2.5
gemfile: gemfiles/rails_7.0.gemfile
- ruby: 2.5
gemfile: gemfiles/rails_7.1.gemfile
- ruby: 2.6
gemfile: gemfiles/rails_7.0.gemfile
- ruby: 2.6
gemfile: gemfiles/rails_7.1.gemfile

env:
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inherit_mode:

AllCops:
NewCops: enable
TargetRubyVersion: 2.5
TargetRubyVersion: 3.0

Exclude:
- 'lib/generators/enumerate_it/enum/templates/**/*'
Expand Down
15 changes: 2 additions & 13 deletions 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.grep_v(/rc|racecar|beta|pre/)

%w[5.0 5.1 5.2 6.0 6.1 7.0 7.1].each do |rails_version|
%w[6.0 6.1 7.0 7.1].each do |rails_version|
appraise "rails_#{rails_version}" do
current_version = rails_versions
.select { |key| key.match(/\A#{rails_version}/) }
Expand All @@ -13,17 +13,6 @@ rails_versions = JSON.parse(Net::HTTP.get(URI('https://rubygems.org/api/v1/versi
gem 'activesupport', "~> #{current_version}"
gem 'activerecord', "~> #{current_version}"

if Gem::Version.new(rails_version) <= Gem::Version.new(5.0)
gem 'sqlite3', '< 1.4'
else
# v2.x isn't yet working. See: https://github.com/sparklemotion/sqlite3-ruby/issues/529
gem 'sqlite3', '< 2'
end

# elsif Gem::Version.new(RUBY_VERSION) < '3'
# gem 'sqlite3', '< 2'
# else
# gem 'sqlite3'
# end
gem 'sqlite3', '< 2' # v2.x isn't yet working. See: https://github.com/sparklemotion/sqlite3-ruby/issues/529
end
end
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PATH
remote: .
specs:
enumerate_it (3.3.0)
activesupport (>= 5.0.7.2)
enumerate_it (4.0.0)
activesupport (>= 6.0.0)

GEM
remote: https://rubygems.org/
Expand Down
Loading

0 comments on commit 3579244

Please sign in to comment.