diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f1ce3b3..074dfc8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.11.2" + ".": "2.11.3" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index f17b8ce..188067d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 27 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-a4934bf1e7f1348c021b48224f7a7110a6e41838253dda4fbcc720dd2d2ed6b7.yml openapi_spec_hash: 537542216811907b1d4ebf23a54dc669 -config_hash: 6b825a08e19dfb747c5dc1766502b789 +config_hash: 0a024bca1710e3a3194925edfedc513c diff --git a/CHANGELOG.md b/CHANGELOG.md index 6aa9529..17a05b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.11.3 (2026-04-09) + +Full Changelog: [v2.11.2...v2.11.3](https://github.com/moderation-api/sdk-ruby/compare/v2.11.2...v2.11.3) + +### Bug Fixes + +* multipart encoding for file arrays ([7480479](https://github.com/moderation-api/sdk-ruby/commit/748047916ff78fc154b75fb4415fe6b06856bfde)) + ## 2.11.2 (2026-04-01) Full Changelog: [v2.11.1...v2.11.2](https://github.com/moderation-api/sdk-ruby/compare/v2.11.1...v2.11.2) diff --git a/Gemfile.lock b/Gemfile.lock index 40db1b9..8eb6062 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - moderation_api (2.11.2) + moderation_api (2.11.3) cgi connection_pool diff --git a/README.md b/README.md index b9e6585..05a9a8a 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 "moderation_api", "~> 2.11.2" +gem "moderation_api", "~> 2.11.3" ``` diff --git a/lib/moderation_api/internal/util.rb b/lib/moderation_api/internal/util.rb index 382526b..4a98a13 100644 --- a/lib/moderation_api/internal/util.rb +++ b/lib/moderation_api/internal/util.rb @@ -610,6 +610,7 @@ def encode_query_params(query) # # @return [Array(String, Enumerable)] private def encode_multipart_streaming(body) + # rubocop:disable Style/CaseEquality # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length boundary = SecureRandom.urlsafe_base64(46) @@ -619,7 +620,7 @@ def encode_query_params(query) in Hash body.each do |key, val| case val - in Array if val.all? { primitive?(_1) } + in Array if val.all? { primitive?(_1) || ModerationAPI::Internal::Type::FileInput === _1 } val.each do |v| write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing) end @@ -635,6 +636,7 @@ def encode_query_params(query) fused_io = fused_enum(strio) { closing.each(&:call) } [boundary, fused_io] + # rubocop:enable Style/CaseEquality end # @api private diff --git a/lib/moderation_api/version.rb b/lib/moderation_api/version.rb index 86d149a..d956e88 100644 --- a/lib/moderation_api/version.rb +++ b/lib/moderation_api/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ModerationAPI - VERSION = "2.11.2" + VERSION = "2.11.3" end