grpc 1.20.0-universal-darwin → 1.21.0-universal-darwin

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 07d489b47ab0ae933dd9254eb6a2f5b3d0e72e108a5735d7b965c85019230a10
4
- data.tar.gz: 0fa3e62f31f93874eee2f16d633d2ad6c5b795483db414c12e9dbfe5af05586b
3
+ metadata.gz: e78b9e0d1594cf077e5769f8ba07cca627c1aedb2819c57d9fcc3e1ae2e5b4ef
4
+ data.tar.gz: dfb219ffcc0b01174a3b6497498565234890b5ecf6ebe5e311e1c9667b054273
5
5
  SHA512:
6
- metadata.gz: 92ca1776d6702d315083ec810d1664112c8d2edc13a27af13e15accbf70d1c1f01ff0788af679bc3d62e0094c1d97946945ea4c859f0d96ad15377e1151b204c
7
- data.tar.gz: 9acf431678a374651016693ac93fdecb4ffdf8e3284b44a444267eea44c0913c1944b33a30547ec54c5f00365a62346300e05cecd26b5eed54f494f34e7a35f3
6
+ metadata.gz: 49f9a28f9a7246abcc61fd2b7d653592f9edf86a07bad8d9e1593b9730f9e65020e9cd224278546b768f117d1a49e144c22ade65b344943a01febf5ddf244a57
7
+ data.tar.gz: 5ebed8e16808891f6aa6fe18ef9b9fdc48b74c641751b0ae098d02d5095b82c3ef29af84a58f39c6693b01ae2aeb5d30f7228ffc3dafc920f8acad232075beaf
data/etc/roots.pem CHANGED
@@ -4552,3 +4552,149 @@ Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayh
4552
4552
  jWZSaX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw
4553
4553
  3kAP+HwV96LOPNdeE4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0=
4554
4554
  -----END CERTIFICATE-----
4555
+
4556
+ # Issuer: CN=emSign Root CA - G1 O=eMudhra Technologies Limited OU=emSign PKI
4557
+ # Subject: CN=emSign Root CA - G1 O=eMudhra Technologies Limited OU=emSign PKI
4558
+ # Label: "emSign Root CA - G1"
4559
+ # Serial: 235931866688319308814040
4560
+ # MD5 Fingerprint: 9c:42:84:57:dd:cb:0b:a7:2e:95:ad:b6:f3:da:bc:ac
4561
+ # SHA1 Fingerprint: 8a:c7:ad:8f:73:ac:4e:c1:b5:75:4d:a5:40:f4:fc:cf:7c:b5:8e:8c
4562
+ # SHA256 Fingerprint: 40:f6:af:03:46:a9:9a:a1:cd:1d:55:5a:4e:9c:ce:62:c7:f9:63:46:03:ee:40:66:15:83:3d:c8:c8:d0:03:67
4563
+ -----BEGIN CERTIFICATE-----
4564
+ MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYD
4565
+ VQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBU
4566
+ ZWNobm9sb2dpZXMgTGltaXRlZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBH
4567
+ MTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgxODMwMDBaMGcxCzAJBgNVBAYTAklO
4568
+ MRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVkaHJhIFRlY2hub2xv
4569
+ Z2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIBIjAN
4570
+ BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQz
4571
+ f2N4aLTNLnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO
4572
+ 8oG0x5ZOrRkVUkr+PHB1cM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aq
4573
+ d7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHWDV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhM
4574
+ tTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ6DqS0hdW5TUaQBw+jSzt
4575
+ Od9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrHhQIDAQAB
4576
+ o0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQD
4577
+ AgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31x
4578
+ PaOfG1vR2vjTnGs2vZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjM
4579
+ wiI/aTvFthUvozXGaCocV685743QNcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6d
4580
+ GNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q+Mri/Tm3R7nrft8EI6/6nAYH
4581
+ 6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeihU80Bv2noWgby
4582
+ RQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx
4583
+ iN66zB+Afko=
4584
+ -----END CERTIFICATE-----
4585
+
4586
+ # Issuer: CN=emSign ECC Root CA - G3 O=eMudhra Technologies Limited OU=emSign PKI
4587
+ # Subject: CN=emSign ECC Root CA - G3 O=eMudhra Technologies Limited OU=emSign PKI
4588
+ # Label: "emSign ECC Root CA - G3"
4589
+ # Serial: 287880440101571086945156
4590
+ # MD5 Fingerprint: ce:0b:72:d1:9f:88:8e:d0:50:03:e8:e3:b8:8b:67:40
4591
+ # SHA1 Fingerprint: 30:43:fa:4f:f2:57:dc:a0:c3:80:ee:2e:58:ea:78:b2:3f:e6:bb:c1
4592
+ # SHA256 Fingerprint: 86:a1:ec:ba:08:9c:4a:8d:3b:be:27:34:c6:12:ba:34:1d:81:3e:04:3c:f9:e8:a8:62:cd:5c:57:a3:6b:be:6b
4593
+ -----BEGIN CERTIFICATE-----
4594
+ MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQG
4595
+ EwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNo
4596
+ bm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g
4597
+ RzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4MTgzMDAwWjBrMQswCQYDVQQGEwJJ
4598
+ TjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9s
4599
+ b2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMw
4600
+ djAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0
4601
+ WXTsuwYc58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xyS
4602
+ fvalY8L1X44uT6EYGQIrMgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuB
4603
+ zhccLikenEhjQjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggq
4604
+ hkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+DCBeQyh+KTOgNG3qxrdWB
4605
+ CUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7jHvrZQnD
4606
+ +JbNR6iC8hZVdyR+EhCVBCyj
4607
+ -----END CERTIFICATE-----
4608
+
4609
+ # Issuer: CN=emSign Root CA - C1 O=eMudhra Inc OU=emSign PKI
4610
+ # Subject: CN=emSign Root CA - C1 O=eMudhra Inc OU=emSign PKI
4611
+ # Label: "emSign Root CA - C1"
4612
+ # Serial: 825510296613316004955058
4613
+ # MD5 Fingerprint: d8:e3:5d:01:21:fa:78:5a:b0:df:ba:d2:ee:2a:5f:68
4614
+ # SHA1 Fingerprint: e7:2e:f1:df:fc:b2:09:28:cf:5d:d4:d5:67:37:b1:51:cb:86:4f:01
4615
+ # SHA256 Fingerprint: 12:56:09:aa:30:1d:a0:a2:49:b9:7a:82:39:cb:6a:34:21:6f:44:dc:ac:9f:39:54:b1:42:92:f2:e8:c8:60:8f
4616
+ -----BEGIN CERTIFICATE-----
4617
+ MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkG
4618
+ A1UEBhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEg
4619
+ SW5jMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAw
4620
+ MFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UEBhMCVVMxEzARBgNVBAsTCmVtU2ln
4621
+ biBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNpZ24gUm9v
4622
+ dCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+upufGZ
4623
+ BczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZ
4624
+ HdPIWoU/Xse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH
4625
+ 3DspVpNqs8FqOp099cGXOFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvH
4626
+ GPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4VI5b2P/AgNBbeCsbEBEV5f6f9vtKppa+c
4627
+ xSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleoomslMuoaJuvimUnzYnu3Yy1
4628
+ aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+XJGFehiq
4629
+ TbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEL
4630
+ BQADggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87
4631
+ /kOXSTKZEhVb3xEp/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4
4632
+ kqNPEjE2NuLe/gDEo2APJ62gsIq1NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrG
4633
+ YQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9wC68AivTxEDkigcxHpvOJpkT
4634
+ +xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQBmIMMMAVSKeo
4635
+ WXzhriKi4gp6D/piq1JM4fHfyr6DDUI=
4636
+ -----END CERTIFICATE-----
4637
+
4638
+ # Issuer: CN=emSign ECC Root CA - C3 O=eMudhra Inc OU=emSign PKI
4639
+ # Subject: CN=emSign ECC Root CA - C3 O=eMudhra Inc OU=emSign PKI
4640
+ # Label: "emSign ECC Root CA - C3"
4641
+ # Serial: 582948710642506000014504
4642
+ # MD5 Fingerprint: 3e:53:b3:a3:81:ee:d7:10:f8:d3:b0:1d:17:92:f5:d5
4643
+ # SHA1 Fingerprint: b6:af:43:c2:9b:81:53:7d:f6:ef:6b:c3:1f:1f:60:15:0c:ee:48:66
4644
+ # SHA256 Fingerprint: bc:4d:80:9b:15:18:9d:78:db:3e:1d:8c:f4:f9:72:6a:79:5d:a1:64:3c:a5:f1:35:8e:1d:db:0e:dc:0d:7e:b3
4645
+ -----BEGIN CERTIFICATE-----
4646
+ MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQG
4647
+ EwJVUzETMBEGA1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMx
4648
+ IDAeBgNVBAMTF2VtU2lnbiBFQ0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAw
4649
+ MFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UEBhMCVVMxEzARBgNVBAsTCmVtU2ln
4650
+ biBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQDExdlbVNpZ24gRUND
4651
+ IFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd6bci
4652
+ MK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4Ojavti
4653
+ sIGJAnB9SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0O
4654
+ BBYEFPtaSNCAIEDyqOkAB2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
4655
+ Af8EBTADAQH/MAoGCCqGSM49BAMDA2gAMGUCMQC02C8Cif22TGK6Q04ThHK1rt0c
4656
+ 3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwUZOR8loMRnLDRWmFLpg9J
4657
+ 0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ==
4658
+ -----END CERTIFICATE-----
4659
+
4660
+ # Issuer: CN=Hongkong Post Root CA 3 O=Hongkong Post
4661
+ # Subject: CN=Hongkong Post Root CA 3 O=Hongkong Post
4662
+ # Label: "Hongkong Post Root CA 3"
4663
+ # Serial: 46170865288971385588281144162979347873371282084
4664
+ # MD5 Fingerprint: 11:fc:9f:bd:73:30:02:8a:fd:3f:f3:58:b9:cb:20:f0
4665
+ # SHA1 Fingerprint: 58:a2:d0:ec:20:52:81:5b:c1:f3:f8:64:02:24:4e:c2:8e:02:4b:02
4666
+ # SHA256 Fingerprint: 5a:2f:c0:3f:0c:83:b0:90:bb:fa:40:60:4b:09:88:44:6c:76:36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Pierc+xYw5F9KBa
4698
+ LJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fqdBb9HxEG
4699
+ mpv0
4700
+ -----END CERTIFICATE-----
@@ -304,7 +304,7 @@ static VALUE bg_thread_init_rb_mu = Qundef;
304
304
  static int bg_thread_init_done = 0;
305
305
 
306
306
  static void grpc_ruby_init_threads() {
307
- // Avoid calling calling into ruby library (when creating threads here)
307
+ // Avoid calling into ruby library (when creating threads here)
308
308
  // in gpr_once_init. In general, it appears to be unsafe to call
309
309
  // into the ruby library while holding a non-ruby mutex, because a gil yield
310
310
  // could end up trying to lock onto that same mutex and deadlocking.
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -42,12 +42,31 @@ module GRPC
42
42
  @metadata = metadata
43
43
  end
44
44
 
45
- # Converts the exception to a GRPC::Status for use in the networking
45
+ # Converts the exception to a {Struct::Status} for use in the networking
46
46
  # wrapper layer.
47
47
  #
48
- # @return [Status] with the same code and details
48
+ # @return [Struct::Status] with the same code and details
49
49
  def to_status
50
- Struct::Status.new(code, details, @metadata)
50
+ Struct::Status.new(code, details, metadata)
51
+ end
52
+
53
+ # Converts the exception to a deserialized {Google::Rpc::Status} object.
54
+ # Returns `nil` if the `grpc-status-details-bin` trailer could not be
55
+ # converted to a {Google::Rpc::Status} due to the server not providing
56
+ # the necessary trailers.
57
+ #
58
+ # @return [Google::Rpc::Status, nil]
59
+ def to_rpc_status
60
+ # Lazily require google_rpc_status_utils to scope
61
+ # loading protobuf_c.so to the users of this method.
62
+ require_relative './google_rpc_status_utils'
63
+ status = to_status
64
+ return if status.nil?
65
+ GoogleRpcStatusUtils.extract_google_rpc_status(status)
66
+ rescue Google::Protobuf::ParseError => parse_error
67
+ GRPC.logger.warn('parse error: to_rpc_status failed')
68
+ GRPC.logger.warn(parse_error)
69
+ nil
51
70
  end
52
71
 
53
72
  def self.new_status_exception(code, details = 'unknown cause',
@@ -224,7 +224,7 @@ module GRPC
224
224
  set_input_stream_done.call
225
225
  end
226
226
  GRPC.logger.debug('bidi-read-loop: finished')
227
- # Make sure that the write loop is done done before finishing the call.
227
+ # Make sure that the write loop is done before finishing the call.
228
228
  # Note that blocking is ok at this point because we've already received
229
229
  # a status
230
230
  @enq_th.join if is_client
@@ -202,7 +202,7 @@ module GRPC
202
202
  # forcing an abrupt exit to each thread.
203
203
  #
204
204
  # * connect_md_proc:
205
- # when non-nil is a proc for determining metadata to to send back the client
205
+ # when non-nil is a proc for determining metadata to send back the client
206
206
  # on receiving an invocation req. The proc signature is:
207
207
  # {key: val, ..} func(method_name, {key: val, ...})
208
208
  #
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.20.0'
17
+ VERSION = '1.21.0'
18
18
  end
@@ -0,0 +1,141 @@
1
+ # Copyright 2015 gRPC authors.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'spec_helper'
16
+ require 'google/protobuf/well_known_types'
17
+ require_relative '../pb/src/proto/grpc/testing/messages_pb'
18
+
19
+ describe GRPC::BadStatus do
20
+ describe :attributes do
21
+ it 'has attributes' do
22
+ code = 1
23
+ details = 'details'
24
+ metadata = { 'key' => 'val' }
25
+
26
+ exception = GRPC::BadStatus.new(code, details, metadata)
27
+
28
+ expect(exception.code).to eq code
29
+ expect(exception.details).to eq details
30
+ expect(exception.metadata).to eq metadata
31
+ end
32
+ end
33
+
34
+ describe :new_status_exception do
35
+ let(:codes_and_classes) do
36
+ [
37
+ [GRPC::Core::StatusCodes::OK, GRPC::Ok],
38
+ [GRPC::Core::StatusCodes::CANCELLED, GRPC::Cancelled],
39
+ [GRPC::Core::StatusCodes::UNKNOWN, GRPC::Unknown],
40
+ [GRPC::Core::StatusCodes::INVALID_ARGUMENT, GRPC::InvalidArgument],
41
+ [GRPC::Core::StatusCodes::DEADLINE_EXCEEDED, GRPC::DeadlineExceeded],
42
+ [GRPC::Core::StatusCodes::NOT_FOUND, GRPC::NotFound],
43
+ [GRPC::Core::StatusCodes::ALREADY_EXISTS, GRPC::AlreadyExists],
44
+ [GRPC::Core::StatusCodes::PERMISSION_DENIED, GRPC::PermissionDenied],
45
+ [GRPC::Core::StatusCodes::UNAUTHENTICATED, GRPC::Unauthenticated],
46
+ [GRPC::Core::StatusCodes::RESOURCE_EXHAUSTED, GRPC::ResourceExhausted],
47
+ [GRPC::Core::StatusCodes::FAILED_PRECONDITION, GRPC::FailedPrecondition],
48
+ [GRPC::Core::StatusCodes::ABORTED, GRPC::Aborted],
49
+ [GRPC::Core::StatusCodes::OUT_OF_RANGE, GRPC::OutOfRange],
50
+ [GRPC::Core::StatusCodes::UNIMPLEMENTED, GRPC::Unimplemented],
51
+ [GRPC::Core::StatusCodes::INTERNAL, GRPC::Internal],
52
+ [GRPC::Core::StatusCodes::UNAVAILABLE, GRPC::Unavailable],
53
+ [GRPC::Core::StatusCodes::DATA_LOSS, GRPC::DataLoss],
54
+ [99, GRPC::BadStatus] # Unknown codes default to BadStatus
55
+ ]
56
+ end
57
+
58
+ it 'maps codes to the correct error class' do
59
+ codes_and_classes.each do |code, grpc_error_class|
60
+ exception = GRPC::BadStatus.new_status_exception(code)
61
+
62
+ expect(exception).to be_a grpc_error_class
63
+ end
64
+ end
65
+ end
66
+
67
+ describe :to_status do
68
+ it 'gets status' do
69
+ code = 1
70
+ details = 'details'
71
+ metadata = { 'key' => 'val' }
72
+
73
+ exception = GRPC::BadStatus.new(code, details, metadata)
74
+ status = Struct::Status.new(code, details, metadata)
75
+
76
+ expect(exception.to_status).to eq status
77
+ end
78
+ end
79
+
80
+ describe :to_rpc_status do
81
+ let(:simple_request_any) do
82
+ Google::Protobuf::Any.new.tap do |any|
83
+ any.pack(
84
+ Grpc::Testing::SimpleRequest.new(
85
+ payload: Grpc::Testing::Payload.new(body: 'request')
86
+ )
87
+ )
88
+ end
89
+ end
90
+ let(:simple_response_any) do
91
+ Google::Protobuf::Any.new.tap do |any|
92
+ any.pack(
93
+ Grpc::Testing::SimpleResponse.new(
94
+ payload: Grpc::Testing::Payload.new(body: 'response')
95
+ )
96
+ )
97
+ end
98
+ end
99
+ let(:payload_any) do
100
+ Google::Protobuf::Any.new.tap do |any|
101
+ any.pack(Grpc::Testing::Payload.new(body: 'payload'))
102
+ end
103
+ end
104
+
105
+ it 'decodes proto values' do
106
+ rpc_status = Google::Rpc::Status.new(
107
+ code: 1,
108
+ message: 'matching message',
109
+ details: [simple_request_any, simple_response_any, payload_any]
110
+ )
111
+ rpc_status_proto = Google::Rpc::Status.encode(rpc_status)
112
+
113
+ code = 1
114
+ details = 'details'
115
+ metadata = { 'grpc-status-details-bin' => rpc_status_proto }
116
+
117
+ exception = GRPC::BadStatus.new(code, details, metadata)
118
+
119
+ expect(exception.to_rpc_status).to eq rpc_status
120
+ end
121
+
122
+ it 'does not raise when decoding a bad proto' do
123
+ code = 1
124
+ details = 'details'
125
+ metadata = { 'grpc-status-details-bin' => 'notavalidprotostream' }
126
+
127
+ exception = GRPC::BadStatus.new(code, details, metadata)
128
+
129
+ expect(exception.to_rpc_status).to be nil
130
+
131
+ error_msg = 'parse error: to_rpc_status failed'
132
+ error_desc = '<Google::Protobuf::ParseError> ' \
133
+ 'Error occurred during parsing: Invalid wire type'
134
+
135
+ # Check that the parse error was logged correctly
136
+ log_contents = @log_output.read
137
+ expect(log_contents).to include "WARN GRPC : #{error_msg}"
138
+ expect(log_contents).to include "WARN GRPC : #{error_desc}"
139
+ end
140
+ end
141
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.20.0
4
+ version: 1.21.0
5
5
  platform: universal-darwin
6
6
  authors:
7
7
  - gRPC Authors
8
8
  autorequire:
9
9
  bindir: src/ruby/bin
10
10
  cert_chain: []
11
- date: 2019-04-15 00:00:00.000000000 Z
11
+ date: 2019-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.0
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -286,6 +286,7 @@ files:
286
286
  - src/ruby/spec/client_server_spec.rb
287
287
  - src/ruby/spec/compression_options_spec.rb
288
288
  - src/ruby/spec/error_sanity_spec.rb
289
+ - src/ruby/spec/errors_spec.rb
289
290
  - src/ruby/spec/generic/active_call_spec.rb
290
291
  - src/ruby/spec/generic/client_interceptors_spec.rb
291
292
  - src/ruby/spec/generic/client_stub_spec.rb
@@ -350,6 +351,7 @@ test_files:
350
351
  - src/ruby/spec/client_server_spec.rb
351
352
  - src/ruby/spec/compression_options_spec.rb
352
353
  - src/ruby/spec/error_sanity_spec.rb
354
+ - src/ruby/spec/errors_spec.rb
353
355
  - src/ruby/spec/generic/active_call_spec.rb
354
356
  - src/ruby/spec/generic/client_interceptors_spec.rb
355
357
  - src/ruby/spec/generic/client_stub_spec.rb