I am using ruby-protobuf
to generate (de)serialisers for my gem. This will essentially generate a ruby file, which is required by other files in my gem.
I have setup Rake tasks for generating this code. I do not add the generated code to git.
The problem is when I install my gem with gem
/bundler
, it will not include this generated file.
I would like to be able to specify that I want my code to be generated as part of the .gemspec
file; in a similar way to how native extensions are built. Is this possible? It could either run the protobuf directly as a CLI command, run my Rake tasks, or run some arbitrary ruby (which could invoke the CLI command).
Thanks.