-
Notifications
You must be signed in to change notification settings - Fork 1
Bump faraday-retry from 2.3.2 to 2.4.0 #847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dependabot
wants to merge
1
commit into
main
Choose a base branch
from
dependabot/bundler/faraday-retry-2.4.0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Contributor
Diff URLs |
Contributor
gem compare faraday 2.13.1 2.14.0Compared versions: ["2.13.1", "2.14.0"]
DIFFERENT metadata:
2.13.1: {"homepage_uri" => "https://lostisland.github.io/faraday", "changelog_uri" => "https://github.com/lostisland/faraday/releases/tag/v2.13.1", "source_code_uri" => "https://github.com/lostisland/faraday", "bug_tracker_uri" => "https://github.com/lostisland/faraday/issues", "rubygems_mfa_required" => "true"}
2.14.0: {"homepage_uri" => "https://lostisland.github.io/faraday", "changelog_uri" => "https://github.com/lostisland/faraday/releases/tag/v2.14.0", "source_code_uri" => "https://github.com/lostisland/faraday", "bug_tracker_uri" => "https://github.com/lostisland/faraday/issues", "rubygems_mfa_required" => "true"}
DIFFERENT rubygems_version:
2.13.1: 3.6.7
2.14.0: 3.6.9
DIFFERENT version:
2.13.1: 2.13.1
2.14.0: 2.14.0
DIFFERENT files:
2.13.1->2.14.0:
* Changed:
lib/faraday.rb +2/-1
lib/faraday/encoders/flat_params_encoder.rb +2/-2
lib/faraday/error.rb +42/-5
lib/faraday/logging/formatter.rb +1/-1
lib/faraday/rack_builder.rb +1/-5
lib/faraday/response.rb +7/-3
lib/faraday/response/raise_error.rb +1/-1
lib/faraday/version.rb +1/-1
spec/faraday/error_spec.rb +83/-1
spec/faraday/response/logger_spec.rb +6/-0
spec/faraday/response/raise_error_spec.rb +24/-13
spec/faraday/response_spec.rb +7/-0 |
Contributor
gem compare --diff faraday 2.13.1 2.14.0Compared versions: ["2.13.1", "2.14.0"]
DIFFERENT files:
2.13.1->2.14.0:
* Changed:
lib/faraday.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/lib/faraday.rb 2025-12-26 03:01:43.215580503 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/lib/faraday.rb 2025-12-26 03:01:43.224580562 +0000
@@ -3 +3,2 @@
-require 'cgi'
+require 'cgi/escape'
+require 'cgi/util' if RUBY_VERSION < '3.5'
lib/faraday/encoders/flat_params_encoder.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/lib/faraday/encoders/flat_params_encoder.rb 2025-12-26 03:01:43.216580510 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/lib/faraday/encoders/flat_params_encoder.rb 2025-12-26 03:01:43.225580568 +0000
@@ -79 +79 @@
- split_query = (query.split('&').map do |pair|
+ split_query = query.split('&').filter_map do |pair|
@@ -81 +81 @@
- end).compact
+ end
lib/faraday/error.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/lib/faraday/error.rb 2025-12-26 03:01:43.216580510 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/lib/faraday/error.rb 2025-12-26 03:01:43.226580574 +0000
@@ -82 +82,25 @@
- return [exc, exc.message, response] if exc.respond_to?(:backtrace)
+ case exc
+ when Exception
+ [exc, exc.message, response]
+ when Hash
+ [nil, build_error_message_from_hash(exc), exc]
+ when Faraday::Env
+ [nil, build_error_message_from_env(exc), exc]
+ else
+ [nil, exc.to_s, response]
+ end
+ end
+
+ private
+
+ def build_error_message_from_hash(hash)
+ # Be defensive with external Hash objects - they might be missing keys
+ status = hash.fetch(:status, nil)
+ request = hash.fetch(:request, nil)
+
+ return fallback_error_message(status) if request.nil?
+
+ method = request.fetch(:method, nil)
+ url = request.fetch(:url, nil)
+ build_status_error_message(status, method, url)
+ end
@@ -84,2 +108,10 @@
- return [nil, "the server responded with status #{exc[:status]}", exc] \
- if exc.respond_to?(:each_key)
+ def build_error_message_from_env(env)
+ # Faraday::Env is internal - we can make reasonable assumptions about its structure
+ build_status_error_message(env.status, env.method, env.url)
+ end
+
+ def build_status_error_message(status, method, url)
+ method_str = method ? method.to_s.upcase : ''
+ url_str = url ? url.to_s : ''
+ "the server responded with status #{status} for #{method_str} #{url_str}"
+ end
@@ -87 +119,3 @@
- [nil, exc.to_s, response]
+ def fallback_error_message(status)
+ "the server responded with status #{status} - method and url are not available " \
+ 'due to include_request: false on Faraday::Response::RaiseError middleware'
@@ -124 +158 @@
- class UnprocessableEntityError < ClientError
+ class UnprocessableContentError < ClientError
@@ -125,0 +160,3 @@
+
+ # Used to provide compatibility with legacy error name.
+ UnprocessableEntityError = UnprocessableContentError
lib/faraday/logging/formatter.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/lib/faraday/logging/formatter.rb 2025-12-26 03:01:43.216580510 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/lib/faraday/logging/formatter.rb 2025-12-26 03:01:43.226580574 +0000
@@ -66 +66 @@
- body.to_str
+ body.to_str.encode(Encoding::UTF_8, undef: :replace, invalid: :replace)
lib/faraday/rack_builder.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/lib/faraday/rack_builder.rb 2025-12-26 03:01:43.217580516 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/lib/faraday/rack_builder.rb 2025-12-26 03:01:43.227580581 +0000
@@ -224 +224 @@
- return unless is_adapter?(klass)
+ return unless klass <= Faraday::Adapter
@@ -235,4 +234,0 @@
- end
-
- def is_adapter?(klass) # rubocop:disable Naming/PredicateName
- klass <= Faraday::Adapter
lib/faraday/response.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/lib/faraday/response.rb 2025-12-26 03:01:43.219580529 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/lib/faraday/response.rb 2025-12-26 03:01:43.227580581 +0000
@@ -35,0 +36,4 @@
+ def url
+ finished? ? env.url : nil
+ end
+
@@ -63,3 +67,3 @@
- status: env.status, body: env.body,
- response_headers: env.response_headers,
- url: env.url
+ status: status, body: body,
+ response_headers: headers,
+ url: url
lib/faraday/response/raise_error.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/lib/faraday/response/raise_error.rb 2025-12-26 03:01:43.219580529 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/lib/faraday/response/raise_error.rb 2025-12-26 03:01:43.228580587 +0000
@@ -18 +18 @@
- 422 => Faraday::UnprocessableEntityError,
+ 422 => Faraday::UnprocessableContentError,
lib/faraday/version.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/lib/faraday/version.rb 2025-12-26 03:01:43.219580529 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/lib/faraday/version.rb 2025-12-26 03:01:43.228580587 +0000
@@ -4 +4 @@
- VERSION = '2.13.1'
+ VERSION = '2.14.0'
spec/faraday/error_spec.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/spec/faraday/error_spec.rb 2025-12-26 03:01:43.220580536 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/spec/faraday/error_spec.rb 2025-12-26 03:01:43.229580594 +0000
@@ -26 +26 @@
- it { expect(subject.message).to eq('the server responded with status 400') }
+ it { expect(subject.message).to eq('the server responded with status 400 - method and url are not available due to include_request: false on Faraday::Response::RaiseError middleware') }
@@ -90,0 +91,82 @@
+ end
+
+ context 'with hash missing status key' do
+ let(:exception) { { body: 'error body' } }
+
+ it { expect(subject.wrapped_exception).to be_nil }
+ it { expect(subject.response).to eq(exception) }
+ it { expect(subject.message).to eq('the server responded with status - method and url are not available due to include_request: false on Faraday::Response::RaiseError middleware') }
+ end
+
+ context 'with hash with status but missing request data' do
+ let(:exception) { { status: 404, body: 'not found' } } # missing request key
+
+ it { expect(subject.wrapped_exception).to be_nil }
+ it { expect(subject.response).to eq(exception) }
+ it { expect(subject.message).to eq('the server responded with status 404 - method and url are not available due to include_request: false on Faraday::Response::RaiseError middleware') }
+ end
+
+ context 'with hash with status and request but missing method in request' do
+ let(:exception) { { status: 404, body: 'not found', request: { url: 'http://example.com/test' } } } # missing method
+
+ it { expect(subject.wrapped_exception).to be_nil }
+ it { expect(subject.response).to eq(exception) }
+ it { expect(subject.message).to eq('the server responded with status 404 for http://example.com/test') }
+ end
+
+ context 'with hash with status and request but missing url in request' do
+ let(:exception) { { status: 404, body: 'not found', request: { method: :get } } } # missing url
+
+ it { expect(subject.wrapped_exception).to be_nil }
+ it { expect(subject.response).to eq(exception) }
+ it { expect(subject.message).to eq('the server responded with status 404 for GET ') }
+ end
+
+ context 'with properly formed Faraday::Env' do
+ # This represents the normal case - a well-formed Faraday::Env object
+ # with all the standard properties populated as they would be during
+ # a typical HTTP request/response cycle
+ let(:exception) { Faraday::Env.new }
+
+ before do
+ exception.status = 500
+ exception.method = :post
+ exception.url = URI('https://api.example.com/users')
+ exception.request = Faraday::RequestOptions.new
+ exception.response_headers = { 'content-type' => 'application/json' }
+ exception.response_body = '{"error": "Internal server error"}'
+ exception.request_headers = { 'authorization' => 'Bearer token123' }
+ exception.request_body = '{"name": "John"}'
+ end
+
+ it { expect(subject.wrapped_exception).to be_nil }
+ it { expect(subject.response).to eq(exception) }
+ it { expect(subject.message).to eq('the server responded with status 500 for POST https://api.example.com/users') }
+ end
+
+ context 'with Faraday::Env missing status key' do
+ let(:exception) { Faraday::Env.new }
+
+ before do
+ exception[:body] = 'error body'
+ # Intentionally not setting status
+ end
+
+ it { expect(subject.wrapped_exception).to be_nil }
+ it { expect(subject.response).to eq(exception) }
+ it { expect(subject.message).to eq('the server responded with status for ') }
+ end
+
+ context 'with Faraday::Env with direct method and url properties' do
+ let(:exception) { Faraday::Env.new }
+
+ before do
+ exception.status = 404
+ exception.method = :get
+ exception.url = URI('http://example.com/test')
+ exception[:body] = 'not found'
+ end
+
+ it { expect(subject.wrapped_exception).to be_nil }
+ it { expect(subject.response).to eq(exception) }
+ it { expect(subject.message).to eq('the server responded with status 404 for GET http://example.com/test') }
spec/faraday/response/logger_spec.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/spec/faraday/response/logger_spec.rb 2025-12-26 03:01:43.222580549 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/spec/faraday/response/logger_spec.rb 2025-12-26 03:01:43.231580607 +0000
@@ -23,0 +24 @@
+ stubs.get('/8bit') { [200, { 'Content-Type' => 'text/html' }, (+'café!').force_encoding(Encoding::ASCII_8BIT)] }
@@ -238,0 +240,5 @@
+ end
+
+ it 'converts to UTF-8' do
+ conn.get '/8bit'
+ expect(string_io.string).to match(%(caf��!))
spec/faraday/response/raise_error_spec.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/spec/faraday/response/raise_error_spec.rb 2025-12-26 03:01:43.222580549 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/spec/faraday/response/raise_error_spec.rb 2025-12-26 03:01:43.231580607 +0000
@@ -16 +16 @@
- stub.get('unprocessable-entity') { [422, { 'X-Reason' => 'because' }, 'keep looking'] }
+ stub.get('unprocessable-content') { [422, { 'X-Reason' => 'because' }, 'keep looking'] }
@@ -31 +31 @@
- expect(ex.message).to eq('the server responded with status 400')
+ expect(ex.message).to eq('the server responded with status 400 for GET http:/bad-request')
@@ -42 +42 @@
- expect(ex.message).to eq('the server responded with status 401')
+ expect(ex.message).to eq('the server responded with status 401 for GET http:/unauthorized')
@@ -53 +53 @@
- expect(ex.message).to eq('the server responded with status 403')
+ expect(ex.message).to eq('the server responded with status 403 for GET http:/forbidden')
@@ -64 +64 @@
- expect(ex.message).to eq('the server responded with status 404')
+ expect(ex.message).to eq('the server responded with status 404 for GET http:/not-found')
@@ -86 +86 @@
- expect(ex.message).to eq('the server responded with status 408')
+ expect(ex.message).to eq('the server responded with status 408 for GET http:/request-timeout')
@@ -97 +97 @@
- expect(ex.message).to eq('the server responded with status 409')
+ expect(ex.message).to eq('the server responded with status 409 for GET http:/conflict')
@@ -106,3 +106,14 @@
- it 'raises Faraday::UnprocessableEntityError for 422 responses' do
- expect { conn.get('unprocessable-entity') }.to raise_error(Faraday::UnprocessableEntityError) do |ex|
- expect(ex.message).to eq('the server responded with status 422')
+ it 'raises legacy Faraday::UnprocessableEntityError for 422 responses' do
+ expect { conn.get('unprocessable-content') }.to raise_error(Faraday::UnprocessableEntityError) do |ex|
+ expect(ex.message).to eq('the server responded with status 422 for GET http:/unprocessable-content')
+ expect(ex.response[:headers]['X-Reason']).to eq('because')
+ expect(ex.response[:status]).to eq(422)
+ expect(ex.response_status).to eq(422)
+ expect(ex.response_body).to eq('keep looking')
+ expect(ex.response_headers['X-Reason']).to eq('because')
+ end
+ end
+
+ it 'raises Faraday::UnprocessableContentError for 422 responses' do
+ expect { conn.get('unprocessable-content') }.to raise_error(Faraday::UnprocessableContentError) do |ex|
+ expect(ex.message).to eq('the server responded with status 422 for GET http:/unprocessable-content')
@@ -119 +130 @@
- expect(ex.message).to eq('the server responded with status 429')
+ expect(ex.message).to eq('the server responded with status 429 for GET http:/too-many-requests')
@@ -141 +152 @@
- expect(ex.message).to eq('the server responded with status 499')
+ expect(ex.message).to eq('the server responded with status 499 for GET http:/4xx')
@@ -152 +163 @@
- expect(ex.message).to eq('the server responded with status 500')
+ expect(ex.message).to eq('the server responded with status 500 for GET http:/server-error')
spec/faraday/response_spec.rb
--- /tmp/d20251226-933-y2xb2v/faraday-2.13.1/spec/faraday/response_spec.rb 2025-12-26 03:01:43.222580549 +0000
+++ /tmp/d20251226-933-y2xb2v/faraday-2.14.0/spec/faraday/response_spec.rb 2025-12-26 03:01:43.231580607 +0000
@@ -15,0 +16 @@
+ it { expect(subject.url).to eq(URI('https://lostisland.github.io/faraday')) }
@@ -33,0 +35,6 @@
+
+ context 'when response is not finished' do
+ subject { Faraday::Response.new.to_hash }
+
+ it { is_expected.to eq({ status: nil, body: nil, response_headers: {}, url: nil }) }
+ end |
Contributor
gem compare faraday-net_http 3.4.1 3.4.2Compared versions: ["3.4.1", "3.4.2"]
DIFFERENT metadata:
3.4.1: {"homepage_uri" => "https://github.com/lostisland/faraday-net_http", "source_code_uri" => "https://github.com/lostisland/faraday-net_http", "changelog_uri" => "https://github.com/lostisland/faraday-net_http/releases/tag/v3.4.1", "rubygems_mfa_required" => "true"}
3.4.2: {"homepage_uri" => "https://github.com/lostisland/faraday-net_http", "source_code_uri" => "https://github.com/lostisland/faraday-net_http", "changelog_uri" => "https://github.com/lostisland/faraday-net_http/releases/tag/v3.4.2", "rubygems_mfa_required" => "true"}
DIFFERENT version:
3.4.1: 3.4.1
3.4.2: 3.4.2
DIFFERENT files:
3.4.1->3.4.2:
* Changed:
lib/faraday/net_http/version.rb +1/-1
DIFFERENT runtime dependencies:
3.4.1->3.4.2:
* Updated:
net-http from: [">= 0.5.0"] to: ["~> 0.5"] |
Contributor
gem compare --diff faraday-net_http 3.4.1 3.4.2Compared versions: ["3.4.1", "3.4.2"]
DIFFERENT files:
3.4.1->3.4.2:
* Changed:
lib/faraday/net_http/version.rb
--- /tmp/d20251226-1300-kebesf/faraday-net_http-3.4.1/lib/faraday/net_http/version.rb 2025-12-26 03:02:06.941691764 +0000
+++ /tmp/d20251226-1300-kebesf/faraday-net_http-3.4.2/lib/faraday/net_http/version.rb 2025-12-26 03:02:06.942691769 +0000
@@ -5 +5 @@
- VERSION = '3.4.1'
+ VERSION = '3.4.2' |
Contributor
gem compare faraday-retry 2.3.2 2.4.0Compared versions: ["2.3.2", "2.4.0"]
DIFFERENT metadata:
2.3.2: {"bug_tracker_uri" => "https://github.com/lostisland/faraday-retry/issues", "changelog_uri" => "https://github.com/lostisland/faraday-retry/blob/v2.3.2/CHANGELOG.md", "documentation_uri" => "http://www.rubydoc.info/gems/faraday-retry/2.3.2", "homepage_uri" => "https://github.com/lostisland/faraday-retry", "source_code_uri" => "https://github.com/lostisland/faraday-retry"}
2.4.0: {"bug_tracker_uri" => "https://github.com/lostisland/faraday-retry/issues", "changelog_uri" => "https://github.com/lostisland/faraday-retry/blob/v2.4.0/CHANGELOG.md", "documentation_uri" => "http://www.rubydoc.info/gems/faraday-retry/2.4.0", "homepage_uri" => "https://github.com/lostisland/faraday-retry", "source_code_uri" => "https://github.com/lostisland/faraday-retry"}
DIFFERENT required_ruby_version:
2.3.2: >= 2.6, < 4
2.4.0: >= 2.6
DIFFERENT version:
2.3.2: 2.3.2
2.4.0: 2.4.0
DIFFERENT files:
2.3.2->2.4.0:
* Changed:
lib/faraday/retry/version.rb +1/-1
DIFFERENT development dependencies:
2.3.2->2.4.0:
* Deleted:
bundler ["~> 2.0"] (development) |
Contributor
gem compare --diff faraday-retry 2.3.2 2.4.0Compared versions: ["2.3.2", "2.4.0"]
DIFFERENT files:
2.3.2->2.4.0:
* Changed:
lib/faraday/retry/version.rb
--- /tmp/d20251226-1398-mzhzeo/faraday-retry-2.3.2/lib/faraday/retry/version.rb 2025-12-26 03:02:29.976794274 +0000
+++ /tmp/d20251226-1398-mzhzeo/faraday-retry-2.4.0/lib/faraday/retry/version.rb 2025-12-26 03:02:29.978794282 +0000
@@ -5 +5 @@
- VERSION = '2.3.2'
+ VERSION = '2.4.0' |
Contributor
gem compare json 2.13.2 2.18.0Compared versions: ["2.13.2", "2.18.0"]
DIFFERENT date:
2.13.2: 2025-07-28 00:00:00 UTC
2.18.0: 1980-01-02 00:00:00 UTC
DIFFERENT require_paths:
2.13.2: ["/opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/extensions/x86_64-linux/4.0.0/json-2.13.2", "lib"]
2.18.0: ["/opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/extensions/x86_64-linux/4.0.0/json-2.18.0", "lib"]
DIFFERENT rubygems_version:
2.13.2: 3.6.2
2.18.0: 3.6.9
DIFFERENT version:
2.13.2: 2.13.2
2.18.0: 2.18.0
DIFFERENT files:
2.13.2->2.18.0:
* Added:
ext/json/ext/json.h +97/-0
ext/json/ext/vendor/ryu.h +819/-0
lib/json/add/string.rb +35/-0
* Changed:
CHANGES.md +76/-8
LEGAL +12/-0
README.md +19/-1
ext/json/ext/fbuffer/fbuffer.h +31/-54
ext/json/ext/generator/extconf.rb +1/-1
ext/json/ext/generator/generator.c +279/-239
ext/json/ext/parser/extconf.rb +2/-1
ext/json/ext/parser/parser.c +528/-401
ext/json/ext/simd/simd.h +15/-12
ext/json/ext/vendor/fpconv.c +12/-11
lib/json.rb +23/-1
lib/json/add/core.rb +1/-0
lib/json/common.rb +60/-23
lib/json/ext/generator/state.rb +11/-14
lib/json/generic_object.rb +0/-8
lib/json/truffle_ruby/generator.rb +113/-63
lib/json/version.rb +1/-1
DIFFERENT extra_rdoc_files:
2.13.2->2.18.0:
* Changed:
README.md +19/-1 |
Contributor
|
Contributor
gem compare net-http 0.6.0 0.9.1Compared versions: ["0.6.0", "0.9.1"]
DIFFERENT date:
0.6.0: 2024-12-02 00:00:00 UTC
0.9.1: 1980-01-02 00:00:00 UTC
DIFFERENT metadata:
0.6.0: {"homepage_uri" => "https://github.com/ruby/net-http", "source_code_uri" => "https://github.com/ruby/net-http"}
0.9.1: {"changelog_uri" => "https://github.com/ruby/net-http/releases", "homepage_uri" => "https://github.com/ruby/net-http", "source_code_uri" => "https://github.com/ruby/net-http"}
DIFFERENT required_ruby_version:
0.6.0: >= 2.6.0
0.9.1: >= 2.7.0
DIFFERENT rubygems_version:
0.6.0: 3.5.11
0.9.1: 3.6.9
DIFFERENT version:
0.6.0: 0.6.0
0.9.1: 0.9.1
DIFFERENT files:
0.6.0->0.9.1:
* Deleted:
Gemfile
Rakefile
bin/console
bin/setup
net-http.gemspec
* Added:
.document +5/-0
* Changed:
lib/net/http.rb +73/-45
lib/net/http/exceptions.rb +2/-1
lib/net/http/generic_request.rb +30/-15
lib/net/http/header.rb +8/-4
lib/net/http/requests.rb +15/-1
lib/net/http/response.rb +2/-1
lib/net/http/responses.rb +70/-2
DIFFERENT runtime dependencies:
0.6.0->0.9.1:
* Updated:
uri from: [">= 0"] to: [">= 0.11.1"]
DIFFERENT Gemfile dependencies
0.6.0->0.9.1:
* Deleted
rake [">= 0"] (runtime)
test-unit [">= 0"] (runtime)
test-unit-ruby-core [">= 0"] (runtime)
webrick [">= 0"] (runtime) |
Contributor
gem compare --diff net-http 0.6.0 0.9.1Compared versions: ["0.6.0", "0.9.1"]
DIFFERENT files:
0.6.0->0.9.1:
* Deleted:
Gemfile
Rakefile
bin/console
bin/setup
net-http.gemspec
* Added:
.document
--- /tmp/20251226-1928-mndmqk 2025-12-26 03:03:38.030096178 +0000
+++ /tmp/d20251226-1928-dnfeev/net-http-0.9.1/.document 2025-12-26 03:03:38.026096159 +0000
@@ -0,0 +1,5 @@
+BSDL
+COPYING
+README.md
+doc/
+lib/
* Changed:
lib/net/http.rb
--- /tmp/d20251226-1928-dnfeev/net-http-0.6.0/lib/net/http.rb 2025-12-26 03:03:38.025096154 +0000
+++ /tmp/d20251226-1928-dnfeev/net-http-0.9.1/lib/net/http.rb 2025-12-26 03:03:38.028096168 +0000
@@ -478,2 +478 @@
- # - {#started?}[rdoc-ref:Net::HTTP#started?]
- # (aliased as {#active?}[rdoc-ref:Net::HTTP#active?]):
+ # - {#started?}[rdoc-ref:Net::HTTP#started?]:
@@ -559,2 +558 @@
- # - {#request_get}[rdoc-ref:Net::HTTP#request_get]
- # (aliased as {#get2}[rdoc-ref:Net::HTTP#get2]):
+ # - {#request_get}[rdoc-ref:Net::HTTP#request_get]:
@@ -564,2 +562 @@
- # - {#request_head}[rdoc-ref:Net::HTTP#request_head]
- # (aliased as {#head2}[rdoc-ref:Net::HTTP#head2]):
+ # - {#request_head}[rdoc-ref:Net::HTTP#request_head]:
@@ -569,2 +566 @@
- # - {#request_post}[rdoc-ref:Net::HTTP#request_post]
- # (aliased as {#post2}[rdoc-ref:Net::HTTP#post2]):
+ # - {#request_post}[rdoc-ref:Net::HTTP#request_post]:
@@ -608,2 +604 @@
- # - {#proxy_address}[rdoc-ref:Net::HTTP#proxy_address]
- # (aliased as {#proxyaddr}[rdoc-ref:Net::HTTP#proxyaddr]):
+ # - {#proxy_address}[rdoc-ref:Net::HTTP#proxy_address]:
@@ -721,2 +716 @@
- # (aliased as {::is_version_1_2?}[rdoc-ref:Net::HTTP.is_version_1_2?]
- # and {::version_1_2}[rdoc-ref:Net::HTTP.version_1_2]):
+ # (aliased as {::version_1_2}[rdoc-ref:Net::HTTP.version_1_2]):
@@ -733 +727 @@
- VERSION = "0.6.0"
+ VERSION = "0.9.1"
@@ -1187,0 +1182 @@
+ @tcpsocket_supports_open_timeout = nil
@@ -1329,0 +1325,3 @@
+
+ # Sets whether the proxy uses SSL;
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
@@ -1536 +1534 @@
- ] # :nodoc:
+ ].freeze # :nodoc:
@@ -1538 +1536 @@
- SSL_IVNAMES = SSL_ATTRIBUTES.map { |a| "@#{a}".to_sym } # :nodoc:
+ SSL_IVNAMES = SSL_ATTRIBUTES.map { |a| "@#{a}".to_sym }.freeze # :nodoc:
@@ -1555 +1553 @@
- # See {OpenSSL::SSL::SSLContext#ciphers=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-ciphers-3D].
+ # See {OpenSSL::SSL::SSLContext#ciphers=}[OpenSSL::SSL::SSL::Context#ciphers=].
@@ -1559 +1557 @@
- # See {OpenSSL::SSL::SSLContext#add_certificate}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-add_certificate].
+ # See {OpenSSL::SSL::SSLContext#add_certificate}[OpenSSL::SSL::SSL::Context#add_certificate].
@@ -1569 +1567 @@
- # See {OpenSSL::SSL::SSLContext#ssl_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-ssl_version-3D].
+ # See {OpenSSL::SSL::SSLContext#ssl_version=}[OpenSSL::SSL::SSL::Context#ssl_version=].
@@ -1573 +1571 @@
- # See {OpenSSL::SSL::SSLContext#min_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D].
+ # See {OpenSSL::SSL::SSLContext#min_version=}[OpenSSL::SSL::SSL::Context#min_version=].
@@ -1577 +1575 @@
- # See {OpenSSL::SSL::SSLContext#max_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-max_version-3D].
+ # See {OpenSSL::SSL::SSLContext#max_version=}[OpenSSL::SSL::SSL::Context#max_version=].
@@ -1593 +1591 @@
- # See {OpenSSL::SSL::SSLContext#verify_hostname=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-verify_mode].
+ # See {OpenSSL::SSL::SSLContext#verify_hostname=}[OpenSSL::SSL::SSL::Context#verify_hostname=].
@@ -1640,0 +1639,15 @@
+ # Finishes the \HTTP session:
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.start
+ # http.started? # => true
+ # http.finish # => nil
+ # http.started? # => false
+ #
+ # Raises IOError if not in a session.
+ def finish
+ raise IOError, 'HTTP session not yet started' unless started?
+ do_finish
+ end
+
+ # :stopdoc:
@@ -1663,6 +1676,5 @@
- s = Timeout.timeout(@open_timeout, Net::OpenTimeout) {
- begin
- TCPSocket.open(conn_addr, conn_port, @local_host, @local_port)
- rescue => e
- raise e, "Failed to open TCP connection to " +
- "#{conn_addr}:#{conn_port} (#{e.message})"
+ begin
+ s = timeouted_connect(conn_addr, conn_port)
+ rescue => e
+ if (defined?(IO::TimeoutError) && e.is_a?(IO::TimeoutError)) || e.is_a?(Errno::ETIMEDOUT) # for compatibility with previous versions
+ e = Net::OpenTimeout.new(e)
@@ -1670 +1682,3 @@
- }
+ raise e, "Failed to open TCP connection to " +
+ "#{conn_addr}:#{conn_port} (#{e.message})"
+ end
@@ -1763 +1777,18 @@
- def on_connect
+ tcp_socket_parameters = TCPSocket.instance_method(:initialize).parameters
+ TCP_SOCKET_NEW_HAS_OPEN_TIMEOUT = if tcp_socket_parameters != [[:rest]]
+ tcp_socket_parameters.include?([:key, :open_timeout])
+ else
+ # Use Socket.tcp to find out since there is no parameters information for TCPSocket#initialize
+ # See discussion in https://github.com/ruby/net-http/pull/224
+ Socket.method(:tcp).parameters.include?([:key, :open_timeout])
+ end
+ private_constant :TCP_SOCKET_NEW_HAS_OPEN_TIMEOUT
+
+ def timeouted_connect(conn_addr, conn_port)
+ if TCP_SOCKET_NEW_HAS_OPEN_TIMEOUT
+ TCPSocket.open(conn_addr, conn_port, @local_host, @local_port, open_timeout: @open_timeout)
+ else
+ Timeout.timeout(@open_timeout, Net::OpenTimeout) {
+ TCPSocket.open(conn_addr, conn_port, @local_host, @local_port)
+ }
+ end
@@ -1765 +1796 @@
- private :on_connect
+ private :timeouted_connect
@@ -1767,12 +1798 @@
- # Finishes the \HTTP session:
- #
- # http = Net::HTTP.new(hostname)
- # http.start
- # http.started? # => true
- # http.finish # => nil
- # http.started? # => false
- #
- # Raises IOError if not in a session.
- def finish
- raise IOError, 'HTTP session not yet started' unless started?
- do_finish
+ def on_connect
@@ -1779,0 +1800 @@
+ private :on_connect
@@ -1829,0 +1851,2 @@
+ # :startdoc:
+
@@ -1923,0 +1947 @@
+ # :stopdoc:
@@ -1926 +1950,2 @@
- require 'cgi/util'
+ require 'cgi/escape'
+ require 'cgi/util' unless defined?(CGI::EscapeExt)
@@ -1950,0 +1976 @@
+ # :startdoc:
@@ -2405 +2431,3 @@
- IDEMPOTENT_METHODS_ = %w/GET HEAD PUT DELETE OPTIONS TRACE/ # :nodoc:
+ # :stopdoc:
+
+ IDEMPOTENT_METHODS_ = %w/GET HEAD PUT DELETE OPTIONS TRACE/.freeze # :nodoc:
@@ -2562 +2590 @@
- # for backward compatibility until Ruby 3.5
+ # for backward compatibility until Ruby 4.0
lib/net/http/exceptions.rb
--- /tmp/d20251226-1928-dnfeev/net-http-0.6.0/lib/net/http/exceptions.rb 2025-12-26 03:03:38.025096154 +0000
+++ /tmp/d20251226-1928-dnfeev/net-http-0.9.1/lib/net/http/exceptions.rb 2025-12-26 03:03:38.028096168 +0000
@@ -6 +6 @@
- module HTTPExceptions
+ module HTTPExceptions # :nodoc:
@@ -14,0 +15 @@
+ # :stopdoc:
lib/net/http/generic_request.rb
--- /tmp/d20251226-1928-dnfeev/net-http-0.6.0/lib/net/http/generic_request.rb 2025-12-26 03:03:38.025096154 +0000
+++ /tmp/d20251226-1928-dnfeev/net-http-0.9.1/lib/net/http/generic_request.rb 2025-12-26 03:03:38.029096173 +0000
@@ -22 +22 @@
- hostname = uri_or_path.hostname
+ hostname = uri_or_path.host
@@ -25,2 +24,0 @@
- host = @uri.hostname.dup
- host << ":" << @uri.port.to_s if @uri.port != @uri.default_port
@@ -31 +28,0 @@
- host = nil
@@ -54 +51 @@
- self['Host'] ||= host if host
+ self['Host'] ||= @uri.authority if @uri
@@ -104,0 +102,25 @@
+ # Returns a string representation of the request with the details for pp:
+ #
+ # require 'pp'
+ # post = Net::HTTP::Post.new(uri)
+ # post.inspect # => "#<Net::HTTP::Post POST>"
+ # post.pretty_inspect
+ # # => #<Net::HTTP::Post
+ # POST
+ # path="/"
+ # headers={"accept-encoding" => ["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],
+ # "accept" => ["*/*"],
+ # "user-agent" => ["Ruby"],
+ # "host" => ["www.ruby-lang.org"]}>
+ #
+ def pretty_print(q)
+ q.object_group(self) {
+ q.breakable
+ q.text @method
+ q.breakable
+ q.text "path="; q.pp @path
+ q.breakable
+ q.text "headers="; q.pp to_hash
+ }
+ end
+
@@ -223 +245 @@
- host.sub!(/:.*/m, '')
+ host = URI.parse("//#{host}").host # Remove a port component from the existing Host header
@@ -241,0 +264,2 @@
+ # :stopdoc:
+
@@ -263 +286,0 @@
- supply_default_content_type
@@ -274 +296,0 @@
- supply_default_content_type
@@ -376,6 +397,0 @@
- def supply_default_content_type
- return if content_type()
- warn 'net/http: Content-Type did not set; using application/x-www-form-urlencoded', uplevel: 1 if $VERBOSE
- set_content_type 'application/x-www-form-urlencoded'
- end
-
@@ -414 +429,0 @@
-
lib/net/http/header.rb
--- /tmp/d20251226-1928-dnfeev/net-http-0.6.0/lib/net/http/header.rb 2025-12-26 03:03:38.025096154 +0000
+++ /tmp/d20251226-1928-dnfeev/net-http-0.9.1/lib/net/http/header.rb 2025-12-26 03:03:38.029096173 +0000
@@ -181,0 +182 @@
+ # The maximum length of HTTP header keys.
@@ -182,0 +184 @@
+ # The maximum length of HTTP header values.
@@ -269,0 +272 @@
+ # :stopdoc:
@@ -296,0 +300 @@
+ # :startdoc:
@@ -493 +497 @@
- def capitalize(name)
+ def capitalize(name) # :nodoc:
@@ -960 +964 @@
- def basic_encode(account, password)
+ def basic_encode(account, password) # :nodoc:
@@ -965 +969 @@
-# Returns whether the HTTP session is to be closed.
+ # Returns whether the HTTP session is to be closed.
@@ -973 +977 @@
-# Returns whether the HTTP session is to be kept alive.
+ # Returns whether the HTTP session is to be kept alive.
lib/net/http/requests.rb
--- /tmp/d20251226-1928-dnfeev/net-http-0.6.0/lib/net/http/requests.rb 2025-12-26 03:03:38.025096154 +0000
+++ /tmp/d20251226-1928-dnfeev/net-http-0.9.1/lib/net/http/requests.rb 2025-12-26 03:03:38.029096173 +0000
@@ -31,0 +32 @@
+ # :stopdoc:
@@ -62,0 +64 @@
+ # :stopdoc:
@@ -97,0 +100 @@
+ # :stopdoc:
@@ -132,0 +136 @@
+ # :stopdoc:
@@ -164,0 +169 @@
+ # :stopdoc:
@@ -195,0 +201 @@
+ # :stopdoc:
@@ -226,0 +233 @@
+ # :stopdoc:
@@ -260,0 +268 @@
+ # :stopdoc:
@@ -287,0 +296 @@
+ # :stopdoc:
@@ -310,0 +320 @@
+ # :stopdoc:
@@ -333,0 +344 @@
+ # :stopdoc:
@@ -356,0 +368 @@
+ # :stopdoc:
@@ -379,0 +392 @@
+ # :stopdoc:
@@ -402,0 +416 @@
+ # :stopdoc:
@@ -425,0 +440 @@
+ # :stopdoc:
@@ -430 +444,0 @@
-
lib/net/http/response.rb
--- /tmp/d20251226-1928-dnfeev/net-http-0.6.0/lib/net/http/response.rb 2025-12-26 03:03:38.026096159 +0000
+++ /tmp/d20251226-1928-dnfeev/net-http-0.9.1/lib/net/http/response.rb 2025-12-26 03:03:38.029096173 +0000
@@ -155,0 +156 @@
+ # :stopdoc:
@@ -262 +263 @@
- def inspect
+ def inspect # :nodoc:
lib/net/http/responses.rb
--- /tmp/d20251226-1928-dnfeev/net-http-0.6.0/lib/net/http/responses.rb 2025-12-26 03:03:38.026096159 +0000
+++ /tmp/d20251226-1928-dnfeev/net-http-0.9.1/lib/net/http/responses.rb 2025-12-26 03:03:38.030096178 +0000
@@ -6,0 +7 @@
+ # Unknown HTTP response
@@ -7,0 +9 @@
+ # :stopdoc:
@@ -21,0 +24 @@
+ # :stopdoc:
@@ -36,0 +40 @@
+ # :stopdoc:
@@ -51,0 +56 @@
+ # :stopdoc:
@@ -65,0 +71 @@
+ # :stopdoc:
@@ -79,0 +86 @@
+ # :stopdoc:
@@ -96,0 +104 @@
+ # :stopdoc:
@@ -113,0 +122 @@
+ # :stopdoc:
@@ -129,0 +139 @@
+ # :stopdoc:
@@ -147,0 +158 @@
+ # :stopdoc:
@@ -164,0 +176 @@
+ # :stopdoc:
@@ -181,0 +194 @@
+ # :stopdoc:
@@ -198,0 +212 @@
+ # :stopdoc:
@@ -217,0 +232 @@
+ # :stopdoc:
@@ -234,0 +250 @@
+ # :stopdoc:
@@ -252,0 +269 @@
+ # :stopdoc:
@@ -270,0 +288 @@
+ # :stopdoc:
@@ -287,0 +306 @@
+ # :stopdoc:
@@ -306,0 +326 @@
+ # :stopdoc:
@@ -323,0 +344 @@
+ # :stopdoc:
@@ -340,0 +362 @@
+ # :stopdoc:
@@ -358,0 +381 @@
+ # :stopdoc:
@@ -375,0 +399 @@
+ # :stopdoc:
@@ -392,0 +417 @@
+ # :stopdoc:
@@ -409,0 +435 @@
+ # :stopdoc:
@@ -425,0 +452 @@
+ # :stopdoc:
@@ -442,0 +470 @@
+ # :stopdoc:
@@ -458,0 +487 @@
+ # :stopdoc:
@@ -474,0 +504 @@
+ # :stopdoc:
@@ -490,0 +521 @@
+ # :stopdoc:
@@ -506,0 +538 @@
+ # :stopdoc:
@@ -523,0 +556 @@
+ # :stopdoc:
@@ -539,0 +573 @@
+ # :stopdoc:
@@ -555,0 +590 @@
+ # :stopdoc:
@@ -572,0 +608 @@
+ # :stopdoc:
@@ -588,0 +625 @@
+ # :stopdoc:
@@ -604,0 +642 @@
+ # :stopdoc:
@@ -621,0 +660 @@
+ # :stopdoc:
@@ -638,0 +678 @@
+ # :stopdoc:
@@ -655,0 +696 @@
+ # :stopdoc:
@@ -672,0 +714 @@
+ # :stopdoc:
@@ -688,0 +731 @@
+ # :stopdoc:
@@ -705,0 +749 @@
+ # :stopdoc:
@@ -723,0 +768 @@
+ # :stopdoc:
@@ -739,0 +785 @@
+ # :stopdoc:
@@ -756,0 +803 @@
+ # :stopdoc:
@@ -776,0 +824 @@
+ # :stopdoc:
@@ -792,0 +841 @@
+ # :stopdoc:
@@ -807,0 +857 @@
+ # :stopdoc:
@@ -823,0 +874 @@
+ # :stopdoc:
@@ -842,0 +894 @@
+ # :stopdoc:
@@ -858,0 +911 @@
+ # :stopdoc:
@@ -874,0 +928 @@
+ # :stopdoc:
@@ -891,0 +946 @@
+ # :stopdoc:
@@ -908,0 +964 @@
+ # :stopdoc:
@@ -928,0 +985 @@
+ # :stopdoc:
@@ -945,0 +1003 @@
+ # :stopdoc:
@@ -962,0 +1021 @@
+ # :stopdoc:
@@ -979,0 +1039 @@
+ # :stopdoc:
@@ -996,0 +1057 @@
+ # :stopdoc:
@@ -1013,0 +1075 @@
+ # :stopdoc:
@@ -1029,0 +1092 @@
+ # :stopdoc:
@@ -1045,0 +1109 @@
+ # :stopdoc:
@@ -1061,0 +1126 @@
+ # :stopdoc:
@@ -1078,0 +1144 @@
+ # :stopdoc:
@@ -1094,0 +1161 @@
+ # :stopdoc:
@@ -1100,0 +1168 @@
+ # :stopdoc:
@@ -1107 +1175 @@
- }
+ }.freeze
@@ -1173 +1241 @@
- }
+ }.freeze |
Contributor
gem compare uri 1.0.3 1.1.1Compared versions: ["1.0.3", "1.1.1"]
DIFFERENT date:
1.0.3: 2025-02-26 00:00:00 UTC
1.1.1: 1980-01-02 00:00:00 UTC
DIFFERENT rubygems_version:
1.0.3: 3.5.11
1.1.1: 3.6.9
DIFFERENT version:
1.0.3: 1.0.3
1.1.1: 1.1.1
DIFFERENT files:
1.0.3->1.1.1:
* Changed:
.rdoc_options +1/-0
lib/uri/common.rb +57/-15
lib/uri/file.rb +1/-1
lib/uri/generic.rb +34/-21
lib/uri/http.rb +12/-0
lib/uri/rfc2396_parser.rb +9/-8
lib/uri/version.rb +2/-2 |
Contributor
gem compare --diff uri 1.0.3 1.1.1Compared versions: ["1.0.3", "1.1.1"]
DIFFERENT files:
1.0.3->1.1.1:
* Changed:
.rdoc_options
--- /tmp/d20251226-2125-l53c09/uri-1.0.3/.rdoc_options 2025-12-26 03:04:01.770208629 +0000
+++ /tmp/d20251226-2125-l53c09/uri-1.1.1/.rdoc_options 2025-12-26 03:04:01.775208652 +0000
@@ -4,0 +5 @@
+visibility: :private
lib/uri/common.rb
--- /tmp/d20251226-2125-l53c09/uri-1.0.3/lib/uri/common.rb 2025-12-26 03:04:01.772208638 +0000
+++ /tmp/d20251226-2125-l53c09/uri-1.1.1/lib/uri/common.rb 2025-12-26 03:04:01.776208657 +0000
@@ -32,0 +33,3 @@
+ remove_const(:PARSER) if defined?(::URI::PARSER)
+ const_set("PARSER", parser)
+
@@ -52 +55 @@
- warn "URI::#{const} is obsolete. Use RFC2396_PARSER.regexp[#{const.inspect}] explicitly.", uplevel: 1 if $VERBOSE
+ warn "URI::#{const} is obsolete. Use URI::RFC2396_PARSER.regexp[#{const.inspect}] explicitly.", uplevel: 1 if $VERBOSE
@@ -55 +58 @@
- warn "URI::#{const} is obsolete. Use RFC2396_Parser::#{const} explicitly.", uplevel: 1 if $VERBOSE
+ warn "URI::#{const} is obsolete. Use URI::RFC2396_Parser::#{const} explicitly.", uplevel: 1 if $VERBOSE
@@ -94,0 +98,34 @@
+ class << self
+ ReservedChars = ".+-"
+ EscapedChars = "\u01C0\u01C1\u01C2"
+ # Use Lo category chars as escaped chars for TruffleRuby, which
+ # does not allow Symbol categories as identifiers.
+
+ def escape(name)
+ unless name and name.ascii_only?
+ return nil
+ end
+ name.upcase.tr(ReservedChars, EscapedChars)
+ end
+
+ def unescape(name)
+ name.tr(EscapedChars, ReservedChars).encode(Encoding::US_ASCII).upcase
+ end
+
+ def find(name)
+ const_get(name, false) if name and const_defined?(name, false)
+ end
+
+ def register(name, klass)
+ unless scheme = escape(name)
+ raise ArgumentError, "invalid character as scheme - #{name}"
+ end
+ const_set(scheme, klass)
+ end
+
+ def list
+ constants.map { |name|
+ [unescape(name.to_s), const_get(name)]
+ }.to_h
+ end
+ end
@@ -107 +144 @@
- Schemes.const_set(scheme.to_s.upcase, klass)
+ Schemes.register(scheme, klass)
@@ -125,3 +162 @@
- Schemes.constants.map { |name|
- [name.to_s.upcase, Schemes.const_get(name)]
- }.to_h
+ Schemes.list
@@ -129,0 +165 @@
+ # :stopdoc:
@@ -132,0 +169 @@
+ # :startdoc:
@@ -151 +188 @@
- const_name = scheme.to_s.upcase
+ const_name = Schemes.escape(scheme)
@@ -154,3 +191 @@
- uri_class ||= if /\A[A-Z]\w*\z/.match?(const_name) && Schemes.const_defined?(const_name, false)
- Schemes.const_get(const_name, false)
- end
+ uri_class ||= Schemes.find(const_name)
@@ -198 +233 @@
- DEFAULT_PARSER.split(uri)
+ PARSER.split(uri)
@@ -208 +243 @@
- # It's recommended to first ::escape string +uri+
+ # It's recommended to first URI::RFC2396_PARSER.escape string +uri+
@@ -212 +247 @@
- DEFAULT_PARSER.parse(uri)
+ PARSER.parse(uri)
@@ -268 +303 @@
- DEFAULT_PARSER.extract(str, schemes, &block)
+ PARSER.extract(str, schemes, &block)
@@ -305 +340 @@
- DEFAULT_PARSER.make_regexp(schemes)
+ PARSER.make_regexp(schemes)
@@ -409,0 +445,2 @@
+ # Returns a string derived from the given string +str+ with
+ # URI-encoded characters matching +regexp+ according to +table+.
@@ -423,0 +461,2 @@
+ # Returns a string decoding characters matching +regexp+ from the
+ # given \URL-encoded string +str+.
@@ -861,0 +901 @@
+ # require 'uri'
@@ -867,0 +908,2 @@
+ #
+ # You must require 'uri' to use this method.
lib/uri/file.rb
--- /tmp/d20251226-2125-l53c09/uri-1.0.3/lib/uri/file.rb 2025-12-26 03:04:01.772208638 +0000
+++ /tmp/d20251226-2125-l53c09/uri-1.1.1/lib/uri/file.rb 2025-12-26 03:04:01.776208657 +0000
@@ -50 +50 @@
- # uri3 = URI::File.build({:path => URI::escape('/path/my file.txt')})
+ # uri3 = URI::File.build({:path => URI::RFC2396_PARSER.escape('/path/my file.txt')})
lib/uri/generic.rb
--- /tmp/d20251226-2125-l53c09/uri-1.0.3/lib/uri/generic.rb 2025-12-26 03:04:01.772208638 +0000
+++ /tmp/d20251226-2125-l53c09/uri-1.1.1/lib/uri/generic.rb 2025-12-26 03:04:01.776208657 +0000
@@ -76 +76 @@
- # then it does URI::Escape.escape all URI components and tries again.
+ # then it does URI::RFC2396_PARSER.escape all URI components and tries again.
@@ -129 +129 @@
- component = self.class.component rescue ::URI::Generic::COMPONENT
+ component = self.component rescue ::URI::Generic::COMPONENT
@@ -131 +131 @@
- "expected Array of or Hash of components of #{self.class} (#{component.join(', ')})"
+ "expected Array of or Hash of components of #{self} (#{component.join(', ')})"
@@ -189 +188,0 @@
- self.userinfo = userinfo
@@ -191,0 +191 @@
+ self.userinfo = userinfo
@@ -198 +197,0 @@
- self.set_userinfo(userinfo)
@@ -200,0 +200 @@
+ self.set_userinfo(userinfo)
@@ -287 +287 @@
- # Unless a URI::Parser is defined, DEFAULT_PARSER is used.
+ # Unless the +parser+ is defined, DEFAULT_PARSER is used.
@@ -318 +318 @@
- # Checks the scheme +v+ component against the URI::Parser Regexp for :SCHEME.
+ # Checks the scheme +v+ component against the +parser+ Regexp for :SCHEME.
@@ -388 +388 @@
- # and against the URI::Parser Regexp for :USERINFO.
+ # and against the +parser+ Regexp for :USERINFO.
@@ -412 +412 @@
- # and against the URI::Parser Regexp for :USERINFO.
+ # and against the +parser+ Regexp for :USERINFO.
@@ -514 +514 @@
- @password = password if password
+ @password = password
@@ -525 +525 @@
- set_userinfo(v, @password)
+ set_userinfo(v, nil)
@@ -576,0 +577,6 @@
+ # Returns the authority info (array of user, password, host and
+ # port), if any is set. Or returns +nil+.
+ def authority
+ return @user, @password, @host, @port if @user || @password || @host || @port
+ end
+
@@ -589 +595 @@
- # and against the URI::Parser Regexp for :HOST.
+ # and against the +parser+ Regexp for :HOST.
@@ -617,0 +624,7 @@
+ # Protected setter for the authority info (+user+, +password+, +host+
+ # and +port+). If +port+ is +nil+, +default_port+ will be set.
+ #
+ protected def set_authority(user, password, host, port = nil)
+ @user, @password, @host, @port = user, password, host, port || self.default_port
+ end
+
@@ -641,0 +655 @@
+ set_userinfo(nil)
@@ -678 +692 @@
- # and against the URI::Parser Regexp for :PORT.
+ # and against the +parser+ Regexp for :PORT.
@@ -731,0 +746 @@
+ set_userinfo(nil)
@@ -751 +766 @@
- # and against the URI::Parser Regexp
+ # and against the +parser+ Regexp
@@ -856 +871 @@
- # against the URI::Parser Regexp for :OPAQUE.
+ # against the +parser+ Regexp for :OPAQUE.
@@ -908 +923 @@
- # Checks the fragment +v+ component against the URI::Parser Regexp for :FRAGMENT.
+ # Checks the fragment +v+ component against the +parser+ Regexp for :FRAGMENT.
@@ -1124 +1139 @@
- authority = rel.userinfo || rel.host || rel.port
+ authority = rel.authority
@@ -1137,3 +1152 @@
- base.set_userinfo(rel.userinfo)
- base.set_host(rel.host)
- base.set_port(rel.port || base.default_port)
+ base.set_authority(*authority)
@@ -1530 +1543 @@
- warn 'The environment variable HTTP_PROXY is discouraged. Use http_proxy.', uplevel: 1
+ warn 'The environment variable HTTP_PROXY is discouraged. Please use http_proxy instead.', uplevel: 1
lib/uri/http.rb
--- /tmp/d20251226-2125-l53c09/uri-1.0.3/lib/uri/http.rb 2025-12-26 03:04:01.772208638 +0000
+++ /tmp/d20251226-2125-l53c09/uri-1.1.1/lib/uri/http.rb 2025-12-26 03:04:01.776208657 +0000
@@ -63,0 +64,12 @@
+ # Do not allow empty host names, as they are not allowed by RFC 3986.
+ def check_host(v)
+ ret = super
+
+ if ret && v.empty?
+ raise InvalidComponentError,
+ "bad component(expected host component): #{v}"
+ end
+
+ ret
+ end
+
lib/uri/rfc2396_parser.rb
--- /tmp/d20251226-2125-l53c09/uri-1.0.3/lib/uri/rfc2396_parser.rb 2025-12-26 03:04:01.773208643 +0000
+++ /tmp/d20251226-2125-l53c09/uri-1.1.1/lib/uri/rfc2396_parser.rb 2025-12-26 03:04:01.777208661 +0000
@@ -70 +70 @@
- # URI::Parser.new([opts])
+ # URI::RFC2396_Parser.new([opts])
@@ -89 +89 @@
- # p = URI::Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})")
+ # p = URI::RFC2396_Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})")
@@ -111 +111 @@
- # See also URI::Parser.initialize_pattern.
+ # See also #initialize_pattern.
@@ -116 +116 @@
- # See also URI::Parser.initialize_regexp.
+ # See also #initialize_regexp.
@@ -205,2 +205 @@
- # p = URI::Parser.new
- # p.parse("ldap://ldap.example.com/dc=example?user=john")
+ # URI::RFC2396_PARSER.parse("ldap://ldap.example.com/dc=example?user=john")
@@ -247 +246 @@
- # See also URI::Parser.make_regexp.
+ # See also #make_regexp.
@@ -266 +265 @@
- /(?=#{Regexp.union(*schemes)}:)#{@pattern[:X_ABS_URI]}/x
+ /(?=(?i:#{Regexp.union(*schemes).source}):)#{@pattern[:X_ABS_URI]}/x
@@ -526,0 +526,2 @@
+ # Returns +uri+ as-is if it is URI, or convert it to URI if it is
+ # a String.
lib/uri/version.rb
--- /tmp/d20251226-2125-l53c09/uri-1.0.3/lib/uri/version.rb 2025-12-26 03:04:01.773208643 +0000
+++ /tmp/d20251226-2125-l53c09/uri-1.1.1/lib/uri/version.rb 2025-12-26 03:04:01.777208661 +0000
@@ -3,2 +3,2 @@
- VERSION_CODE = '010003'.freeze
- VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
+ VERSION = '1.1.1'.freeze
+ VERSION_CODE = VERSION.split('.').map{|s| s.rjust(2, '0')}.join.freeze |
eb1c9de to
de1a9c6
Compare
Bumps [faraday-retry](https://github.com/lostisland/faraday-retry) from 2.3.2 to 2.4.0. - [Release notes](https://github.com/lostisland/faraday-retry/releases) - [Changelog](https://github.com/lostisland/faraday-retry/blob/main/CHANGELOG.md) - [Commits](lostisland/faraday-retry@v2.3.2...v2.4.0) --- updated-dependencies: - dependency-name: faraday-retry dependency-version: 2.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
de1a9c6 to
56adbf0
Compare
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.
Bumps faraday-retry from 2.3.2 to 2.4.0.
Release notes
Sourced from faraday-retry's releases.
Commits
a422231Version bump to 2.4.08fa8cc2Relaxrequired_ruby_versionto support Ruby 4.06111501Bump actions/checkout from 5 to 65968845Bump actions/checkout from 4 to 5Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)