From 9ae7bf673a15fc01cf7e25b6c508dd20fa6a38f7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 15:21:27 +0000 Subject: [PATCH 1/8] fix(client): elide content type header on requests without body --- lib/imagekitio/internal/transport/base_client.rb | 2 ++ test/imagekitio/client_test.rb | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/imagekitio/internal/transport/base_client.rb b/lib/imagekitio/internal/transport/base_client.rb index e9c0aea9..f6c722bd 100644 --- a/lib/imagekitio/internal/transport/base_client.rb +++ b/lib/imagekitio/internal/transport/base_client.rb @@ -306,6 +306,8 @@ def initialize( Imagekitio::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact) end + headers.delete("content-type") if body.nil? + url = Imagekitio::Internal::Util.join_parsed_uri( @base_url_components, {**req, path: path, query: query} diff --git a/test/imagekitio/client_test.rb b/test/imagekitio/client_test.rb index b17d0a02..aabeef38 100644 --- a/test/imagekitio/client_test.rb +++ b/test/imagekitio/client_test.rb @@ -280,8 +280,8 @@ def test_client_redirect_307 assert_equal(recorded.method, _1.method) # assert_equal(recorded.body, _1.body) skipping, since the request body is multipart encoded assert_equal( - recorded.headers.transform_keys(&:downcase).fetch("content-type"), - _1.headers.transform_keys(&:downcase).fetch("content-type") + recorded.headers.transform_keys(&:downcase)["content-type"], + _1.headers.transform_keys(&:downcase)["content-type"] ) end end @@ -400,8 +400,9 @@ def test_default_headers image_kit.files.upload(file: StringIO.new("Example data"), file_name: "fileName") assert_requested(:any, /./) do |req| - headers = req.headers.transform_keys(&:downcase).fetch_values("accept", "content-type") - headers.each { refute_empty(_1) } + headers = req.headers.transform_keys(&:downcase) + expected = req.body.nil? ? ["accept"] : %w[accept content-type] + headers.fetch_values(*expected).each { refute_empty(_1) } end end end From 65401086b8180a2c4cb131d07f09683d6c0da7cb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 02:36:50 +0000 Subject: [PATCH 2/8] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 278a536d..62ce5cf3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-ad6dd3b4acf289708568a12574b997503059a47c4a4ca5ffefe64f40f3d3dbf3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-a8f005109bd8f1fa42d080ed43b4f7b67eacad5aea113fe5223306c3f217556a.yml openapi_spec_hash: 7c103e2dff0edcbeea82057e62f58d4d -config_hash: 94f48fd13b7d41b8b6a203a3a8cee9ed +config_hash: 493cdeb6cf0935806c5f6a029774029d From 2a791e9462b79ddcfa8ce77144c0ea83b6df7dfa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 02:40:22 +0000 Subject: [PATCH 3/8] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 62ce5cf3..6bae0823 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-a8f005109bd8f1fa42d080ed43b4f7b67eacad5aea113fe5223306c3f217556a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-9daf3daa1db3813288c77c8777bfca85337e3512bdc83ee48fe0631e41c3650d.yml openapi_spec_hash: 7c103e2dff0edcbeea82057e62f58d4d -config_hash: 493cdeb6cf0935806c5f6a029774029d +config_hash: 34c788f0652c42a878adf62248426f1e From 128ebfecc31ca0539b80f164381c3522597e1619 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 02:45:24 +0000 Subject: [PATCH 4/8] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6bae0823..02b09bcf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-9daf3daa1db3813288c77c8777bfca85337e3512bdc83ee48fe0631e41c3650d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-59ecd0e32aaade3cf2b31e6f757697c0a4f1c4c8ed3e52fb25b1071f592db509.yml openapi_spec_hash: 7c103e2dff0edcbeea82057e62f58d4d -config_hash: 34c788f0652c42a878adf62248426f1e +config_hash: c5a7aed248c5d9ad5cd42e56fdd62c12 From 363aa0528a398c5aa437a91f7af567f74b3b86a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 03:12:37 +0000 Subject: [PATCH 5/8] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 02b09bcf..364b12b5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-59ecd0e32aaade3cf2b31e6f757697c0a4f1c4c8ed3e52fb25b1071f592db509.yml -openapi_spec_hash: 7c103e2dff0edcbeea82057e62f58d4d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-4df977cf1706b48f9d9f15d7e134d5bb062607bcf206a406a239ff6691852e7d.yml +openapi_spec_hash: fd7c931960b5d8a4c1072a69a5a3e6a1 config_hash: c5a7aed248c5d9ad5cd42e56fdd62c12 From a33642439dc15f0f23b4bffb5e5feaaa00073190 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 03:24:31 +0000 Subject: [PATCH 6/8] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 364b12b5..1497247c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-4df977cf1706b48f9d9f15d7e134d5bb062607bcf206a406a239ff6691852e7d.yml -openapi_spec_hash: fd7c931960b5d8a4c1072a69a5a3e6a1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-406b71ea98caac24889265c5b4371961c784912e543ade88e7e6917f9a31a951.yml +openapi_spec_hash: 462b973437dd6b2659654881e9a0e5c1 config_hash: c5a7aed248c5d9ad5cd42e56fdd62c12 From 0f8a86c01a7ce7d0fb7d001422d3df15e6526b28 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 03:35:24 +0000 Subject: [PATCH 7/8] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1497247c..88ec6965 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-406b71ea98caac24889265c5b4371961c784912e543ade88e7e6917f9a31a951.yml -openapi_spec_hash: 462b973437dd6b2659654881e9a0e5c1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-b9cc1f62fca41c286295001551cbe902d6b2f30ab775d84e549eb5affc0186ec.yml +openapi_spec_hash: f3790446521a8f846e2e7249313de100 config_hash: c5a7aed248c5d9ad5cd42e56fdd62c12 From a16881e33cc04a9d735b483a777fb1ca58dadbd1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 03:35:50 +0000 Subject: [PATCH 8/8] release: 4.5.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/imagekitio/version.rb | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3d5f4e35..5457a012 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.5.0" + ".": "4.5.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ccadc4b..3414901f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.5.1 (2026-05-17) + +Full Changelog: [v4.5.0...v4.5.1](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.5.0...v4.5.1) + +### Bug Fixes + +* **client:** elide content type header on requests without body ([9ae7bf6](https://github.com/imagekit-developer/imagekit-ruby/commit/9ae7bf673a15fc01cf7e25b6c508dd20fa6a38f7)) + ## 4.5.0 (2026-05-13) Full Changelog: [v4.4.1...v4.5.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.4.1...v4.5.0) diff --git a/Gemfile.lock b/Gemfile.lock index 088e7050..045ec1f6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - imagekitio (4.5.0) + imagekitio (4.5.1) cgi connection_pool standardwebhooks diff --git a/README.md b/README.md index 7a03c787..03f91081 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "imagekitio", "~> 4.5.0" +gem "imagekitio", "~> 4.5.1" ``` diff --git a/lib/imagekitio/version.rb b/lib/imagekitio/version.rb index fd555c92..7cfec8d1 100644 --- a/lib/imagekitio/version.rb +++ b/lib/imagekitio/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Imagekitio - VERSION = "4.5.0" + VERSION = "4.5.1" end