/tablexi_dev-generators

A recommended set of generators for Table XI projects.

Primary LanguageRubyMIT LicenseMIT

Table XI Dev Generators

A recommended set of generators for Table XI projects.

Example usage

Install everything:

bundle exec rails g tablexi_dev:all

Or install only the ones you want:

bundle exec rails g tablexi_dev:git_hook
bundle exec rails g tablexi_dev:rubocop
bundle exec rails g tablexi_dev:unicorn
# ...

Installing this gem

Add this line to your application's Gemfile:

group :development do
  gem "tablexi_dev-generators"
end

And then execute:

$ bundle

Upgrading this gem

After upgrading this gem, it's recommended that you re-run the generators and verify that the changed files are correct.

All available generators

Generator: Git hooks

bundle exec rails g tablexi_dev:git_hook

This generator will guide you through installing git hooks. If you do not have a strong preference, we recommend installing the pre-push rubocop hook.

Because git hooks do not get checked into the remote repository, it's recommended that each team member run this generator upon installing any project on their local machine.

Generator: Rubocop

bundle exec rails g tablexi_dev:rubocop

The rubocop generator is designed to be used in the following different situations:

  1. On initial setup of rubocop in a project, to set up the tool.
  2. When updates to the rubocop cops occur (new versions of Rubocop are provided, with new rules)

For detailed instructions on the rubocop generator and its options, check out the rubocop readme

Generator: Unicorn

bundle exec rails g tablexi_dev:unicorn

The unicorn generator sets up a project's unicorn configuration files.

Publishing this gem

  1. Bump the version in lib/tablexi_dev/generators/version.rb according to semver
  2. Commit lib/tablexi_dev/generators/version.rb to master and push
  3. Draft a github release with new vesion number and add a description that follows the convention of the existing releases
  4. Publish the release
  5. Checkout master and pull the latest
  6. Make sure you are a tablexi_dev-generators owner on rubygems.org. If not, have an existing owner run tablexi_dev-generators -a you@example.com.
  7. Run gem build tablexi_dev-generators
  8. Run gem push tablexi_dev-generators-<version>.gem with file that was generated from the previous step