mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Simplify OmniAuth version check by trying to load the gem with the necessary version
This commit is contained in:
parent
c43ae8cb47
commit
1d138dd40c
1 changed files with 2 additions and 5 deletions
|
@ -1,17 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
begin
|
||||
gem "omniauth", ">= 1.0.0"
|
||||
|
||||
require "omniauth"
|
||||
require "omniauth/version"
|
||||
rescue LoadError
|
||||
warn "Could not load 'omniauth'. Please ensure you have the omniauth gem >= 1.0.0 installed and listed in your Gemfile."
|
||||
raise
|
||||
end
|
||||
|
||||
if Gem::Version.new(OmniAuth::VERSION) < Gem::Version.new('1.0.0')
|
||||
raise "You are using an old OmniAuth version, please ensure you have 1.0.0 version or later installed."
|
||||
end
|
||||
|
||||
# Clean up the default path_prefix. It will be automatically set by Devise.
|
||||
OmniAuth.config.path_prefix = nil
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue