whichdigital / active-rest-client

ActiveRestClient API Client
https://rubygems.org/gems/active_rest_client
MIT License
386 stars 44 forks source link

Adds support for configuring api_auth with different credentials per model #100

Closed nathanhoel closed 9 years ago

nathanhoel commented 9 years ago

This change allows for connecting to multiple different servers that would have different API Auth credentials.

Each model or config class can now define it's own api auth credentials independently. If a base class specifies credentials all sub classes will inherit them. Any sub class can override the credentials though.

andyjeffries commented 9 years ago

Would be nice if you could put the same style fix in to username/password so they both work in the same way (allowing superclasses to specify defaults)? Any chance?

nathanhoel commented 9 years ago

I barely had time for this modification at the moment haha. It also seems like something worthy of a separate PR, no?

andyjeffries commented 9 years ago

Can't blame a man for trying ;-)

Fair enough, I'll either get it to it at some point or if you get a chance for a separate PR ;-)

nathanhoel commented 9 years ago

True, true, I would have tried too! Thanks, always a pleasure!