From eb00b62dec88fac6006c503e7ef930e5918913b3 Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Fri, 5 Apr 2024 08:06:33 +0200 Subject: [PATCH] Bump view_component to fix high security alert --- Gemfile | 2 +- Gemfile.lock | 6 +++--- app/components/request_metrics/request_metrics.rb | 8 ++++---- .../request_notification/request_notification.html.erb | 2 +- .../request_notification/request_notification.rb | 6 +++--- app/views/requests/show.html.erb | 4 ++-- spec/components/move_message_form_spec.rb | 6 +++--- spec/components/request_metrics_spec.rb | 4 ++-- spec/components/request_notification_spec.rb | 4 ++-- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Gemfile b/Gemfile index 5efa7e941..8ad034939 100644 --- a/Gemfile +++ b/Gemfile @@ -60,7 +60,7 @@ gem 'pg_search' gem 'phony_rails' gem 'rails-settings-cached', '~> 2.8' gem 'valid_email2', '~> 4.0' -gem 'view_component', '~> 2' +gem 'view_component', '~> 2.83.0' # Middleware gem 'rack-attack', '~> 6.6' diff --git a/Gemfile.lock b/Gemfile.lock index fbc2987b4..6cf51f0cc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -415,8 +415,8 @@ GEM activemodel (>= 3.2) mail (~> 2.5) vcr (6.1.0) - view_component (2.72.0) - activesupport (>= 5.0.0, < 8.0) + view_component (2.83.0) + activesupport (>= 5.2.0, < 8.0) concurrent-ruby (~> 1.0) method_source (~> 1.0) webmock (3.18.1) @@ -484,7 +484,7 @@ DEPENDENCIES tzinfo-data valid_email2 (~> 4.0) vcr - view_component (~> 2) + view_component (~> 2.83.0) webmock RUBY VERSION diff --git a/app/components/request_metrics/request_metrics.rb b/app/components/request_metrics/request_metrics.rb index cb160b7b4..829eaeb7a 100644 --- a/app/components/request_metrics/request_metrics.rb +++ b/app/components/request_metrics/request_metrics.rb @@ -2,10 +2,10 @@ module RequestMetrics class RequestMetrics < ApplicationComponent - def initialize(request:, **) + def initialize(request_for_info:, **) super - @request = request + @request_for_info = request_for_info end def call @@ -14,10 +14,10 @@ def call private - attr_reader :request + attr_reader :request_for_info def metrics - stats = request.stats + stats = request_for_info.stats [ { value: stats[:counts][:contributors], diff --git a/app/components/request_notification/request_notification.html.erb b/app/components/request_notification/request_notification.html.erb index cd61c1392..947be6a08 100644 --- a/app/components/request_notification/request_notification.html.erb +++ b/app/components/request_notification/request_notification.html.erb @@ -1,7 +1,7 @@