Releases: nikolalsvk/ordinare
Check if your Gemfile is sorted
You can now use:
ordinare --check
to see if your Gemfile is sorted.
Also, you can combine passing of the path to Gemfile:
ordinare --check --path my_project/Gemfile
Overwrite Gemfile
ordinare now overwrite your Gemfile by default when you do:
$ ordinare
You can skip overwriting if you do:
$ ordinare --no-overwrite
or
$ ordinare -n
You can also mix option for filename and no overwriting!
Give feedback when done with sorting
Ordinare now tells you where you sorted Gemfile is like this:
Your sorted Gemfile can be found at Gemfile.ordinare
Handle newline at the end of a Gemfile
You can now have a Gemfile with newline at the end:
source "http://rubygems.org"
...
gem "byebug"
gem "devise"
Fix issue when gem is located at the end of a file
0.2.6 Handle a range when end of a file is met
Sort actual groups of gems
Ordinare now sorts gems in group {}
blocks and similar like source {}
. For example:
source "https://rubygems.org"
gemspec
# Auth
gem "devise"
gem "authenticator"
# Assets
gem "rails-assets"
gem "jquery"
gem "angular"
group :test do
gem "webmock"
gem "cucumber-rails"
end
After $ ordinare
will look like this:
source "https://rubygems.org"
gemspec
# Auth
gem "authenticator"
gem "devise"
# Assets
gem "angular"
gem "jquery"
gem "rails-assets"
group :test do
gem "cucumber-rails"
gem "webmock"
end
Sort groups of gems in your Gemfile
ordinare can now sort a Gemfile that has groups of gems, similar to this:
source "https://rubygems.org"
gemspec
# Auth
gem "devise"
gem "authenticator"
# Assets
gem "rails-assets"
gem "jquery"
gem "angular"
after $ ordinare
is ran:
source "https://rubygems.org"
gemspec
# Auth
gem "authenticator"
gem "devise"
# Assets
gem "angular"
gem "jquery"
gem "rails-assets"
Sort basic Gemfile
You can now sort basic Gemfile.
# Gemfile
gem "rails"
gem "activeadmin"
If you run ordinare
in the root of your project like this:
$ ordinare
You will get Gemfile.ordinare
:
# Gemfile.ordinare
gem "activeadmin"
gem "rails"
Pass path to a Gemfile
You can now do
$ ordinare -p Gemfile
or $ ordinare --path Gemfile
Basic CLI functions
You can do:
$ ordinare -h
or$ ordinare --help
and get a summary of what you can do$ ordinare -v
or$ ordinare --version
and get a version of a gem