diff options
author | Stanley Cheung <stanley.cheung@gmail.com> | 2015-08-11 10:00:56 -0700 |
---|---|---|
committer | Stanley Cheung <stanley.cheung@gmail.com> | 2015-08-11 10:00:56 -0700 |
commit | 844c449a0ea534622122055243c25b22b0f3833b (patch) | |
tree | fa068a5fb9f68c5c53a0e411a952c257291867c1 /src | |
parent | acc6cf28fc67aa874b577644f631a3f690947476 (diff) | |
parent | 10ddfde8e63abcca866e4d3cfeed1d5182ecd61b (diff) |
Merge pull request #2886 from tbetbetbe/grpc-ruby-add-primary-user-agent-key
Adds grpc.primary_user_agent key during stub creation
Diffstat (limited to 'src')
-rw-r--r-- | src/ruby/lib/grpc/generic/client_stub.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ruby/lib/grpc/generic/client_stub.rb b/src/ruby/lib/grpc/generic/client_stub.rb index 7b2c04aa22..3640a8c050 100644 --- a/src/ruby/lib/grpc/generic/client_stub.rb +++ b/src/ruby/lib/grpc/generic/client_stub.rb @@ -28,6 +28,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. require 'grpc/generic/active_call' +require 'grpc/version' # GRPC contains the General RPC module. module GRPC @@ -46,6 +47,7 @@ module GRPC fail(TypeError, '!Channel') unless alt_chan.is_a?(Core::Channel) return alt_chan end + kw['grpc.primary_user_agent'] = "grpc-ruby/#{VERSION}" return Core::Channel.new(host, kw) if creds.nil? fail(TypeError, '!Credentials') unless creds.is_a?(Core::Credentials) Core::Channel.new(host, kw, creds) |