gapic-common 1.5.0 → 1.5.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/rest/grpc_transcoder.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3906b246e3ecacee83c366fee3cd10077a56a72b29c3490ca8ff01ac4e124d65
|
|
4
|
+
data.tar.gz: c0a72cf00fa758234a196d385f53303d41c82cd895a17a339b185b7db529cf3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4aaff885138cd52a4f822ebb51af2f2c658700e7ba71d3b1199ada4c3871343e16cb66c1fc65a44606cf178316a07bb61f553a40bcf1ffd80e98a00758e18d51
|
|
7
|
+
data.tar.gz: 59232d7d58c9711b6e0e9e0b1da7ca3f0d69abbda9d10d4fa72412e463d8a57062a45f46131c5c24a392cbbc5e8e99be63b7491c4bcf668f77ed48b4e44a235f
|
data/CHANGELOG.md
CHANGED
data/lib/gapic/common/version.rb
CHANGED
|
@@ -111,7 +111,7 @@ module Gapic
|
|
|
111
111
|
# @return [Hash{String, String}]
|
|
112
112
|
# Name to value hash of the variables for the uri template expansion.
|
|
113
113
|
# The values are percent-escaped with slashes potentially preserved.
|
|
114
|
-
# @raise [Gapic::Common::Error] If any parameter value fails path traversal
|
|
114
|
+
# @raise [Gapic::Common::Error] If any parameter value fails path traversal validation.
|
|
115
115
|
def bind_uri_values! http_binding, request_hash
|
|
116
116
|
http_binding.field_bindings.to_h do |field_binding|
|
|
117
117
|
field_path_camel = field_binding.field_path.split(".").map { |part| camel_name_for part }.join(".")
|
|
@@ -252,7 +252,7 @@ module Gapic
|
|
|
252
252
|
# Returns nil if:
|
|
253
253
|
# - the field is not found
|
|
254
254
|
# - the field is a Message or an array,
|
|
255
|
-
# - the regex does not match
|
|
255
|
+
# - the regex does not match the entire string representation
|
|
256
256
|
# @param request_hash [Hash]
|
|
257
257
|
# A hash of the GRPC request or the sub-request with the unset
|
|
258
258
|
# proto3_optional fields removed.
|
|
@@ -266,7 +266,9 @@ module Gapic
|
|
|
266
266
|
|
|
267
267
|
# Covers the case where in `foo.bar.baz`, `baz` is still a submessage or an array.
|
|
268
268
|
return nil if value.is_a?(::Hash) || value.is_a?(::Array)
|
|
269
|
-
|
|
269
|
+
str = value.to_s
|
|
270
|
+
match = regex.match str
|
|
271
|
+
str if match && match.pre_match.empty? && match.post_match.empty?
|
|
270
272
|
end
|
|
271
273
|
|
|
272
274
|
# Finds a value in the hash by path.
|