Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
c357749b
Commit
c357749b
authored
Jan 8, 2016
by
Craig Tiller
Browse files
Options
Downloads
Plain Diff
Merge pull request #4625 from murgatroid99/ruby_client_stub_fix_typo
Fix a bug recently reported in the mailing list
parents
9a781b7e
69108a33
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/ruby/lib/grpc.rb
+2
-2
2 additions, 2 deletions
src/ruby/lib/grpc.rb
src/ruby/lib/grpc/generic/client_stub.rb
+2
-2
2 additions, 2 deletions
src/ruby/lib/grpc/generic/client_stub.rb
src/ruby/pb/test/client.rb
+7
-3
7 additions, 3 deletions
src/ruby/pb/test/client.rb
with
11 additions
and
7 deletions
src/ruby/lib/grpc.rb
+
2
−
2
View file @
c357749b
# Copyright 2015, Google Inc.
# Copyright 2015
-2016
, Google Inc.
# All rights reserved.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# Redistribution and use in source and binary forms, with or without
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ssl_roots_path
=
File
.
expand_path
(
'../../../etc/roots.pem'
,
__FILE__
)
ssl_roots_path
=
File
.
expand_path
(
'../../../
../
etc/roots.pem'
,
__FILE__
)
unless
ENV
[
'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH'
]
unless
ENV
[
'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH'
]
ENV
[
'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH'
]
=
ssl_roots_path
ENV
[
'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH'
]
=
ssl_roots_path
end
end
...
...
This diff is collapsed.
Click to expand it.
src/ruby/lib/grpc/generic/client_stub.rb
+
2
−
2
View file @
c357749b
# Copyright 2015, Google Inc.
# Copyright 2015
-2016
, Google Inc.
# All rights reserved.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# Redistribution and use in source and binary forms, with or without
...
@@ -464,7 +464,7 @@ module GRPC
...
@@ -464,7 +464,7 @@ module GRPC
method
,
method
,
nil
,
# host use nil,
nil
,
# host use nil,
deadline
)
deadline
)
call
.
set_credentials
credentials
unless
credentials
.
nil?
call
.
set_credentials
!
credentials
unless
credentials
.
nil?
ActiveCall
.
new
(
call
,
@queue
,
marshal
,
unmarshal
,
deadline
,
started:
false
)
ActiveCall
.
new
(
call
,
@queue
,
marshal
,
unmarshal
,
deadline
,
started:
false
)
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
src/ruby/pb/test/client.rb
+
7
−
3
View file @
c357749b
#!/usr/bin/env ruby
#!/usr/bin/env ruby
# Copyright 2015, Google Inc.
# Copyright 2015
-2016
, Google Inc.
# All rights reserved.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# Redistribution and use in source and binary forms, with or without
...
@@ -264,11 +264,15 @@ class NamedTests
...
@@ -264,11 +264,15 @@ class NamedTests
def
per_rpc_creds
def
per_rpc_creds
auth_creds
=
Google
::
Auth
.
get_application_default
(
@args
.
oauth_scope
)
auth_creds
=
Google
::
Auth
.
get_application_default
(
@args
.
oauth_scope
)
update_metadata
=
proc
do
|
md
|
kw
=
auth_creds
.
updater_proc
.
call
({})
kw
=
auth_creds
.
updater_proc
.
call
({})
end
call_creds
=
GRPC
::
Core
::
CallCredentials
.
new
(
update_metadata
)
resp
=
perform_large_unary
(
fill_username:
true
,
resp
=
perform_large_unary
(
fill_username:
true
,
fill_oauth_scope:
true
,
fill_oauth_scope:
true
,
**
kw
)
credentials:
call_creds
)
json_key
=
File
.
read
(
ENV
[
AUTH_ENV
])
json_key
=
File
.
read
(
ENV
[
AUTH_ENV
])
wanted_email
=
MultiJson
.
load
(
json_key
)[
'client_email'
]
wanted_email
=
MultiJson
.
load
(
json_key
)[
'client_email'
]
assert
(
"
#{
__callee__
}
: bad username"
)
{
wanted_email
==
resp
.
username
}
assert
(
"
#{
__callee__
}
: bad username"
)
{
wanted_email
==
resp
.
username
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment