jpatokal / mediawiki-gateway

Ruby framework for MediaWiki API manipulation
Other
133 stars 50 forks source link

Add HTTP options for RestClient::Request #59

Closed blackwinter closed 10 years ago

blackwinter commented 10 years ago

There are cases where one needs to pass additional options to the underlying HTTP connection. This can be achieved by allowing MediaWiki::Gateway#initialize to receive an additional argument which is then being passed down to RestClient::Request.execute. In order to do that, the RestClient.{get,post} calls need to be replaced with their RestClient::Request.execute equivalents.

This change should be fully backwards compatible.

(Note: I updated the specs to work with RSpec 3 -- feel free to ignore that commit.)

jpatokal commented 10 years ago

Thank you!