grpc 1.65.2-arm64-darwin → 1.66.0-arm64-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/ruby/ext/grpc/rb_call.c +3 -3
- data/src/ruby/ext/grpc/rb_call_credentials.c +1 -1
- data/src/ruby/ext/grpc/rb_channel.c +14 -14
- data/src/ruby/ext/grpc/rb_channel_args.c +1 -1
- data/src/ruby/ext/grpc/rb_compression_options.c +3 -3
- data/src/ruby/ext/grpc/rb_event_thread.c +2 -2
- data/src/ruby/ext/grpc/rb_grpc.c +5 -5
- data/src/ruby/ext/grpc/rb_grpc.h +8 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +0 -4
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +0 -6
- data/src/ruby/ext/grpc/rb_server.c +4 -4
- data/src/ruby/lib/grpc/3.0/grpc_c.bundle +0 -0
- data/src/ruby/lib/grpc/3.1/grpc_c.bundle +0 -0
- data/src/ruby/lib/grpc/3.2/grpc_c.bundle +0 -0
- data/src/ruby/lib/grpc/3.3/grpc_c.bundle +0 -0
- data/src/ruby/lib/grpc/logconfig.rb +13 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/logconfig_spec.rb +30 -0
- metadata +6 -5
- data/src/ruby/lib/grpc/2.7/grpc_c.bundle +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87d3052b411a0bd062431c379159c544d310edc4736266e79449bab4b8f0a752
|
4
|
+
data.tar.gz: 6365c18ca8796cf2e79381f75b38825d30b36b24d6e9ca30b0383d592f012b26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b3ebcf29b051d6c93833a3825c1c4a886b234965de0063e2cceb40ac72ddb51e2b17e090ef3ee84e69b7804479784e13e629f63e2a0aaf70cf953634b1db7e4
|
7
|
+
data.tar.gz: eadf1869cef5742b283be891cab86557e16d896723d6a255519774b025d0d7759b206ab1fb7c98a4f4fac327d3ba0b40f614c1faf361042c20d2328248f08fd9
|
data/src/ruby/ext/grpc/rb_call.c
CHANGED
@@ -437,7 +437,7 @@ static int grpc_rb_md_ary_fill_hash_cb(VALUE key, VALUE val, VALUE md_ary_obj) {
|
|
437
437
|
tmp_str);
|
438
438
|
return ST_STOP;
|
439
439
|
}
|
440
|
-
|
440
|
+
GRPC_RUBY_ASSERT(md_ary->count < md_ary->capacity);
|
441
441
|
md_ary->metadata[md_ary->count].key = key_slice;
|
442
442
|
md_ary->metadata[md_ary->count].value = value_slice;
|
443
443
|
md_ary->count += 1;
|
@@ -453,7 +453,7 @@ static int grpc_rb_md_ary_fill_hash_cb(VALUE key, VALUE val, VALUE md_ary_obj) {
|
|
453
453
|
tmp_str);
|
454
454
|
return ST_STOP;
|
455
455
|
}
|
456
|
-
|
456
|
+
GRPC_RUBY_ASSERT(md_ary->count < md_ary->capacity);
|
457
457
|
md_ary->metadata[md_ary->count].key = key_slice;
|
458
458
|
md_ary->metadata[md_ary->count].value = value_slice;
|
459
459
|
md_ary->count += 1;
|
@@ -809,7 +809,7 @@ struct call_run_batch_args {
|
|
809
809
|
};
|
810
810
|
|
811
811
|
static void cancel_call_unblock_func(void* arg) {
|
812
|
-
gpr_log(
|
812
|
+
gpr_log(GPR_DEBUG, "GRPC_RUBY: cancel_call_unblock_func");
|
813
813
|
grpc_call* call = (grpc_call*)arg;
|
814
814
|
grpc_call_cancel(call, NULL);
|
815
815
|
}
|
@@ -112,7 +112,7 @@ static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args,
|
|
112
112
|
VALUE rb_exception_info =
|
113
113
|
rb_funcall(exception_object, rb_intern("inspect"), 0);
|
114
114
|
(void)args;
|
115
|
-
gpr_log(
|
115
|
+
gpr_log(GPR_DEBUG,
|
116
116
|
"GRPC_RUBY call credentials callback failed, exception inspect:|%s| "
|
117
117
|
"backtrace:|%s|",
|
118
118
|
StringValueCStr(rb_exception_info), StringValueCStr(backtrace_str));
|
@@ -123,7 +123,7 @@ static void* run_poll_channels_loop_unblocking_func_wrapper(void* arg);
|
|
123
123
|
// Needs to be called under global_connection_polling_mu
|
124
124
|
static void grpc_rb_channel_watch_connection_state_op_complete(
|
125
125
|
watch_state_op* op, int success) {
|
126
|
-
|
126
|
+
GRPC_RUBY_ASSERT(!op->op.api_callback_args.called_back);
|
127
127
|
op->op.api_callback_args.called_back = 1;
|
128
128
|
op->op.api_callback_args.success = success;
|
129
129
|
// wake up the watch API call that's waiting on this op
|
@@ -133,7 +133,7 @@ static void grpc_rb_channel_watch_connection_state_op_complete(
|
|
133
133
|
/* Avoids destroying a channel twice. */
|
134
134
|
static void grpc_rb_channel_safe_destroy(bg_watched_channel* bg) {
|
135
135
|
gpr_mu_lock(&global_connection_polling_mu);
|
136
|
-
|
136
|
+
GRPC_RUBY_ASSERT(bg_watched_channel_list_lookup(bg));
|
137
137
|
if (!bg->channel_destroyed) {
|
138
138
|
grpc_channel_destroy(bg->channel);
|
139
139
|
bg->channel_destroyed = 1;
|
@@ -253,7 +253,7 @@ static VALUE grpc_rb_channel_init(int argc, VALUE* argv, VALUE self) {
|
|
253
253
|
ch = grpc_channel_create(target_chars, creds, &wrapper->args);
|
254
254
|
}
|
255
255
|
|
256
|
-
|
256
|
+
GRPC_RUBY_ASSERT(ch);
|
257
257
|
stack.channel = ch;
|
258
258
|
stack.wrapper = wrapper;
|
259
259
|
rb_thread_call_without_gvl(
|
@@ -416,7 +416,7 @@ static void grpc_rb_channel_maybe_recreate_channel_after_fork(
|
|
416
416
|
if (bg->channel_destroyed) {
|
417
417
|
// There must be one ref at this point, held by the ruby-level channel
|
418
418
|
// object, drop this one here.
|
419
|
-
|
419
|
+
GRPC_RUBY_ASSERT(bg->refcount == 1);
|
420
420
|
rb_thread_call_without_gvl(channel_safe_destroy_without_gil, bg, NULL,
|
421
421
|
NULL);
|
422
422
|
// re-create C-core channel
|
@@ -581,8 +581,8 @@ static void bg_watched_channel_list_free_and_remove(
|
|
581
581
|
bg_watched_channel* target) {
|
582
582
|
bg_watched_channel* bg = NULL;
|
583
583
|
|
584
|
-
|
585
|
-
|
584
|
+
GRPC_RUBY_ASSERT(bg_watched_channel_list_lookup(target));
|
585
|
+
GRPC_RUBY_ASSERT(target->channel_destroyed && target->refcount == 0);
|
586
586
|
if (bg_watched_channel_list_head == target) {
|
587
587
|
bg_watched_channel_list_head = target->next;
|
588
588
|
gpr_free(target);
|
@@ -597,7 +597,7 @@ static void bg_watched_channel_list_free_and_remove(
|
|
597
597
|
}
|
598
598
|
bg = bg->next;
|
599
599
|
}
|
600
|
-
|
600
|
+
GRPC_RUBY_ASSERT(0);
|
601
601
|
}
|
602
602
|
|
603
603
|
/* Initialize a grpc_rb_channel's "protected grpc_channel" and try to push
|
@@ -621,11 +621,11 @@ static void grpc_rb_channel_try_register_connection_polling(
|
|
621
621
|
grpc_connectivity_state conn_state;
|
622
622
|
watch_state_op* op = NULL;
|
623
623
|
if (bg->refcount == 0) {
|
624
|
-
|
624
|
+
GRPC_RUBY_ASSERT(bg->channel_destroyed);
|
625
625
|
bg_watched_channel_list_free_and_remove(bg);
|
626
626
|
return;
|
627
627
|
}
|
628
|
-
|
628
|
+
GRPC_RUBY_ASSERT(bg->refcount == 1);
|
629
629
|
if (bg->channel_destroyed || g_abort_channel_polling) {
|
630
630
|
return;
|
631
631
|
}
|
@@ -633,7 +633,7 @@ static void grpc_rb_channel_try_register_connection_polling(
|
|
633
633
|
if (conn_state == GRPC_CHANNEL_SHUTDOWN) {
|
634
634
|
return;
|
635
635
|
}
|
636
|
-
|
636
|
+
GRPC_RUBY_ASSERT(bg_watched_channel_list_lookup(bg));
|
637
637
|
// prevent bg from being free'd by GC while background thread is watching it
|
638
638
|
bg->refcount++;
|
639
639
|
op = gpr_zalloc(sizeof(watch_state_op));
|
@@ -679,7 +679,7 @@ static void* run_poll_channels_loop_no_gil(void* arg) {
|
|
679
679
|
grpc_rb_channel_watch_connection_state_op_complete(
|
680
680
|
(watch_state_op*)event.tag, event.success);
|
681
681
|
} else {
|
682
|
-
|
682
|
+
GRPC_RUBY_ASSERT(0);
|
683
683
|
}
|
684
684
|
}
|
685
685
|
gpr_mu_unlock(&global_connection_polling_mu);
|
@@ -769,9 +769,9 @@ static void do_basic_init() {
|
|
769
769
|
*/
|
770
770
|
void grpc_rb_channel_polling_thread_start() {
|
771
771
|
gpr_once_init(&g_once_init, do_basic_init);
|
772
|
-
|
773
|
-
|
774
|
-
|
772
|
+
GRPC_RUBY_ASSERT(!RTEST(g_channel_polling_thread));
|
773
|
+
GRPC_RUBY_ASSERT(!g_abort_channel_polling);
|
774
|
+
GRPC_RUBY_ASSERT(g_channel_polling_cq == NULL);
|
775
775
|
|
776
776
|
g_channel_polling_cq = grpc_completion_queue_create_for_next(NULL);
|
777
777
|
g_channel_polling_thread = rb_thread_create(run_poll_channels_loop, NULL);
|
@@ -160,7 +160,7 @@ void grpc_rb_hash_convert_to_channel_args(VALUE src_hash,
|
|
160
160
|
}
|
161
161
|
|
162
162
|
void grpc_rb_channel_args_destroy(grpc_channel_args* args) {
|
163
|
-
|
163
|
+
GRPC_RUBY_ASSERT(args != NULL);
|
164
164
|
if (args->args == NULL) return;
|
165
165
|
for (int i = 0; i < args->num_args; i++) {
|
166
166
|
// the key was created with gpr_strdup
|
@@ -181,9 +181,9 @@ void grpc_rb_compression_options_algorithm_name_to_value_internal(
|
|
181
181
|
char* name_slice_str = grpc_slice_to_c_string(name_slice);
|
182
182
|
char* error_message_str = NULL;
|
183
183
|
VALUE error_message_ruby_str = Qnil;
|
184
|
-
|
185
|
-
|
186
|
-
|
184
|
+
GRPC_RUBY_ASSERT(gpr_asprintf(&error_message_str,
|
185
|
+
"Invalid compression algorithm name: %s",
|
186
|
+
name_slice_str) != -1);
|
187
187
|
gpr_free(name_slice_str);
|
188
188
|
error_message_ruby_str =
|
189
189
|
rb_str_new(error_message_str, strlen(error_message_str));
|
@@ -149,12 +149,12 @@ void grpc_rb_event_queue_thread_start() {
|
|
149
149
|
event_queue.head = event_queue.tail = NULL;
|
150
150
|
}
|
151
151
|
event_queue.abort = false;
|
152
|
-
|
152
|
+
GRPC_RUBY_ASSERT(!RTEST(g_event_thread));
|
153
153
|
g_event_thread = rb_thread_create(grpc_rb_event_thread, NULL);
|
154
154
|
}
|
155
155
|
|
156
156
|
void grpc_rb_event_queue_thread_stop() {
|
157
|
-
|
157
|
+
GRPC_RUBY_ASSERT(g_one_time_init_done);
|
158
158
|
if (!RTEST(g_event_thread)) {
|
159
159
|
gpr_log(GPR_ERROR,
|
160
160
|
"GRPC_RUBY: call credentials thread stop: thread not running");
|
data/src/ruby/ext/grpc/rb_grpc.c
CHANGED
@@ -248,12 +248,12 @@ static pid_t g_init_pid;
|
|
248
248
|
static long g_init_tid;
|
249
249
|
|
250
250
|
static bool grpc_ruby_initial_pid(void) {
|
251
|
-
|
251
|
+
GRPC_RUBY_ASSERT(g_init_pid != 0);
|
252
252
|
return g_init_pid == getpid();
|
253
253
|
}
|
254
254
|
|
255
255
|
static bool grpc_ruby_initial_thread(void) {
|
256
|
-
|
256
|
+
GRPC_RUBY_ASSERT(g_init_tid != 0);
|
257
257
|
return sys_gettid() == g_init_tid;
|
258
258
|
}
|
259
259
|
|
@@ -263,8 +263,8 @@ static void grpc_ruby_reset_init_state(void) {
|
|
263
263
|
}
|
264
264
|
|
265
265
|
static void grpc_ruby_basic_init(void) {
|
266
|
-
|
267
|
-
|
266
|
+
GRPC_RUBY_ASSERT(g_init_pid == 0);
|
267
|
+
GRPC_RUBY_ASSERT(g_init_tid == 0);
|
268
268
|
grpc_ruby_reset_init_state();
|
269
269
|
// TODO(apolcyn): ideally, we should share logic with C-core
|
270
270
|
// for determining whether or not fork support is enabled, rather
|
@@ -328,7 +328,7 @@ static void grpc_ruby_init_threads() {
|
|
328
328
|
// in gpr_once_init. In general, it appears to be unsafe to call
|
329
329
|
// into the ruby library while holding a non-ruby mutex, because a gil yield
|
330
330
|
// could end up trying to lock onto that same mutex and deadlocking.
|
331
|
-
gpr_log(
|
331
|
+
gpr_log(GPR_DEBUG,
|
332
332
|
"GRPC_RUBY: grpc_ruby_init_threads g_bg_thread_init_done=%d",
|
333
333
|
g_bg_thread_init_done);
|
334
334
|
rb_mutex_lock(g_bg_thread_init_rb_mu);
|
data/src/ruby/ext/grpc/rb_grpc.h
CHANGED
@@ -21,6 +21,8 @@
|
|
21
21
|
|
22
22
|
#include <ruby/ruby.h>
|
23
23
|
|
24
|
+
#include <stdlib.h>
|
25
|
+
|
24
26
|
#include <grpc/support/time.h>
|
25
27
|
|
26
28
|
/* grpc_rb_mGrpcCore is the module containing the ruby wrapper GRPC classes. */
|
@@ -78,4 +80,10 @@ void grpc_rb_fork_unsafe_end();
|
|
78
80
|
|
79
81
|
void grpc_ruby_init();
|
80
82
|
|
83
|
+
#define GRPC_RUBY_ASSERT(x) \
|
84
|
+
if (!(x)) { \
|
85
|
+
fprintf(stderr, "%s:%d assert failed\n", __FILE__, __LINE__); \
|
86
|
+
abort(); \
|
87
|
+
}
|
88
|
+
|
81
89
|
#endif /* GRPC_RB_H_ */
|
@@ -253,14 +253,12 @@ gpr_malloc_aligned_type gpr_malloc_aligned_import;
|
|
253
253
|
gpr_free_aligned_type gpr_free_aligned_import;
|
254
254
|
gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
|
255
255
|
gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
|
256
|
-
gpr_log_severity_string_type gpr_log_severity_string_import;
|
257
256
|
gpr_log_type gpr_log_import;
|
258
257
|
gpr_should_log_type gpr_should_log_import;
|
259
258
|
gpr_log_message_type gpr_log_message_import;
|
260
259
|
gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
|
261
260
|
gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
|
262
261
|
gpr_set_log_function_type gpr_set_log_function_import;
|
263
|
-
gpr_assertion_failed_type gpr_assertion_failed_import;
|
264
262
|
gpr_format_message_type gpr_format_message_import;
|
265
263
|
gpr_strdup_type gpr_strdup_import;
|
266
264
|
gpr_asprintf_type gpr_asprintf_import;
|
@@ -543,14 +541,12 @@ void grpc_rb_load_imports(HMODULE library) {
|
|
543
541
|
gpr_free_aligned_import = (gpr_free_aligned_type) GetProcAddress(library, "gpr_free_aligned");
|
544
542
|
gpr_cpu_num_cores_import = (gpr_cpu_num_cores_type) GetProcAddress(library, "gpr_cpu_num_cores");
|
545
543
|
gpr_cpu_current_cpu_import = (gpr_cpu_current_cpu_type) GetProcAddress(library, "gpr_cpu_current_cpu");
|
546
|
-
gpr_log_severity_string_import = (gpr_log_severity_string_type) GetProcAddress(library, "gpr_log_severity_string");
|
547
544
|
gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log");
|
548
545
|
gpr_should_log_import = (gpr_should_log_type) GetProcAddress(library, "gpr_should_log");
|
549
546
|
gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message");
|
550
547
|
gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity");
|
551
548
|
gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init");
|
552
549
|
gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function");
|
553
|
-
gpr_assertion_failed_import = (gpr_assertion_failed_type) GetProcAddress(library, "gpr_assertion_failed");
|
554
550
|
gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message");
|
555
551
|
gpr_strdup_import = (gpr_strdup_type) GetProcAddress(library, "gpr_strdup");
|
556
552
|
gpr_asprintf_import = (gpr_asprintf_type) GetProcAddress(library, "gpr_asprintf");
|
@@ -735,9 +735,6 @@ extern gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
|
|
735
735
|
typedef unsigned(*gpr_cpu_current_cpu_type)(void);
|
736
736
|
extern gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
|
737
737
|
#define gpr_cpu_current_cpu gpr_cpu_current_cpu_import
|
738
|
-
typedef const char*(*gpr_log_severity_string_type)(gpr_log_severity severity);
|
739
|
-
extern gpr_log_severity_string_type gpr_log_severity_string_import;
|
740
|
-
#define gpr_log_severity_string gpr_log_severity_string_import
|
741
738
|
typedef void(*gpr_log_type)(const char* file, int line, gpr_log_severity severity, const char* format, ...) GPR_PRINT_FORMAT_CHECK(4, 5);
|
742
739
|
extern gpr_log_type gpr_log_import;
|
743
740
|
#define gpr_log gpr_log_import
|
@@ -756,9 +753,6 @@ extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
|
|
756
753
|
typedef void(*gpr_set_log_function_type)(gpr_log_func deprecated_setting);
|
757
754
|
extern gpr_set_log_function_type gpr_set_log_function_import;
|
758
755
|
#define gpr_set_log_function gpr_set_log_function_import
|
759
|
-
typedef void(*gpr_assertion_failed_type)(const char* filename, int line, const char* message);
|
760
|
-
extern gpr_assertion_failed_type gpr_assertion_failed_import;
|
761
|
-
#define gpr_assertion_failed gpr_assertion_failed_import
|
762
756
|
typedef char*(*gpr_format_message_type)(int messageid);
|
763
757
|
extern gpr_format_message_type gpr_format_message_import;
|
764
758
|
#define gpr_format_message gpr_format_message_import
|
@@ -68,7 +68,7 @@ static void grpc_rb_server_shutdown_and_notify_internal(grpc_rb_server* server,
|
|
68
68
|
server->queue, tag, gpr_inf_future(GPR_CLOCK_REALTIME), NULL, NULL);
|
69
69
|
}
|
70
70
|
if (ev.type != GRPC_OP_COMPLETE) {
|
71
|
-
gpr_log(
|
71
|
+
gpr_log(GPR_DEBUG,
|
72
72
|
"GRPC_RUBY: bad grpc_server_shutdown_and_notify result:%d",
|
73
73
|
ev.type);
|
74
74
|
}
|
@@ -192,8 +192,8 @@ struct server_request_call_args {
|
|
192
192
|
|
193
193
|
static void shutdown_server_unblock_func(void* arg) {
|
194
194
|
grpc_rb_server* server = (grpc_rb_server*)arg;
|
195
|
-
gpr_log(
|
196
|
-
|
195
|
+
gpr_log(GPR_DEBUG, "GRPC_RUBY: shutdown_server_unblock_func");
|
196
|
+
GRPC_RUBY_ASSERT(server->wrapped != NULL);
|
197
197
|
grpc_event event;
|
198
198
|
void* tag = &event;
|
199
199
|
grpc_server_shutdown_and_notify(server->wrapped, server->queue, tag);
|
@@ -202,7 +202,7 @@ static void shutdown_server_unblock_func(void* arg) {
|
|
202
202
|
// cancelled all calls.
|
203
203
|
event = grpc_completion_queue_pluck(server->queue, tag,
|
204
204
|
gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
|
205
|
-
gpr_log(
|
205
|
+
gpr_log(GPR_DEBUG,
|
206
206
|
"GRPC_RUBY: shutdown_server_unblock_func pluck event.type: %d "
|
207
207
|
"event.success: %d",
|
208
208
|
event.type, event.success);
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -14,6 +14,19 @@
|
|
14
14
|
|
15
15
|
# GRPC contains the General RPC module.
|
16
16
|
module GRPC
|
17
|
+
def self.logger=(logger_obj)
|
18
|
+
# Need a free variable here to keep value of logger_obj for logger closure
|
19
|
+
@logger = logger_obj
|
20
|
+
|
21
|
+
extend(
|
22
|
+
Module.new do
|
23
|
+
def logger
|
24
|
+
@logger
|
25
|
+
end
|
26
|
+
end
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
17
30
|
# DefaultLogger is a module included in GRPC if no other logging is set up for
|
18
31
|
# it. See ../spec/spec_helpers an example of where other logging is added.
|
19
32
|
module DefaultLogger
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Copyright 2024 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 'logger'
|
17
|
+
|
18
|
+
describe GRPC do
|
19
|
+
describe '.logger=' do
|
20
|
+
it 'sets logger' do
|
21
|
+
noop_logger = GRPC::DefaultLogger::NoopLogger.new
|
22
|
+
GRPC.logger = noop_logger
|
23
|
+
expect(GRPC.logger).to be(noop_logger)
|
24
|
+
|
25
|
+
custom_logger = Logger.new(STDOUT)
|
26
|
+
GRPC.logger = custom_logger
|
27
|
+
expect(GRPC.logger).to be(custom_logger)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
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.
|
4
|
+
version: 1.66.0
|
5
5
|
platform: arm64-darwin
|
6
6
|
authors:
|
7
7
|
- gRPC Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: src/ruby/bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -255,7 +255,6 @@ files:
|
|
255
255
|
- src/ruby/ext/grpc/rb_xds_server_credentials.c
|
256
256
|
- src/ruby/ext/grpc/rb_xds_server_credentials.h
|
257
257
|
- src/ruby/lib/grpc.rb
|
258
|
-
- src/ruby/lib/grpc/2.7/grpc_c.bundle
|
259
258
|
- src/ruby/lib/grpc/3.0/grpc_c.bundle
|
260
259
|
- src/ruby/lib/grpc/3.1/grpc_c.bundle
|
261
260
|
- src/ruby/lib/grpc/3.2/grpc_c.bundle
|
@@ -313,6 +312,7 @@ files:
|
|
313
312
|
- src/ruby/spec/generic/server_interceptors_spec.rb
|
314
313
|
- src/ruby/spec/generic/service_spec.rb
|
315
314
|
- src/ruby/spec/google_rpc_status_utils_spec.rb
|
315
|
+
- src/ruby/spec/logconfig_spec.rb
|
316
316
|
- src/ruby/spec/pb/codegen/grpc/testing/package_options.proto
|
317
317
|
- src/ruby/spec/pb/codegen/grpc/testing/package_options_import.proto
|
318
318
|
- src/ruby/spec/pb/codegen/grpc/testing/package_options_import2.proto
|
@@ -349,7 +349,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
349
349
|
requirements:
|
350
350
|
- - ">="
|
351
351
|
- !ruby/object:Gem::Version
|
352
|
-
version: '
|
352
|
+
version: '3.0'
|
353
353
|
- - "<"
|
354
354
|
- !ruby/object:Gem::Version
|
355
355
|
version: 3.4.dev
|
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
359
359
|
- !ruby/object:Gem::Version
|
360
360
|
version: '0'
|
361
361
|
requirements: []
|
362
|
-
rubygems_version: 3.5.
|
362
|
+
rubygems_version: 3.5.17
|
363
363
|
signing_key:
|
364
364
|
specification_version: 4
|
365
365
|
summary: GRPC system in Ruby
|
@@ -385,6 +385,7 @@ test_files:
|
|
385
385
|
- src/ruby/spec/generic/server_interceptors_spec.rb
|
386
386
|
- src/ruby/spec/generic/service_spec.rb
|
387
387
|
- src/ruby/spec/google_rpc_status_utils_spec.rb
|
388
|
+
- src/ruby/spec/logconfig_spec.rb
|
388
389
|
- src/ruby/spec/pb/codegen/grpc/testing/package_options.proto
|
389
390
|
- src/ruby/spec/pb/codegen/grpc/testing/package_options_import.proto
|
390
391
|
- src/ruby/spec/pb/codegen/grpc/testing/package_options_import2.proto
|
Binary file
|