You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Feature] Allow ruby_ui:component to accept multiple components (#416)
* [Feature] Allow ruby_ui:component to accept multiple components
The component generator now accepts multiple component names in a single
invocation (e.g. `bin/rails g ruby_ui:component Button Link Input Textarea`),
matching the command already produced by the MCP add-command tool.
- Switch the generator argument to an array and validate all names upfront,
reporting every missing component at once.
- Run the Stimulus manifest update a single time at the end instead of once
per component.
- Generate all components via a single invocation in the `:all` generator.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [Bug Fix] Exit with non-zero status when components are missing
`validate_components!` used a bare `exit`, which in Ruby is `exit(true)` and
yields exit status 0. A failed generation therefore reported success to the
shell, so CI steps and scripts gating on the exit code treated missing-component
errors as passing runs. Use `exit 1` so the failure is observable.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [Bug Fix] Select only directories in ruby_ui:component:all
The batch generator filtered out only `.rb` files, so any other non-directory
entry at the source root (e.g. a macOS `.DS_Store`) survived and was passed as
a component name. Since the names are now generated in a single invocation,
`validate_components!` would reject the whole batch and abort the entire
all-components run. Components are always directories, so select directories
only — this excludes `.rb` files, dotfiles, and any stray file at once.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments