Index: third_party/grpc/src/ruby/pb/generate_proto_ruby.sh |
diff --git a/third_party/WebKit/LayoutTests/http/tests/websocket/echo_wsh.py b/third_party/grpc/src/ruby/pb/generate_proto_ruby.sh |
old mode 100644 |
new mode 100755 |
similarity index 70% |
copy from third_party/WebKit/LayoutTests/http/tests/websocket/echo_wsh.py |
copy to third_party/grpc/src/ruby/pb/generate_proto_ruby.sh |
index 9851d26b37b4c9a72ceac14d5866df3c61e9ee60..86c082099d98304859e4ab55f5a6512b0116f8ab |
--- a/third_party/WebKit/LayoutTests/http/tests/websocket/echo_wsh.py |
+++ b/third_party/grpc/src/ruby/pb/generate_proto_ruby.sh |
@@ -1,4 +1,5 @@ |
-# Copyright 2009, 2011, Google Inc. |
+#!/bin/sh |
+# Copyright 2015-2016, Google Inc. |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
@@ -27,22 +28,24 @@ |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+# Regenerates gRPC service stubs from proto files. |
+set +e |
+cd $(dirname $0)/../../.. |
-_GOODBYE_MESSAGE = u'Goodbye' |
+PROTOC=bins/opt/protobuf/protoc |
+PLUGIN=protoc-gen-grpc=bins/opt/grpc_ruby_plugin |
+$PROTOC -I src/proto src/proto/grpc/health/v1/health.proto \ |
+ --grpc_out=src/ruby/pb \ |
+ --ruby_out=src/ruby/pb \ |
+ --plugin=$PLUGIN |
-def web_socket_do_extra_handshake(request): |
- pass # Always accept. |
+$PROTOC -I . test/proto/{messages,test,empty}.proto \ |
+ --grpc_out=src/ruby/pb \ |
+ --ruby_out=src/ruby/pb \ |
+ --plugin=$PLUGIN |
- |
-def web_socket_transfer_data(request): |
- while True: |
- line = request.ws_stream.receive_message() |
- if line is None: |
- return |
- if isinstance(line, unicode): |
- request.ws_stream.send_message(line, binary=False) |
- if line == _GOODBYE_MESSAGE: |
- return |
- else: |
- request.ws_stream.send_message(line, binary=True) |
+$PROTOC -I src/proto/math src/proto/math/math.proto \ |
+ --grpc_out=src/ruby/bin \ |
+ --ruby_out=src/ruby/bin \ |
+ --plugin=$PLUGIN |