Repository navigation
Expand file tree
/
Copy pathGemfile
More file actions
51 lines (40 loc) · 1.38 KB
/
Copy pathGemfile
File metadata and controls
51 lines (40 loc) · 1.38 KB
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
source 'https://rubygems.org'
# Specify your gem's dependencies in two_factor_authentication.gemspec
gemspec
rails_version = ENV["RAILS_VERSION"] || "default"
rails = case rails_version
when "main"
{github: "rails/rails", branch: "main"}
when "default"
"~> 8.1.0"
else
requirement = rails_version.split('.').length == 2 ? "#{rails_version}.0" : rails_version
"~> #{requirement}"
end
gem "rails", rails
# Rails main freezes controller default_url_options; rspec-rails 8.0.4 still
# mutates it in feature specs. Drop once a release includes rspec/rspec-rails#2907.
gem "rspec-rails", github: "rspec/rspec-rails", branch: "main" if rails_version == "main"
ruby_version = Gem::Version.new(RUBY_VERSION)
gem "test-unit", "~> 3.0"
if ruby_version < Gem::Version.new('2.5.0')
gem 'nokogiri', '~> 1.10.10'
elsif ruby_version < Gem::Version.new('2.6.0')
gem 'nokogiri', '~> 1.12.5'
end
gem 'loofah', '< 2.21' if ruby_version < Gem::Version.new('2.5.0')
gem 'psych', '< 5' if rails_version == '7.1' && ruby_version < Gem::Version.new('3.0.0')
group :test, :development do
gem 'ostruct' if ruby_version >= Gem::Version.new('4.0.0')
case rails_version
when '5.2', '6.0', '6.1', '7.0'
gem 'sqlite3', '~> 1.4'
else
gem 'sqlite3'
end
gem 'sprockets-rails'
end
group :test do
gem 'rack_session_access'
gem 'ammeter'
end