Skip to content

Not adding the leading slash leads to an anonymous NoMethodError: undefined method `downcase' for nil:NilClass  #194

Closed
@ferdi2005

Description

@ferdi2005

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions