Repository navigation
Update dependency rest-client to v2 - #16
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
'~> 1'→'~> 2'Release Notes
rest-client/rest-client (rest-client)
v2.1.0Compare Source
This works around a bad memory leak introduced in MRI Ruby 2.4.0 and fixed in
Ruby 2.4.2. (#615)
usage than the older storage model of mime-types. (#393)
:logoption to individual requests. This allows users to set a log on aper-request / per-resource basis instead of the kludgy global log. (#538)
log_responsea method on the Response object, and ensure thesizemethodworks on RawResponse objects. (#126)
# => 200 OK | text/html 1270 bytes, 0.08s:stream_log_percentparameter, which is applicable onlywhen
:raw_response => trueis set. This causes progress logs to beemitted only on every N% (default 10%) of the total download size rather
than on every chunk.
supported Content-Encodings like gzip and deflate. Don't set any explicit
Accept-Encodingheader, rely instead on Net::HTTP defaults. (#597):raw_response => true. Previously the raw response would not have beenuncompressed by rest-client, but now Net::HTTP will uncompress it.
Authorization header was case-sensitive and incomplete. Fix this by
respecting existing Authorization headers, regardless of letter case. (#550)
ParamsArray passed as the payload. Instead, automatically use
Payload::Multipart if the ParamsArray contains a file handle, or use
Payload::UrlEncoded if it doesn't. (#508)
passed as a payload argument. Previously,
Payload.generatewould wrap aPayload object in Payload::Streamed, creating a pointlessly nested payload.
Also add a
closed?method to Payload objects, and don't error inshort_inspectifsizereturns nil. (#603)v2.0.2Compare Source
same. There's no conflict if the value is unchanged. (#578)
v2.0.1Compare Source
override headers set by the user. This is usually not what the user wants to
happen, and can be surprising. (#554)
defaults. Ruby versions from Oct. 2014 onward use sane defaults, so this is
no longer needed. (#573)
v2.0.0Compare Source
This release is largely API compatible, but makes several breaking changes.
rest-client would not override the string encoding chosen by Net::HTTP. Now
responses that specify a charset will yield a body string in that encoding.
For example,
Content-Type: text/plain; charset=EUC-JPwill return a Stringencoded with
Encoding::EUC_JP. (#361)RestClient::RequestTimeout(which is still used for HTTP 408), networktimeouts will now raise either
RestClient::Exceptions::ReadTimeoutorRestClient::Exceptions::OpenTimeout, both of which inherit fromRestClient::Exceptions::Timeout. For backwards compatibility, this stillinherits from
RestClient::RequestTimeoutso existing uses will still work.This may change in a future major release. These new timeout classes also
make the original wrapped exception available as
#original_exception.RestClient::RequestFailed, which stillinherits from
ExceptionWithResponse. Previously, HTTP 304, 401, and 404inherited directly from
ExceptionWithResponserather than fromRequestFailed. Now all HTTP status code exceptions inherit from both.:timeoutrequest option to:read_timeout. When:timeoutispassed, now set both
:read_timeoutand:open_timeout.*/*2.0+ bug https://bugs.ruby-lang.org/issues/9129, with the fix expected to be
backported to 2.0 and 2.1)
Responseobjects are now a subclass ofStringrather than aStringthatmixes in the response functionality. Most of the methods remain unchanged,
but this makes it much easier to understand what is happening when you look
at a RestClient response object. There are a few additional changes:
.inspectto make this distinction clearer.Response#to_iwill now behave likeString#to_iinstead of returning theHTTP response code, which was very surprising behavior.
Response#bodyand#to_swill now return a trueStringobject ratherthan self. Previously there was no easy way to get the true
Stringresponse instead of the Frankenstein response string object with
AbstractResponse mixed in.
access request args directly from the request object, which reduces
confusion and duplication.
Set-Cookie, which is special) by joining the values with a comma space,
compliant with RFC 7230
for requests, responses, and redirection in order to resolve long-standing
complaints about the previously broken behavior: (#498)
:cookiesoption may now be a Hash of Strings, an Array ofHTTP::Cookie objects, or a full HTTP::CookieJar.
RestClient::Request#cookie_jarand reimplementRequest#cookiestobe a wrapper around the cookie jar.
:cookiesoption in the headers hash, but nowraise ArgumentError if that option is also passed to
Request#initialize.:cookiesand aCookieheader are supplied.Request#cookie_jaras the basis forResponse#cookie_jar,creating a copy of the jar and adding any newly received cookies.
from the original request are carried through in a standards-compliant way
by the cookie jar.
Authorizationheader is specified:proxyoption to requests, which can be used for thread-safeper-request proxy configuration, overriding
RestClient.proxyENV['http_proxy']to disable proxies by settingRestClient.proxyto a falsey value. Previously there was no way in Ruby 2.xto turn off a proxy specified in the environment without changing
ENV.would call
.to_seven on RestClient::Payload::Streamed objects. Instead,treat any object that responds to
.readas a streaming payload and pass itthrough to
.body_stream=on the Net:HTTP object. This massively reduces thememory required for large file uploads.
RestClient::MaxRedirectsReachedin favor of the normalExceptionWithResponsesubclasses. This makes the response accessible onthe exception object as
.response, making it possible for callers to tellwhat has actually happened when the redirect limit is reached.
the response object as
.history. This makes it possible to access theoriginal response headers and body before the redirection was followed.
passed as a symbol or string. Under the hood rest-client now normalizes the
HTTP request method to a lowercase string.
:before_execution_procoption toRestClient::Request. This makes itpossible to add procs like
RestClient.add_before_execution_procto a singlerequest without global state.
Request#transmita private method, along with a few others.and hashes, unify handling of null/empty values, and use the same code for
GET and POST params. (#437)
can be used to pass multiple keys with same name or keys where the ordering
is significant.
RestClient::Payload::Base#inspectstop pretending to be a String.Request#redacted_uriandRequest#redacted_urlto display the URIwith any password redacted.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.