Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lucascaton authored Apr 21, 2024
2 parents dc5b4d2 + d435453 commit 46a0b69
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 24 deletions.
19 changes: 13 additions & 6 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@ 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 |version|
appraise "rails_#{version}" do
%w[5.0 5.1 5.2 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#{version}/) }
.select { |key| key.match(/\A#{rails_version}/) }
.max { |a, b| Gem::Version.new(a) <=> Gem::Version.new(b) }

gem 'activesupport', "~> #{current_version}"
gem 'activerecord', "~> #{current_version}"

if Gem::Version.new(version) > Gem::Version.new(5.0)
gem 'sqlite3'
else
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
end
end
4 changes: 1 addition & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
wwtd (1.4.1)

PLATFORMS
ruby
Expand All @@ -118,8 +117,7 @@ DEPENDENCIES
rubocop
rubocop-rake
rubocop-rspec
sqlite3
wwtd
sqlite3 (< 2)

BUNDLED WITH
2.4.19
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,4 +536,4 @@ you can see them on the [releases page](../../releases).

## Copyright

Copyright (c) 2010-2023 Cássio Marques and Lucas Caton. See `LICENSE` file for details.
Copyright (c) 2010-2024 Cássio Marques and Lucas Caton. See `LICENSE` file for details.
3 changes: 1 addition & 2 deletions enumerate_it.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'rubocop'
gem.add_development_dependency 'rubocop-rake'
gem.add_development_dependency 'rubocop-rspec'
gem.add_development_dependency 'sqlite3'
gem.add_development_dependency 'wwtd'
gem.add_development_dependency 'sqlite3', '< 2'
end
2 changes: 1 addition & 1 deletion gemfiles/rails_5.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ source 'https://rubygems.org'

gem 'activerecord', '~> 5.1.7'
gem 'activesupport', '~> 5.1.7'
gem 'sqlite3'
gem 'sqlite3', '< 2'

gemspec path: '../'
2 changes: 1 addition & 1 deletion gemfiles/rails_5.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ source 'https://rubygems.org'

gem 'activerecord', '~> 5.2.8.1'
gem 'activesupport', '~> 5.2.8.1'
gem 'sqlite3'
gem 'sqlite3', '< 2'

gemspec path: '../'
2 changes: 1 addition & 1 deletion gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ source 'https://rubygems.org'

gem 'activerecord', '~> 6.0.6.1'
gem 'activesupport', '~> 6.0.6.1'
gem 'sqlite3'
gem 'sqlite3', '< 2'

gemspec path: '../'
6 changes: 3 additions & 3 deletions gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

source 'https://rubygems.org'

gem 'activerecord', '~> 6.1.7.6'
gem 'activesupport', '~> 6.1.7.6'
gem 'sqlite3'
gem 'activerecord', '~> 6.1.7.7'
gem 'activesupport', '~> 6.1.7.7'
gem 'sqlite3', '< 2'

gemspec path: '../'
6 changes: 3 additions & 3 deletions gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

source 'https://rubygems.org'

gem 'activerecord', '~> 7.0.8'
gem 'activesupport', '~> 7.0.8'
gem 'sqlite3'
gem 'activerecord', '~> 7.0.8.1'
gem 'activesupport', '~> 7.0.8.1'
gem 'sqlite3', '< 2'

gemspec path: '../'
6 changes: 3 additions & 3 deletions gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

source 'https://rubygems.org'

gem 'activerecord', '~> 7.1.1'
gem 'activesupport', '~> 7.1.1'
gem 'sqlite3'
gem 'activerecord', '~> 7.1.3.2'
gem 'activesupport', '~> 7.1.3.2'
gem 'sqlite3', '< 2'

gemspec path: '../'

0 comments on commit 46a0b69

Please sign in to comment.