-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Gemfile-rails-dependencies
58 lines (51 loc) · 2.1 KB
/
Gemfile-rails-dependencies
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version_file = File.expand_path("../.rails-version", __FILE__)
# This is required for Ruby 3.1, because in Ruby 3.1 these gems were moved to
# bundled gems from default gems. This issue was fixed in Rails Rails 7.0.1.
# Discussion can be found here - https://github.com/mikel/mail/pull/1439
def add_net_gems_dependency
if RUBY_VERSION >= '3.1'
gem 'net-smtp', require: false
gem 'net-imap', require: false
gem 'net-pop', require: false
end
end
# sqlite3 is an optional, unspecified, dependency and Rails 6.0 only supports `~> 1.4`
if RUBY_VERSION.to_f < 3
# sqlite3 1.7.x doesn't work on all platforms for Ruby 2.x
gem 'sqlite3', '~> 1.4', '< 1.7', platforms: [:ruby]
else
gem 'sqlite3', '~> 1.4', platforms: [:ruby]
end
if RUBY_VERSION.to_f < 2.7
gem 'puma', '< 6.0.0'
else
gem 'puma'
end
case version = ENV['RAILS_VERSION'] || (File.exist?(version_file) && File.read(version_file).chomp) || ''
when /main/
gem "rails", :git => "https://github.com/rails/rails.git"
gem 'activerecord-jdbcsqlite3-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', platforms: [:jruby]
gem 'selenium-webdriver', require: false
when /stable$/
gem_list = %w[rails railties actionmailer actionpack activerecord activesupport activejob actionview]
gem 'activerecord-jdbcsqlite3-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', platforms: [:jruby]
gem_list.each do |rails_gem|
gem rails_gem, :git => "https://github.com/rails/rails.git", :branch => version
end
when nil, false, ""
gem "rails", "~> 7.0.0"
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
gem 'selenium-webdriver', require: false
else
version_number = version.split(' ').last
add_net_gems_dependency if version_number < '7.0'
gem "rails", version
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
# This version number reflects our build version not our actual version,
# this will be fixed in 7.1.4 and should be removed then.
if version_number == '7.1.0'
gem 'selenium-webdriver', '< 4.20.0', require: false
else
gem 'selenium-webdriver', require: false
end
end