From 59688741f3ea5350f58cf73700af33eff7898ae7 Mon Sep 17 00:00:00 2001 From: Michal Cichra Date: Fri, 17 Oct 2025 10:44:44 +0200 Subject: [PATCH] Declare actionview as explicit gem dependency lib/view_component.rb has `require "action_view"`, yet this gem did not have actionview declared as a dependency. --- Gemfile.lock | 1 + docs/CHANGELOG.md | 4 ++++ gemfiles/rails_7.1.gemfile.lock | 1 + gemfiles/rails_7.2.gemfile.lock | 1 + gemfiles/rails_8.0.gemfile.lock | 3 ++- gemfiles/rails_8.1.gemfile.lock | 3 ++- gemfiles/rails_main.gemfile.lock | 1 + view_component.gemspec | 4 +++- 8 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 160e5d3f1..90f1923f1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,6 +3,7 @@ PATH specs: view_component (4.1.0) activesupport (>= 7.1.0, < 8.2) + actionview (>= 7.1.0, < 8.2) concurrent-ruby (~> 1) GEM diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index f1ae0cd8f..e307009cb 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -24,6 +24,10 @@ nav_order: 6 *Tom Lord* +* Declare `actionview` as a `view_component` gem dependency. + + *Michal Cichra* + ## 4.0.2 * Share the view context in tests to prevent out-of-order rendering issues for certain advanced use-cases, eg. testing instances of Rails' `FormBuilder`. diff --git a/gemfiles/rails_7.1.gemfile.lock b/gemfiles/rails_7.1.gemfile.lock index 783c26cc0..2b4b5762a 100644 --- a/gemfiles/rails_7.1.gemfile.lock +++ b/gemfiles/rails_7.1.gemfile.lock @@ -2,6 +2,7 @@ PATH remote: .. specs: view_component (4.1.0) + actionview (>= 7.1.0, < 8.2) activesupport (>= 7.1.0, < 8.2) concurrent-ruby (~> 1) diff --git a/gemfiles/rails_7.2.gemfile.lock b/gemfiles/rails_7.2.gemfile.lock index 1cdd2541f..a21c39901 100644 --- a/gemfiles/rails_7.2.gemfile.lock +++ b/gemfiles/rails_7.2.gemfile.lock @@ -2,6 +2,7 @@ PATH remote: .. specs: view_component (4.1.0) + actionview (>= 7.1.0, < 8.2) activesupport (>= 7.1.0, < 8.2) concurrent-ruby (~> 1) diff --git a/gemfiles/rails_8.0.gemfile.lock b/gemfiles/rails_8.0.gemfile.lock index 0e25a00fc..03d65eece 100644 --- a/gemfiles/rails_8.0.gemfile.lock +++ b/gemfiles/rails_8.0.gemfile.lock @@ -1,7 +1,8 @@ PATH remote: .. specs: - view_component (4.0.2) + view_component (4.1.0) + actionview (>= 7.1.0, < 8.2) activesupport (>= 7.1.0, < 8.2) concurrent-ruby (~> 1) diff --git a/gemfiles/rails_8.1.gemfile.lock b/gemfiles/rails_8.1.gemfile.lock index b8b95a54e..2de01169b 100644 --- a/gemfiles/rails_8.1.gemfile.lock +++ b/gemfiles/rails_8.1.gemfile.lock @@ -1,7 +1,8 @@ PATH remote: .. specs: - view_component (4.0.2) + view_component (4.1.0) + actionview (>= 7.1.0, < 8.2) activesupport (>= 7.1.0, < 8.2) concurrent-ruby (~> 1) diff --git a/gemfiles/rails_main.gemfile.lock b/gemfiles/rails_main.gemfile.lock index 2cd3228fd..cf88b1240 100644 --- a/gemfiles/rails_main.gemfile.lock +++ b/gemfiles/rails_main.gemfile.lock @@ -110,6 +110,7 @@ PATH remote: .. specs: view_component (4.1.0) + actionview (>= 7.1.0, < 8.2) activesupport (>= 7.1.0, < 8.2) concurrent-ruby (~> 1) diff --git a/view_component.gemspec b/view_component.gemspec index 2daf692cd..d8eb51271 100644 --- a/view_component.gemspec +++ b/view_component.gemspec @@ -32,6 +32,8 @@ Gem::Specification.new do |spec| spec.required_ruby_version = ">= 3.2.0" - spec.add_runtime_dependency "activesupport", [">= 7.1.0", "< 8.2"] + supported_rails_version = [">= 7.1.0", "< 8.2"] + spec.add_runtime_dependency "activesupport", supported_rails_version + spec.add_runtime_dependency "actionview", supported_rails_version spec.add_runtime_dependency "concurrent-ruby", "~> 1" end