Draft
Conversation
6748ef3 to
d486dd2
Compare
d486dd2 to
14beaf4
Compare
There was a problem hiding this comment.
Pull request overview
Reworks the gem into a proper Rails plugin by renaming it to rolemodel-rails, introducing a Rails Engine for generator registration, and removing generator eager-loading during host app boot.
Changes:
- Renames the gem from
rolemodel_railstorolemodel-railsand collapses the public namespace toRolemodel. - Adds a
Rolemodel::Engineto register generator support without eager-loading all generators at boot. - Updates specs, example apps, and tooling scripts to use the new gem name and loading behavior.
Reviewed changes
Copilot reviewed 16 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/support/helpers/example_app.rb | Updates Gemfile cleanup to remove rolemodel-rails entries in the test app. |
| spec/spec_helper.rb | Updates spec bootstrapping to load Rails + the gem and eagerly require generator classes for tests. |
| spec/rolemodel_rails_spec.rb | Updates version constant expectations to the new Rolemodel namespace. |
| spec/generators/rolemodel/github_generator_spec.rb | Updates expected template text to reference the new version file path. |
| rolemodel-rails.gemspec | Renames the gem, updates metadata, and points version loading at Rolemodel::VERSION. |
| lib/rolemodel_rails.rb | Removes the old entrypoint that eagerly loaded generators. |
| lib/rolemodel/version.rb | Moves version constant under Rolemodel module. |
| lib/rolemodel/engine.rb | Adds Rails Engine for generator registration. |
| lib/rolemodel-rails.rb | Adds new gem entrypoint that defines version constants and requires version/engine. |
| lib/generators/rolemodel/base_generator.rb | Introduces a standalone BaseGenerator (previously defined in lib/generators/rolemodel.rb). |
| lib/generators/rolemodel.rb | Removes the old generator aggregator that loaded all generators eagerly. |
| example_rails8/Gemfile / Gemfile.lock | Updates example app to depend on rolemodel-rails. |
| example_rails7/Gemfile / Gemfile.lock | Updates example app to depend on rolemodel-rails. |
| bin/recreate_legacy_example | Updates bundle add invocation to rolemodel-rails. |
| bin/recreate_current_example | Updates bundle add invocation to rolemodel-rails. |
| bin/console | Updates require to rolemodel-rails. |
| bin/bump_version | Updates paths and gemspec name used by the version bumper. |
| README.md | Updates documentation to reference rolemodel-rails. |
| Gemfile / Gemfile.lock | Updates development dependency name to rolemodel-rails. |
| .gitignore | Adds .DS_Store ignore. |
| .github/workflows/ci.yml | Updates runner and GitHub Action versions used in CI. |
Comments suppressed due to low confidence (1)
rolemodel-rails.gemspec:5
rolemodel-rails.gemspecno longer has# frozen_string_literal: trueat the top. This repo consistently uses frozen string literals in Ruby files, and removing it may introduce RuboCop/style inconsistencies.
Suggestion: add the frozen-string-literal magic comment back at the top of the gemspec (before any require).
Member
Author
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@OutlawAndy I've opened a new pull request, #182, to work on those changes. Once the pull request is ready, I'll request review from you. |
4 tasks
…182) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: OutlawAndy <1504753+OutlawAndy@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
Rolemodel&RolemodelRails) which is a general anti-pattern for RubyGems.-rather than a_. e.g.rspec-rails,slim-rails,rubocop-rails, etc. This ties back into#2becauserolemodel-railstranslates toRolemodel::Rails, whilerolemodel_railstranslates toRolemodelRails.What Changed
What changed in this PR?
rolemodel-railsPre-merge checklist
bin/bump_versionorbin/bump_version --patch