1
0
Fork 0
mirror of https://github.com/omniauth/omniauth.git synced 2022-11-09 12:31:49 -05:00

privatize rack checks

This commit is contained in:
Bobby McDonald 2019-11-10 22:32:39 -05:00
parent 8aec5276bb
commit bec4b70375
No known key found for this signature in database
GPG key ID: CAD931A49619329A

View file

@ -11,14 +11,6 @@ module OmniAuth
end
end
def rack14?
Rack.release.start_with?('1.') && (Rack.release.split('.')[1].to_i >= 4)
end
def rack2?
Rack.release.start_with? '2.'
end
def on_failure(&block)
OmniAuth.config.on_failure = block
end
@ -63,5 +55,15 @@ module OmniAuth
def call(env)
to_app.call(env)
end
private
def rack14?
Rack.release.start_with?('1.') && (Rack.release.split('.')[1].to_i >= 4)
end
def rack2?
Rack.release.start_with? '2.'
end
end
end