RubyGems Navigation menu

scope_hunter 0.1.3

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.

Gemfile:
=

install:
=

Versions:

  1. 0.1.3 November 29, 2025 (11.5 KB)
  2. 0.1.2 October 27, 2025 (11.5 KB)
  3. 0.1.1 October 27, 2025 (11.5 KB)
  4. 0.1.0 October 27, 2025 (11.5 KB)

Runtime Dependencies (3):

parser ~> 3.3
rubocop >= 1.60
rubocop-ast ~> 1.32

Development Dependencies (1):

standard >= 1.40

Owners:

Pushed by:

Authors:

  • Ajith kumar

SHA 256 checksum:

=

Total downloads 489

For this version 115

Version Released:

License:

MIT

Required Ruby Version: >= 3.2.0

Links: