google-apis-core 1.2.4 → 1.2.5
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 +3 -2
- data/lib/google/apis/core/storage_download.rb +3 -2
- 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: 496e7d887e5cfdbe739f62370d447dc9d663352a6385ab89e7bc7aa75f58d391
|
|
4
|
+
data.tar.gz: d68a12cee717e901edd3f1092dbe338f1692c0ccaba75408096ed5a05256eecf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 01423b834b7449a7824b35a64bda7e31df896e0a40a5084217ff52186d467cbea8d3d2359475ebd5d0b7d3bc0585fbfaef1682965b72195262ef591c2ef8a5e9
|
|
7
|
+
data.tar.gz: 53f83a8ed0557d57939c017bd5910e98d38e0211a25053f79ecf5ddfd528000d5382f8347769529f182263f4d2089ec371d1c575481e0070cef94051c29673c9
|
data/CHANGELOG.md
CHANGED
|
@@ -81,11 +81,12 @@ 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
|
-
# The on_data callback is only invoked on a successful response.
|
|
85
84
|
# Some Faraday adapters (e.g. Typhoeus) may not provide a response
|
|
86
85
|
# object in the callback, so we default to a 200 OK status.
|
|
86
|
+
# Note: Ignore non-2xx responses (redirects and 4xx/5xx error payloads)
|
|
87
|
+
# so error messages are not written to the download stream.
|
|
87
88
|
status = res ? res.status.to_i : 200
|
|
88
|
-
next if chunk.nil? || (status
|
|
89
|
+
next if chunk.nil? || !(200..299).include?(status)
|
|
89
90
|
|
|
90
91
|
# HTTP 206 is Partial Content
|
|
91
92
|
download_offset ||= (status == 206 ? @offset : 0)
|
|
@@ -48,11 +48,12 @@ 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
|
-
# The on_data callback is only invoked on a successful response.
|
|
52
51
|
# Some Faraday adapters (e.g. Typhoeus) may not provide a response
|
|
53
52
|
# object in the callback, so we default to a 200 OK status.
|
|
53
|
+
# Note: Ignore non-2xx responses (redirects and 4xx/5xx error payloads)
|
|
54
|
+
# so error messages are not written to the download stream.
|
|
54
55
|
status = res ? res.status.to_i : 200
|
|
55
|
-
next if chunk.nil? || (status
|
|
56
|
+
next if chunk.nil? || !(200..299).include?(status)
|
|
56
57
|
|
|
57
58
|
download_offset ||= (status == 206 ? @offset : 0)
|
|
58
59
|
download_offset += chunk.bytesize
|
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.2.
|
|
4
|
+
version: 1.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -167,7 +167,7 @@ licenses:
|
|
|
167
167
|
metadata:
|
|
168
168
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
|
169
169
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core/CHANGELOG.md
|
|
170
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-core/v1.2.
|
|
170
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-core/v1.2.5
|
|
171
171
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core
|
|
172
172
|
rdoc_options: []
|
|
173
173
|
require_paths:
|