From 0a268216c2c8e112351b7ed038da04bf50b9eb5a Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 27 Aug 2015 14:38:38 -0700 Subject: replace all grpc-common occurances with examples --- examples/ruby/README.md | 4 ++-- examples/ruby/grpc-demo.gemspec | 2 +- examples/ruby/route_guide/README.md | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'examples/ruby') diff --git a/examples/ruby/README.md b/examples/ruby/README.md index fecd8041e0..dc21f5dd49 100644 --- a/examples/ruby/README.md +++ b/examples/ruby/README.md @@ -55,7 +55,7 @@ Try it! Tutorial -------- -You can find a more detailed tutorial in [gRPC Basics: Ruby](https://github.com/grpc/grpc-common/blob/master/ruby/route_guide/README.md) +You can find a more detailed tutorial in [gRPC Basics: Ruby](examples/ruby/route_guide/README.md) -[helloworld.proto]:https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto +[helloworld.proto]:examples/protos/helloworld.proto [RVM]:https://www.rvm.io/ diff --git a/examples/ruby/grpc-demo.gemspec b/examples/ruby/grpc-demo.gemspec index fa69eb20c1..2cc1eb8f41 100644 --- a/examples/ruby/grpc-demo.gemspec +++ b/examples/ruby/grpc-demo.gemspec @@ -6,7 +6,7 @@ Gem::Specification.new do |s| s.version = '0.5.0' s.authors = ['gRPC Authors'] s.email = 'temiola@google.com' - s.homepage = 'https://github.com/grpc/grpc-common' + s.homepage = 'https://github.com/grpc/grpc' s.summary = 'gRPC Ruby overview sample' s.description = 'Simple demo of using gRPC from Ruby' diff --git a/examples/ruby/route_guide/README.md b/examples/ruby/route_guide/README.md index d22874799f..c7231fb43f 100644 --- a/examples/ruby/route_guide/README.md +++ b/examples/ruby/route_guide/README.md @@ -6,7 +6,7 @@ This tutorial provides a basic Ruby programmer's introduction to working with gR - Generate server and client code using the protocol buffer compiler. - Use the Ruby gRPC API to write a simple client and server for your service. -It assumes that you have read the [Getting started](https://github.com/grpc/grpc-common) guide and are familiar with [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). Note that the example in this tutorial uses the proto3 version of the protocol buffers language, which is currently in alpha release:you can find out more in the [proto3 language guide](https://developers.google.com/protocol-buffers/docs/proto3) and see the [release notes](https://github.com/google/protobuf/releases) for the new version in the protocol buffers Github repository. +It assumes that you have read the [Getting started](https://github.com/grpc/grpc/tree/master/examples) guide and are familiar with [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). Note that the example in this tutorial uses the proto3 version of the protocol buffers language, which is currently in alpha release:you can find out more in the [proto3 language guide](https://developers.google.com/protocol-buffers/docs/proto3) and see the [release notes](https://github.com/google/protobuf/releases) for the new version in the protocol buffers Github repository. This isn't a comprehensive guide to using gRPC in Ruby: more reference documentation is coming soon. @@ -18,22 +18,22 @@ With gRPC we can define our service once in a .proto file and implement clients ## Example code and setup -The example code for our tutorial is in [grpc/grpc-common/ruby/route_guide](https://github.com/grpc/grpc-common/tree/master/ruby/route_guide). To download the example, clone the `grpc-common` repository by running the following command: +The example code for our tutorial is in [examples/ruby/route_guide](examples/ruby/route_guide). To download the example, clone this repository by running the following command: ```shell -$ git clone https://github.com/grpc/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -Then change your current directory to `grpc-common/ruby/route_guide`: +Then change your current directory to `examples/ruby/route_guide`: ```shell -$ cd grpc-common/ruby/route_guide +$ cd examples/ruby/route_guide ``` -You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Ruby quick start guide](https://github.com/grpc/grpc-common/tree/master/ruby). +You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Ruby quick start guide](examples/ruby). ## Defining the service -Our first step (as you'll know from [Getting started](https://github.com/grpc/grpc-common)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto). +Our first step (as you'll know from [Getting started](https://github.com/grpc/grpc/tree/master/examples)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`examples/protos/route_guide.proto`](examples/protos/route_guide.proto). To define a service, you specify a named `service` in your .proto file: @@ -116,7 +116,7 @@ There are two parts to making our `RouteGuide` service do its job: - Implementing the service interface generated from our service definition: doing the actual "work" of our service. - Running a gRPC server to listen for requests from clients and return the service responses. -You can find our example `RouteGuide` server in [grpc-common/ruby/route_guide/route_guide_server.rb](https://github.com/grpc/grpc-common/blob/master/ruby/route_guide/route_guide_server.rb). Let's take a closer look at how it works. +You can find our example `RouteGuide` server in [examples/ruby/route_guide/route_guide_server.rb](examples/ruby/route_guide/route_guide_server.rb). Let's take a closer look at how it works. ### Implementing RouteGuide @@ -199,7 +199,7 @@ As you can see, we build and start our server using a `GRPC::RpcServer`. To do t ## Creating the client -In this section, we'll look at creating a Ruby client for our `RouteGuide` service. You can see our complete example client code in [grpc-common/ruby/route_guide/route_guide_client.rb](https://github.com/grpc/grpc-common/blob/master/ruby/route_guide/route_guide_client.rb). +In this section, we'll look at creating a Ruby client for our `RouteGuide` service. You can see our complete example client code in [examples/ruby/route_guide/route_guide_client.rb](examples/ruby/route_guide/route_guide_client.rb). ### Creating a stub @@ -269,17 +269,17 @@ Although it's not shown well by this example, each enumerable is independent of Build client and server: ```shell -$ # from grpc-common/ruby +$ # from examples/ruby $ gem install bundler && bundle install ``` Run the server, which will listen on port 50051: ```shell -$ # from grpc-common/ruby +$ # from examples/ruby $ bundle exec route_guide/route_guide_server.rb ../node/route_guide/route_guide_db.json & ``` Run the client (in a different terminal): ```shell -$ # from grpc-common/ruby +$ # from examples/ruby $ bundle exec route_guide/route_guide_client.rb ../node/route_guide/route_guide_db.json & ``` -- cgit v1.2.3