diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7ac8eadf..5f383af5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.166.0" + ".": "1.166.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8397eeba..74ac06db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.166.1 (2025-12-18) + +Full Changelog: [v1.166.0...v1.166.1](https://github.com/Increase/increase-ruby/compare/v1.166.0...v1.166.1) + +### Bug Fixes + +* issue where json.parse errors when receiving HTTP 204 with nobody ([35cc667](https://github.com/Increase/increase-ruby/commit/35cc6675facca611a5d519a87fa7affc8a0bbb8e)) + ## 1.166.0 (2025-12-17) Full Changelog: [v1.165.0...v1.166.0](https://github.com/Increase/increase-ruby/compare/v1.165.0...v1.166.0) diff --git a/Gemfile.lock b/Gemfile.lock index 53c62521..f5806979 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.166.0) + increase (1.166.1) connection_pool GEM diff --git a/README.md b/README.md index b44fd205..f20555d0 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 "increase", "~> 1.166.0" +gem "increase", "~> 1.166.1" ``` diff --git a/lib/increase/internal/util.rb b/lib/increase/internal/util.rb index d0632658..d567467b 100644 --- a/lib/increase/internal/util.rb +++ b/lib/increase/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 Increase::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 Increase::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/increase/version.rb b/lib/increase/version.rb index 2991ad62..e498f0e4 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.166.0" + VERSION = "1.166.1" end