Skip to content

Commit

Permalink
Merge pull request grpc#7347 from apolcyn/add_ruby_client_compression…
Browse files Browse the repository at this point in the history
…_interop_tests

Add ruby client compression interop tests
  • Loading branch information
kpayson64 authored Jul 15, 2016
2 parents 84b1df2 + 535b71d commit 69d897d
Show file tree
Hide file tree
Showing 15 changed files with 853 additions and 204 deletions.
6 changes: 3 additions & 3 deletions src/ruby/bin/math_services.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/ruby/ext/grpc/rb_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/impl/codegen/compression_types.h>

#include "rb_byte_buffer.h"
#include "rb_call_credentials.h"
Expand Down Expand Up @@ -910,6 +911,12 @@ static void Init_grpc_op_codes() {
UINT2NUM(GRPC_OP_RECV_CLOSE_ON_SERVER));
}

static void Init_grpc_metadata_keys() {
VALUE grpc_rb_mMetadataKeys = rb_define_module_under(grpc_rb_mGrpcCore, "MetadataKeys");
rb_define_const(grpc_rb_mMetadataKeys, "COMPRESSION_REQUEST_ALGORITHM",
rb_str_new2(GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY));
}

void Init_grpc_call() {
/* CallError inherits from Exception to signal that it is non-recoverable */
grpc_rb_eCallError =
Expand Down Expand Up @@ -972,6 +979,7 @@ void Init_grpc_call() {
Init_grpc_error_codes();
Init_grpc_op_codes();
Init_grpc_write_flags();
Init_grpc_metadata_keys();
}

/* Gets the call from the ruby object */
Expand Down
Loading

0 comments on commit 69d897d

Please sign in to comment.