grpc 1.13.0-x86-mingw32 → 1.14.0-x86-mingw32

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.

Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/grpc_c.32.ruby +0 -0
  3. data/grpc_c.64.ruby +0 -0
  4. data/src/ruby/ext/grpc/rb_channel_credentials.c +3 -3
  5. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +18 -18
  6. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +29 -29
  7. data/src/ruby/lib/grpc/2.0/grpc_c.so +0 -0
  8. data/src/ruby/lib/grpc/2.1/grpc_c.so +0 -0
  9. data/src/ruby/lib/grpc/2.2/grpc_c.so +0 -0
  10. data/src/ruby/lib/grpc/2.3/grpc_c.so +0 -0
  11. data/src/ruby/lib/grpc/2.4/grpc_c.so +0 -0
  12. data/src/ruby/lib/grpc/2.5/grpc_c.so +0 -0
  13. data/src/ruby/lib/grpc/generic/active_call.rb +19 -23
  14. data/src/ruby/lib/grpc/version.rb +1 -1
  15. data/src/ruby/spec/call_credentials_spec.rb +1 -1
  16. data/src/ruby/spec/call_spec.rb +1 -1
  17. data/src/ruby/spec/channel_credentials_spec.rb +1 -1
  18. data/src/ruby/spec/channel_spec.rb +1 -1
  19. data/src/ruby/spec/client_auth_spec.rb +1 -12
  20. data/src/ruby/spec/client_server_spec.rb +1 -1
  21. data/src/ruby/spec/compression_options_spec.rb +1 -1
  22. data/src/ruby/spec/error_sanity_spec.rb +1 -1
  23. data/src/ruby/spec/generic/client_stub_spec.rb +13 -1
  24. data/src/ruby/spec/generic/rpc_desc_spec.rb +1 -1
  25. data/src/ruby/spec/generic/rpc_server_pool_spec.rb +1 -1
  26. data/src/ruby/spec/generic/service_spec.rb +1 -1
  27. data/src/ruby/spec/google_rpc_status_utils_spec.rb +1 -12
  28. data/src/ruby/spec/pb/duplicate/codegen_spec.rb +1 -0
  29. data/src/ruby/spec/pb/health/checker_spec.rb +1 -1
  30. data/src/ruby/spec/server_credentials_spec.rb +1 -1
  31. data/src/ruby/spec/server_spec.rb +1 -1
  32. data/src/ruby/spec/spec_helper.rb +1 -0
  33. data/src/ruby/spec/support/services.rb +1 -1
  34. data/src/ruby/spec/time_consts_spec.rb +1 -1
  35. metadata +27 -33
  36. data/src/ruby/spec/pb/package_with_underscore/checker_spec.rb +0 -51
  37. data/src/ruby/spec/pb/package_with_underscore/data.proto +0 -23
  38. data/src/ruby/spec/pb/package_with_underscore/service.proto +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fcb33dd9a5b1938428c7a6b474e601f45e1055e61d24f7629c290de3f0fec780
4
- data.tar.gz: 3cb17b771fdbbf1276be5618f706d900517047f831411b0fe78d53e17ed15c39
3
+ metadata.gz: 27c135536a0ec1f08ac804f866f98fd19ab5b194261f5ed13d3e75b7d93985a1
4
+ data.tar.gz: 5a2004cc2e2e5bb84ff5704c59f1274975f9eedf739676b58c1f9482fc0f4712
5
5
  SHA512:
6
- metadata.gz: 0ba7ea9ee825c40c00c0e41564346043309b2f32fb880b75973bb17d29982f8f8f7bcceb62d83e72d4b3898ee2b57fc387573103f5cabfafa6740085746603c1
7
- data.tar.gz: b58bef22f8c7f378f67f6f95785c8ef5b629f8adba479398165bf52950aa19733dd6e021ee2777e36e0ca2eba168bb733210b80f5b0df63381de8780b3afd031
6
+ metadata.gz: d6ae101278ed07796eb2c39d8d62734328e1798d3ad411c26ea7121bf1a82d9e977b4674181cf134db89ec554a22b72d5504826bff115a94cad0a16c55134fec
7
+ data.tar.gz: 877e07e71b5ce805351034a3f5c2e934c9d8876a3b5ffa1b05e8bbb8426e7f650acee554136d86c028b784c62d7998d7772cc14ac7a1869169bb0f77cbc22794
Binary file
Binary file
@@ -159,12 +159,12 @@ static VALUE grpc_rb_channel_credentials_init(int argc, VALUE* argv,
159
159
  pem_root_certs_cstr = RSTRING_PTR(pem_root_certs);
160
160
  }
161
161
  if (pem_private_key == Qnil && pem_cert_chain == Qnil) {
162
- creds = grpc_ssl_credentials_create(pem_root_certs_cstr, NULL, NULL);
162
+ creds = grpc_ssl_credentials_create(pem_root_certs_cstr, NULL, NULL, NULL);
163
163
  } else {
164
164
  key_cert_pair.private_key = RSTRING_PTR(pem_private_key);
165
165
  key_cert_pair.cert_chain = RSTRING_PTR(pem_cert_chain);
166
- creds =
167
- grpc_ssl_credentials_create(pem_root_certs_cstr, &key_cert_pair, NULL);
166
+ creds = grpc_ssl_credentials_create(pem_root_certs_cstr, &key_cert_pair,
167
+ NULL, NULL);
168
168
  }
169
169
  if (creds == NULL) {
170
170
  rb_raise(rb_eRuntimeError, "could not create a credentials, not sure why");
@@ -68,8 +68,6 @@ grpc_channel_get_info_type grpc_channel_get_info_import;
68
68
  grpc_insecure_channel_create_type grpc_insecure_channel_create_import;
69
69
  grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import;
70
70
  grpc_channel_destroy_type grpc_channel_destroy_import;
71
- grpc_channel_get_trace_type grpc_channel_get_trace_import;
72
- grpc_channel_get_uuid_type grpc_channel_get_uuid_import;
73
71
  grpc_call_cancel_type grpc_call_cancel_import;
74
72
  grpc_call_cancel_with_status_type grpc_call_cancel_with_status_import;
75
73
  grpc_call_ref_type grpc_call_ref_import;
@@ -144,6 +142,8 @@ grpc_alts_credentials_client_options_add_target_service_account_type grpc_alts_c
144
142
  grpc_alts_credentials_options_destroy_type grpc_alts_credentials_options_destroy_import;
145
143
  grpc_alts_credentials_create_type grpc_alts_credentials_create_import;
146
144
  grpc_alts_server_credentials_create_type grpc_alts_server_credentials_create_import;
145
+ grpc_local_credentials_create_type grpc_local_credentials_create_import;
146
+ grpc_local_server_credentials_create_type grpc_local_server_credentials_create_import;
147
147
  grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import;
148
148
  grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import;
149
149
  grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import;
@@ -154,6 +154,13 @@ grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import;
154
154
  grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import;
155
155
  grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
156
156
  grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
157
+ gpr_log_severity_string_type gpr_log_severity_string_import;
158
+ gpr_log_type gpr_log_import;
159
+ gpr_should_log_type gpr_should_log_import;
160
+ gpr_log_message_type gpr_log_message_import;
161
+ gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
162
+ gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
163
+ gpr_set_log_function_type gpr_set_log_function_import;
157
164
  grpc_slice_ref_type grpc_slice_ref_import;
158
165
  grpc_slice_unref_type grpc_slice_unref_import;
159
166
  grpc_slice_copy_type grpc_slice_copy_import;
@@ -212,13 +219,6 @@ gpr_set_allocation_functions_type gpr_set_allocation_functions_import;
212
219
  gpr_get_allocation_functions_type gpr_get_allocation_functions_import;
213
220
  gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
214
221
  gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
215
- gpr_log_severity_string_type gpr_log_severity_string_import;
216
- gpr_log_type gpr_log_import;
217
- gpr_should_log_type gpr_should_log_import;
218
- gpr_log_message_type gpr_log_message_import;
219
- gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
220
- gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
221
- gpr_set_log_function_type gpr_set_log_function_import;
222
222
  gpr_format_message_type gpr_format_message_import;
223
223
  gpr_strdup_type gpr_strdup_import;
224
224
  gpr_asprintf_type gpr_asprintf_import;
@@ -316,8 +316,6 @@ void grpc_rb_load_imports(HMODULE library) {
316
316
  grpc_insecure_channel_create_import = (grpc_insecure_channel_create_type) GetProcAddress(library, "grpc_insecure_channel_create");
317
317
  grpc_lame_client_channel_create_import = (grpc_lame_client_channel_create_type) GetProcAddress(library, "grpc_lame_client_channel_create");
318
318
  grpc_channel_destroy_import = (grpc_channel_destroy_type) GetProcAddress(library, "grpc_channel_destroy");
319
- grpc_channel_get_trace_import = (grpc_channel_get_trace_type) GetProcAddress(library, "grpc_channel_get_trace");
320
- grpc_channel_get_uuid_import = (grpc_channel_get_uuid_type) GetProcAddress(library, "grpc_channel_get_uuid");
321
319
  grpc_call_cancel_import = (grpc_call_cancel_type) GetProcAddress(library, "grpc_call_cancel");
322
320
  grpc_call_cancel_with_status_import = (grpc_call_cancel_with_status_type) GetProcAddress(library, "grpc_call_cancel_with_status");
323
321
  grpc_call_ref_import = (grpc_call_ref_type) GetProcAddress(library, "grpc_call_ref");
@@ -392,6 +390,8 @@ void grpc_rb_load_imports(HMODULE library) {
392
390
  grpc_alts_credentials_options_destroy_import = (grpc_alts_credentials_options_destroy_type) GetProcAddress(library, "grpc_alts_credentials_options_destroy");
393
391
  grpc_alts_credentials_create_import = (grpc_alts_credentials_create_type) GetProcAddress(library, "grpc_alts_credentials_create");
394
392
  grpc_alts_server_credentials_create_import = (grpc_alts_server_credentials_create_type) GetProcAddress(library, "grpc_alts_server_credentials_create");
393
+ grpc_local_credentials_create_import = (grpc_local_credentials_create_type) GetProcAddress(library, "grpc_local_credentials_create");
394
+ grpc_local_server_credentials_create_import = (grpc_local_server_credentials_create_type) GetProcAddress(library, "grpc_local_server_credentials_create");
395
395
  grpc_raw_byte_buffer_create_import = (grpc_raw_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_byte_buffer_create");
396
396
  grpc_raw_compressed_byte_buffer_create_import = (grpc_raw_compressed_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_compressed_byte_buffer_create");
397
397
  grpc_byte_buffer_copy_import = (grpc_byte_buffer_copy_type) GetProcAddress(library, "grpc_byte_buffer_copy");
@@ -402,6 +402,13 @@ void grpc_rb_load_imports(HMODULE library) {
402
402
  grpc_byte_buffer_reader_next_import = (grpc_byte_buffer_reader_next_type) GetProcAddress(library, "grpc_byte_buffer_reader_next");
403
403
  grpc_byte_buffer_reader_readall_import = (grpc_byte_buffer_reader_readall_type) GetProcAddress(library, "grpc_byte_buffer_reader_readall");
404
404
  grpc_raw_byte_buffer_from_reader_import = (grpc_raw_byte_buffer_from_reader_type) GetProcAddress(library, "grpc_raw_byte_buffer_from_reader");
405
+ gpr_log_severity_string_import = (gpr_log_severity_string_type) GetProcAddress(library, "gpr_log_severity_string");
406
+ gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log");
407
+ gpr_should_log_import = (gpr_should_log_type) GetProcAddress(library, "gpr_should_log");
408
+ gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message");
409
+ gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity");
410
+ gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init");
411
+ gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function");
405
412
  grpc_slice_ref_import = (grpc_slice_ref_type) GetProcAddress(library, "grpc_slice_ref");
406
413
  grpc_slice_unref_import = (grpc_slice_unref_type) GetProcAddress(library, "grpc_slice_unref");
407
414
  grpc_slice_copy_import = (grpc_slice_copy_type) GetProcAddress(library, "grpc_slice_copy");
@@ -460,13 +467,6 @@ void grpc_rb_load_imports(HMODULE library) {
460
467
  gpr_get_allocation_functions_import = (gpr_get_allocation_functions_type) GetProcAddress(library, "gpr_get_allocation_functions");
461
468
  gpr_cpu_num_cores_import = (gpr_cpu_num_cores_type) GetProcAddress(library, "gpr_cpu_num_cores");
462
469
  gpr_cpu_current_cpu_import = (gpr_cpu_current_cpu_type) GetProcAddress(library, "gpr_cpu_current_cpu");
463
- gpr_log_severity_string_import = (gpr_log_severity_string_type) GetProcAddress(library, "gpr_log_severity_string");
464
- gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log");
465
- gpr_should_log_import = (gpr_should_log_type) GetProcAddress(library, "gpr_should_log");
466
- gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message");
467
- gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity");
468
- gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init");
469
- gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function");
470
470
  gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message");
471
471
  gpr_strdup_import = (gpr_strdup_type) GetProcAddress(library, "gpr_strdup");
472
472
  gpr_asprintf_import = (gpr_asprintf_type) GetProcAddress(library, "gpr_asprintf");
@@ -30,11 +30,11 @@
30
30
  #include <grpc/grpc_posix.h>
31
31
  #include <grpc/grpc_security.h>
32
32
  #include <grpc/impl/codegen/byte_buffer.h>
33
+ #include <grpc/impl/codegen/log.h>
33
34
  #include <grpc/slice.h>
34
35
  #include <grpc/slice_buffer.h>
35
36
  #include <grpc/support/alloc.h>
36
37
  #include <grpc/support/cpu.h>
37
- #include <grpc/support/log.h>
38
38
  #include <grpc/support/log_windows.h>
39
39
  #include <grpc/support/string_util.h>
40
40
  #include <grpc/support/sync.h>
@@ -179,12 +179,6 @@ extern grpc_lame_client_channel_create_type grpc_lame_client_channel_create_impo
179
179
  typedef void(*grpc_channel_destroy_type)(grpc_channel* channel);
180
180
  extern grpc_channel_destroy_type grpc_channel_destroy_import;
181
181
  #define grpc_channel_destroy grpc_channel_destroy_import
182
- typedef char*(*grpc_channel_get_trace_type)(grpc_channel* channel);
183
- extern grpc_channel_get_trace_type grpc_channel_get_trace_import;
184
- #define grpc_channel_get_trace grpc_channel_get_trace_import
185
- typedef intptr_t(*grpc_channel_get_uuid_type)(grpc_channel* channel);
186
- extern grpc_channel_get_uuid_type grpc_channel_get_uuid_import;
187
- #define grpc_channel_get_uuid grpc_channel_get_uuid_import
188
182
  typedef grpc_call_error(*grpc_call_cancel_type)(grpc_call* call, void* reserved);
189
183
  extern grpc_call_cancel_type grpc_call_cancel_import;
190
184
  #define grpc_call_cancel grpc_call_cancel_import
@@ -317,7 +311,7 @@ extern grpc_google_default_credentials_create_type grpc_google_default_credentia
317
311
  typedef void(*grpc_set_ssl_roots_override_callback_type)(grpc_ssl_roots_override_callback cb);
318
312
  extern grpc_set_ssl_roots_override_callback_type grpc_set_ssl_roots_override_callback_import;
319
313
  #define grpc_set_ssl_roots_override_callback grpc_set_ssl_roots_override_callback_import
320
- typedef grpc_channel_credentials*(*grpc_ssl_credentials_create_type)(const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pair, void* reserved);
314
+ typedef grpc_channel_credentials*(*grpc_ssl_credentials_create_type)(const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pair, const verify_peer_options* verify_options, void* reserved);
321
315
  extern grpc_ssl_credentials_create_type grpc_ssl_credentials_create_import;
322
316
  #define grpc_ssl_credentials_create grpc_ssl_credentials_create_import
323
317
  typedef void(*grpc_call_credentials_release_type)(grpc_call_credentials* creds);
@@ -407,6 +401,12 @@ extern grpc_alts_credentials_create_type grpc_alts_credentials_create_import;
407
401
  typedef grpc_server_credentials*(*grpc_alts_server_credentials_create_type)(const grpc_alts_credentials_options* options);
408
402
  extern grpc_alts_server_credentials_create_type grpc_alts_server_credentials_create_import;
409
403
  #define grpc_alts_server_credentials_create grpc_alts_server_credentials_create_import
404
+ typedef grpc_channel_credentials*(*grpc_local_credentials_create_type)(grpc_local_connect_type type);
405
+ extern grpc_local_credentials_create_type grpc_local_credentials_create_import;
406
+ #define grpc_local_credentials_create grpc_local_credentials_create_import
407
+ typedef grpc_server_credentials*(*grpc_local_server_credentials_create_type)(grpc_local_connect_type type);
408
+ extern grpc_local_server_credentials_create_type grpc_local_server_credentials_create_import;
409
+ #define grpc_local_server_credentials_create grpc_local_server_credentials_create_import
410
410
  typedef grpc_byte_buffer*(*grpc_raw_byte_buffer_create_type)(grpc_slice* slices, size_t nslices);
411
411
  extern grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import;
412
412
  #define grpc_raw_byte_buffer_create grpc_raw_byte_buffer_create_import
@@ -437,6 +437,27 @@ extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_impo
437
437
  typedef grpc_byte_buffer*(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader* reader);
438
438
  extern grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
439
439
  #define grpc_raw_byte_buffer_from_reader grpc_raw_byte_buffer_from_reader_import
440
+ typedef const char*(*gpr_log_severity_string_type)(gpr_log_severity severity);
441
+ extern gpr_log_severity_string_type gpr_log_severity_string_import;
442
+ #define gpr_log_severity_string gpr_log_severity_string_import
443
+ typedef void(*gpr_log_type)(const char* file, int line, gpr_log_severity severity, const char* format, ...) GPR_PRINT_FORMAT_CHECK(4, 5);
444
+ extern gpr_log_type gpr_log_import;
445
+ #define gpr_log gpr_log_import
446
+ typedef int(*gpr_should_log_type)(gpr_log_severity severity);
447
+ extern gpr_should_log_type gpr_should_log_import;
448
+ #define gpr_should_log gpr_should_log_import
449
+ typedef void(*gpr_log_message_type)(const char* file, int line, gpr_log_severity severity, const char* message);
450
+ extern gpr_log_message_type gpr_log_message_import;
451
+ #define gpr_log_message gpr_log_message_import
452
+ typedef void(*gpr_set_log_verbosity_type)(gpr_log_severity min_severity_to_print);
453
+ extern gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
454
+ #define gpr_set_log_verbosity gpr_set_log_verbosity_import
455
+ typedef void(*gpr_log_verbosity_init_type)(void);
456
+ extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
457
+ #define gpr_log_verbosity_init gpr_log_verbosity_init_import
458
+ typedef void(*gpr_set_log_function_type)(gpr_log_func func);
459
+ extern gpr_set_log_function_type gpr_set_log_function_import;
460
+ #define gpr_set_log_function gpr_set_log_function_import
440
461
  typedef grpc_slice(*grpc_slice_ref_type)(grpc_slice s);
441
462
  extern grpc_slice_ref_type grpc_slice_ref_import;
442
463
  #define grpc_slice_ref grpc_slice_ref_import
@@ -611,27 +632,6 @@ extern gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
611
632
  typedef unsigned(*gpr_cpu_current_cpu_type)(void);
612
633
  extern gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
613
634
  #define gpr_cpu_current_cpu gpr_cpu_current_cpu_import
614
- typedef const char*(*gpr_log_severity_string_type)(gpr_log_severity severity);
615
- extern gpr_log_severity_string_type gpr_log_severity_string_import;
616
- #define gpr_log_severity_string gpr_log_severity_string_import
617
- typedef void(*gpr_log_type)(const char* file, int line, gpr_log_severity severity, const char* format, ...) GPR_PRINT_FORMAT_CHECK(4, 5);
618
- extern gpr_log_type gpr_log_import;
619
- #define gpr_log gpr_log_import
620
- typedef int(*gpr_should_log_type)(gpr_log_severity severity);
621
- extern gpr_should_log_type gpr_should_log_import;
622
- #define gpr_should_log gpr_should_log_import
623
- typedef void(*gpr_log_message_type)(const char* file, int line, gpr_log_severity severity, const char* message);
624
- extern gpr_log_message_type gpr_log_message_import;
625
- #define gpr_log_message gpr_log_message_import
626
- typedef void(*gpr_set_log_verbosity_type)(gpr_log_severity min_severity_to_print);
627
- extern gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
628
- #define gpr_set_log_verbosity gpr_set_log_verbosity_import
629
- typedef void(*gpr_log_verbosity_init_type)(void);
630
- extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
631
- #define gpr_log_verbosity_init gpr_log_verbosity_init_import
632
- typedef void(*gpr_set_log_function_type)(gpr_log_func func);
633
- extern gpr_set_log_function_type gpr_set_log_function_import;
634
- #define gpr_set_log_function gpr_set_log_function_import
635
635
  typedef char*(*gpr_format_message_type)(int messageid);
636
636
  extern gpr_format_message_type gpr_format_message_import;
637
637
  #define gpr_format_message gpr_format_message_import
@@ -116,10 +116,11 @@ module GRPC
116
116
 
117
117
  # Sends the initial metadata that has yet to be sent.
118
118
  # Does nothing if metadata has already been sent for this call.
119
- def send_initial_metadata
119
+ def send_initial_metadata(new_metadata = {})
120
120
  @send_initial_md_mutex.synchronize do
121
121
  return if @metadata_sent
122
- @metadata_tag = ActiveCall.client_invoke(@call, @metadata_to_send)
122
+ @metadata_to_send.merge!(new_metadata)
123
+ ActiveCall.client_invoke(@call, @metadata_to_send)
123
124
  @metadata_sent = true
124
125
  end
125
126
  end
@@ -321,18 +322,22 @@ module GRPC
321
322
  # @return [Enumerator] if no block was given
322
323
  def each_remote_read_then_finish
323
324
  return enum_for(:each_remote_read_then_finish) unless block_given?
324
- begin
325
- loop do
326
- resp = remote_read
327
- if resp.nil? # the last response was received
328
- receive_and_check_status
329
- break
325
+ loop do
326
+ resp =
327
+ begin
328
+ remote_read
329
+ rescue GRPC::Core::CallError => e
330
+ GRPC.logger.warn("In each_remote_read_then_finish: #{e}")
331
+ nil
330
332
  end
331
- yield resp
332
- end
333
- ensure
334
- set_input_stream_done
333
+
334
+ break if resp.nil? # the last response was received
335
+ yield resp
335
336
  end
337
+
338
+ receive_and_check_status
339
+ ensure
340
+ set_input_stream_done
336
341
  end
337
342
 
338
343
  # request_response sends a request to a GRPC server, and returns the
@@ -388,7 +393,7 @@ module GRPC
388
393
  def client_streamer(requests, metadata: {})
389
394
  raise_error_if_already_executed
390
395
  begin
391
- merge_metadata_and_send_if_not_already_sent(metadata)
396
+ send_initial_metadata(metadata)
392
397
  requests.each { |r| @call.run_batch(SEND_MESSAGE => @marshal.call(r)) }
393
398
  rescue GRPC::Core::CallError => e
394
399
  receive_and_check_status # check for Cancelled
@@ -490,7 +495,7 @@ module GRPC
490
495
  raise_error_if_already_executed
491
496
  # Metadata might have already been sent if this is an operation view
492
497
  begin
493
- merge_metadata_and_send_if_not_already_sent(metadata)
498
+ send_initial_metadata(metadata)
494
499
  rescue GRPC::Core::CallError => e
495
500
  batch_result = @call.run_batch(RECV_STATUS_ON_CLIENT => nil)
496
501
  set_input_stream_done
@@ -571,15 +576,6 @@ module GRPC
571
576
  end
572
577
  end
573
578
 
574
- def merge_metadata_and_send_if_not_already_sent(new_metadata = {})
575
- @send_initial_md_mutex.synchronize do
576
- return if @metadata_sent
577
- @metadata_to_send.merge!(new_metadata)
578
- @call.run_batch(SEND_INITIAL_METADATA => @metadata_to_send)
579
- @metadata_sent = true
580
- end
581
- end
582
-
583
579
  def attach_peer_cert(peer_cert)
584
580
  @peer_cert = peer_cert
585
581
  end
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.13.0'
17
+ VERSION = '1.14.0'
18
18
  end
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  describe GRPC::Core::CallCredentials do
18
18
  CallCredentials = GRPC::Core::CallCredentials
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  include GRPC::Core::StatusCodes
18
18
 
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  describe GRPC::Core::ChannelCredentials do
18
18
  ChannelCredentials = GRPC::Core::ChannelCredentials
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  def load_test_certs
18
18
  test_root = File.join(File.dirname(__FILE__), 'testdata')
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  def create_channel_creds
18
18
  test_root = File.join(File.dirname(__FILE__), 'testdata')
@@ -39,17 +39,6 @@ def create_server_creds
39
39
  true) # force client auth
40
40
  end
41
41
 
42
- # A test message
43
- class EchoMsg
44
- def self.marshal(_o)
45
- ''
46
- end
47
-
48
- def self.unmarshal(_o)
49
- EchoMsg.new
50
- end
51
- end
52
-
53
42
  # a test service that checks the cert of its peer
54
43
  class SslTestService
55
44
  include GRPC::GenericService
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  include GRPC::Core
18
18
 
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  describe GRPC::Core::CompressionOptions do
18
18
  # Note these constants should be updated
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  StatusCodes = GRPC::Core::StatusCodes
18
18
 
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  Thread.abort_on_exception = true
18
18
 
@@ -589,6 +589,18 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
589
589
  responses.each { |r| p r }
590
590
  end
591
591
  end
592
+
593
+ it 'raises GRPC::Cancelled after the call has been cancelled' do
594
+ server_port = create_test_server
595
+ host = "localhost:#{server_port}"
596
+ th = run_server_streamer(@sent_msg, @replys, @pass)
597
+ stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
598
+ resp = get_responses(stub, run_start_call_first: false)
599
+ expect(resp.next).to eq('reply_1')
600
+ @op.cancel
601
+ expect { resp.next }.to raise_error(GRPC::Cancelled)
602
+ th.join
603
+ end
592
604
  end
593
605
  end
594
606
 
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
  require 'grpc/generic/rpc_desc'
17
17
 
18
18
  describe GRPC::RpcDesc do
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  Thread.abort_on_exception = true
18
18
 
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
  require 'grpc/generic/rpc_desc'
17
17
  require 'grpc/generic/service'
18
18
 
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
  require_relative '../lib/grpc/google_rpc_status_utils'
17
17
  require_relative '../pb/src/proto/grpc/testing/messages_pb'
18
18
  require_relative '../pb/src/proto/grpc/testing/messages_pb'
@@ -114,17 +114,6 @@ describe 'conversion from a status struct to a google protobuf status' do
114
114
  end
115
115
  end
116
116
 
117
- # Test message
118
- class EchoMsg
119
- def self.marshal(_o)
120
- ''
121
- end
122
-
123
- def self.unmarshal(_o)
124
- EchoMsg.new
125
- end
126
- end
127
-
128
117
  # A test service that fills in the "reserved" grpc-status-details-bin trailer,
129
118
  # for client-side testing of GoogleRpcStatus protobuf extraction from trailers.
130
119
  class GoogleRpcStatusTestService
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ require 'spec_helper'
15
16
  require 'open3'
16
17
  require 'tmpdir'
17
18
 
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
  require 'grpc/health/v1/health_pb'
17
17
  require 'grpc/health/checker'
18
18
  require 'open3'
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  def load_test_certs
18
18
  test_root = File.join(File.dirname(__FILE__), 'testdata')
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  def load_test_certs
18
18
  test_root = File.join(File.dirname(__FILE__), 'testdata')
@@ -31,6 +31,7 @@ end if ENV['COVERAGE_NAME']
31
31
  require 'rspec'
32
32
  require 'logging'
33
33
  require 'rspec/logging_helper'
34
+ require 'grpc'
34
35
 
35
36
  require_relative 'support/services'
36
37
  require_relative 'support/helpers'
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
  # Test stubs for various scenarios
16
- require 'grpc'
16
+ require 'spec_helper'
17
17
 
18
18
  # A test message
19
19
  class EchoMsg
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'grpc'
15
+ require 'spec_helper'
16
16
 
17
17
  TimeConsts = GRPC::Core::TimeConsts
18
18
 
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.13.0
4
+ version: 1.14.0
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - gRPC Authors
8
8
  autorequire:
9
9
  bindir: src/ruby/bin
10
10
  cert_chain: []
11
- date: 2018-06-28 00:00:00.000000000 Z
11
+ date: 2018-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -299,9 +299,6 @@ files:
299
299
  - src/ruby/spec/google_rpc_status_utils_spec.rb
300
300
  - src/ruby/spec/pb/duplicate/codegen_spec.rb
301
301
  - src/ruby/spec/pb/health/checker_spec.rb
302
- - src/ruby/spec/pb/package_with_underscore/checker_spec.rb
303
- - src/ruby/spec/pb/package_with_underscore/data.proto
304
- - src/ruby/spec/pb/package_with_underscore/service.proto
305
302
  - src/ruby/spec/server_credentials_spec.rb
306
303
  - src/ruby/spec/server_spec.rb
307
304
  - src/ruby/spec/spec_helper.rb
@@ -344,39 +341,36 @@ signing_key:
344
341
  specification_version: 4
345
342
  summary: GRPC system in Ruby
346
343
  test_files:
347
- - src/ruby/spec/server_spec.rb
348
- - src/ruby/spec/pb/package_with_underscore/service.proto
349
- - src/ruby/spec/pb/package_with_underscore/data.proto
350
- - src/ruby/spec/pb/package_with_underscore/checker_spec.rb
351
- - src/ruby/spec/pb/duplicate/codegen_spec.rb
352
- - src/ruby/spec/pb/health/checker_spec.rb
353
- - src/ruby/spec/compression_options_spec.rb
354
- - src/ruby/spec/testdata/ca.pem
355
- - src/ruby/spec/testdata/client.pem
356
- - src/ruby/spec/testdata/server1.key
357
- - src/ruby/spec/testdata/README
358
- - src/ruby/spec/testdata/server1.pem
359
- - src/ruby/spec/testdata/client.key
360
- - src/ruby/spec/server_credentials_spec.rb
344
+ - src/ruby/spec/channel_credentials_spec.rb
345
+ - src/ruby/spec/error_sanity_spec.rb
361
346
  - src/ruby/spec/client_auth_spec.rb
362
- - src/ruby/spec/time_consts_spec.rb
363
- - src/ruby/spec/client_server_spec.rb
364
347
  - src/ruby/spec/channel_spec.rb
365
- - src/ruby/spec/generic/rpc_server_spec.rb
366
- - src/ruby/spec/generic/client_stub_spec.rb
348
+ - src/ruby/spec/pb/health/checker_spec.rb
349
+ - src/ruby/spec/pb/duplicate/codegen_spec.rb
350
+ - src/ruby/spec/generic/rpc_server_pool_spec.rb
367
351
  - src/ruby/spec/generic/rpc_desc_spec.rb
368
352
  - src/ruby/spec/generic/service_spec.rb
369
- - src/ruby/spec/generic/interceptor_registry_spec.rb
370
- - src/ruby/spec/generic/rpc_server_pool_spec.rb
371
- - src/ruby/spec/generic/client_interceptors_spec.rb
372
- - src/ruby/spec/generic/server_interceptors_spec.rb
373
353
  - src/ruby/spec/generic/active_call_spec.rb
374
- - src/ruby/spec/support/services.rb
375
- - src/ruby/spec/support/helpers.rb
376
- - src/ruby/spec/channel_credentials_spec.rb
354
+ - src/ruby/spec/generic/rpc_server_spec.rb
355
+ - src/ruby/spec/generic/server_interceptors_spec.rb
356
+ - src/ruby/spec/generic/client_interceptors_spec.rb
357
+ - src/ruby/spec/generic/client_stub_spec.rb
358
+ - src/ruby/spec/generic/interceptor_registry_spec.rb
359
+ - src/ruby/spec/time_consts_spec.rb
360
+ - src/ruby/spec/client_server_spec.rb
361
+ - src/ruby/spec/google_rpc_status_utils_spec.rb
377
362
  - src/ruby/spec/spec_helper.rb
363
+ - src/ruby/spec/compression_options_spec.rb
364
+ - src/ruby/spec/support/helpers.rb
365
+ - src/ruby/spec/support/services.rb
366
+ - src/ruby/spec/server_spec.rb
367
+ - src/ruby/spec/server_credentials_spec.rb
368
+ - src/ruby/spec/call_spec.rb
378
369
  - src/ruby/spec/channel_connection_spec.rb
379
370
  - src/ruby/spec/call_credentials_spec.rb
380
- - src/ruby/spec/call_spec.rb
381
- - src/ruby/spec/error_sanity_spec.rb
382
- - src/ruby/spec/google_rpc_status_utils_spec.rb
371
+ - src/ruby/spec/testdata/ca.pem
372
+ - src/ruby/spec/testdata/server1.key
373
+ - src/ruby/spec/testdata/README
374
+ - src/ruby/spec/testdata/server1.pem
375
+ - src/ruby/spec/testdata/client.pem
376
+ - src/ruby/spec/testdata/client.key
@@ -1,51 +0,0 @@
1
- # Copyright 2016 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 'open3'
16
- require 'tmpdir'
17
-
18
- describe 'Package with underscore protobuf code generation' do
19
- it 'should have the same content as created by code generation' do
20
- root_dir = File.join(File.dirname(__FILE__), '..', '..', '..', '..', '..')
21
- pb_dir = File.join(root_dir, 'src', 'ruby', 'spec', 'pb')
22
-
23
- fail 'CONFIG env variable unexpectedly unset' unless ENV['CONFIG']
24
- bins_sub_dir = ENV['CONFIG']
25
- bins_dir = File.join(root_dir, 'bins', bins_sub_dir)
26
-
27
- plugin = File.join(bins_dir, 'grpc_ruby_plugin')
28
- protoc = File.join(bins_dir, 'protobuf', 'protoc')
29
-
30
- got = nil
31
-
32
- Dir.mktmpdir do |tmp_dir|
33
- gen_out = File.join(tmp_dir, 'package_with_underscore', 'service_services_pb.rb')
34
-
35
- pid = spawn(
36
- protoc,
37
- '-I.',
38
- 'package_with_underscore/service.proto',
39
- "--grpc_out=#{tmp_dir}",
40
- "--plugin=protoc-gen-grpc=#{plugin}",
41
- chdir: pb_dir)
42
- Process.waitpid2(pid)
43
- File.open(gen_out) { |f| got = f.read }
44
- end
45
-
46
- correct_modularized_rpc = 'rpc :TestOne, ' \
47
- 'Grpc::Testing::PackageWithUnderscore::Data::Request, ' \
48
- 'Grpc::Testing::PackageWithUnderscore::Data::Response'
49
- expect(got).to include(correct_modularized_rpc)
50
- end
51
- end
@@ -1,23 +0,0 @@
1
- // Copyright 2018 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
- syntax = "proto3";
16
-
17
- package grpc.testing.package_with_underscore.data;
18
-
19
- message Request {
20
- }
21
-
22
- message Response {
23
- }
@@ -1,23 +0,0 @@
1
- // Copyright 2018 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
- syntax = "proto3";
16
-
17
- package grpc.testing.package_with_underscore.service;
18
-
19
- import "package_with_underscore/data.proto";
20
-
21
- service MyService {
22
- rpc TestOne(data.Request) returns (data.Response) {}
23
- }