Description
Not adding the traling slash in the OAuth consumer leads to an uneasily debuggable NoMethodError: undefined method 'downcase' for nil:NilClass
Example, using:
oauth_consumer = OAuth::Consumer.new(ENV["CONSUMER_KEY"], ENV["CONSUMER_SECRET"], :site => "https://commons.wikimedia.org", :request_token_path => "w/index.php?title=Special:OAuth/initiate", :authorize_path => "wiki/Special:OAuth/authorize", :access_token_path => "wiki/Special:OAuth/token",)
instead of:
oauth_consumer = OAuth::Consumer.new(ENV["CONSUMER_KEY"], ENV["CONSUMER_SECRET"], :site => "https://commons.wikimedia.org", :request_token_path => "/w/index.php?title=Special:OAuth/initiate", :authorize_path => "/wiki/Special:OAuth/authorize", :access_token_path => "/wiki/Special:OAuth/token",)
leads to a NoMethodError: undefined method 'downcase' for nil:NilClass
and not to a clearer error.