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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/google/apis/core/download.rb +4 -1
- data/lib/google/apis/core/storage_download.rb +4 -1
- data/lib/google/apis/core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d024f53c9ef6e0174ec201b40ed2d437fc17fa8e98ef9d154e9cc9bf62540a1
|
4
|
+
data.tar.gz: aa5a7b80813d3f3ad8bb89c732aec0ef6defa631f1f3c3710c94366d1f584346
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dcac5014397a36e277fba550c9eef19320d2a28de16e209122a8ae2457227dedf970ed59a3dd04928e33e1b7184cd4daad15c1b8db6012f80bac957d26491b7
|
7
|
+
data.tar.gz: aa15768fe116318ab8c06228fb1962da38cc870ff3c9cd2911a4cb30ff1863bba9c0674a170e6c97f7fad9a8ac380d8180435908fd2865ed7fbff0a9b0e68a16
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
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
|
-
|
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)
|
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.
|
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.
|
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:
|