From 6a45e9340701f3107f5d39cc5f5c0366204faa23 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 2 May 2016 14:25:49 -0700 Subject: Made ruby plugin support empty package names --- src/compiler/ruby_generator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/ruby_generator.cc b/src/compiler/ruby_generator.cc index 5ac56ad289..4ca06a4554 100644 --- a/src/compiler/ruby_generator.cc +++ b/src/compiler/ruby_generator.cc @@ -98,7 +98,7 @@ void PrintService(const ServiceDescriptor *service, const grpc::string &package, out->Print("self.marshal_class_method = :encode\n"); out->Print("self.unmarshal_class_method = :decode\n"); std::map pkg_vars = - ListToDict({"service.name", service->name(), "pkg.name", package, }); + ListToDict({"service_full_namename", service->full_name()}); out->Print(pkg_vars, "self.service_name = '$pkg.name$.$service.name$'\n"); out->Print("\n"); for (int i = 0; i < service->method_count(); ++i) { -- cgit v1.2.3 From dedae79cd46cb84187ca68854e191dbdb4cb9fae Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 2 May 2016 15:05:37 -0700 Subject: Finished ruby generator change --- src/compiler/ruby_generator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/ruby_generator.cc b/src/compiler/ruby_generator.cc index 4ca06a4554..936a186beb 100644 --- a/src/compiler/ruby_generator.cc +++ b/src/compiler/ruby_generator.cc @@ -98,8 +98,8 @@ void PrintService(const ServiceDescriptor *service, const grpc::string &package, out->Print("self.marshal_class_method = :encode\n"); out->Print("self.unmarshal_class_method = :decode\n"); std::map pkg_vars = - ListToDict({"service_full_namename", service->full_name()}); - out->Print(pkg_vars, "self.service_name = '$pkg.name$.$service.name$'\n"); + ListToDict({"service_full_name", service->full_name()}); + out->Print(pkg_vars, "self.service_name = '$service_full_name$'\n"); out->Print("\n"); for (int i = 0; i < service->method_count(); ++i) { PrintMethod(service->method(i), package, out); -- cgit v1.2.3