From 8bb358cf80a632d3232c3f548ce7b95fd94b6eb2 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Thu, 7 Jan 2021 09:21:14 -0300 Subject: [PATCH] Improve OmniAuth version check to allow anything from 1.0 forward This should enable people to try OmniAuth 2 currently in pre-release. --- lib/devise/omniauth.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/devise/omniauth.rb b/lib/devise/omniauth.rb index 63ea6ca519..5076eb2e33 100644 --- a/lib/devise/omniauth.rb +++ b/lib/devise/omniauth.rb @@ -8,8 +8,8 @@ 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.