diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1b77f50..1bc5713 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.7.0" + ".": "0.7.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a1e39e5..3ece7a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.7.1 (2025-12-19) + +Full Changelog: [v0.7.0...v0.7.1](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.7.0...v0.7.1) + +### Bug Fixes + +* issue where json.parse errors when receiving HTTP 204 with nobody ([cd07b68](https://github.com/openlayer-ai/openlayer-ruby/commit/cd07b686e5ab45fb20726638181f1c9b6590a181)) + ## 0.7.0 (2025-12-17) Full Changelog: [v0.6.0...v0.7.0](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.6.0...v0.7.0) diff --git a/Gemfile.lock b/Gemfile.lock index 428a52a..8d55df2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - openlayer (0.7.0) + openlayer (0.7.1) connection_pool GEM diff --git a/README.md b/README.md index 3c2f9f0..663aa16 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "openlayer", "~> 0.7.0" +gem "openlayer", "~> 0.7.1" ``` diff --git a/lib/openlayer/internal/util.rb b/lib/openlayer/internal/util.rb index add608b..b57a2fc 100644 --- a/lib/openlayer/internal/util.rb +++ b/lib/openlayer/internal/util.rb @@ -657,7 +657,8 @@ def force_charset!(content_type, text:) def decode_content(headers, stream:, suppress_error: false) case (content_type = headers["content-type"]) in Openlayer::Internal::Util::JSON_CONTENT - json = stream.to_a.join + return nil if (json = stream.to_a.join).empty? + begin JSON.parse(json, symbolize_names: true) rescue JSON::ParserError => e @@ -667,7 +668,11 @@ def decode_content(headers, stream:, suppress_error: false) in Openlayer::Internal::Util::JSONL_CONTENT lines = decode_lines(stream) chain_fused(lines) do |y| - lines.each { y << JSON.parse(_1, symbolize_names: true) } + lines.each do + next if _1.empty? + + y << JSON.parse(_1, symbolize_names: true) + end end in %r{^text/event-stream} lines = decode_lines(stream) diff --git a/lib/openlayer/version.rb b/lib/openlayer/version.rb index 5875583..8df88b5 100644 --- a/lib/openlayer/version.rb +++ b/lib/openlayer/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Openlayer - VERSION = "0.7.0" + VERSION = "0.7.1" end