faraday 2.9.1 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/faraday/connection.rb +2 -1
- data/lib/faraday/version.rb +1 -1
- data/spec/faraday/connection_spec.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2795a487e8f0330545b6b9720029b597b0f0f36d33ed47bf3a7ab5ec8e2d583
|
4
|
+
data.tar.gz: a892c9ceebf1a9b5499ca7c6f20a1f6bb3c8a632bcf953f83af0ac17814c0691
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc55e018b7b5cec1d5538194841c74a643182d0bb6bc3a73bf5ca1c3c7c88f84998f8b4f90165bffe22b01422e3d90c7bbf6c035714c563bb09265bd34029169
|
7
|
+
data.tar.gz: 05c24fe02e969616d069ba3b02fa7fddfb5c70cb504bfd39ca60983d12aaa47207f985c1e5a1a24d29c71c6cecbe899eb2252f4a8f9458d8681e06584d7016fc
|
data/lib/faraday/connection.rb
CHANGED
@@ -473,7 +473,8 @@ module Faraday
|
|
473
473
|
if url && !base.path.end_with?('/')
|
474
474
|
base.path = "#{base.path}/" # ensure trailing slash
|
475
475
|
end
|
476
|
-
url
|
476
|
+
# Ensure relative url will be parsed correctly (such as `service:search` )
|
477
|
+
url = "./#{url}" if url.respond_to?(:start_with?) && !url.start_with?('http://', 'https://', '/', './', '../')
|
477
478
|
uri = url ? base + url : base
|
478
479
|
if params
|
479
480
|
uri.query = params.to_query(params_encoder || options.params_encoder)
|
data/lib/faraday/version.rb
CHANGED
@@ -300,14 +300,14 @@ RSpec.describe Faraday::Connection do
|
|
300
300
|
it 'joins url to base when used relative path' do
|
301
301
|
conn = Faraday.new(url: url)
|
302
302
|
uri = conn.build_exclusive_url('service:search?limit=400')
|
303
|
-
expect(uri.to_s).to eq('http://service.com/service
|
303
|
+
expect(uri.to_s).to eq('http://service.com/service:search?limit=400')
|
304
304
|
end
|
305
305
|
|
306
306
|
it 'joins url to base when used with path prefix' do
|
307
307
|
conn = Faraday.new(url: url)
|
308
308
|
conn.path_prefix = '/api'
|
309
309
|
uri = conn.build_exclusive_url('service:search?limit=400')
|
310
|
-
expect(uri.to_s).to eq('http://service.com/api/service
|
310
|
+
expect(uri.to_s).to eq('http://service.com/api/service:search?limit=400')
|
311
311
|
end
|
312
312
|
end
|
313
313
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "@technoweenie"
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-06-
|
13
|
+
date: 2024-06-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday-net_http
|
@@ -117,7 +117,7 @@ licenses:
|
|
117
117
|
- MIT
|
118
118
|
metadata:
|
119
119
|
homepage_uri: https://lostisland.github.io/faraday
|
120
|
-
changelog_uri: https://github.com/lostisland/faraday/releases/tag/v2.9.
|
120
|
+
changelog_uri: https://github.com/lostisland/faraday/releases/tag/v2.9.2
|
121
121
|
source_code_uri: https://github.com/lostisland/faraday
|
122
122
|
bug_tracker_uri: https://github.com/lostisland/faraday/issues
|
123
123
|
post_install_message:
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
|
-
rubygems_version: 3.5.
|
139
|
+
rubygems_version: 3.5.11
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: HTTP/REST API client library.
|