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

Merge branch 'simplified_default_options' of https://github.com/raebot/omniauth into raebot-simplified_default_options

This commit is contained in:
Tom Milewski 2017-02-12 01:16:17 -05:00
commit 62e0cf90c5
No known key found for this signature in database
GPG key ID: 0C45B110F8B40F20

View file

@ -21,9 +21,8 @@ module OmniAuth
# Returns an inherited set of default options set at the class-level
# for each strategy.
def default_options
return @default_options if instance_variable_defined?(:@default_options) && @default_options
existing = superclass.respond_to?(:default_options) ? superclass.default_options : {}
@default_options = OmniAuth::Strategy::Options.new(existing)
existing = superclass.default_options if superclass.respond_to?(:default_options)
@default_options ||= OmniAuth::Strategy::Options.new(existing)
end
# This allows for more declarative subclassing of strategies by allowing