Sha256: 5cd7ee189385d795695c647ca0144f4bbd0494230f969db45a2064a704c1124d
Contents?: true
Size: 500 Bytes
Versions: 3
Compression:
Stored size: 500 Bytes
Contents
module OmniAuth class Builder < Rack::Builder def initialize(app, &block) @app = app super(&block) end def provider(klass, *args, &block) if klass.is_a?(Class) middleware = klass else middleware = OmniAuth::Strategies.const_get("#{OmniAuth::Utils.camelize(klass.to_s)}") end use middleware, *args, &block end def call(env) @ins << @app unless @ins.include?(@app) to_app.call(env) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
oa-core-0.0.3 | lib/omniauth/builder.rb |
oa-core-0.0.2 | lib/omniauth/builder.rb |
oa-core-0.0.1 | lib/omniauth/builder.rb |