forked from rspec/rspec-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gemfile-rails-dependencies
42 lines (36 loc) · 1.66 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
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`
gem 'sqlite3', '~> 1.4', platforms: [:ruby]
# Due to capybara strings issue
gem 'puma', '< 6.0.0'
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
add_net_gems_dependency if version.split(' ').last < '7.0'
gem "rails", version
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
gem 'selenium-webdriver', require: false
end