diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1f0d8a9b..3e2bf498 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.4.0-beta.1" + ".": "0.4.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ed1e1b91..437ee8b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.4.1 (2025-05-23) + +Full Changelog: [v0.4.0-beta.1...v0.4.1](https://github.com/openai/openai-ruby/compare/v0.4.0-beta.1...v0.4.1) + +### Bug Fixes + +* prevent rubocop from mangling `===` to `is_a?` check ([c3a61c9](https://github.com/openai/openai-ruby/commit/c3a61c9f83b8cb79b41edadadca1a241de03d10f)) + ## 0.4.0-beta.1 (2025-05-23) Full Changelog: [v0.1.0-beta.2...v0.4.0-beta.1](https://github.com/openai/openai-ruby/compare/v0.1.0-beta.2...v0.4.0-beta.1) diff --git a/Gemfile.lock b/Gemfile.lock index 9496ce68..64aeded6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - openai (0.4.0.pre.beta.1) + openai (0.4.1) connection_pool GEM diff --git a/README.md b/README.md index 84f09d30..d902b49a 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 "openai", "~> 0.4.0.pre.beta.1" +gem "openai", "~> 0.4.1" ``` diff --git a/lib/openai/internal/util.rb b/lib/openai/internal/util.rb index c84c9e78..9e11d6ed 100644 --- a/lib/openai/internal/util.rb +++ b/lib/openai/internal/util.rb @@ -600,11 +600,13 @@ class << self # # @return [Object] def encode_content(headers, body) + # rubocop:disable Style/CaseEquality + # rubocop:disable Layout/LineLength content_type = headers["content-type"] case [content_type, body] in [OpenAI::Internal::Util::JSON_CONTENT, Hash | Array | -> { primitive?(_1) }] [headers, JSON.generate(body)] - in [OpenAI::Internal::Util::JSONL_CONTENT, Enumerable] unless body.is_a?(OpenAI::Internal::Type::FileInput) + in [OpenAI::Internal::Util::JSONL_CONTENT, Enumerable] unless OpenAI::Internal::Type::FileInput === body [headers, body.lazy.map { JSON.generate(_1) }] in [%r{^multipart/form-data}, Hash | OpenAI::Internal::Type::FileInput] boundary, strio = encode_multipart_streaming(body) @@ -619,6 +621,8 @@ def encode_content(headers, body) else [headers, body] end + # rubocop:enable Layout/LineLength + # rubocop:enable Style/CaseEquality end # @api private diff --git a/lib/openai/version.rb b/lib/openai/version.rb index 03fe9c50..a71b9348 100644 --- a/lib/openai/version.rb +++ b/lib/openai/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module OpenAI - VERSION = "0.4.0.pre.beta.1" + VERSION = "0.4.1" end