Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
  .circleci
  bin
  config
  lib
  .gitignore
  .reek.yml
  .rspec
  .rubocop.yml
  .ruby-gemset
  .ruby-version
  CHANGELOG.md
  Gemfile
  Gemfile.lock
  README.md
  Rakefile
  pull_request_template.md
  teak-dev.gemspec
Size: Mime:
  README.md

Teak::Dev

Centralized linter configuration for Teak Ruby projects.

Installation

Add this line to your application's Gemfile:

group :development do
  gem 'teak-dev', require: false
end

N.B. If you are using Sequel / Rails, you will need to add rubocop-sequel / rubocop-rails and rubocop-factory_bot to your Gemfile yourself!

N.B.B. If you are using the Rails configuration, it is assumed you are also usin FactoryBot!

And then execute:

bundle install

Usage

In your .rubocop.yml, add the following:

inherit_gem:
  teak-dev: config/rubocop-base.yml

Or, if you're using Sequel/Rails:

inherit_gem:
  teak-dev:
  - config/rubocop-base.yml
  - config/rubocop-sequel.yml
  - config/rubocop-rails.yml
  - config/rubocop-factory_bot.yml # N.B. This is automatically included if using the rails config!

In your Rakefile, add the following:

begin
  require 'teak/dev/tasks'
  Teak::Dev::Tasks.install(service: '<service name>')
rescue LoadError
end

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec 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 the created tag, and push the .gem file to rubygems.org.

Dogfooding

# The `bundle exec` is very important here, and will always be needed because this project won't be installed as a gem.
bundle exec rubocop

Versioning

DO NOT update version.rb UNTIL a new version is ready to cut. Updating version.rb also results in updates to the Gemfile.lock (see Dogfooding), so bumping it early can cause CI/CD pain.

Deploying

To deploy a new build of the teak-dev gem:

  • Update the version number in lib/teak/dev/version.rb.
  • Make a commit on the main branch containing Promote to: release in the commit message.
    • Note that this must be the most recent commit for the CI run!
  • CI will do the thing.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/GoCarrot/teak-dev.