google-gax 1.5.0 → 1.6.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 +5 -5
- data/lib/google/gax.rb +2 -2
- data/lib/google/gax/api_callable.rb +5 -4
- data/lib/google/gax/bundling.rb +2 -2
- data/lib/google/gax/constants.rb +2 -2
- data/lib/google/gax/errors.rb +2 -2
- data/lib/google/gax/grpc.rb +2 -2
- data/lib/google/gax/operation.rb +2 -2
- data/lib/google/gax/path_template.rb +2 -2
- data/lib/google/gax/settings.rb +7 -4
- data/lib/google/gax/util.rb +2 -2
- data/lib/google/gax/version.rb +3 -3
- data/lib/google/longrunning/operations_client.rb +14 -10
- data/spec/fixtures/fixture.proto +1 -1
- data/spec/google/gax/api_callable_spec.rb +3 -3
- data/spec/google/gax/bundling_spec.rb +2 -2
- data/spec/google/gax/call_settings_spec.rb +100 -0
- data/spec/google/gax/error_spec.rb +2 -2
- data/spec/google/gax/grpc_spec.rb +2 -2
- data/spec/google/gax/operation_spec.rb +2 -2
- data/spec/google/gax/path_template_spec.rb +2 -2
- data/spec/google/gax/settings_spec.rb +2 -2
- data/spec/google/gax/util_spec.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b9cab0f97202d451fdc7ac6296ec47ad060d8ca69dcbf563c562994f2fc92402
|
|
4
|
+
data.tar.gz: '09ebcd41d4d4d03e9230ed98ffac2254e3eaead6531b18e675cfb6d9f2113007'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c1beaad9a521df3f78d6e09ec31bb02da6148e33b0ec01340b46c9df4ce7265d1d36e380c3660c545608258babf864252b40673537d771fc326e7f137469724
|
|
7
|
+
data.tar.gz: d7a28c5d8158c8bdfeb1753feb35ef02e90bfd53c3181d0b409ac691408a559678dcf62c43b2f9f702ab7b7bfdc101f3da91588ce9bca70c006a3b316da1783f
|
data/lib/google/gax.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -393,12 +393,13 @@ module Google
|
|
|
393
393
|
# @return [Proc] the original proc updated to the timeout arg
|
|
394
394
|
def add_timeout_arg(a_func, timeout, metadata)
|
|
395
395
|
proc do |request, block|
|
|
396
|
+
deadline = Time.now + timeout unless timeout.nil?
|
|
396
397
|
op = a_func.call(request,
|
|
397
|
-
deadline:
|
|
398
|
+
deadline: deadline,
|
|
398
399
|
metadata: metadata,
|
|
399
400
|
return_op: true)
|
|
400
401
|
res = op.execute
|
|
401
|
-
block.call op if block
|
|
402
|
+
block.call res, op if block
|
|
402
403
|
res
|
|
403
404
|
end
|
|
404
405
|
end
|
data/lib/google/gax/bundling.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
data/lib/google/gax/constants.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
data/lib/google/gax/errors.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
data/lib/google/gax/grpc.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
data/lib/google/gax/operation.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
data/lib/google/gax/settings.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -83,7 +83,9 @@ module Google
|
|
|
83
83
|
|
|
84
84
|
# @return true when it has retry codes.
|
|
85
85
|
def retry_codes?
|
|
86
|
-
@retry_options &&
|
|
86
|
+
@retry_options &&
|
|
87
|
+
@retry_options.retry_codes &&
|
|
88
|
+
@retry_options.retry_codes.any?
|
|
87
89
|
end
|
|
88
90
|
|
|
89
91
|
# @return true when it has valid bundler configuration.
|
|
@@ -123,7 +125,8 @@ module Google
|
|
|
123
125
|
options.page_token
|
|
124
126
|
end
|
|
125
127
|
|
|
126
|
-
metadata =
|
|
128
|
+
metadata = @metadata || {}
|
|
129
|
+
metadata = metadata.dup
|
|
127
130
|
metadata.update(options.metadata) if options.metadata != :OPTION_INHERIT
|
|
128
131
|
|
|
129
132
|
CallSettings.new(timeout: timeout,
|
data/lib/google/gax/util.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2017, Google
|
|
1
|
+
# Copyright 2017, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
data/lib/google/gax/version.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
|
|
30
30
|
module Google
|
|
31
31
|
module Gax
|
|
32
|
-
VERSION = '1.
|
|
32
|
+
VERSION = '1.6.2'.freeze
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -108,13 +108,16 @@ module Google
|
|
|
108
108
|
# or the specified config is missing data points.
|
|
109
109
|
# @param timeout [Numeric]
|
|
110
110
|
# The default timeout, in seconds, for calls made through this client.
|
|
111
|
+
# @param metadata [Hash]
|
|
112
|
+
# The request metadata headers.
|
|
111
113
|
def initialize \
|
|
112
114
|
credentials: nil,
|
|
113
115
|
scopes: ALL_SCOPES,
|
|
114
116
|
client_config: {},
|
|
115
117
|
timeout: DEFAULT_TIMEOUT,
|
|
116
118
|
lib_name: nil,
|
|
117
|
-
lib_version: ""
|
|
119
|
+
lib_version: "",
|
|
120
|
+
metadata: nil
|
|
118
121
|
# These require statements are intentionally placed here to initialize
|
|
119
122
|
# the gRPC module only when it's required.
|
|
120
123
|
# See https://github.com/googleapis/toolkit/issues/446
|
|
@@ -139,18 +142,19 @@ module Google
|
|
|
139
142
|
updater_proc = credentials.updater_proc
|
|
140
143
|
end
|
|
141
144
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
metadata ||= {}
|
|
146
|
+
metadata[:"x-goog-api-client"] ||= begin
|
|
147
|
+
google_api_client = ["gl-ruby/#{RUBY_VERSION}"]
|
|
148
|
+
google_api_client << "#{lib_name}/#{lib_version}" if lib_name
|
|
149
|
+
google_api_client << "gax/#{Google::Gax::VERSION}"
|
|
150
|
+
google_api_client << "grpc/#{GRPC::VERSION}"
|
|
151
|
+
google_api_client.join(' ').freeze
|
|
152
|
+
end
|
|
149
153
|
|
|
150
|
-
headers = { :"x-goog-api-client" => google_api_client }
|
|
151
154
|
client_config_file = Pathname.new(__dir__).join(
|
|
152
155
|
"operations_client_config.json"
|
|
153
156
|
)
|
|
157
|
+
|
|
154
158
|
defaults = client_config_file.open do |f|
|
|
155
159
|
Google::Gax.construct_settings(
|
|
156
160
|
"google.longrunning.Operations",
|
|
@@ -160,7 +164,7 @@ module Google
|
|
|
160
164
|
timeout,
|
|
161
165
|
page_descriptors: PAGE_DESCRIPTORS,
|
|
162
166
|
errors: Google::Gax::Grpc::API_ERRORS,
|
|
163
|
-
|
|
167
|
+
metadata: metadata
|
|
164
168
|
)
|
|
165
169
|
end
|
|
166
170
|
|
data/spec/fixtures/fixture.proto
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -353,7 +353,7 @@ describe Google::Gax do
|
|
|
353
353
|
my_callable = Google::Gax.create_api_call(
|
|
354
354
|
func, CallSettings.new(timeout: 0, retry_options: retry_options)
|
|
355
355
|
)
|
|
356
|
-
expect { my_callable.call }.to raise_error(
|
|
356
|
+
expect { my_callable.call }.to raise_error(CustomException)
|
|
357
357
|
expect(call_count).to eq(1)
|
|
358
358
|
end
|
|
359
359
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Copyright 2019, Google Inc.
|
|
2
|
+
# All rights reserved.
|
|
3
|
+
#
|
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
|
5
|
+
# modification, are permitted provided that the following conditions are
|
|
6
|
+
# met:
|
|
7
|
+
#
|
|
8
|
+
# * Redistributions of source code must retain the above copyright
|
|
9
|
+
# notice, this list of conditions and the following disclaimer.
|
|
10
|
+
# * Redistributions in binary form must reproduce the above
|
|
11
|
+
# copyright notice, this list of conditions and the following disclaimer
|
|
12
|
+
# in the documentation and/or other materials provided with the
|
|
13
|
+
# distribution.
|
|
14
|
+
# * Neither the name of Google Inc. nor the names of its
|
|
15
|
+
# contributors may be used to endorse or promote products derived from
|
|
16
|
+
# this software without specific prior written permission.
|
|
17
|
+
#
|
|
18
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
19
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
20
|
+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
21
|
+
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
22
|
+
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
23
|
+
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
24
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
25
|
+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
26
|
+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
27
|
+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
|
+
|
|
30
|
+
require 'google/gax/settings'
|
|
31
|
+
require 'google/gax'
|
|
32
|
+
|
|
33
|
+
describe 'Google::Gax::CallSettings' do
|
|
34
|
+
describe 'merging metadata' do
|
|
35
|
+
NonPrivateCallSettings = Google::Gax.const_get :CallSettings
|
|
36
|
+
|
|
37
|
+
it 'merges nil with :OPTION_INHERIT' do
|
|
38
|
+
call_settings = NonPrivateCallSettings.new metadata: nil
|
|
39
|
+
call_options = Google::Gax::CallOptions.new metadata: :OPTION_INHERIT
|
|
40
|
+
new_settings = call_settings.merge call_options
|
|
41
|
+
expect(new_settings.metadata).to eq({})
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
it 'merges nil with an empty hash' do
|
|
45
|
+
call_settings = NonPrivateCallSettings.new metadata: nil
|
|
46
|
+
call_options = Google::Gax::CallOptions.new metadata: {}
|
|
47
|
+
new_settings = call_settings.merge call_options
|
|
48
|
+
expect(new_settings.metadata).to eq({})
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
it 'merges nil hash with a filled hash' do
|
|
52
|
+
call_settings = NonPrivateCallSettings.new metadata: nil
|
|
53
|
+
call_options = Google::Gax::CallOptions.new metadata: { foo: :baz }
|
|
54
|
+
new_settings = call_settings.merge call_options
|
|
55
|
+
expect(new_settings.metadata).to eq(foo: :baz)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
it 'merges an empty hash with :OPTION_INHERIT' do
|
|
59
|
+
call_settings = NonPrivateCallSettings.new metadata: {}
|
|
60
|
+
call_options = Google::Gax::CallOptions.new metadata: :OPTION_INHERIT
|
|
61
|
+
new_settings = call_settings.merge call_options
|
|
62
|
+
expect(new_settings.metadata).to eq({})
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
it 'merges an empty hash with an empty hash' do
|
|
66
|
+
call_settings = NonPrivateCallSettings.new metadata: {}
|
|
67
|
+
call_options = Google::Gax::CallOptions.new metadata: {}
|
|
68
|
+
new_settings = call_settings.merge call_options
|
|
69
|
+
expect(new_settings.metadata).to eq({})
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
it 'merges an empty hash with a filled hash' do
|
|
73
|
+
call_settings = NonPrivateCallSettings.new metadata: {}
|
|
74
|
+
call_options = Google::Gax::CallOptions.new metadata: { foo: :baz }
|
|
75
|
+
new_settings = call_settings.merge call_options
|
|
76
|
+
expect(new_settings.metadata).to eq(foo: :baz)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
it 'merges a filled hash with :OPTION_INHERIT' do
|
|
80
|
+
call_settings = NonPrivateCallSettings.new metadata: { foo: :bar }
|
|
81
|
+
call_options = Google::Gax::CallOptions.new metadata: :OPTION_INHERIT
|
|
82
|
+
new_settings = call_settings.merge call_options
|
|
83
|
+
expect(new_settings.metadata).to eq(foo: :bar)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
it 'merges a filled hash with an empty hash' do
|
|
87
|
+
call_settings = NonPrivateCallSettings.new metadata: { foo: :bar }
|
|
88
|
+
call_options = Google::Gax::CallOptions.new metadata: {}
|
|
89
|
+
new_settings = call_settings.merge call_options
|
|
90
|
+
expect(new_settings.metadata).to eq(foo: :bar)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
it 'merges a filled hash with a filled hash' do
|
|
94
|
+
call_settings = NonPrivateCallSettings.new metadata: { foo: :bar }
|
|
95
|
+
call_options = Google::Gax::CallOptions.new metadata: { foo: :baz }
|
|
96
|
+
new_settings = call_settings.merge call_options
|
|
97
|
+
expect(new_settings.metadata).to eq(foo: :baz)
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2017, Google
|
|
1
|
+
# Copyright 2017, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2017, Google
|
|
1
|
+
# Copyright 2017, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2016, Google
|
|
1
|
+
# Copyright 2016, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2017, Google
|
|
1
|
+
# Copyright 2017, Google LLC
|
|
2
2
|
# All rights reserved.
|
|
3
3
|
#
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# copyright notice, this list of conditions and the following disclaimer
|
|
12
12
|
# in the documentation and/or other materials provided with the
|
|
13
13
|
# distribution.
|
|
14
|
-
# * Neither the name of Google
|
|
14
|
+
# * Neither the name of Google LLC nor the names of its
|
|
15
15
|
# contributors may be used to endorse or promote products derived from
|
|
16
16
|
# this software without specific prior written permission.
|
|
17
17
|
#
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-gax
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.2
|
|
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: 2019-
|
|
11
|
+
date: 2019-05-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: googleauth
|
|
@@ -194,6 +194,7 @@ files:
|
|
|
194
194
|
- spec/fixtures/fixture_pb.rb
|
|
195
195
|
- spec/google/gax/api_callable_spec.rb
|
|
196
196
|
- spec/google/gax/bundling_spec.rb
|
|
197
|
+
- spec/google/gax/call_settings_spec.rb
|
|
197
198
|
- spec/google/gax/error_spec.rb
|
|
198
199
|
- spec/google/gax/grpc_spec.rb
|
|
199
200
|
- spec/google/gax/operation_spec.rb
|
|
@@ -220,8 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
220
221
|
- !ruby/object:Gem::Version
|
|
221
222
|
version: '0'
|
|
222
223
|
requirements: []
|
|
223
|
-
|
|
224
|
-
rubygems_version: 2.6.14
|
|
224
|
+
rubygems_version: 3.0.3
|
|
225
225
|
signing_key:
|
|
226
226
|
specification_version: 4
|
|
227
227
|
summary: Aids the development of APIs for clients and servers based on GRPC and Google
|