0.0
No commit activity in last 3 years
No release in over 3 years
A Pry plugin to see the difference you made to Rails routes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 5
~> 12.0
~> 3.0

Runtime

>= 0.12
 Project Readme

DiffRoutes build-test

Inspect routes changes in Rails console.

Installation

Add this line to your application's Gemfile:

gem 'pry-rails-diff-routes', group: :development

DiffRoutes will set Pry as the REPL in your Rails console, just like when you use PryRails.

If you already used PryRails, you should install DiffRoutes after it.

gem 'pry-rails' # not a dependency
gem 'pry-rails-diff-routes'

When you type help in Rails console, you'll notice that diff-routes is listed in the same group as PryRails commands.

Rails
  diff-routes        Show the difference you made in routes.
  find-route         See which urls match a given controller.
  recognize-path     See which route matches a url.
  show-middleware    Show all middleware (that rails knows about).
  show-model         Show the given model.
  show-models        Show all models.
  show-routes        Show all routes in match order.

Usage

Flags

A route is considered the same route if it maintains its verb (http method, e.g. GET, POST, etc.) and uri path. When its other properties are changed, we call it a modified route.

-R or --removed

Show removed routes only.

-M or --modified

Show modified routes only.

-N or --new

Show new routes only.

-S or --save

Make current routes as the basis for changes.

You can combine -R, -M, and -N together, but not -S.

Demo Screenshot

pry-rails-diff-routes demo screenshot

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/styd/diff-routes. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the DiffRoutes project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.