Closed nathanhoel closed 9 years ago
Good one, merged. Thanks.
I think it's great that you added api-auth support. I feel bad, though, that this will force all users of active-rest-client to depend on the api-auth gem even if they aren't using the feature.
Do you think it might be worth it to require users to add api-auth to their gemfile themselves? I think this could be achieved by only requiring api-auth if the api_auth_credentials
method is called, and then maybe giving a nice error message about how to add api-auth if a load error is raised.
That's a great idea. I will add that tomorrow I bet Andy will appreciate that suggestion too.
See Nathan, you already understand me. Absolutely, I think it's a great idea.
In the past we've forced gems that a lot of people may not want, but we've tend to take the point of making it easy to use rather than lower dependencies.
@nathanhoel if you can work on making it an optional requirement, that would be great.
@kjg thanks for the comment.
Api-Auth is a popular gem for signing and authorizing requests. ActiveResource an alternative Ruby rest client offers an integration with ApiAuth and it probably the only thing that it offers that ActiveRestClient does not.
Here is an excerpt from the changes I am making to the docs (gives an example of how to configure)
Also if we are able to have this merged I can definitely submit a pull request to Api-Auth to have ActiveRestClient added to their documentation as a support integration.