diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fa87c7ea..de2352fe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.51" + ".": "0.1.0-alpha.52" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aee27f4..1f9ff314 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.52 (2025-10-15) + +Full Changelog: [v0.1.0-alpha.51...v0.1.0-alpha.52](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.51...v0.1.0-alpha.52) + +### Bug Fixes + +* absolutely qualified uris should always override the default ([603aa2e](https://github.com/lithic-com/lithic-ruby/commit/603aa2e88449994118f1f5c19edc1accbcf57cb1)) + ## 0.1.0-alpha.51 (2025-10-14) Full Changelog: [v0.1.0-alpha.50...v0.1.0-alpha.51](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.50...v0.1.0-alpha.51) diff --git a/Gemfile.lock b/Gemfile.lock index 8fa02d31..fce856db 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - lithic (0.1.0.pre.alpha.51) + lithic (0.1.0.pre.alpha.52) connection_pool GEM diff --git a/README.md b/README.md index 58e03c0b..71e94f32 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "lithic", "~> 0.1.0.pre.alpha.51" +gem "lithic", "~> 0.1.0.pre.alpha.52" ``` diff --git a/lib/lithic/internal/util.rb b/lib/lithic/internal/util.rb index d93a1d58..50b9f0a9 100644 --- a/lib/lithic/internal/util.rb +++ b/lib/lithic/internal/util.rb @@ -346,8 +346,9 @@ def join_parsed_uri(lhs, rhs) base_path, base_query = lhs.fetch_values(:path, :query) slashed = base_path.end_with?("/") ? base_path : "#{base_path}/" - parsed_path, parsed_query = parse_uri(rhs.fetch(:path)).fetch_values(:path, :query) - override = URI::Generic.build(**rhs.slice(:scheme, :host, :port), path: parsed_path) + merged = {**parse_uri(rhs.fetch(:path)), **rhs.except(:path, :query)} + parsed_path, parsed_query = merged.fetch_values(:path, :query) + override = URI::Generic.build(**merged.slice(:scheme, :host, :port), path: parsed_path) joined = URI.join(URI::Generic.build(lhs.except(:path, :query)), slashed, override) query = deep_merge( diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index e46f3895..3a487b44 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.1.0.pre.alpha.51" + VERSION = "0.1.0.pre.alpha.52" end diff --git a/test/lithic/internal/util_test.rb b/test/lithic/internal/util_test.rb index 4d449f7e..eaa6f729 100644 --- a/test/lithic/internal/util_test.rb +++ b/test/lithic/internal/util_test.rb @@ -124,6 +124,14 @@ def test_joining path: "/c", query: {"d" => ["e"]} } + ], + [ + "h://a.b/c?d=e", + "h://nope", + { + path: "h://a.b/c", + query: {"d" => ["e"]} + } ] ]