googleapis / googleapis/gapic-generator-ruby
gapic-generator-cloud docker invocation fails if --ruby-cloud-gem-name option is not supplied
- Dominant language
- Ruby
- Stars
- 50
- Forks
- 36
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 6
Description
when invoking gapic-generator-cloud docker like this:
```sh
$ docker run --rm --user $UID \
--mount type=bind,source=`pwd`/google/showcase/v1beta1,destination=/in/google/showcase/v1beta1,readonly \
--mount type=bind,source=`pwd`/showcase-ruby,destination=/out \
gcr.io/gapic-images/gapic-generator-ruby:latest
```
the generator will fail with the Nil reference exception.
```
/usr/local/bundle/gems/gapic-generator-0.0.1/templates/default/helpers/presenters/gem_presenter.rb:62 \
:in `namespace': undefined method `split' for nil:NilClass (ActionView::Template::Error)
```
This can be remedied by supplying the docker generator with the --ruby-cloud-gem-name parameter:
```sh
$ docker run --rm --user $UID \
--mount type=bind,source=`pwd`/google/showcase/v1beta1,destination=/in/google/showcase/v1beta1,readonly \
--mount type=bind,source=`pwd`/showcase-ruby,destination=/out \
gcr.io/gapic-images/gapic-generator-ruby:latest --ruby-cloud-gem-name=showcase
```
(this generates correctly)
There should be a sensible default for the gemname we can add to the gapic-generator-ruby to avoid this issue.
Contributor guide
Assessment
This issue has not been assessed yet.