The right thing to guide us Is right here inside us --Nickelback
StrongVersions enforces a strict policy on your
- The pessimistic
~>operator must be used for all gem requirement definitions.
- If the gem version is greater than 1, the requirement format must be
- If the gem version is less than 1, the requirement format must be
- A lower/upper bound can be specified as long as a valid pessimistic version is also specified, e.g.
'~> 8.4', '< 8.6.7'
- All gems with a
gitsource are ignored, e.g.
- All gems specified in the ignore list are ignored.
Any gems that do not satisfy these rules will be included in the StrongVersions output with details on why they did not meet the standard.
When all gems in a
Gemfile follow this convention it SHOULD always be safe to run
bundle update (assuming all gems adhere to Semantic Versioning).
Add the gem to your
gem 'strong_versions', '~> 0.4.2'
And rebuild your bundle:
$ bundle install
Or install yourself:
$ gem install strong_versions -v '0.4.2'
StrongVersions is invoked with a provided executable:
$ bundle exec strong_versions
The executable will output all non-passing gems and will return an exit code of
1 on failure,
0 on success (i.e. all gems passing). This makes StrongVersions suitable for use in a continuous integration pipeline:
If you are feeling brave, auto-correct is available:
$ bundle exec strong_versions -a
# .strong_versions.yml ignore: - rails
Fork and create a pull request.
Run tests with RSpec:
Check code with Rubocop: