forked from rspec/rspec-rails
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGemfile-rails-dependencies
40 lines (36 loc) · 1.55 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
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
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 'puma', "3.12.1"
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 'puma', "3.12.1"
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 "puma"
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 "puma"
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
gem 'selenium-webdriver', require: false
end