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:
gem.cocgem.mitgem.test--exe, --bin, -b
exe/GEM_NAME)
in the generated rubygem project. This binary will also be added to the
GEM_NAME.gemspec manifest. This behavior is disabled by default.--no-exe--exe specified in the global config).--cocCODE_OF_CONDUCT.md file to the root of the generated project. If
this option is unspecified, an interactive prompt will be displayed and the
answer will be saved in Bundler's global config for future bundle gem use.--no-cocCODE_OF_CONDUCT.md (overrides --coc specified in the
global config).--changelogCHANGELOG.md file to the root of the generated project. If
this option is unspecified, an interactive prompt will be displayed and the
answer will be saved in Bundler's global config for future bundle gem use.
Update the default with bundle config set --global gem.changelog <true|false>.--no-changelogCHANGELOG.md (overrides --changelog specified in the
global config).--ext=c, --ext=rust
--no-ext--ext specified in the global
config).--git--github-username=GITHUB_USERNAMEbundle config set --global gem.github_username <your_username>.--mitLICENSE.txt file in the root of the generated
project. Your name from the global git config is used for the copyright
statement. If this option is unspecified, an interactive prompt will be
displayed and the answer will be saved in Bundler's global config for future
bundle gem use.--no-mitLICENSE.txt (overrides --mit specified in the global
config).-t, --test=minitest, --test=rspec, --test=test-unit
minitest, rspec and test-unit. The
GEM_NAME.gemspec will be configured and a skeleton test/spec directory will
be created based on this option. Given no option is specified:
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.
--no-test--test specified in the global
config).--ci, --ci=circle, --ci=github, --ci=gitlab
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.
--no-ci--ci specified in
the global config).--linter, --linter=rubocop, --linter=standard
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.
--no-linter--linter specified in the global config).--rubocopbundle config set --global gem.rubocop true.--edit=EDIT, -e=EDIT
$BUNDLER_EDITOR, $VISUAL, or $EDITOR.--bundlebundle install after creating the gem.--no-bundlebundle install after creating the gem.