Project

rsgem

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Generating gems the Rootstrap way
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.13.1
~> 13.0.1
~> 3.9.0
~> 0.17.1

Runtime

~> 0.6.0
 Project Readme

rsgem - Rootstrap's gem generator

Gem Version ci Maintainability Test Coverage

rsgem is a tool to help you start developing gems with the defaults we use at Rootstrap.

Installation

$ gem install rsgem

We highly suggest to not include rsgem in your Gemfile. rsgem is not a library, and should not affect the dependency tree of your project.

Usage

rsgem new NAME

RSGem will solve the following tasks for you:

  1. Create a folder for your gem leveraging bundler's defaults. (You need bundler in your system)
  2. Add the following dependencies:
  3. Add configuration files for Reek and Rubocop with default Rootstrap's configuration.
  4. Add a rake task to run Rubocop and Reek by calling rake code_analysis.
  5. Clean the Gemfile.
  6. Git ignore the Gemfile.lock
  7. Add a CI provider configuration. GitHub Actions and Travis are available providers. Travis is the default.
  8. Set the bundled files to be a short list of files. By default the gem will bundle:
    • LICENSE.txt
    • README.md
    • lib/**/* (everything inside lib)
  9. Apply Rubocop style fixes

Examples

rsgem new foo

Creates a new gem called foo.

rsgem new bar --ci=github_actions

Creates a new gem called bar that uses Github Actions as the CI provider.

rsgem new foo_bar --bundler=--ext

Creates a new gem called foo_bar and passes the --ext flag to bundler.

rsgem new bar_foo --bundler='--several --flags'

Creates a new gem passing several flags to bundler.

Help

rsgem -h

Displays global help.

rsgem new -h

Displays help for the new command.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bundle exec rspec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/rootstrap/rsgem. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Rootstrap project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.