Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Bump ViewComponent to 4.0.2

Alexander Brandon Coles1e6d136a7ffb
diff --git a/Gemfile b/Gemfile
index 6c7ec314fcc..b0835f432c1 100644
--- a/Gemfile
+++ b/Gemfile
@@ -225,7 +225,7 @@ gem "yabeda-prometheus-mmap", require: false
gem "yabeda-puma-plugin"
gem "yabeda-rails"
-gem "view_component"
+gem "view_component", "~> 4.0.2"
# Lookbook
gem "lookbook", "2.3.13"
diff --git a/Gemfile.lock b/Gemfile.lock
index d64f176724c..c4ee4f08591 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1256,10 +1256,9 @@ GEM
vcr (6.3.1)
base64
vernier (1.8.0)
- view_component (3.23.2)
- activesupport (>= 5.2.0, < 8.1)
+ view_component (4.0.2)
+ activesupport (>= 7.1.0, < 8.1)
concurrent-ruby (~> 1)
- method_source (~> 1.0)
virtus (2.0.0)
axiom-types (~> 0.1)
coercible (~> 1.0)
@@ -1536,7 +1535,7 @@ DEPENDENCIES
validate_url
vcr
vernier
- view_component
+ view_component (~> 4.0.2)
warden (~> 1.2)
warden-basic_auth (~> 0.2.1)
webmock (~> 3.12)
@@ -1987,7 +1986,7 @@ CHECKSUMS
validate_url (1.0.15) sha256=72fe164c0713d63a9970bd6700bea948babbfbdcec392f2342b6704042f57451
vcr (6.3.1) sha256=37b56e157e720446a3f4d2d39919cabef8cb7b6c45936acffd2ef8229fec03ed
vernier (1.8.0) sha256=c6cf9555c2a58affc25ebc45de0b4d45a993eb078f88f14f5b45d7bacb25acdd
- view_component (3.23.2) sha256=3c2fed4b9e38bf074fa3d42ca55eedbb2cc070e0f3c31d7c13a50b0db530892b
+ view_component (4.0.2) sha256=80eb4a8ecf8ff4cf152aea4821a8748d071a2e3af04f0532efcbf5011e8e9f65
virtus (2.0.0) sha256=8841dae4eb7fcc097320ba5ea516bf1839e5d056c61ee27138aa4bddd6e3d1c2
warden (1.2.9) sha256=46684f885d35a69dbb883deabf85a222c8e427a957804719e143005df7a1efd0
warden-basic_auth (0.2.1) sha256=bfc752e0109c0182c3e69e930284c5e1e81e7b4a354aeb2b5914ead1391f3c6e
diff --git a/config/initializers/lookbook.rb b/config/initializers/lookbook.rb
index d05124915eb..2b64edc2754 100644
--- a/config/initializers/lookbook.rb
+++ b/config/initializers/lookbook.rb
@@ -42,7 +42,7 @@ Rails.application.configure do
config.lookbook.page_paths = [Rails.root.join("lookbook/docs").to_s]
config.lookbook.component_paths << Primer::ViewComponents::Engine.root.join("app/components").to_s
- config.view_component.preview_paths += [
+ config.view_component.previews.paths += [
Rails.root.join("lookbook/previews").to_s,
Primer::ViewComponents::Engine.root.join("previews").to_s
]
diff --git a/config/initializers/view_component.rb b/config/initializers/view_component.rb
index 4c91ccbefc6..b9fce5eb91a 100644
--- a/config/initializers/view_component.rb
+++ b/config/initializers/view_component.rb
@@ -29,13 +29,12 @@
#++
Rails.application.configure do
+ config.view_component.previews.paths << Rails.root.join("spec/components/previews").to_s
+ config.view_component.previews.default_layout = "component_preview"
+
+ config.view_component.generate.preview = true
config.view_component.generate.preview_path = Rails.root.join("spec/components/previews").to_s
- config.view_component.preview_paths << Rails.root.join("spec/components/previews").to_s
# Enable instrumentation (e.g., for AppSignal)
config.view_component.instrumentation_enabled = true
- config.view_component.use_deprecated_instrumentation_name = false
-
- config.view_component.generate.preview = true
- config.view_component.default_preview_layout = "component_preview"
end