gapic-common 0.11.0 → 0.11.1
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/gapic/common/version.rb +1 -1
- data/lib/gapic/generic_lro/operation.rb +2 -1
- data/lib/gapic/rest/grpc_transcoder.rb +12 -9
- 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: 4362fc972a82bd5c92fdf8172a0ad005f371ecfaf968d251e19bc64b73681652
|
4
|
+
data.tar.gz: 85ebd85fef5f54aecfec53ffba4a83e2d7b03ecc26c474ffe64f2644241ae74f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1b4b4844fbc1380ccb5e82098c9e8647437da5cbfea789d0eb94543c020b10e97187faf5ac600b6b83d8091172b14f29d9cf05bb93017369b8126af21e49415
|
7
|
+
data.tar.gz: d046faba797ec8b2d76ec66cc2deb12fca86c570a090c05e97ecb844c1aebe8591d56d84a3910a226a8895f0171b1d060ede34a8879c103a76a0ec7da5ad7c7d
|
data/CHANGELOG.md
CHANGED
data/lib/gapic/common/version.rb
CHANGED
@@ -140,7 +140,8 @@ module Gapic
|
|
140
140
|
# @return [Boolean] Whether an error has been returned.
|
141
141
|
#
|
142
142
|
def error?
|
143
|
-
|
143
|
+
no_error_code = error_code.nil? || error_code.zero?
|
144
|
+
done? && !(err.nil? && no_error_code)
|
144
145
|
end
|
145
146
|
|
146
147
|
##
|
@@ -108,12 +108,9 @@ module Gapic
|
|
108
108
|
uri_values = bind_uri_values! http_binding, request_hash
|
109
109
|
next if uri_values.any? { |_, value| value.nil? }
|
110
110
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
body_binding_camel = camel_name_for http_binding.body
|
115
|
-
next unless request_hash.key? body_binding_camel
|
116
|
-
end
|
111
|
+
# Note that the body template can only point to a top-level field,
|
112
|
+
# so there is no need to split the path.
|
113
|
+
next if http_binding.body && http_binding.body != "*" && !(request.respond_to? http_binding.body.to_sym)
|
117
114
|
|
118
115
|
method = http_binding.method
|
119
116
|
uri = expand_template http_binding.template, uri_values
|
@@ -182,9 +179,15 @@ module Gapic
|
|
182
179
|
#
|
183
180
|
# The `request_hash_without_uri` at this point was mutated to delete these fields.
|
184
181
|
#
|
185
|
-
# Note
|
186
|
-
|
187
|
-
|
182
|
+
# Note 1: body template can only point to a top-level field.
|
183
|
+
# Note 2: The field that body template points to can be null, in which case
|
184
|
+
# an empty string should be sent. E.g. `Compute.Projects.SetUsageExportBucket`.
|
185
|
+
request_body_field = request.send body_template.to_sym if request.respond_to? body_template.to_sym
|
186
|
+
if request_body_field
|
187
|
+
request_hash_without_uri.delete camel_name_for body_template
|
188
|
+
body = request_body_field.to_json emit_defaults: true
|
189
|
+
end
|
190
|
+
|
188
191
|
query_params = build_query_params request_hash_without_uri
|
189
192
|
else
|
190
193
|
query_params = build_query_params request_hash_without_uri
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gapic-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google API Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|