BUNDLE-GEM(1) BUNDLE-GEM(1)

bundle-gem - Generate a project skeleton for creating a rubygem

bundle gem GEM_NAME OPTIONS

Generates a directory named GEM_NAME with a Rakefile, GEM_NAME.gemspec, and other supporting files and directories that can be used to develop a rubygem with that name.

Run rake -T in the resulting project for a list of Rake tasks that can be used to test and publish the gem to rubygems.org.

The generated project skeleton can be customized with OPTIONS, as explained below. Note that these options can also be specified via Bundler´s global configuration file using the following names:

When Bundler is configured to generate tests, this defaults to Bundler´s global config setting gem.test.
When Bundler is configured to not generate tests, an interactive prompt will be displayed and the answer will be used for the current rubygem project.
When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler´s global config for future bundle gem use.
--ci, --ci=github, --ci=gitlab, --ci=circle: Specify the continuous integration service that Bundler should use when generating the project. Acceptable values are github, gitlab and circle. A configuration file will be generated in the project directory. Given no option is specified:
When Bundler is configured to generate CI files, this defaults to Bundler´s global config setting gem.ci.
When Bundler is configured to not generate CI files, an interactive prompt will be displayed and the answer will be used for the current rubygem project.
When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler´s global config for future bundle gem use.
--linter, --linter=rubocop, --linter=standard: Specify the linter and code formatter that Bundler should add to the project´s development dependencies. Acceptable values are rubocop and standard. A configuration file will be generated in the project directory. Given no option is specified:
When Bundler is configured to add a linter, this defaults to Bundler´s global config setting gem.linter.
When Bundler is configured not to add a linter, an interactive prompt will be displayed and the answer will be used for the current rubygem project.
When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler´s global config for future bundle gem use.
-e, --edit[=EDITOR]: Open the resulting GEM_NAME.gemspec in EDITOR, or the default editor if not specified. The default is $BUNDLER_EDITOR, $VISUAL, or $EDITOR.

bundle config(1) bundle-config.1.html

August 2023