Update shared config for Shuttlerock's projects:
codecov.yml
.rubocop.yml
.codeclimate.yml
.eslintrc
.stylelintrc
Dangerfile
env_list.yml
.env.example
.gitleaks.toml
gitleaks.yml
PULL_REQUEST_TEMPLATE.md
Add this line to your application's Gemfile:
gem 'shuttlerock_shared_config'
And then execute:
$ bundle
Or install it yourself as:
$ gem install shuttlerock_shared_config
$ rake shuttlerock_shared_config:update_pull_request_template # Update PULL_REQUEST_TEMPLATE.md
$ rake shuttlerock_shared_config:update_codeclimate # Update .codeclimate.yml
$ rake shuttlerock_shared_config:update_eslint # Update .eslint.yml
$ rake shuttlerock_shared_config:update_rubocop # Update .rubocop.yml
$ rake shuttlerock_shared_config:update_stylelintrc # Update .stylelintrc
$ rake shuttlerock_shared_config:update_dangerfile # Update Dangerfile and create doc/env_list.yml
$ rake shuttlerock_shared_config:update_codecov # Update codecov.yml
$ rake shuttlerock_shared_config:update_gitleaks # Update .gitleaks.toml/gitleaks.yml
$ rake shuttlerock_shared_config:update # Update all
$ npm install shuttlerock_shared_config
Add ' "update_eslintrc": "npx update_eslintrc" ' to yours package.json:
scripts: {
...
"update_eslintrc": "npx update_eslintrc"
...
}
$ npm run-script update_eslintrc
or
$ yarn run update_eslintrc
- Update gem's version:
- Commit and push changes to Github
- Add tag with new version and push to Github
$ git tag -a vX.X.X -m "vX.X.X"
$ git push origin vX.X.X
You can read about this here.
Add to .circleci/config.yml:
<<: *defaults
steps:
- restore_cache:
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
key: v1-bundle-{{ checksum "Gemfile.lock" }}
- run: bundle --path vendor/bundle
- run: bundle exec danger
Add environment variables to doc/env_list.yml
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 tags, and push the .gem
file to rubygems.org.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the ShuttlerockSharedConfig project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.