{"id":13483502,"url":"https://github.com/amatsuda/traceroute","last_synced_at":"2025-05-14T20:07:10.565Z","repository":{"id":38206746,"uuid":"1707744","full_name":"amatsuda/traceroute","owner":"amatsuda","description":"A Rake task gem that helps you find the unused routes and controller actions for your Rails 3+ app","archived":false,"fork":false,"pushed_at":"2023-09-28T19:19:53.000Z","size":92,"stargazers_count":901,"open_issues_count":16,"forks_count":38,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-13T14:06:52.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amatsuda.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2011-05-05T18:28:20.000Z","updated_at":"2025-03-02T23:02:49.000Z","dependencies_parsed_at":"2023-10-20T16:44:43.656Z","dependency_job_id":"96bd7e45-4666-442c-8370-4a18d3fb0acb","html_url":"https://github.com/amatsuda/traceroute","commit_stats":{"total_commits":156,"total_committers":11,"mean_commits":"14.181818181818182","dds":"0.16666666666666663","last_synced_commit":"83500d0a3df72bc0a4eb4e317a00ed0a5ef7abfb"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amatsuda%2Ftraceroute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amatsuda%2Ftraceroute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amatsuda%2Ftraceroute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amatsuda%2Ftraceroute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amatsuda","download_url":"https://codeload.github.com/amatsuda/traceroute/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724639,"owners_count":21151561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:01:12.077Z","updated_at":"2025-04-13T14:06:57.934Z","avatar_url":"https://github.com/amatsuda.png","language":"Ruby","readme":"= Traceroute\n\nA Rake task that helps you find dead routes and unused actions in your Rails 3+ app.\n\n\n== Features\n\nThis Rake task investigates your Rails application's routes definition, then shows you the unused routes and unreachable action methods.\n\n\n== Supported versions\n\n* Ruby 1.8.7, 1.9.2, 1.9.3, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1 (trunk)\n\n* Rails 3.0.x, 3.1.x, 3.2.x, 4.0.x, 4.1.x, 5.0.x, 5.1.x, 5.2.x, 6.0, 6.1, 7.0 (master)\n\n\n== Install\n\nPut this line in your Gemfile:\n  gem 'traceroute'\n\nThen bundle:\n  % bundle\n\n\n== Usage\n\nJust run the following command in your Rails app directory.\n  % rake traceroute\n\nIf you want the rake task to fail when errors are found.\n\n  % FAIL_ON_ERROR=1 rake traceroute\n\n== What's gonna happen then?\n\nConsider you have the following routes.rb and a controller:\n\n  # config/routes.rb\n  YourRailsApp::Application.routes.draw do\n    resources :users, :only =\u003e [:index, :show, :new, :create]\n    match 'products/:id/purchase' =\u003e 'catalog#purchase', :as =\u003e :purchase\n  end\n\n  # app/controllers/users_controller.rb\n  class UsersController \u003c ApplicationController\n    def index\n      @users = User.page(params[:page])\n    end\n\n    def index2\n    end\n\n    def show\n      @user = User.find(params[:id])\n    end\n  end\n\nRunning the Rake task will print something like this for you:\n\n  Unused routes (3):\n    users#create\n    users#new\n    catalog#purchase\n  Unreachable action methods (1):\n    users#index2\n\nOMG super helpful, isn't it?\n\n== How do I tell it to ignore routes?\n\nSome gems out there that inject routes or actions into our app for testing. Jasmine-Rails does this. They can give you false negatives when running this in development mode. It can be useful to ignore said routes or actions.\n\nCreate a .traceroute.yaml (or .traceroute.yml or .traceroute) file in your root directory.\n\n  # .traceroute.yaml\n  ignore_unreachable_actions:\n  - ^jasmine_rails\\/\n  ignore_unused_routes:\n  - ^users#index\n\nBoth yaml headers accept a list of regexes.\n\n\n== FAQ\n\n  Q: It makes a fuss over the default route at the very bottom. WTF?\n  A: Please do not use that. Did you read the comment in your routes.rb? Actually this task will help you a lot to remove that evil route.\n\n  Q: \"command not found: traceroute\" Did you mean: tracert\n  A: I'm afraid you're using the wrong operating system.\n\n\n== Questions, Feedback\n\nFeel free to message me on Github (amatsuda) or Twitter (@a_matsuda)  ☇3☇3☇3\n\n\n== Contributing to Traceroute\n\n* Fork, patch, then send me a pull request.\n\n\n== Copyright\n\nCopyright (c) 2011 Akira Matsuda. See MIT-LICENSE file for further details.\n","funding_links":[],"categories":["Code Analysis and Metrics","Ruby","Programming Languages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famatsuda%2Ftraceroute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famatsuda%2Ftraceroute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famatsuda%2Ftraceroute/lists"}