-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
boot.rb
39 lines (30 loc) · 835 Bytes
/
boot.rb
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
# frozen_string_literal: true
unless defined?(DEVISE_ORM)
DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
end
module Devise
module Test
# Detection for minor differences between Rails versions in tests.
def self.rails6?
Rails.version.start_with? '6'
end
def self.rails52_and_up?
Rails::VERSION::MAJOR > 5 || rails52?
end
def self.rails52?
Rails.version.start_with? '5.2'
end
def self.rails51?
Rails.version.start_with? '5.1'
end
def self.rails5_and_up?
Rails::VERSION::MAJOR >= 5
end
def self.rails5?
Rails.version.start_with? '5'
end
end
end
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])