refactor: replace rest-client with net/http#154
Conversation
|
Nice PR but some things need to be updated like the spec test and i'm sure not all references to rest-client gem are removed, as i can see it's still in the gemspec file. |
|
I spent a while trying to understand what's wrong with the test (besides that |
ekohl
left a comment
There was a problem hiding this comment.
Nice. I like relying on fewer external dependencies.
|
For the spec tests it seems it might need some extra webmock config. |
|
Haha.. found why this test was failing: bblimke/webmock#959.. Here is the actual implementation (this method is called internally): https://github.com/ruby/net-http/blob/master/lib/net/http/generic_request.rb#L314 |
|
So I reimplemented the unit test with RSpec mocks. Looks good enough from my point of view. |
| self.password = password | ||
| self.token = token | ||
| self.api_key = api_key | ||
| RestClient.proxy = ENV.fetch('http_proxy', nil) |
There was a problem hiding this comment.
FYI, net/http respects http_proxy variables by default
|
Updated to reduce the diff even more. Will do all the improvements in another PR. |
Closes #153