[Bug] Ruby files named `*.rake`, `*.jbuilder`, `*.gemspec`, `Rakefile` and `Gemfile` are not parsed as Ruby

Open
#6,298 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@HuaTNA is already working on this.

Since Nov 25, 2026.

  • #6305 by @HuaTNA — open

Assessment

This issue has not been assessed yet.

Description

bug good first issue

Summary

The Ruby language spec claims only the .rb extension, plus config.ru by name, so rake tasks, jbuilder views, gemspecs, Rakefile and Gemfile are skipped as an unknown type and never parsed.

packages/core/src/repowise/core/ingestion/languages/specs/ruby.py:18-21

extensions=frozenset({".rb"}),
special_filenames=frozenset({"config.ru"}),

Mechanism

  • Extension and filename lookup both come from the registry (ingestion/languages/registry.py:76-88), built from the specs, so the spec is the only place to change.
  • special_filenames is the precedent: config.ru here, artisan in specs/php.py:17.
  • code_origin.py already classes Rakefile as tooling and .gemspec as build, so origin needs no change.

Repro

lib/tasks/cleanup.rake           module Helper; def self.go; 1; end; end, plus a rake namespace
Rakefile
app/views/api/show.json.jbuilder
Gemfile
fixture.gemspec
config.ru
app/models/account.rb

repowise init --mode fast --no-prose on main, then the file nodes in graph_nodes:

['app/models/account.rb', 'config.ru']

None of the .rake, .jbuilder, .gemspec, Rakefile or Gemfile files appear.

Impact

Rake tasks and jbuilder views are invisible to the graph, dead code and health, and constants defined in a .rake file cannot be resolved.

Done looks like

  • Add .rake, .jbuilder and .gemspec to extensions, and Rakefile, Gemfile, Capfile, Guardfile and Vagrantfile to special_filenames.
  • Gemfile stays in manifest_files; confirm the gem resolver (ingestion/resolvers/ruby.py) still reads it and it is not reported as an unreachable file.
  • code_origin for these files is unchanged.
  • Good first issue: one spec and a registry test.

Tests

tests/unit/ingestion/test_language_capabilities.py: each name and extension maps to ruby. tests/unit/ingestion/parser/test_ruby.py: a .rake file yields its Helper module symbol.

Dominant language
Python
Stars
7.1k
Forks
756
Avg merge
21h 5m
Merged PRs (30d)
797

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from repowise-dev/repowise

All issues in repowise-dev/repowise

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.