From dc0c5c1da01d2e46d7e038becb97ded5b461ff7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 22:31:15 +0000 Subject: [PATCH 1/2] Bump view_component from 2.37.0 to 2.49.1 Note we don't require the "view_component/engine" in the Gemfile anymore, since it's been deprecated since ViewComponent 2.46.0. Bumps [view_component](https://github.com/github/view_component) from 2.37.0 to 2.49.1. - [Release notes](https://github.com/github/view_component/releases) - [Changelog](https://github.com/github/view_component/blob/main/docs/CHANGELOG.md) - [Commits](https://github.com/github/view_component/compare/v2.37.0...v2.49.1) --- updated-dependencies: - dependency-name: view_component dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 8dde556bb..45238a498 100644 --- a/Gemfile +++ b/Gemfile @@ -58,7 +58,7 @@ gem "turbolinks", "~> 5.2.1" gem "turnout", "~> 2.5.0" gem "uglifier", "~> 4.2.0" gem "uuidtools", "~> 2.1.5" -gem "view_component", "~> 2.37.0", require: "view_component/engine" +gem "view_component", "~> 2.49.1" gem "whenever", "~> 1.0.0", require: false gem "wicked_pdf", "~> 2.1.0" gem "wkhtmltopdf-binary", "~> 0.12.6" diff --git a/Gemfile.lock b/Gemfile.lock index 4bcd948be..9576dc413 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -302,7 +302,7 @@ GEM httpi (2.4.5) rack socksify - i18n (1.8.10) + i18n (1.10.0) concurrent-ruby (~> 1.0) i18n-tasks (0.9.34) activesupport (>= 4.0.2) @@ -376,7 +376,7 @@ GEM mini_magick (4.11.0) mini_mime (1.1.0) mini_portile2 (2.8.0) - minitest (5.14.4) + minitest (5.15.0) mixlib-cli (2.1.8) mixlib-config (3.0.9) tomlrb @@ -651,7 +651,7 @@ GEM unicode-display_width (1.7.0) uniform_notifier (1.14.2) uuidtools (2.1.5) - view_component (2.37.0) + view_component (2.49.1) activesupport (>= 5.0.0, < 8.0) method_source (~> 1.0) warden (1.2.9) @@ -780,7 +780,7 @@ DEPENDENCIES turnout (~> 2.5.0) uglifier (~> 4.2.0) uuidtools (~> 2.1.5) - view_component (~> 2.37.0) + view_component (~> 2.49.1) web-console (~> 3.7.0) webdrivers (~> 4.6.0) whenever (~> 1.0.0) From 15d9b88978c76bafb7b2773f06e1000b8b3672f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 4 Mar 2022 12:45:51 +0100 Subject: [PATCH 2/2] Use with_request_url with query params in specs Support for query params in component specs was added in ViewComponent 2.41.0. --- .../users/public_activity_component_spec.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/spec/components/users/public_activity_component_spec.rb b/spec/components/users/public_activity_component_spec.rb index 2f72c8495..7f066903f 100644 --- a/spec/components/users/public_activity_component_spec.rb +++ b/spec/components/users/public_activity_component_spec.rb @@ -1,8 +1,10 @@ require "rails_helper" describe Users::PublicActivityComponent, controller: UsersController do + include Rails.application.routes.url_helpers + around do |example| - with_request_url(Rails.application.routes.url_helpers.user_path(user)) { example.run } + with_request_url(user_path(user)) { example.run } end describe "follows tab" do @@ -28,11 +30,12 @@ describe Users::PublicActivityComponent, controller: UsersController do it "is the active tab when the follows filters is selected" do create(:proposal, author: user, followers: [user]) - controller.params["filter"] = "follows" - render_inline component + with_request_url user_path(user, filter: "follows") do + render_inline component - expect(page).to have_selector "li.is-active", text: "1 Following" + expect(page).to have_selector "li.is-active", text: "1 Following" + end end end