Skip to content

Require view_component/version - #2475

Merged
Spone merged 2 commits into
mainfrom
require-version
Oct 27, 2025
Merged

Spone merged 2 commits into
mainfrom
require-version

Conversation

@Spone

@Spone Spone commented Oct 24, 2025

Copy link
Copy Markdown
Collaborator

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 camertron and finalburn October 24, 2025 12:32
@Spone Spone self-assigned this Oct 24, 2025

@finalburn finalburn left a comment

Copy link
Copy Markdown
Collaborator

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.

2 participants