Improve OmniAuth version check to allow anything from 1.0 forward

This should enable people to try OmniAuth 2 currently in pre-release.
This commit is contained in:
Carlos Antonio da Silva 2021-01-07 09:21:14 -03:00
parent 98fc5e8e39
commit 8bb358cf80
1 changed files with 2 additions and 2 deletions

View File

@ -8,8 +8,8 @@ rescue LoadError
raise
end
unless OmniAuth::VERSION =~ /^1\./
raise "You are using an old OmniAuth version, please ensure you have 1.0.0.pr2 version or later installed."
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.