google-gax 0.8.9 → 0.8.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d01554d9585efae173a06f021c95ee26fcc6b043
4
- data.tar.gz: 8fcb4ef5ac286b1ce963ccea9d6a2ceb1b727cfa
3
+ metadata.gz: 76440a4d7dd2108f85483471d10f1a6423f859d5
4
+ data.tar.gz: abf6c468b2e6a3d4000da9471507739df2396c34
5
5
  SHA512:
6
- metadata.gz: f841c39cea967f4d120e4089812bd6aa676d7f0412dc1ff865633a4c322087ec85ee0e1be3e45d621c1cb5a1bfff8bd813281795cb80242a8c73f552ef120449
7
- data.tar.gz: 3f98b5a00ca78eff391ea81de5a053e2026b1c235eb2941d2081141ed3080fa574ba29de6684ddad76d993be7d55e1eb1114a21d50575d76aed1b98a85b6c557
6
+ metadata.gz: 4318c6095b0eb2fde132101060f19d8484c9522c9fdeb39feb569a227cdbcff07577708af72f6aebe49e8b21f503e9292751a975355af085c852c2223edd6ad9
7
+ data.tar.gz: dce53acdbc2064e0fd85b127a01621cf8aa0db94d2952abef5da22eaba60a68828aec8e951846ee3e9d89aae9331d0a52244d13d136bef35e3445a6ed13973fb
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
data/lib/google/gax.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -29,6 +29,6 @@
29
29
 
30
30
  module Google
31
31
  module Gax
32
- VERSION = '0.8.9'.freeze
32
+ VERSION = '0.8.10'.freeze
33
33
  end
34
34
  end
@@ -0,0 +1,34 @@
1
+ # Copyright 2016, 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
+ module Google
31
+ module Gax
32
+ VERSION = '0.8.7'.freeze
33
+ end
34
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -114,4 +114,37 @@ describe Google::Gax::Grpc do
114
114
  end.to raise_error(ArgumentError)
115
115
  end
116
116
  end
117
+ describe '#deserialize_error_status_details' do
118
+ it 'deserializes a known error type' do
119
+ expected_error = Google::Rpc::DebugInfo.new(detail: 'shoes are untied')
120
+
121
+ any = Google::Protobuf::Any.new
122
+ any.pack(expected_error)
123
+ status = Google::Rpc::Status.new(details: [any])
124
+ encoded = Google::Rpc::Status.encode(status)
125
+ metadata = {
126
+ 'grpc-status-details-bin' => encoded
127
+ }
128
+ error = GRPC::BadStatus.new(1, '', metadata)
129
+
130
+ expect(Google::Gax::Grpc.deserialize_error_status_details(error))
131
+ .to eq [expected_error]
132
+ end
133
+ it 'does not deserialize an unknown error type' do
134
+ expected_error = Random.new.bytes(8)
135
+
136
+ any = Google::Protobuf::Any.new(
137
+ type_url: 'unknown-type', value: expected_error
138
+ )
139
+ status = Google::Rpc::Status.new(details: [any])
140
+ encoded = Google::Rpc::Status.encode(status)
141
+ metadata = {
142
+ 'grpc-status-details-bin' => encoded
143
+ }
144
+ error = GRPC::BadStatus.new(1, '', metadata)
145
+
146
+ expect(Google::Gax::Grpc.deserialize_error_status_details(error))
147
+ .to eq [any]
148
+ end
149
+ end
117
150
  end
File without changes
File without changes
File without changes
File without changes
data/spec/spec_helper.rb CHANGED
File without changes
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: 0.8.9
4
+ version: 0.8.10
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: 2017-09-26 00:00:00.000000000 Z
11
+ date: 2017-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: googleauth
@@ -170,6 +170,7 @@ files:
170
170
  - lib/google/gax/settings.rb
171
171
  - lib/google/gax/util.rb
172
172
  - lib/google/gax/version.rb
173
+ - lib/google/gax/version.rb~
173
174
  - lib/google/longrunning/operations_client.rb
174
175
  - lib/google/longrunning/operations_client_config.json
175
176
  - spec/fixtures/fixture.proto