{"id":19055764,"url":"https://github.com/taskrabbit/route_counter","last_synced_at":"2025-07-02T16:34:00.399Z","repository":{"id":24703534,"uuid":"28115000","full_name":"taskrabbit/route_counter","owner":"taskrabbit","description":"Count on your Rails routes.","archived":false,"fork":false,"pushed_at":"2014-12-17T04:24:37.000Z","size":196,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-05-25T02:19:44.832Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/taskrabbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-17T01:19:09.000Z","updated_at":"2018-09-16T21:54:37.000Z","dependencies_parsed_at":"2022-08-06T02:15:49.590Z","dependency_job_id":null,"html_url":"https://github.com/taskrabbit/route_counter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/taskrabbit/route_counter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrabbit%2Froute_counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrabbit%2Froute_counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrabbit%2Froute_counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrabbit%2Froute_counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taskrabbit","download_url":"https://codeload.github.com/taskrabbit/route_counter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskrabbit%2Froute_counter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262049797,"owners_count":23250813,"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-11-08T23:46:57.046Z","updated_at":"2025-07-02T16:34:00.307Z","avatar_url":"https://github.com/taskrabbit.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RouteCounter\n\nWhen you want to know how much your routes are being used.\n\nThis is particularly useful if you are wondering if they are used at all.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'route_counter'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install route_counter\n\nEnable the recording in an initializer and insert the middleware:\n\n```ruby\n  RouteCounter.config.enabled = true\n  Rails.application.config.middleware.use RouteCounter::Middleware\n```\n\nAdd to Rakefile:\n\n```ruby\nrequire \"route_counter/tasks\"\n```\n\n## Usage\n\n\nCheck what's been used.\n\n```bash\n  $ bundle exec rake routes:count:local\n```\n\nAll of this gets stored on your disk. If you want to clear it out.\n\n```bash\n  $ bundle exec rake route_counter:local:clear\n```\n\n##  Global Usage\n\nYou might want to see the counts across your servers.\nThis will use Redis to aggregate info from across all of them.\nFirst, you'll need to tell it where Redis is:\n\n```ruby\nRouteCounter.config.redis = Redis.new(connection_hash)\n```\n\nThen, you can clear out the remote store.\nOr not to be cumulative to last time you took a snapshot\n\n```bash\n  $ bundle exec rake route_counter:global:clear\n```\n\nThen take a snapshot. You can do this in parallel on all of your servers (with Capistrano for example).\n\n```bash\n  $ bundle exec rake route_counter:snapshot\n```\n\nThen on one of the servers you can run to use the global numbers\n\n```bash\n  $ bundle exec rake routes:count:global\n```\n\n## TODO\n\n* could make a middleware (or config option) that wrote directly to Redis\n* should it record more info about the request?\n* configurable error handler\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskrabbit%2Froute_counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaskrabbit%2Froute_counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskrabbit%2Froute_counter/lists"}