From 3b2dd27cb2317ef84e67b037179e4f6fce37aa6d Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Wed, 6 Mar 2019 15:37:08 -0500 Subject: [PATCH] Deprecate Ruby bindings * Also update Java and Python docs --- java/UPDATING.md | 2 +- python/UPDATING.md | 1 + ruby/README.md | 2 ++ ruby/UPDATING.md | 25 +++++++++++++++++++++++-- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/java/UPDATING.md b/java/UPDATING.md index a0cbd2d..16c0bfa 100644 --- a/java/UPDATING.md +++ b/java/UPDATING.md @@ -4,7 +4,7 @@ #### One-Time Setup -1. Download and setup Protocol Buffer release from https://github.com/protocolbuffers/protobuf/releases. As of February 2019 we're using v3.6.1 release, which is compatible with proto2 .proto files. +1. Download and setup Protocol Buffer release from https://github.com/protocolbuffers/protobuf/releases (if you haven't already done this for another language). As of February 2019 we're using v3.7 release, which is compatible with proto2 .proto files. 1. Download [Java JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html) 1. Download and install [Maven](https://maven.apache.org/download.cgi) diff --git a/python/UPDATING.md b/python/UPDATING.md index 22aae55..924ab6f 100644 --- a/python/UPDATING.md +++ b/python/UPDATING.md @@ -4,6 +4,7 @@ #### One-Time Setup +1. Download and setup Protocol Buffer release from https://github.com/protocolbuffers/protobuf/releases (if you haven't already done this for another language). As of February 2019 we're using v3.7 release, which is compatible with proto2 .proto files. 1. Install [Python](https://www.python.org/downloads/). Release 3.7.2 was most recently used. 1. Install [nose](https://nose.readthedocs.io/en/latest/) for unit tests by running `easy_install nose` 1. Install the Python protobuf library via `easy_install protobuf` diff --git a/ruby/README.md b/ruby/README.md index dc8fa26..3cbab7a 100644 --- a/ruby/README.md +++ b/ruby/README.md @@ -7,6 +7,8 @@ Provides Ruby classes generated from the Buffer specification. These classes will allow you to parse a binary Protocol Buffer GTFS-realtime data feed into Ruby objects. +**Deprecated:** *As of February 2019, the official `google-protobuf` Google protoc tool [doesn't support extensions](https://github.com/protocolbuffers/protobuf/issues/1198) in proto2 files. A 3rd party tool, [ruby-protocol-buffers](https://github.com/codekitchen/ruby-protocol-buffers), can be installed using `gem install ruby-protocol-buffers`, but doesn't seem to match the existing structure of the Ruby GTFS-rt bindings, as the unit tests fail. As a result we are deprecating the Ruby bindings until official support for proto2 files is implemented in the Google protocol buffer tools.* + ## Add the Dependency To use the `gtfs-realtime-bindings` classes in your own project, you need to diff --git a/ruby/UPDATING.md b/ruby/UPDATING.md index 6fdba71..953ae19 100644 --- a/ruby/UPDATING.md +++ b/ruby/UPDATING.md @@ -1,9 +1,22 @@ # How-To Update Bindings When gtfs-realtime.proto Changes -Regenerate the language binding source from gtfs-realtime.proto. +## Regenerate the language binding source from gtfs-realtime.proto. + +#### One-Time Setup + +1. Download and setup Protocol Buffer release from https://github.com/protocolbuffers/protobuf/releases (if you haven't already done this for another language). As of February 2019 we're using v3.7 release, which is compatible with proto2 .proto files. +1. Install the Google protobuf Ruby gem using `gem install google-protobuf` +1. Download and install [Ruby](https://www.ruby-lang.org/en/downloads/) +1. `gem install rspec` to install [rspec](https://github.com/rspec/rspec) unit testing tool + +**FIME:** As of February 2019, the official `google-protobuf` Google protoc tool [doesn't support extensions](https://github.com/protocolbuffers/protobuf/issues/1198) in proto2 files. A 3rd party tool, [ruby-protocol-buffers](https://github.com/codekitchen/ruby-protocol-buffers), can be installed using `gem install ruby-protocol-buffers`, but doesn't seem to match the existing structure of the Ruby GTFS-rt bindings, as the unit tests fail. As a result we are deprecating the Ruby bindings until official support for proto2 files is implemented in the Google protocol buffer tools. + +#### Every time `gtfs-realtime.proto` changes + +Regenerate the language binding source from gtfs-realtime.proto by running the following from the `ruby` directory: ``` -protoc --ruby_out=lib/google/transit --proto_path=.. ../gtfs-realtime.proto +protoc --ruby_out=lib/google/transit/gtfs-realtime.pb.rb --proto_path=.. ../gtfs-realtime.proto ``` Add the license header back to the generated source file. @@ -16,6 +29,14 @@ rspec Update the version number in `gtfs-realtime-bindings.gemspec`. +## Publishing a new release + +#### One-Time Setup + +? + +#### Every release + Build and deploy the gem to rubygems.org ```