Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.7.0"
".": "0.7.1"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
openlayer (0.7.0)
openlayer (0.7.1)
connection_pool

GEM
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "openlayer", "~> 0.7.0"
gem "openlayer", "~> 0.7.1"
```

<!-- x-release-please-end -->
Expand Down
9 changes: 7 additions & 2 deletions lib/openlayer/internal/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/openlayer/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Openlayer
VERSION = "0.7.0"
VERSION = "0.7.1"
end