google-apis-core 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3942b0296ecaefbf670d435adf32df8c1f14be2a16d9a890ed3551ba7d95688a
4
- data.tar.gz: 66e5e8b65a689f1ccd5788de4ec169d1f4298b1cc106362d1fc3075f17a62526
3
+ metadata.gz: 5d024f53c9ef6e0174ec201b40ed2d437fc17fa8e98ef9d154e9cc9bf62540a1
4
+ data.tar.gz: aa5a7b80813d3f3ad8bb89c732aec0ef6defa631f1f3c3710c94366d1f584346
5
5
  SHA512:
6
- metadata.gz: 50a6c03bb553d70d16ca5120416eca74c4983329069ea80d5c42c840e9f06b9934be375b60563b78c55eadd233e21c33514743f75139d8751d89ece9cf8f7450
7
- data.tar.gz: 6bac8358f9627301e9dab533a4c303442235fb4bd239aac2bcab20ca86a322975b00e51c6bffee629b07d4e219f060c81d3264b32a654ddb8da8666fa3c93360
6
+ metadata.gz: 6dcac5014397a36e277fba550c9eef19320d2a28de16e209122a8ae2457227dedf970ed59a3dd04928e33e1b7184cd4daad15c1b8db6012f80bac957d26491b7
7
+ data.tar.gz: aa15768fe116318ab8c06228fb1962da38cc870ff3c9cd2911a4cb30ff1863bba9c0674a170e6c97f7fad9a8ac380d8180435908fd2865ed7fbff0a9b0e68a16
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.0.2 (2025-09-09)
4
+
5
+ #### Bug Fixes
6
+
7
+ * Handle nil response in on_data callback for Faraday streaming ([#24235](https://github.com/googleapis/google-api-ruby-client/issues/24235))
8
+
3
9
  ### 1.0.1 (2025-08-08)
4
10
 
5
11
  #### Bug Fixes
@@ -81,7 +81,10 @@ module Google
81
81
 
82
82
  http_res = client.get(url.to_s, query, request_header) do |request|
83
83
  request.options.on_data = proc do |chunk, _size, res|
84
- status = res.status.to_i
84
+ # The on_data callback is only invoked on a successful response.
85
+ # Some Faraday adapters (e.g. Typhoeus) may not provide a response
86
+ # object in the callback, so we default to a 200 OK status.
87
+ status = res ? res.status.to_i : 200
85
88
  next if chunk.nil? || (status >= 300 && status < 400)
86
89
 
87
90
  # HTTP 206 is Partial Content
@@ -48,7 +48,10 @@ module Google
48
48
 
49
49
  http_res = client.get(url.to_s, query, request_header) do |request|
50
50
  request.options.on_data = proc do |chunk, _size, res|
51
- status = res.status.to_i
51
+ # The on_data callback is only invoked on a successful response.
52
+ # Some Faraday adapters (e.g. Typhoeus) may not provide a response
53
+ # object in the callback, so we default to a 200 OK status.
54
+ status = res ? res.status.to_i : 200
52
55
  next if chunk.nil? || (status >= 300 && status < 400)
53
56
 
54
57
  download_offset ||= (status == 206 ? @offset : 0)
@@ -16,7 +16,7 @@ module Google
16
16
  module Apis
17
17
  module Core
18
18
  # Core version
19
- VERSION = "1.0.1".freeze
19
+ VERSION = "1.0.2".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -153,7 +153,7 @@ licenses:
153
153
  metadata:
154
154
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
155
155
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core/CHANGELOG.md
156
- documentation_uri: https://googleapis.dev/ruby/google-apis-core/v1.0.1
156
+ documentation_uri: https://googleapis.dev/ruby/google-apis-core/v1.0.2
157
157
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core
158
158
  rdoc_options: []
159
159
  require_paths: