Skip to content

Commit

Permalink
Deprecate Ruby bindings
Browse files Browse the repository at this point in the history
* Also update Java and Python docs
  • Loading branch information
barbeau committed Mar 6, 2019
1 parent a38cf25 commit 3b2dd27
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion java/UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions python/UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 2 additions & 0 deletions ruby/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 23 additions & 2 deletions ruby/UPDATING.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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

```
Expand Down

0 comments on commit 3b2dd27

Please sign in to comment.