Sha256: c3a056ddd5155bb140728f8676e63cbbb2ebc92a759e56f8fcf6f989ec890e37

Contents?: true

Size: 934 Bytes

Versions: 2

Compression:

Stored size: 934 Bytes

Contents

# 1. Fix the generated code.

Currently, the Ruby code generated by gRPC will not compile.
See https://github.com/momentohq/client-sdk-ruby/issues/12

If #12 is not fixed, here are the steps to fix the PB classes.

1. Generate them as normal using grpc_tools_ruby_protoc.
2. Remove the leading `PB__` from the constants in ControlClient and CacheClient.
3. Remove the leading `_` from the ControlClient and CacheClient references in the Service classes.

Or...

```
perl -i -p -e 's{PB__}{}g' lib/*_pb.rb
perl -i -p -e 's{\b_}{}g' lib/*_services_pb.rb
```

# 2. Place the generated classes under the Momento module.

The generated classes are at the top level. That is unacceptable for a gem.

Put them in their own namespace.

1. Wrap the modules in `module Momento`.
2. In the *_services_pb.rb files, change the module names.
  * rename ::ControlClient to ::Momento::ControlClient
  * rename ::CacheClient to ::Momento::CacheClient

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
momento-0.2.0 lib/README-generating-pb.txt
momento-0.1.0 lib/README-generating-pb.txt