Skip to content

Rename BaseGenerator to GeneratorBase#188

Draft
OutlawAndy wants to merge 6 commits intomasterfrom
command-improvements
Draft

Rename BaseGenerator to GeneratorBase#188
OutlawAndy wants to merge 6 commits intomasterfrom
command-improvements

Conversation

@OutlawAndy
Copy link
Copy Markdown
Member

@OutlawAndy OutlawAndy commented Apr 3, 2026

Why?

BaseGenerator sounds like it's a generator itself, but it's not. It also shows up in the list of available generators for the consumer app, which it shouldn't.

What Changed

What changed in this PR?

  • Rename BaseGenerator to GeneratorBase
  • move GeneratorBase out of rolemodel/generators directory
  • improve bin/new_generator output
  • clean up bin/recreate_current_example generator
  • update github PR template
    • there is almost never a reason to include screenshots
    • I'm moving gem version management out of PRs and into GH Actions

Pre-merge checklist

  • Update relevant READMEs
  • Run bin/bump_version or bin/bump_version --patch

Screenshots

iTerm2 04 03 2026@21 46 39 Code 04 03 2026@21 48 46

@OutlawAndy OutlawAndy changed the title Improve bin/recreate_current_example & bin/new_generator Rename BaseGenerator to GeneratorBase Apr 4, 2026
@OutlawAndy OutlawAndy requested a review from timirwin April 4, 2026 01:09
@OutlawAndy OutlawAndy force-pushed the command-improvements branch from b916c17 to 392c6de Compare April 4, 2026 01:13
@OutlawAndy OutlawAndy self-assigned this Apr 4, 2026
@OutlawAndy OutlawAndy requested a review from justwiebe April 6, 2026 13:47
class McpGenerator < GeneratorBase
source_root File.expand_path('templates', __dir__)

def update_inflections
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the generator going to be able to be run a second time if the inflections are setup? Or don't inflections affect gems?

Copy link
Copy Markdown
Member Author

@OutlawAndy OutlawAndy Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just testing on the example app, host application inflections do not affect gem file loading. Which I think makes sense. Rails inflections affect constant look up because they're tied into the Rails autoloader, but RMR's generators are not loaded by the Zeitwerk autoloader. They are just added to the Ruby FILE_PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants