lib/grpc/generic/service.rb in grpc-0.5.0 vs lib/grpc/generic/service.rb in grpc-0.6.0

- old
+ new

@@ -174,29 +174,30 @@ mth_name = name.to_s.underscore.to_sym marshal = desc.marshal_proc unmarshal = desc.unmarshal_proc(:output) route = "/#{route_prefix}/#{name}" if desc.request_response? - define_method(mth_name) do |req, deadline = nil| + define_method(mth_name) do |req, deadline = nil, **kw| logger.debug("calling #{@host}:#{route}") - request_response(route, req, marshal, unmarshal, deadline) + request_response(route, req, marshal, unmarshal, deadline, **kw) end elsif desc.client_streamer? - define_method(mth_name) do |reqs, deadline = nil| + define_method(mth_name) do |reqs, deadline = nil, **kw| logger.debug("calling #{@host}:#{route}") - client_streamer(route, reqs, marshal, unmarshal, deadline) + client_streamer(route, reqs, marshal, unmarshal, deadline, **kw) end elsif desc.server_streamer? - define_method(mth_name) do |req, deadline = nil, &blk| + define_method(mth_name) do |req, deadline = nil, **kw, &blk| logger.debug("calling #{@host}:#{route}") - server_streamer(route, req, marshal, unmarshal, deadline, + server_streamer(route, req, marshal, unmarshal, deadline, **kw, &blk) end else # is a bidi_stream - define_method(mth_name) do |reqs, deadline = nil, &blk| + define_method(mth_name) do |reqs, deadline = nil, **kw, &blk| logger.debug("calling #{@host}:#{route}") - bidi_streamer(route, reqs, marshal, unmarshal, deadline, &blk) + bidi_streamer(route, reqs, marshal, unmarshal, deadline, **kw, + &blk) end end end end end @@ -215,11 +216,11 @@ end end def self.included(o) o.extend(Dsl) - # Update to the use the service name including module. Proivde a default - # that can be nil e,g. when modules are declared dynamically. + # Update to the use the service name including module. Provide a default + # that can be nil e.g. when modules are declared dynamically. return unless o.service_name.nil? if o.name.nil? o.service_name = 'GenericService' else modules = o.name.split('::')