From deaf90175b57082c3f3f23b2a17f055a06bd37f8 Mon Sep 17 00:00:00 2001 From: Nate Matykiewicz Date: Mon, 31 Jul 2023 16:10:57 -0500 Subject: [PATCH 1/6] Disable code reloading in production by default By default a Rails app configs have `cache_classes` as false in develoment and true in production, and does not change `reload_classes_only_on_change` from its default `true`. This means that Lookbook currently actually watches for changes in Production as well as Development, because it's not taking `cache_classes` into account. To quote the Rails Guides: The Reloader only checks for file changes when `cache_classes` is false and `reload_classes_only_on_change` is true (which is the default in the `development` environment). When `cache_classes` is true (in `production`, by default), the Reloader is only a pass-through to the Executor. --- docs/src/_data/config_options.yml | 4 ++-- lib/lookbook/engine.rb | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/src/_data/config_options.yml b/docs/src/_data/config_options.yml index 7f3460f62..f394dcae0 100644 --- a/docs/src/_data/config_options.yml +++ b/docs/src/_data/config_options.yml @@ -223,10 +223,10 @@ debugging: system: - name: reload_on_change types: Boolean - default: "config.reload_classes_only_on_change" + default: "!config.cache_classes && config.reload_classes_only_on_change" example: config.lookbook.reload_on_change = true description: | - By default Lookbook uses the value of the `reload_classes_only_on_change` Rails config option to decide if + By default Lookbook uses the value of the `cache_classes` and `reload_classes_only_on_change` Rails config options to decide if it should attempt to update the preview data after changes. If set the value of this config option will take precedence and be used instead. - name: live_updates diff --git a/lib/lookbook/engine.rb b/lib/lookbook/engine.rb index 054323fc4..6585f9abc 100644 --- a/lib/lookbook/engine.rb +++ b/lib/lookbook/engine.rb @@ -62,7 +62,9 @@ class Engine < Rails::Engine ViewComponent::Preview.extend(Lookbook::PreviewAfterRender) end - opts.reload_on_change = host_config.reload_classes_only_on_change if opts.reload_on_change.nil? + if opts.reload_on_change.nil? + opts.reload_on_change = !host_config.cache_classes && host_config.reload_classes_only_on_change + end end config.after_initialize do From 2a58cb24de61837513774a211819a8f17091640a Mon Sep 17 00:00:00 2001 From: Stefano Savanelli Date: Fri, 25 Aug 2023 12:50:25 +0200 Subject: [PATCH 2/6] Fix attribute escaping deprecation warning --- app/components/lookbook/tag_component.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/components/lookbook/tag_component.rb b/app/components/lookbook/tag_component.rb index 19bba9b7e..8489bd288 100644 --- a/app/components/lookbook/tag_component.rb +++ b/app/components/lookbook/tag_component.rb @@ -20,7 +20,14 @@ def call end def self.escape_attribute_key - @escape_attribute_key ||= (Gem::Version.new(Rails.version) < Gem::Version.new("6.1.5.1")) ? :escape_attributes : :escape + @escape_attribute_key ||= ( + ( + Gem::Version.new(Rails.version) < Gem::Version.new("5.2.7.1") + ) || ( + Gem::Version.new(Rails.version) >= Gem::Version.new("6") && + Gem::Version.new(Rails.version) < Gem::Version.new("6.1.5.1") + ) + ) ? :escape_attributes : :escape end end end From d0a65ace5b619429140ca33c23525c85a99fe3f4 Mon Sep 17 00:00:00 2001 From: Mark Perkins Date: Wed, 30 Aug 2023 13:44:32 +0100 Subject: [PATCH 3/6] Update selenium webdriver version --- Gemfile | 2 +- Gemfile.lock | 4 ++-- gemfiles/rails_6.0.gemfile | 2 +- gemfiles/rails_6.1.gemfile | 2 +- gemfiles/rails_7.0.gemfile | 2 +- gemfiles/rails_head.gemfile | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index f7401f4f4..0503c6878 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,6 @@ group :test do gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" - gem "selenium-webdriver", "4.9.0" + gem "selenium-webdriver", "4.11.0" gem "puma", "~> 6" end diff --git a/Gemfile.lock b/Gemfile.lock index 8c585037f..81ce44820 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -224,7 +224,7 @@ GEM rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) rubyzip (2.3.2) - selenium-webdriver (4.9.0) + selenium-webdriver (4.11.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -272,7 +272,7 @@ DEPENDENCIES phlex-rails puma (~> 6) rails (~> 7.0.0) - selenium-webdriver (= 4.9.0) + selenium-webdriver (= 4.11.0) standard view_component yard-activesupport-concern diff --git a/gemfiles/rails_6.0.gemfile b/gemfiles/rails_6.0.gemfile index 9475e57e1..c2e9161f2 100644 --- a/gemfiles/rails_6.0.gemfile +++ b/gemfiles/rails_6.0.gemfile @@ -14,7 +14,7 @@ group :test do gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" - gem "selenium-webdriver", "4.9.0" + gem "selenium-webdriver", "4.11.0" gem "puma", "~> 6" end diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index ef1d05328..d7424b5eb 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -17,7 +17,7 @@ group :test do gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" - gem "selenium-webdriver", "4.9.0" + gem "selenium-webdriver", "4.11.0" gem "puma", "~> 6" end diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile index 394d08107..aba460c87 100644 --- a/gemfiles/rails_7.0.gemfile +++ b/gemfiles/rails_7.0.gemfile @@ -14,7 +14,7 @@ group :test do gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" - gem "selenium-webdriver", "4.9.0" + gem "selenium-webdriver", "4.11.0" gem "puma", "~> 6" end diff --git a/gemfiles/rails_head.gemfile b/gemfiles/rails_head.gemfile index d483ad0dc..6eba51e56 100644 --- a/gemfiles/rails_head.gemfile +++ b/gemfiles/rails_head.gemfile @@ -14,7 +14,7 @@ group :test do gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" - gem "selenium-webdriver", "4.9.0" + gem "selenium-webdriver", "4.11.0" gem "puma", "~> 6" end From aa9aa19c9d0b6348c4ba63b78bf381812be0b7ae Mon Sep 17 00:00:00 2001 From: Mark Perkins Date: Wed, 30 Aug 2023 13:56:12 +0100 Subject: [PATCH 4/6] Use raw response body to test string output --- spec/requests/previews_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/requests/previews_spec.rb b/spec/requests/previews_spec.rb index 03f284192..83e053dce 100644 --- a/spec/requests/previews_spec.rb +++ b/spec/requests/previews_spec.rb @@ -13,7 +13,7 @@ it "doesn't beautify HTML in the preview" do get lookbook_preview_path("whitespace_significant/default") - expect(response.parsed_body.to_s.include?("
one
two
three
")).to be true + expect(response.body.include?("
one
two
three
")).to be true end context "ViewComponents" do From bba7cddc0a17349da4c81873072924151f6c9c39 Mon Sep 17 00:00:00 2001 From: Mark Perkins Date: Wed, 30 Aug 2023 14:40:20 +0100 Subject: [PATCH 5/6] Try to fix selenium issues --- Appraisals | 4 + Gemfile | 1 - Gemfile.lock | 201 ++++++++++++++++++------------------ gemfiles/rails_6.0.gemfile | 2 +- gemfiles/rails_6.1.gemfile | 2 +- gemfiles/rails_7.0.gemfile | 2 +- gemfiles/rails_head.gemfile | 2 +- 7 files changed, 109 insertions(+), 105 deletions(-) diff --git a/Appraisals b/Appraisals index 2b100e59a..593be1f2d 100644 --- a/Appraisals +++ b/Appraisals @@ -3,11 +3,13 @@ appraise "rails-6.0" do gem "rails", "~> 6.0.0" gem "rspec-rails", "~> 5" + gem "selenium-webdriver", (RUBY_VERSION > "3.0.0") ? "4.11.0" : "4.9.0" end appraise "rails-6.1" do gem "rails", "~> 6.1.0" gem "rspec-rails", "~> 6" + gem "selenium-webdriver", (RUBY_VERSION > "3.0.0") ? "4.11.0" : "4.9.0" # Required for Ruby 3.1.0 gem "net-smtp", require: false @@ -18,9 +20,11 @@ end appraise "rails-7.0" do gem "rails", "~> 7.0.0" gem "rspec-rails", "~> 6" + gem "selenium-webdriver", (RUBY_VERSION > "3.0.0") ? "4.11.0" : "4.9.0" end appraise "rails-head" do gem "rails", github: "rails/rails", branch: "main" gem "rspec-rails", "~> 6" + gem "selenium-webdriver", (RUBY_VERSION > "3.0.0") ? "4.11.0" : "4.9.0" end diff --git a/Gemfile b/Gemfile index 0503c6878..1b176ae02 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,5 @@ group :test do gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" - gem "selenium-webdriver", "4.11.0" gem "puma", "~> 6" end diff --git a/Gemfile.lock b/Gemfile.lock index 81ce44820..c8abf4ed1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,9 @@ GIT remote: https://github.com/thoughtbot/appraisal.git - revision: b200e636903700098bef25f4f51dbc4c46e4c04c + revision: feb78bcc6177038399bff098cb6c2bd4bca4972a branch: main specs: - appraisal (2.4.1) + appraisal (2.5.0) bundler rake thor (>= 0.14.0) @@ -27,76 +27,77 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (7.0.5) - actionpack (= 7.0.5) - activesupport (= 7.0.5) + actioncable (7.0.7.2) + actionpack (= 7.0.7.2) + activesupport (= 7.0.7.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.5) - actionpack (= 7.0.5) - activejob (= 7.0.5) - activerecord (= 7.0.5) - activestorage (= 7.0.5) - activesupport (= 7.0.5) + actionmailbox (7.0.7.2) + actionpack (= 7.0.7.2) + activejob (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.5) - actionpack (= 7.0.5) - actionview (= 7.0.5) - activejob (= 7.0.5) - activesupport (= 7.0.5) + actionmailer (7.0.7.2) + actionpack (= 7.0.7.2) + actionview (= 7.0.7.2) + activejob (= 7.0.7.2) + activesupport (= 7.0.7.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.5) - actionview (= 7.0.5) - activesupport (= 7.0.5) + actionpack (7.0.7.2) + actionview (= 7.0.7.2) + activesupport (= 7.0.7.2) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.5) - actionpack (= 7.0.5) - activerecord (= 7.0.5) - activestorage (= 7.0.5) - activesupport (= 7.0.5) + actiontext (7.0.7.2) + actionpack (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.5) - activesupport (= 7.0.5) + actionview (7.0.7.2) + activesupport (= 7.0.7.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.5) - activesupport (= 7.0.5) + activejob (7.0.7.2) + activesupport (= 7.0.7.2) globalid (>= 0.3.6) - activemodel (7.0.5) - activesupport (= 7.0.5) - activerecord (7.0.5) - activemodel (= 7.0.5) - activesupport (= 7.0.5) - activestorage (7.0.5) - actionpack (= 7.0.5) - activejob (= 7.0.5) - activerecord (= 7.0.5) - activesupport (= 7.0.5) + activemodel (7.0.7.2) + activesupport (= 7.0.7.2) + activerecord (7.0.7.2) + activemodel (= 7.0.7.2) + activesupport (= 7.0.7.2) + activestorage (7.0.7.2) + actionpack (= 7.0.7.2) + activejob (= 7.0.7.2) + activerecord (= 7.0.7.2) + activesupport (= 7.0.7.2) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.5) + activesupport (7.0.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.4) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) + base64 (0.1.1) builder (3.2.4) - capybara (3.39.1) + capybara (3.39.2) addressable matrix mini_mime (>= 0.1.3) @@ -112,10 +113,10 @@ GEM thor (>= 0.14.6) concurrent-ruby (1.2.2) crass (1.0.6) - css_parser (1.14.0) + css_parser (1.15.0) addressable date (3.3.3) - erb (4.0.2) + erb (4.0.3) cgi (>= 0.3.3) erubi (1.12.0) factory_bot (6.2.1) @@ -124,11 +125,11 @@ GEM activesupport (>= 5.0) htmlbeautifier (1.4.2) htmlentities (4.3.4) - i18n (1.14.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) json (2.6.3) language_server-protocol (3.17.0.3) - lint_roller (1.0.0) + lint_roller (1.1.0) loofah (2.21.3) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -140,9 +141,10 @@ GEM marcel (1.0.2) matrix (0.4.2) method_source (1.0.0) - mini_mime (1.1.2) - minitest (5.18.0) - net-imap (0.3.4) + mini_mime (1.1.5) + mini_portile2 (2.8.4) + minitest (5.19.0) + net-imap (0.3.7) date net-protocol net-pop (0.1.2) @@ -152,13 +154,15 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.5.9) - nokogiri (1.15.2-arm64-darwin) + nokogiri (1.15.4) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.15.2-x86_64-linux) + nokogiri (1.15.4-arm64-darwin) racc (~> 1.4) parallel (1.23.0) - parser (3.2.2.1) + parser (3.2.2.3) ast (~> 2.4.1) + racc phlex (1.8.1) concurrent-ruby (~> 1.2) erb (>= 4) @@ -167,36 +171,37 @@ GEM phlex (~> 1.7) rails (>= 6.1, < 8) zeitwerk (~> 2.6) - public_suffix (5.0.1) - puma (6.3.0) + public_suffix (5.0.3) + puma (6.3.1) nio4r (~> 2.0) - racc (1.6.2) - rack (2.2.7) + racc (1.7.1) + rack (2.2.8) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.5) - actioncable (= 7.0.5) - actionmailbox (= 7.0.5) - actionmailer (= 7.0.5) - actionpack (= 7.0.5) - actiontext (= 7.0.5) - actionview (= 7.0.5) - activejob (= 7.0.5) - activemodel (= 7.0.5) - activerecord (= 7.0.5) - activestorage (= 7.0.5) - activesupport (= 7.0.5) + rails (7.0.7.2) + actioncable (= 7.0.7.2) + actionmailbox (= 7.0.7.2) + actionmailer (= 7.0.7.2) + actionpack (= 7.0.7.2) + actiontext (= 7.0.7.2) + actionview (= 7.0.7.2) + activejob (= 7.0.7.2) + activemodel (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) bundler (>= 1.15.0) - railties (= 7.0.5) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + railties (= 7.0.7.2) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.5) - actionpack (= 7.0.5) - activesupport (= 7.0.5) + railties (7.0.7.2) + actionpack (= 7.0.7.2) + activesupport (= 7.0.7.2) method_source rake (>= 12.2) thor (~> 1.0) @@ -204,52 +209,49 @@ GEM rainbow (3.1.1) rake (13.0.6) redcarpet (3.6.0) - regexp_parser (2.8.0) - rexml (3.2.5) - rouge (4.1.2) - rubocop (1.52.0) + regexp_parser (2.8.1) + rexml (3.2.6) + rouge (4.1.3) + rubocop (1.56.2) + base64 (~> 0.1.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-performance (1.18.0) + rubocop-performance (1.19.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) - rubyzip (2.3.2) - selenium-webdriver (4.11.0) - rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2, < 3.0) - websocket (~> 1.0) - standard (1.29.0) + standard (1.31.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.52.0) + rubocop (~> 1.56.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.1.0) - standard-custom (1.0.0) - lint_roller (~> 1.0) - standard-performance (1.1.0) + standard-performance (~> 1.2) + standard-custom (1.0.2) lint_roller (~> 1.0) - rubocop-performance (~> 1.18.0) + rubocop (~> 1.50) + standard-performance (1.2.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.19.0) thor (1.2.2) - timeout (0.3.2) + timeout (0.4.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.4.2) - view_component (3.1.0) + view_component (3.5.0) activesupport (>= 5.2.0, < 8.0) concurrent-ruby (~> 1.0) method_source (~> 1.0) - websocket (1.2.9) - websocket-driver (0.7.5) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) @@ -257,11 +259,11 @@ GEM yard (0.9.34) yard-activesupport-concern (0.0.1) yard (>= 0.8) - zeitwerk (2.6.8) + zeitwerk (2.6.11) PLATFORMS arm64-darwin-22 - x86_64-linux + ruby DEPENDENCIES appraisal! @@ -272,10 +274,9 @@ DEPENDENCIES phlex-rails puma (~> 6) rails (~> 7.0.0) - selenium-webdriver (= 4.11.0) standard view_component yard-activesupport-concern BUNDLED WITH - 2.4.7 + 2.4.19 diff --git a/gemfiles/rails_6.0.gemfile b/gemfiles/rails_6.0.gemfile index c2e9161f2..2d8891b01 100644 --- a/gemfiles/rails_6.0.gemfile +++ b/gemfiles/rails_6.0.gemfile @@ -8,13 +8,13 @@ gem "standard" gem "view_component" gem "yard-activesupport-concern" gem "rspec-rails", "~> 5" +gem "selenium-webdriver", "4.9.0" group :test do gem "appraisal", github: "thoughtbot/appraisal", branch: "main" gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" - gem "selenium-webdriver", "4.11.0" gem "puma", "~> 6" end diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index d7424b5eb..625ee945e 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -8,6 +8,7 @@ gem "standard" gem "view_component" gem "yard-activesupport-concern" gem "rspec-rails", "~> 6" +gem "selenium-webdriver", "4.9.0" gem "net-smtp", require: false gem "net-imap", require: false gem "net-pop", require: false @@ -17,7 +18,6 @@ group :test do gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" - gem "selenium-webdriver", "4.11.0" gem "puma", "~> 6" end diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile index aba460c87..afd073e54 100644 --- a/gemfiles/rails_7.0.gemfile +++ b/gemfiles/rails_7.0.gemfile @@ -8,13 +8,13 @@ gem "standard" gem "view_component" gem "yard-activesupport-concern" gem "rspec-rails", "~> 6" +gem "selenium-webdriver", "4.9.0" group :test do gem "appraisal", github: "thoughtbot/appraisal", branch: "main" gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" - gem "selenium-webdriver", "4.11.0" gem "puma", "~> 6" end diff --git a/gemfiles/rails_head.gemfile b/gemfiles/rails_head.gemfile index 6eba51e56..354662d80 100644 --- a/gemfiles/rails_head.gemfile +++ b/gemfiles/rails_head.gemfile @@ -8,13 +8,13 @@ gem "standard" gem "view_component" gem "yard-activesupport-concern" gem "rspec-rails", "~> 6" +gem "selenium-webdriver", "4.9.0" group :test do gem "appraisal", github: "thoughtbot/appraisal", branch: "main" gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" - gem "selenium-webdriver", "4.11.0" gem "puma", "~> 6" end From 3845215b48796030d5234c205a9523e4aa85b3a0 Mon Sep 17 00:00:00 2001 From: Mark Perkins Date: Wed, 30 Aug 2023 14:58:12 +0100 Subject: [PATCH 6/6] Revert selenium/appraisal changes --- Appraisals | 4 ---- Gemfile | 1 + Gemfile.lock | 7 +++++++ gemfiles/rails_6.0.gemfile | 2 +- gemfiles/rails_6.1.gemfile | 2 +- gemfiles/rails_7.0.gemfile | 2 +- gemfiles/rails_head.gemfile | 2 +- 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Appraisals b/Appraisals index 593be1f2d..2b100e59a 100644 --- a/Appraisals +++ b/Appraisals @@ -3,13 +3,11 @@ appraise "rails-6.0" do gem "rails", "~> 6.0.0" gem "rspec-rails", "~> 5" - gem "selenium-webdriver", (RUBY_VERSION > "3.0.0") ? "4.11.0" : "4.9.0" end appraise "rails-6.1" do gem "rails", "~> 6.1.0" gem "rspec-rails", "~> 6" - gem "selenium-webdriver", (RUBY_VERSION > "3.0.0") ? "4.11.0" : "4.9.0" # Required for Ruby 3.1.0 gem "net-smtp", require: false @@ -20,11 +18,9 @@ end appraise "rails-7.0" do gem "rails", "~> 7.0.0" gem "rspec-rails", "~> 6" - gem "selenium-webdriver", (RUBY_VERSION > "3.0.0") ? "4.11.0" : "4.9.0" end appraise "rails-head" do gem "rails", github: "rails/rails", branch: "main" gem "rspec-rails", "~> 6" - gem "selenium-webdriver", (RUBY_VERSION > "3.0.0") ? "4.11.0" : "4.9.0" end diff --git a/Gemfile b/Gemfile index 1b176ae02..f7401f4f4 100644 --- a/Gemfile +++ b/Gemfile @@ -14,5 +14,6 @@ group :test do gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" + gem "selenium-webdriver", "4.9.0" gem "puma", "~> 6" end diff --git a/Gemfile.lock b/Gemfile.lock index c8abf4ed1..77ce42d40 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -230,6 +230,11 @@ GEM rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) + rubyzip (2.3.2) + selenium-webdriver (4.9.0) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) standard (1.31.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) @@ -251,6 +256,7 @@ GEM activesupport (>= 5.2.0, < 8.0) concurrent-ruby (~> 1.0) method_source (~> 1.0) + websocket (1.2.9) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -274,6 +280,7 @@ DEPENDENCIES phlex-rails puma (~> 6) rails (~> 7.0.0) + selenium-webdriver (= 4.9.0) standard view_component yard-activesupport-concern diff --git a/gemfiles/rails_6.0.gemfile b/gemfiles/rails_6.0.gemfile index 2d8891b01..9475e57e1 100644 --- a/gemfiles/rails_6.0.gemfile +++ b/gemfiles/rails_6.0.gemfile @@ -8,13 +8,13 @@ gem "standard" gem "view_component" gem "yard-activesupport-concern" gem "rspec-rails", "~> 5" -gem "selenium-webdriver", "4.9.0" group :test do gem "appraisal", github: "thoughtbot/appraisal", branch: "main" gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" + gem "selenium-webdriver", "4.9.0" gem "puma", "~> 6" end diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index 625ee945e..ef1d05328 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -8,7 +8,6 @@ gem "standard" gem "view_component" gem "yard-activesupport-concern" gem "rspec-rails", "~> 6" -gem "selenium-webdriver", "4.9.0" gem "net-smtp", require: false gem "net-imap", require: false gem "net-pop", require: false @@ -18,6 +17,7 @@ group :test do gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" + gem "selenium-webdriver", "4.9.0" gem "puma", "~> 6" end diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile index afd073e54..394d08107 100644 --- a/gemfiles/rails_7.0.gemfile +++ b/gemfiles/rails_7.0.gemfile @@ -8,13 +8,13 @@ gem "standard" gem "view_component" gem "yard-activesupport-concern" gem "rspec-rails", "~> 6" -gem "selenium-webdriver", "4.9.0" group :test do gem "appraisal", github: "thoughtbot/appraisal", branch: "main" gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" + gem "selenium-webdriver", "4.9.0" gem "puma", "~> 6" end diff --git a/gemfiles/rails_head.gemfile b/gemfiles/rails_head.gemfile index 354662d80..d483ad0dc 100644 --- a/gemfiles/rails_head.gemfile +++ b/gemfiles/rails_head.gemfile @@ -8,13 +8,13 @@ gem "standard" gem "view_component" gem "yard-activesupport-concern" gem "rspec-rails", "~> 6" -gem "selenium-webdriver", "4.9.0" group :test do gem "appraisal", github: "thoughtbot/appraisal", branch: "main" gem "phlex-rails", require: false gem "factory_bot", require: false gem "capybara", "~> 3.39" + gem "selenium-webdriver", "4.9.0" gem "puma", "~> 6" end