Craig Tiller 85eea08ba8 Merge pull request #141 from jboeuf/ssl_server_creds_integration %!s(int64=11) %!d(string=hai) anos
..
bin 5de3a1de25 Corrects the ruby interop tests %!s(int64=11) %!d(string=hai) anos
ext 073d7b6cd9 Fixing node and ruby builds. %!s(int64=11) %!d(string=hai) anos
lib e2860c5bdb Adds rubocop and fixes most style violations it detected %!s(int64=11) %!d(string=hai) anos
spec 1fdb1e61d2 Fix a typo %!s(int64=11) %!d(string=hai) anos
.gitignore 097ef9b7d9 Incorporating ruby into the master grpc repository. %!s(int64=11) %!d(string=hai) anos
.rspec 097ef9b7d9 Incorporating ruby into the master grpc repository. %!s(int64=11) %!d(string=hai) anos
.rubocop.yml e2860c5bdb Adds rubocop and fixes most style violations it detected %!s(int64=11) %!d(string=hai) anos
.rubocop_todo.yml e2860c5bdb Adds rubocop and fixes most style violations it detected %!s(int64=11) %!d(string=hai) anos
Gemfile 0f0a6bc4f0 Switches to using protobuf-ruby. %!s(int64=11) %!d(string=hai) anos
README.md 0f0a6bc4f0 Switches to using protobuf-ruby. %!s(int64=11) %!d(string=hai) anos
Rakefile e2860c5bdb Adds rubocop and fixes most style violations it detected %!s(int64=11) %!d(string=hai) anos
grpc.gemspec 6c57f6b1cf Fixes a regression in the style pull request %!s(int64=11) %!d(string=hai) anos

README.md

Ruby for GRPC

LAYOUT

Directory structure is the recommended layout for ruby extensions

  • ext: the extension code
  • lib: the entrypoint grpc ruby library to be used in a 'require' statement
  • test: tests

DEPENDENCIES

  • Extension

The extension can be built and tested using rake. However, the rake-extensiontask rule is not supported on older versions of rubygems, and the necessary version of rubygems.

This is resolved by using RVM instead; install a single-user ruby environment, and develop on the latest stable version of ruby (2.1.5).

INSTALLATION PREREQUISITES

Install RVM

$ command curl -sSL https://rvm.io/mpapis.asc | gpg --import - $ \curl -sSL https://get.rvm.io | bash -s stable --ruby $ $ # follow the instructions to ensure that your're using the latest stable version of Ruby $ # and that the rvm command is installed $ $ gem install bundler # install bundler, the standard ruby package manager

HACKING

The extension can be built and tested using the Rakefile.

$ # create a workspace $ git5 start net/grpc $ $ # build the C library and install it in $HOME/grpc_dev $ /net/grpc/c/build_gyp/build_grpc_dev.sh $ $ # build the ruby extension and test it. $ cd google3_dir/net/grpc/ruby $ rake

Finally, install grpc ruby locally.

$ cd $ $ # update the Gemfile, modify the line beginning # gem 'beefcake' to refer to $ # the patched beefcake dir $ $ bundle install