{"push_id":774118537,"size":1,"distinct_size":1,"ref":"refs/heads/update-rest-client","head":"fcf9d678178b347a9f3db0820a04ae25f857fa00","before":"55ff02aefa713dc9a88667e921d5074312b1e6b8","commits":[{"sha":"fcf9d678178b347a9f3db0820a04ae25f857fa00","author":{"email":"aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d@timjwade.com","name":"Tim Wade"},"message":"Update rest-client to 2.0.0.rc1\n\nHere's the list of breaking changes introduced by version 2 (quoted from\nthe repository's changelog) with any impact on this project explained:\n\n- Drop support for Ruby 1.9.2\n\nNot an issue\n\n- Respect Content-Type charset header provided by server. Previously,\n  rest-client would not override the string encoding chosen by Net::HTTP. Now\n  responses that specify a charset will yield a body string in that encoding.\n  For example, `Content-Type: text/plain; charset=EUC-JP` will return a String\n  encoded with `Encoding::EUC_JP`.\n\nI don't *believe* this is an issue\n\n- Change exceptions raised on request timeout. Instead of\n  RestClient::RequestTimeout (which is still used for HTTP 408), network\n  timeouts will now raise either RestClient::Exceptions::ReadTimeout or\n  RestClient::Exceptions::OpenTimeout, both of which inherit from\n  RestClient::Exceptions::Timeout. This class also makes the original\n  wrapped exception available as `#original_exception`.\n\nWe don't appear to be referencing RestClient::RequestTimeout anywhere\n\n- Rename `:timeout` to `:read_timeout`. When `:timeout` is passed, now\n  set both `:read_timeout` and `:open_timeout`.\n\n- Change default HTTP Accept header to `*/*`\n\n- Use a more descriptive User-Agent header by default\n\n- Drop RC4-MD5 from default cipher list\n\n- Only prepend http:// to URIs without a scheme\n\n- Fix some support for using IPv6 addresses in URLs (still affected by\n  Ruby 2.0+ bug https://bugs.ruby-lang.org/issues/9129, with the fix\n  expected to be backported to 2.0 and 2.1)\n\nThat's a revision @jrafanie introduced, and the one that we were\npreviously referencing in the gemfile so this should be good\n\n- `Response` objects are now a subclass of `String` rather than a\n  `String` that mixes in the response functionality. Most of the methods\n  remain unchanged, but this makes it much easier to understand what is\n  happening when you look at a RestClient response object. There are a\n  few additional changes:\n\n  - Response objects now implement `.inspect` to make this distinction\n    clearer.\n\n  - `Response#to_i` will now behave like `String#to_i` instead of\n    returning the HTTP response code, which was very surprising behavior.\n\n  - `Response#body` and `#to_s` will now return a true `String` object\n    rather than self. Previously there was no easy way to get the true\n    `String` response instead of the Frankenstein response string object\n    with AbstractResponse mixed in.\n\nSince ApipieBindings::API wraps these responses, this shouldn't be a concern.\n\n- Handle multiple HTTP response headers with the same name (except for\n  Set-Cookie, which is special) by joining the values with a comma space,\n  compliant with RFC 7230\n\n- Don't set basic auth header if explicit `Authorization` header is\n  specified\n\n- Add `:proxy` option to requests, which can be used for thread-safe\n  per-request proxy configuration, overriding `RestClient.proxy`\n\n- Allow overriding `ENV['http_proxy']` to disable proxies by setting\n  `RestClient.proxy` to a falsey value. Previously there was no way in\n  Ruby 2.x to turn off a proxy specified in the environment without\n  changing `ENV`.\n\n- Add actual support for streaming request payloads. Previously\n  rest-client would call `.to_s` even on RestClient::Payload::Streamed\n  objects. Instead, treat any object that responds to `.read` as a\n  streaming payload and pass it through to `.body_stream=` on the\n  Net:HTTP object. This massively reduces the memory required for large\n  file uploads.\n\n- Remove `RestClient::MaxRedirectsReached` in favor of the normal\n  `ExceptionWithResponse` subclasses. This makes the response accessible\n  on the exception object as `.response`, making it possible for callers\n  to tell what has actually happened when the redirect limit is reached.\n\n- When following HTTP redirection, store a list of each previous\n  response on the response object as `.history`. This makes it possible\n  to access the original response headers and body before the\n  redirection was followed.\n\n- Add `:before_execution_proc` option to `RestClient::Request`. This\n  makes it possible to add procs like\n  `RestClient.add_before_execution_proc` to a single request without\n  global state.\n\nAnything above that I have not commented on is either not applicable or\nthe concern of apipie-bindings which is the library that requires\nrest-client (we do a couple of things to handle rest-client's\nexceptions, but that's pretty much it). It's worth noting that\napipie-bindings added support for rest-client v 1.8 in\nhttps://github.com/Apipie/apipie-bindings/commit/da7ea84725f1a75f17e88cdf663131425b01a5fb\nbut as it stands nothing has been done with regard to changes introduced\nin 2.0.0.rc1. Having said that, I did run the tests for apipie-bindings\nlocally using rest-client 2.0.0.rc1 and everything passed.\n\nResolves https://github.com/ManageIQ/manageiq/issues/3969","distinct":true,"url":"https://api.github.com/repos/imtayadeway/manageiq/commits/fcf9d678178b347a9f3db0820a04ae25f857fa00"}]}