zachfeldman / rubypress

Ruby interface for the WordPress XMLRPC API. Follows standard XML-RPC Documentation closely.
201 stars 55 forks source link

Fix #37 - Allow custom prefixes on method names #40

Closed botimer closed 9 years ago

botimer commented 9 years ago

This allows bare method names to be passed to Client#execute and be prefixed by "wp." as before, but allows method names with a namespace prefix to pass through unmodified. This is determined by whether or not there is a '.' present in the method name.

This implementation does mean that custom methods must have some dotted prefix, since any bare method names are assumed to need "wp.", but this seems to be a reasonable requirement, matching API convention.

zachfeldman commented 9 years ago

Thanks for the PR @botimer , just wanted to confirm that tests pass for you locally before merging in?

botimer commented 9 years ago

Yes, all tests passing, including the three new ones. I'm not sure what's going on with Travis, but I suspect a config issue. I'm running on MRI 2.1.5 at the moment but could test with others if needed.