vendor/rack/lib/rack/auth/openid.rb in relevance-castronaut-0.5.4 vs vendor/rack/lib/rack/auth/openid.rb in relevance-castronaut-0.6.0

- old
+ new

@@ -341,11 +341,11 @@ when ::OpenID::Consumer::FAILURE session.clear session['authenticated'] = false req.env['rack.errors'].puts oid.message - goto = @options[:login_fail] if @option.key? :login_fail + goto = @options[:login_fail] if @options.key? :login_fail body << "Authentication unsuccessful.\n" when ::OpenID::Consumer::SUCCESS session.clear ## Extension support @@ -365,11 +365,11 @@ body << "Authentication successful.\n" when ::OpenID::Consumer::CANCEL session.clear session['authenticated'] = false - goto = @options[:login_fail] if @option.key? :login_fail + goto = @options[:login_fail] if @options.key? :login_fail body << "Authentication cancelled.\n" when ::OpenID::Consumer::SETUP_NEEDED session[:setup_needed] = true unless o_id = session[:openid_param] raise('Required values missing.') @@ -400,10 +400,11 @@ # This method returns the key at which the response data will be found in # the session, which is the namespace uri by default. def add_extension ext, *args if not ext.is_a? Module raise TypeError, "#{ext.inspect} is not a module" - elsif not (m = %w'Request Response NS_URI' - ext.constants).empty? + elsif !(m = %w'Request Response NS_URI' - + ext.constants.map{ |c| c.to_s }).empty? raise ArgumentError, "#{ext.inspect} missing #{m*', '}" end consts = [ext::Request, ext::Response]