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:
parent
8aec5276bb
commit
bec4b70375
1 changed files with 10 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue