Skip to content

Conversation

@Spone
Copy link
Collaborator

@Spone Spone commented Oct 24, 2025

What are you trying to accomplish?

Make ViewComponent::VERSION accessible to other gems by default.

In view_component-form we need to add conditionals to some specs, depending on ViewComponent version. Currently, calling ::ViewComponent::VERSION from our code raises with uninitialized constant ViewComponent::VERSION if we don't require it manually.

What approach did you choose and why?

I added a require to the main lib file. That's the default when you generate a new gem with rails plugin new.

@Spone Spone requested review from boardfish and camertron October 24, 2025 12:32
@Spone Spone self-assigned this Oct 24, 2025
Copy link
Collaborator

@boardfish boardfish left a comment

Choose a reason for hiding this comment

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

Guessing from recent history that these CI runs aren't a blocker to merging? Certainly shouldn't be a problem for something like this.

@Spone Spone merged commit e733e40 into main Oct 27, 2025
16 of 18 checks passed
@Spone Spone deleted the require-version branch October 27, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants