google-gax 1.4.0 → 1.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f85f3914efd1320cd9f01cfe77ec1e7fff36e092
4
- data.tar.gz: 7326644db9b2b1157eeab214f9f327b14961c6c1
3
+ metadata.gz: ba10bcc638424821c5305ebb861de86bd4b40c5f
4
+ data.tar.gz: e4bb08f02fa8419dbd78dd367728ccccdb4dcf6a
5
5
  SHA512:
6
- metadata.gz: b48de10a41fbe57711a32e0018a2004134871b115469eafed271dc6a301ff5a732b6866c55dba6b580b2e24d424cb329bce815b2f8ec64d522e2ea30cf950a5d
7
- data.tar.gz: 127ad3139e211fd901e3a5943937d0da7f12ea7150a8385365f212a77a12c8a1fdd1e84592ea677190667cfaa8b2c260468eb4389ca5f2ffb5c486360d4023ce
6
+ metadata.gz: 646afd7b05a46f131a73253f1f8deb6ed3a7228dfa1881e231ed6c01a22f815b37241c67b6b9e318651de81b471cb7a0ef0913dacd3161b60d9381fbb2bf4366
7
+ data.tar.gz: c45da1ed072ed6581f693e57f438e92faaaedb44d4ffd3eb1490b7256026b509666d2fb692ac185cfb78e6d23bbad74c254b4c6248d7962c74a4af5a5a1fe284
@@ -106,12 +106,12 @@ module Google
106
106
  # @param client [Google::Longrunning::OperationsClient]
107
107
  # The client that handles the grpc operations.
108
108
  # @param result_type [Class] The class type to be unpacked from the
109
- # result.
109
+ # result. If not provided the class type will be looked up. Optional.
110
110
  # @param metadata_type [Class] The class type to be unpacked from the
111
- # metadata.
111
+ # metadata. If not provided the class type will be looked up. Optional.
112
112
  # @param call_options [Google::Gax::CallOptions]
113
- # The call options that are used when reloading the operation.
114
- def initialize(grpc_op, client, result_type, metadata_type,
113
+ # The call options that are used when reloading the operation. Optional.
114
+ def initialize(grpc_op, client, result_type = nil, metadata_type = nil,
115
115
  call_options: nil)
116
116
  @grpc_op = grpc_op
117
117
  @client = client
@@ -29,6 +29,6 @@
29
29
 
30
30
  module Google
31
31
  module Gax
32
- VERSION = '1.4.0'.freeze
32
+ VERSION = '1.5.0'.freeze
33
33
  end
34
34
  end
@@ -142,6 +142,15 @@ describe Google::Gax::Operation do
142
142
  expect(op.metadata).to eq(TIMESTAMP)
143
143
  end
144
144
 
145
+ it 'should lookup and unpack the metadata when metadata_type is not ' \
146
+ 'provided' do
147
+ op = GaxOp.new( # create Operation without result_type or metadata_type
148
+ GrpcOp.new(done: true, metadata: TIMESTAMP_ANY),
149
+ DONE_ON_GET_CLIENT
150
+ )
151
+ expect(op.metadata).to eq(TIMESTAMP)
152
+ end
153
+
145
154
  it 'should return original metadata when metadata_type is not found when ' \
146
155
  'looked up.' do
147
156
  op = create_op(GrpcOp.new(done: true, metadata: UNKNOWN_ANY),
@@ -238,6 +247,15 @@ describe Google::Gax::Operation do
238
247
  expect(op.response).to eq(TIMESTAMP)
239
248
  end
240
249
 
250
+ it 'should lookup and unpack the result when result_type is not ' \
251
+ 'provided.' do
252
+ op = GaxOp.new( # create Operation without result_type or metadata_type
253
+ GrpcOp.new(done: true, response: TIMESTAMP_ANY),
254
+ DONE_ON_GET_CLIENT
255
+ )
256
+ expect(op.response).to eq(TIMESTAMP)
257
+ end
258
+
241
259
  it 'should return original response when result_type is not found when ' \
242
260
  'looked up.' do
243
261
  op = create_op(GrpcOp.new(done: true, response: UNKNOWN_ANY),
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-gax
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
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: 2018-09-26 00:00:00.000000000 Z
11
+ date: 2019-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: googleauth
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.6.2
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 0.10.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: 0.6.2
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 0.10.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: grpc
29
35
  requirement: !ruby/object:Gem::Requirement