• Stars
    star
    180
  • Rank 213,097 (Top 5 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ordinare sorts gems in your Gemfile alphabetically

ordinare

Build Status Gem Version codecov PRs Welcome FOSSA Status Open Source Helpers

Ordinare sorts gems in your Gemfile alphabetically

ordinare GIF

In order to install the gem, do:

$ gem install ordinare

Usage ⛏️

Position yourself inside Rails project with Gemfile and do:

$ ordinare

And that's it! Ordinare will sort your Gemfile and overwrite your current Gemfile.

If you don't want ordinare to overwrite your Gemfile, see Don't overwrite Gemfile.

NOTE: be sure to do $ bundle install after ordinare sorts your Gemfile just to make sure everything is OK.

Love for the gem groups ❤️

If you're using something along these lines in your Gemfile:

...

group :test do
  gem "webmock"
  gem "cucumber-rails"
end

group :development do
  gem "byebug"
  gem "spring"
do

...

ordinare will consider groups inside your Gemfile and will sort gems inside those groups, not messing them up.

Love for the comment groups 💚

If you're organizing your gems using comments in similar fashion:

...

# Auth
gem "devise"
gem "oauth2"

# Assets
gem "sprockets"
gem "sprockets-es6"
gem "pusher"

...

ordinare will sort gems below your comments, treating them as groups (e.g. "Auth" group and "Assets" group).

Advanced usage ⚒️

Pass in path to Gemfile

You can pass in path to your gemfile:

$ ordinare --path my_awesome_project/Gemfile

And that's it! You can find your ordered Gemfile at my_awesome_project/Gemfile.

Don't overwrite Gemfile

Ordinare has an option that will make Gemfile.ordinare instead of overwriting your original Gemfile.

Just call ordinare like this:

$ ordinare --no-overwrite

And that's it! You can find your ordered Gemfile at Gemfile.ordinare.

Check if Gemfile is sorted

There is an option to check your Gemfile to see if it's sorted. This will not overwrite nor create a new sorted Gemfile.

Call ordinare like this:

ordinare --check

And that's it, ordinare will inform your whether your Gemfile is sorted properly or not. This can be useful on some CI server where you check if Gemfile is sorted.

Contributing ✍️

Any suggestions and improvements are more than welcome 🙇‍♂️.

If you'd like to contribute, you can check CONTRIBUTING.md

License

FOSSA Status

More Repositories

1

dotfiles

Configuration files for Vim and Git
Vim Script
121
star
2

nikolalsvk

Hey 👋 Thanks for visiting
40
star
3

pusher-js-mock

Mock Pusher.js in your JavaScript tests
TypeScript
32
star
4

custom-readme-styles

18
star
5

blog

🍍
TypeScript
11
star
6

short-it

URL shortener on the Edge
TypeScript
11
star
7

restaurant-reservations

Ruby on Rails project for Internet Software Architecture course
Ruby
8
star
8

next-the-13th

Next.js 13 showcase
TypeScript
8
star
9

react-error-handling

JavaScript
4
star
10

nextjs-blog-starter

A blog built with Next.js that includes Markdown, image loading, sitemap, etc
JavaScript
4
star
11

duplicate-sidekiq-jobs

Repo that holds DIY examples on how to have unique Sidekiq jobs
Ruby
3
star
12

congrats-you-broke-the-build

AWS Lambda function for notifying a user who breaks the build on Semaphore CI
JavaScript
2
star
13

rtassignment

App for managing your fantasy characters
Ruby
2
star
14

abacus

Node.js TypeScript library starter kit
TypeScript
2
star
15

pong-ping

Basic game in Godot
GDScript
2
star
16

rails-sse

Server-Sent Events and Rails demo app
Ruby
2
star
17

rails-view-testing

How to write Ruby on Rails view specs
Ruby
2
star
18

lighthouse-server

JavaScript
2
star
19

town-parliament

Project for XML course
Ruby
1
star
20

receipt-yourself

AngularJS + Rails app for managing company receipts and invoices
HTML
1
star
21

nikolalsvk.github.io

Personal website
CSS
1
star
22

note-play

Musical notes recognition and playing. Project for Soft Computing course.
Jupyter Notebook
1
star
23

small-world-explorer

Dash through small worlds with your spaceship
GDScript
1
star
24

picasso-example-ts

Small TypeScript example project to get you started with Picasso UI library
HTML
1
star
25

service-worker-jungle

Playground for Service Worker
JavaScript
1
star
26

just-do-it

JUST DO IT
JavaScript
1
star
27

react-file-upload

How to upload files in React
TypeScript
1
star
28

rails-6-base-app

Ruby
1
star