BETAmodules.com is in beta — open to partnerships & joint ventures.Build with us

scope_hunter

v0.1.4RubyGems· Ruby

Scope Hunter is a RuboCop extension that detects ActiveRecord query chains that duplicate existing named scopes and suggests using those scopes instead. It indexes model scopes, canonicalizes relation chains, and flags matches with an autocorrect that replaces the initial query with Model.scope while preserving any trailing methods. This keeps query logic DRY, improves readability, and helps teams discover and reuse well-named scopes.

The verdict
Maintained. Niche but maintained, actively maintained.
Live from the RubyGems registry · derived rules, not AI
How it scores
MaintenanceHealthy
PopularityNiche
SecurityClean
LicensePermissive
DepsZero deps
Maintenance
Last published 2 months ago.
Popularity
20 downloads / week
Security
No known advisories for this version (OSV).
License
MIT
Dependencies
No runtime dependencies
Recent releases
  • 0.1.42 months ago
  • 0.1.36 months ago
  • 0.1.27 months ago
  • 0.1.17 months ago
  • 0.1.07 months ago
scope_hunter — Scope Hunter is a RuboCop extension that detects ActiveRecord query chains that duplicate existing named scopes and suggests using those scopes instead. It indexes model scopes, canonicalizes relation chains, and flags matches with an autocorrect that replaces the initial query with Model.scope while preserving any trailing methods. This keeps query logic DRY, improves readability, and helps teams discover and reuse well-named scopes. (Ruby / RubyGems) · Modules