Skip to content

Commit c05e45c

Browse files
committed
Update playground code and ensure rails 6 and 7 works
1 parent 5152708 commit c05e45c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Gemfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,19 @@ group :development do
1313
end
1414

1515
group :test do
16-
rails_version = ENV['RAILS_VERSION'] || '6.1'
16+
rails_version = ENV['RAILS_VERSION'] || '7.1'
1717
sequel_version = ENV['SEQUEL_VERSION'] ? "~> #{ENV['SEQUEL_VERSION']}" : '>= 4.0'
1818

1919
gem 'active_model_serializers'
2020
gem 'rails', "~> #{rails_version}"
2121
gem 'sequel', sequel_version
2222

23-
gem 'sqlite3', '~> 2', platform: %i[rbx ruby]
23+
# remove when deprecate rails 6
24+
if Gem::Version.new(rails_version) >= Gem::Version.new('7.0')
25+
gem 'sqlite3', '~> 2', platform: %i[rbx ruby]
26+
else
27+
gem 'sqlite3', '< 2', platform: %i[rbx ruby]
28+
end
2429

2530
gem 'activerecord-jdbc-adapter', platform: :jruby
2631
gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
@@ -29,6 +34,7 @@ group :test do
2934
gem 'simplecov', require: 'false'
3035
gem 'simplecov-cobertura', require: 'false'
3136
gem 'threads'
37+
gem 'logger'
3238

3339
gem 'byebug'
3440
gem 'dotenv', '~> 2.7', '>= 2.7.6'

playground/Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
44
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
55
gem 'rails', '~> 6.1.3'
66
# Use sqlite3 as the database for Active Record
7-
gem 'sqlite3', '~> 1.4'
7+
gem 'sqlite3'
88
# Use Puma as the app server
9-
gem 'puma', '~> 5.0'
9+
gem 'puma'
1010
# Use SCSS for stylesheets
1111
gem 'sass-rails', '>= 6'
1212
gem 'bootstrap', '~> 5.0.0.beta2'

0 commit comments

Comments
 (0)