@@ -11,12 +11,14 @@ def add_net_gems_dependency
11
11
end
12
12
end
13
13
14
- # sqlite3 is an optional, unspecified, dependency and Rails 6.0 only supports `~> 1.4`
15
- if RUBY_VERSION.to_f < 3
16
- # sqlite3 1.7.x doesn't work on all platforms for Ruby 2.x
17
- gem 'sqlite3', '~> 1.4', '< 1.7', platforms: [:ruby]
18
- else
19
- gem 'sqlite3', '>= 1.4', platforms: [:ruby]
14
+ def add_sqlite3_gem_dependency
15
+ # sqlite3 is an optional, unspecified, dependency and Rails 6.0 only supports `~> 1.4`
16
+ if RUBY_VERSION.to_f < 3
17
+ # sqlite3 1.7.x doesn't work on all platforms for Ruby 2.x
18
+ gem 'sqlite3', '~> 1.4', '< 1.7', platforms: [:ruby]
19
+ else
20
+ gem 'sqlite3', '~> 1.4', platforms: [:ruby]
21
+ end
20
22
end
21
23
22
24
if RUBY_VERSION.to_f < 2.7
@@ -30,17 +32,22 @@ when /main/
30
32
gem "rails", :git => "https://github.com/rails/rails.git"
31
33
gem 'activerecord-jdbcsqlite3-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', platforms: [:jruby]
32
34
gem 'selenium-webdriver', require: false
35
+
36
+ # Rails 8 requires 2.0.0
37
+ gem 'sqlite3', '~> 2.0', platforms: [:ruby]
33
38
when /stable$/
34
39
gem_list = %w[rails railties actionmailer actionpack activerecord activesupport activejob actionview]
35
40
gem 'activerecord-jdbcsqlite3-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', platforms: [:jruby]
36
41
37
42
gem_list.each do |rails_gem|
38
43
gem rails_gem, :git => "https://github.com/rails/rails.git", :branch => version
39
44
end
45
+ add_sqlite3_gem_dependency
40
46
when nil, false, ""
41
47
gem "rails", "~> 7.0.0"
42
48
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
43
49
gem 'selenium-webdriver', require: false
50
+ add_sqlite3_gem_dependency
44
51
else
45
52
version_number = version.split(' ').last
46
53
add_net_gems_dependency if version_number < '7.0'
55
62
else
56
63
gem 'selenium-webdriver', require: false
57
64
end
65
+ add_sqlite3_gem_dependency
58
66
end
0 commit comments