From ea0daa4e42b0cf4016057f4d7dd21b62761ac09d Mon Sep 17 00:00:00 2001 From: Kirill Platonov Date: Mon, 4 Mar 2024 09:03:33 +0100 Subject: [PATCH 1/3] Update dependencies --- Gemfile | 4 +- Gemfile.lock | 284 ++++++++++-------- demo/Gemfile | 4 +- demo/Gemfile.lock | 235 +++++++++------ demo/bin/setup | 17 +- demo/config/application.rb | 8 +- demo/config/cable.yml | 8 + demo/config/environments/development.rb | 16 +- demo/config/environments/production.rb | 55 +++- demo/config/environments/test.rb | 22 +- .../initializers/content_security_policy.rb | 44 ++- .../initializers/filter_parameter_logging.rb | 4 +- .../config/initializers/permissions_policy.rb | 20 +- demo/config/routes.rb | 4 +- ..._to_active_storage_blobs.active_storage.rb | 22 ++ ..._storage_variant_records.active_storage.rb | 27 ++ ...e_storage_blobs_checksum.active_storage.rb | 8 + demo/db/schema.rb | 2 +- package.json | 6 +- polaris_view_components.gemspec | 3 +- yarn.lock | 34 +-- 21 files changed, 506 insertions(+), 321 deletions(-) create mode 100644 demo/config/cable.yml create mode 100644 demo/db/migrate/20240304070104_add_service_name_to_active_storage_blobs.active_storage.rb create mode 100644 demo/db/migrate/20240304070105_create_active_storage_variant_records.active_storage.rb create mode 100644 demo/db/migrate/20240304070106_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb diff --git a/Gemfile b/Gemfile index 08d962d4..8ee0954a 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" gemspec gem "rake", "~> 13.0" -gem "rails", "~> 7.0.8" +gem "rails", "~> 7.1.3.2" gem "puma", "~> 6.0" gem "sprockets-rails" gem "importmap-rails" @@ -15,5 +15,3 @@ gem "foreman" gem "capybara" gem "sqlite3" gem "standard" -# TODO: Keep until support for Ruby 2.7 is dropped -gem "selenium-webdriver", "=4.9.0" diff --git a/Gemfile.lock b/Gemfile.lock index 5eb9364d..3a778232 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,109 +8,126 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8) - actionpack (= 7.0.8) - activesupport (= 7.0.8) + actioncable (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8) - actionpack (= 7.0.8) - activejob (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + zeitwerk (~> 2.6) + actionmailbox (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.8) - actionpack (= 7.0.8) - actionview (= 7.0.8) - activejob (= 7.0.8) - activesupport (= 7.0.8) + actionmailer (7.1.3.2) + actionpack (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.8) - actionview (= 7.0.8) - activesupport (= 7.0.8) - rack (~> 2.0, >= 2.2.4) + rails-dom-testing (~> 2.2) + actionpack (7.1.3.2) + actionview (= 7.1.3.2) + activesupport (= 7.1.3.2) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8) - actionpack (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.3.2) + actionpack (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8) - activesupport (= 7.0.8) + actionview (7.1.3.2) + activesupport (= 7.1.3.2) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.8) - activesupport (= 7.0.8) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.3.2) + activesupport (= 7.1.3.2) globalid (>= 0.3.6) - activemodel (7.0.8) - activesupport (= 7.0.8) - activerecord (7.0.8) - activemodel (= 7.0.8) - activesupport (= 7.0.8) - activestorage (7.0.8) - actionpack (= 7.0.8) - activejob (= 7.0.8) - activerecord (= 7.0.8) - activesupport (= 7.0.8) + activemodel (7.1.3.2) + activesupport (= 7.1.3.2) + activerecord (7.1.3.2) + activemodel (= 7.1.3.2) + activesupport (= 7.1.3.2) + timeout (>= 0.4.0) + activestorage (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activesupport (= 7.1.3.2) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.8) + activesupport (7.1.3.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) - base64 (0.1.1) + base64 (0.2.0) + bigdecimal (3.1.6) builder (3.2.4) - capybara (3.39.2) + capybara (3.40.0) addressable matrix mini_mime (>= 0.1.3) - nokogiri (~> 1.8) + nokogiri (~> 1.11) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) coderay (1.1.3) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) crass (1.0.6) css_parser (1.16.0) addressable - date (3.3.3) + date (3.3.4) + drb (2.2.1) erubi (1.12.0) foreman (0.87.2) globalid (1.2.1) activesupport (>= 6.1) - htmlbeautifier (1.4.2) + htmlbeautifier (1.4.3) htmlentities (4.3.4) i18n (1.14.1) concurrent-ruby (~> 1.0) - importmap-rails (1.2.1) + importmap-rails (2.0.1) actionpack (>= 6.0.0) + activesupport (>= 6.0.0) railties (>= 6.0.0) - json (2.6.3) + io-console (0.7.2) + irb (1.11.2) + rdoc + reline (>= 0.4.2) + json (2.7.1) language_server-protocol (3.17.0.3) lint_roller (1.1.0) - loofah (2.21.3) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - lookbook (2.0.5) + lookbook (2.2.1) activemodel css_parser htmlbeautifier (~> 1.3) @@ -127,53 +144,65 @@ GEM net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) matrix (0.4.2) method_source (1.0.0) mini_mime (1.1.5) - mini_portile2 (2.8.5) - minitest (5.20.0) - net-imap (0.3.7) + minitest (5.22.2) + mutex_m (0.2.0) + net-imap (0.4.10) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.4.0.1) net-protocol - nio4r (2.5.9) - nokogiri (1.15.4) - mini_portile2 (~> 2.8.2) + nio4r (2.7.0) + nokogiri (1.16.2-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.2-arm64-darwin) racc (~> 1.4) - parallel (1.23.0) - parser (3.2.2.3) + nokogiri (1.16.2-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.2-x86_64-linux) + racc (~> 1.4) + parallel (1.24.0) + parser (3.3.0.5) ast (~> 2.4.1) racc pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (5.0.3) - puma (6.3.1) + psych (5.1.2) + stringio + public_suffix (5.0.4) + puma (6.4.2) nio4r (~> 2.0) - racc (1.7.1) - rack (2.2.8) + racc (1.7.3) + rack (3.0.9.1) + rack-session (2.0.0) + rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.8) - actioncable (= 7.0.8) - actionmailbox (= 7.0.8) - actionmailer (= 7.0.8) - actionpack (= 7.0.8) - actiontext (= 7.0.8) - actionview (= 7.0.8) - activejob (= 7.0.8) - activemodel (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails (7.1.3.2) + actioncable (= 7.1.3.2) + actionmailbox (= 7.1.3.2) + actionmailer (= 7.1.3.2) + actionpack (= 7.1.3.2) + actiontext (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activemodel (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) bundler (>= 1.15.0) - railties (= 7.0.8) + railties (= 7.1.3.2) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -181,39 +210,44 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.8) - actionpack (= 7.0.8) - activesupport (= 7.0.8) - method_source + railties (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.0.6) + rake (13.1.0) + rdoc (6.6.2) + psych (>= 4.0.0) redcarpet (3.6.0) - regexp_parser (2.8.1) + regexp_parser (2.9.0) + reline (0.4.3) + io-console (~> 0.5) rexml (3.2.6) - rouge (4.1.3) - rubocop (1.56.3) - base64 (~> 0.1.1) + rouge (4.2.0) + rubocop (1.61.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + rubocop-ast (>= 1.30.0, < 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.19.0) - rubocop (>= 1.7.0, < 2.0) - rubocop-ast (>= 0.4.0) + rubocop-ast (1.31.1) + parser (>= 3.3.0.4) + rubocop-performance (1.20.2) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (1.13.0) rubyzip (2.3.2) - selenium-webdriver (4.9.0) + selenium-webdriver (4.18.1) + base64 (~> 0.2) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -224,47 +258,51 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.6.6) - mini_portile2 (~> 2.8.0) - standard (1.31.1) + sqlite3 (1.7.2-aarch64-linux) + sqlite3 (1.7.2-arm64-darwin) + sqlite3 (1.7.2-x86_64-darwin) + sqlite3 (1.7.2-x86_64-linux) + standard (1.34.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.56.2) + rubocop (~> 1.60) standard-custom (~> 1.0.0) - standard-performance (~> 1.2) + standard-performance (~> 1.3) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.2.0) + standard-performance (1.3.1) lint_roller (~> 1.1) - rubocop-performance (~> 1.19.0) - stimulus-rails (1.2.2) + rubocop-performance (~> 1.20.2) + stimulus-rails (1.3.3) railties (>= 6.0.0) - thor (1.2.2) - timeout (0.4.0) - turbo-rails (1.4.0) + stringio (3.1.0) + thor (1.3.1) + timeout (0.4.1) + turbo-rails (2.0.4) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.4.2) - view_component (3.6.0) + unicode-display_width (2.5.0) + view_component (3.11.0) activesupport (>= 5.2.0, < 8.0) concurrent-ruby (~> 1.0) method_source (~> 1.0) - webdrivers (5.3.1) + webdrivers (5.2.0) nokogiri (~> 1.6) rubyzip (>= 1.3.0) - selenium-webdriver (~> 4.0, < 4.11) - websocket (1.2.9) + selenium-webdriver (~> 4.0) + webrick (1.8.1) + websocket (1.2.10) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.34) - zeitwerk (2.6.11) + yard (0.9.36) + zeitwerk (2.6.13) PLATFORMS aarch64-linux @@ -285,9 +323,9 @@ DEPENDENCIES polaris_view_components! pry puma (~> 6.0) - rails (~> 7.0.8) + rails (~> 7.1.3.2) rake (~> 13.0) - selenium-webdriver (= 4.9.0) + selenium-webdriver (~> 4.18) sprockets-rails sqlite3 standard diff --git a/demo/Gemfile b/demo/Gemfile index bd51f621..397382fd 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -1,8 +1,8 @@ source "https://rubygems.org" -ruby File.read(".ruby-version").chomp +ruby file: ".ruby-version" -gem "rails", "~> 7.0.8" +gem "rails", "~> 7.1.3.2" gem "puma", "~> 6.0" gem "sqlite3" gem "sprockets-rails" diff --git a/demo/Gemfile.lock b/demo/Gemfile.lock index 67798607..79a609bc 100644 --- a/demo/Gemfile.lock +++ b/demo/Gemfile.lock @@ -8,99 +8,117 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8) - actionpack (= 7.0.8) - activesupport (= 7.0.8) + actioncable (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8) - actionpack (= 7.0.8) - activejob (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + zeitwerk (~> 2.6) + actionmailbox (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.8) - actionpack (= 7.0.8) - actionview (= 7.0.8) - activejob (= 7.0.8) - activesupport (= 7.0.8) + actionmailer (7.1.3.2) + actionpack (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.8) - actionview (= 7.0.8) - activesupport (= 7.0.8) - rack (~> 2.0, >= 2.2.4) + rails-dom-testing (~> 2.2) + actionpack (7.1.3.2) + actionview (= 7.1.3.2) + activesupport (= 7.1.3.2) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8) - actionpack (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.3.2) + actionpack (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8) - activesupport (= 7.0.8) + actionview (7.1.3.2) + activesupport (= 7.1.3.2) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.8) - activesupport (= 7.0.8) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.3.2) + activesupport (= 7.1.3.2) globalid (>= 0.3.6) - activemodel (7.0.8) - activesupport (= 7.0.8) - activerecord (7.0.8) - activemodel (= 7.0.8) - activesupport (= 7.0.8) - activestorage (7.0.8) - actionpack (= 7.0.8) - activejob (= 7.0.8) - activerecord (= 7.0.8) - activesupport (= 7.0.8) + activemodel (7.1.3.2) + activesupport (= 7.1.3.2) + activerecord (7.1.3.2) + activemodel (= 7.1.3.2) + activesupport (= 7.1.3.2) + timeout (>= 0.4.0) + activestorage (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activesupport (= 7.1.3.2) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.8) + activesupport (7.1.3.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) + base64 (0.2.0) + bigdecimal (3.1.6) bindex (0.8.1) builder (3.2.4) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) crass (1.0.6) css_parser (1.16.0) addressable - date (3.3.3) + date (3.3.4) + drb (2.2.1) erubi (1.12.0) - ffi (1.15.5) + ffi (1.16.3) foreman (0.87.2) globalid (1.2.1) activesupport (>= 6.1) - htmlbeautifier (1.4.2) + htmlbeautifier (1.4.3) htmlentities (4.3.4) i18n (1.14.1) concurrent-ruby (~> 1.0) - importmap-rails (1.2.1) + importmap-rails (2.0.1) actionpack (>= 6.0.0) + activesupport (>= 6.0.0) railties (>= 6.0.0) - listen (3.8.0) + io-console (0.7.2) + irb (1.11.2) + rdoc + reline (>= 0.4.2) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.21.3) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - lookbook (2.0.5) + lookbook (2.2.1) activemodel css_parser htmlbeautifier (~> 1.3) @@ -117,45 +135,57 @@ GEM net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) method_source (1.0.0) mini_mime (1.1.5) - mini_portile2 (2.8.5) - minitest (5.20.0) - net-imap (0.3.7) + minitest (5.22.2) + mutex_m (0.2.0) + net-imap (0.4.10) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.4.0.1) net-protocol - nio4r (2.5.9) - nokogiri (1.15.4) - mini_portile2 (~> 2.8.2) + nio4r (2.7.0) + nokogiri (1.16.2-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.2-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.2-x86_64-darwin) racc (~> 1.4) - public_suffix (5.0.3) - puma (6.3.1) + nokogiri (1.16.2-x86_64-linux) + racc (~> 1.4) + psych (5.1.2) + stringio + public_suffix (5.0.4) + puma (6.4.2) nio4r (~> 2.0) - racc (1.7.1) - rack (2.2.8) + racc (1.7.3) + rack (3.0.9.1) + rack-session (2.0.0) + rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.8) - actioncable (= 7.0.8) - actionmailbox (= 7.0.8) - actionmailer (= 7.0.8) - actionpack (= 7.0.8) - actiontext (= 7.0.8) - actionview (= 7.0.8) - activejob (= 7.0.8) - activemodel (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails (7.1.3.2) + actioncable (= 7.1.3.2) + actionmailbox (= 7.1.3.2) + actionmailer (= 7.1.3.2) + actionpack (= 7.1.3.2) + actiontext (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activemodel (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) bundler (>= 1.15.0) - railties (= 7.0.8) + railties (= 7.1.3.2) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -163,19 +193,24 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.8) - actionpack (= 7.0.8) - activesupport (= 7.0.8) - method_source + railties (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) - rake (13.0.6) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rake (13.1.0) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) + rdoc (6.6.2) + psych (>= 4.0.0) redcarpet (3.6.0) - rouge (4.1.3) + reline (0.4.3) + io-console (~> 0.5) + rouge (4.2.0) sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) @@ -183,19 +218,22 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.6.6) - mini_portile2 (~> 2.8.0) - stimulus-rails (1.2.2) + sqlite3 (1.7.2-aarch64-linux) + sqlite3 (1.7.2-arm64-darwin) + sqlite3 (1.7.2-x86_64-darwin) + sqlite3 (1.7.2-x86_64-linux) + stimulus-rails (1.3.3) railties (>= 6.0.0) - thor (1.2.2) - timeout (0.4.0) - turbo-rails (1.4.0) + stringio (3.1.0) + thor (1.3.1) + timeout (0.4.1) + turbo-rails (2.0.4) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - view_component (3.6.0) + view_component (3.11.0) activesupport (>= 5.2.0, < 8.0) concurrent-ruby (~> 1.0) method_source (~> 1.0) @@ -204,11 +242,12 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) + webrick (1.8.1) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - yard (0.9.34) - zeitwerk (2.6.11) + yard (0.9.36) + zeitwerk (2.6.13) PLATFORMS aarch64-linux @@ -226,7 +265,7 @@ DEPENDENCIES lookbook (~> 2.0) polaris_view_components! puma (~> 6.0) - rails (~> 7.0.8) + rails (~> 7.1.3.2) sprockets-rails sqlite3 stimulus-rails diff --git a/demo/bin/setup b/demo/bin/setup index bf081719..c246fdab 100755 --- a/demo/bin/setup +++ b/demo/bin/setup @@ -2,10 +2,10 @@ require "fileutils" # path to your application root. -APP_ROOT = File.expand_path('..', __dir__) +APP_ROOT = File.expand_path("..", __dir__) def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") + system(*args, exception: true) end FileUtils.chdir APP_ROOT do @@ -13,13 +13,16 @@ FileUtils.chdir APP_ROOT do # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') + puts "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") + + puts "\n== Preparing database ==" + system! "bin/rails db:prepare" puts "\n== Removing old logs and tempfiles ==" - system! 'bin/rails log:clear tmp:clear' + system! "bin/rails log:clear tmp:clear" puts "\n== Restarting application server ==" - system! 'bin/rails restart' + system! "bin/rails restart" end diff --git a/demo/config/application.rb b/demo/config/application.rb index afac7514..cbf7c306 100644 --- a/demo/config/application.rb +++ b/demo/config/application.rb @@ -5,6 +5,7 @@ require "active_job/railtie" require "active_model/railtie" require "action_controller/railtie" +require "action_cable/engine" require "action_view/railtie" require "active_storage/engine" require "rails/test_unit/railtie" @@ -16,7 +17,12 @@ module Demo class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.0 + config.load_defaults 7.1 + + # Please, add to the `ignore` list any other `lib` subdirectories that do + # not contain `.rb` files, or that should not be reloaded or eager loaded. + # Common ones are `templates`, `generators`, or `middleware`, for example. + config.autoload_lib(ignore: %w(assets tasks)) # Configuration for the application, engines, and railties goes here. # diff --git a/demo/config/cable.yml b/demo/config/cable.yml new file mode 100644 index 00000000..afce7c7b --- /dev/null +++ b/demo/config/cable.yml @@ -0,0 +1,8 @@ +development: + adapter: test + +test: + adapter: test + +production: + adapter: test diff --git a/demo/config/environments/development.rb b/demo/config/environments/development.rb index cca95cfb..9b998cd1 100644 --- a/demo/config/environments/development.rb +++ b/demo/config/environments/development.rb @@ -6,7 +6,7 @@ # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. - config.cache_classes = false + config.enable_reloading = true # Do not eager load code on boot. config.eager_load = false @@ -14,13 +14,16 @@ # Show full error reports. config.consider_all_requests_local = true + # Enable server timing + config.server_timing = true + # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true - config.cache_store = :file_store, "#{root}/tmp/cache/" + config.cache_store = :memory_store config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } @@ -39,8 +42,11 @@ # Tell Active Support which deprecation messages to disallow. config.active_support.disallowed_deprecation_warnings = [] + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + # Suppress logger output for asset requests. - # config.assets.quiet = true + config.assets.quiet = true # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true @@ -48,6 +54,6 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true - # Uncomment if you wish to allow Action Cable access from any origin. - # config.action_cable.disable_request_forgery_protection = true + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = true end diff --git a/demo/config/environments/production.rb b/demo/config/environments/production.rb index 5120fb22..a8ec70b5 100644 --- a/demo/config/environments/production.rb +++ b/demo/config/environments/production.rb @@ -4,7 +4,7 @@ # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. - config.cache_classes = true + config.enable_reloading = false # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers @@ -13,26 +13,49 @@ config.eager_load = true # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false + config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Disable serving static files from the `/public` folder by default since - # Apache or NGINX already handles this. - config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true + + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. + # config.public_file_server.enabled = false # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.asset_host = "http://assets.example.com" + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX + + # Assume all access to the app is happening through a SSL-terminating reverse proxy. + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. + # config.assume_ssl = true + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true - # Include generic and useful information about system operation, but avoid logging too much - # information to avoid inadvertent exposure of personally identifiable information (PII). - config.log_level = :info + # Log to STDOUT by default + config.logger = ActiveSupport::Logger.new(STDOUT) + .tap { |logger| logger.formatter = ::Logger::Formatter.new } + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } # Prepend all log lines with the following tags. config.log_tags = [ :request_id ] + # "info" includes generic and useful information about system operation, but avoids logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). If you + # want to log everything, set the level to "debug". + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true @@ -40,12 +63,14 @@ # Don't log any deprecations. config.active_support.report_deprecations = false - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false - if ENV["RAILS_LOG_TO_STDOUT"].present? - logger = ActiveSupport::Logger.new(STDOUT) - logger.formatter = config.log_formatter - config.logger = ActiveSupport::TaggedLogging.new(logger) - end + # Enable DNS rebinding protection and other `Host` header attacks. + # config.hosts = [ + # "example.com", # Allow requests from example.com + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` + # ] + # Skip DNS rebinding protection for the default health check endpoint. + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } end diff --git a/demo/config/environments/test.rb b/demo/config/environments/test.rb index 5c6c7d0d..d349c355 100644 --- a/demo/config/environments/test.rb +++ b/demo/config/environments/test.rb @@ -8,13 +8,14 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # Turn false under Spring and add config.action_view.cache_template_loading = true - config.cache_classes = true + # While tests run files are not watched, reloading is not necessary. + config.enable_reloading = false - # Do not eager load code on boot. This avoids loading your whole application - # just for the purpose of running a single test. If you are using a tool that - # preloads Rails for running tests, you may have to set it to true. - config.eager_load = false + # Eager loading loads your entire application. When running a single test locally, + # this is usually not necessary, and can slow down your test suite. However, it's + # recommended that you enable it in continuous integration systems to ensure eager + # loading is working properly before deploying your code. + config.eager_load = ENV["CI"].present? # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true @@ -23,12 +24,12 @@ } # Show full error reports and disable caching. - config.consider_all_requests_local = true + config.consider_all_requests_local = true config.action_controller.perform_caching = false config.cache_store = :null_store - # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false + # Render exception templates for rescuable exceptions and raise for other exceptions. + config.action_dispatch.show_exceptions = :rescuable # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false @@ -47,4 +48,7 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true + + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = true end diff --git a/demo/config/initializers/content_security_policy.rb b/demo/config/initializers/content_security_policy.rb index d988237c..b3076b38 100644 --- a/demo/config/initializers/content_security_policy.rb +++ b/demo/config/initializers/content_security_policy.rb @@ -1,27 +1,25 @@ # Be sure to restart your server when you modify this file. -# Define an application-wide content security policy -# For further information see the following documentation -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header -# Rails.application.config.content_security_policy do |policy| -# policy.default_src :self, :https -# policy.font_src :self, :https, :data -# policy.img_src :self, :https, :data -# policy.object_src :none -# policy.script_src :self, :https -# policy.style_src :self, :https -# # Specify URI for violation reports -# # policy.report_uri "/csp-violation-report-endpoint" +# Rails.application.configure do +# config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end +# +# # Generate session nonces for permitted importmap, inline scripts, and inline styles. +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-src style-src) +# +# # Report violations without enforcing the policy. +# # config.content_security_policy_report_only = true # end - -# If you are using UJS then enable automatic nonce generation -# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } - -# Set the nonce only to specific directives -# Rails.application.config.content_security_policy_nonce_directives = %w(script-src) - -# Report CSP violations to a specified URI -# For further information see the following documentation: -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only -# Rails.application.config.content_security_policy_report_only = true diff --git a/demo/config/initializers/filter_parameter_logging.rb b/demo/config/initializers/filter_parameter_logging.rb index 4b34a036..c2d89e28 100644 --- a/demo/config/initializers/filter_parameter_logging.rb +++ b/demo/config/initializers/filter_parameter_logging.rb @@ -1,6 +1,8 @@ # Be sure to restart your server when you modify this file. -# Configure sensitive parameters which will be filtered from the log file. +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. +# Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ] diff --git a/demo/config/initializers/permissions_policy.rb b/demo/config/initializers/permissions_policy.rb index 00f64d71..7db3b957 100644 --- a/demo/config/initializers/permissions_policy.rb +++ b/demo/config/initializers/permissions_policy.rb @@ -1,11 +1,13 @@ +# Be sure to restart your server when you modify this file. + # Define an application-wide HTTP permissions policy. For further -# information see https://developers.google.com/web/updates/2018/06/feature-policy -# -# Rails.application.config.permissions_policy do |f| -# f.camera :none -# f.gyroscope :none -# f.microphone :none -# f.usb :none -# f.fullscreen :self -# f.payment :self, "https://secure.example.com" +# information see: https://developers.google.com/web/updates/2018/06/feature-policy + +# Rails.application.config.permissions_policy do |policy| +# policy.camera :none +# policy.gyroscope :none +# policy.microphone :none +# policy.usb :none +# policy.fullscreen :self +# policy.payment :self, "https://secure.example.com" # end diff --git a/demo/config/routes.rb b/demo/config/routes.rb index 7ca0fa1f..2cc395d0 100644 --- a/demo/config/routes.rb +++ b/demo/config/routes.rb @@ -5,7 +5,7 @@ resources :suggestions, only: :index resource :uploads, only: :create - get 'test', to: "test#hello" + get "up" => "rails/health#show", as: :rails_health_check - root to: redirect('/lookbook') + root to: redirect("/lookbook") end diff --git a/demo/db/migrate/20240304070104_add_service_name_to_active_storage_blobs.active_storage.rb b/demo/db/migrate/20240304070104_add_service_name_to_active_storage_blobs.active_storage.rb new file mode 100644 index 00000000..a15c6ce8 --- /dev/null +++ b/demo/db/migrate/20240304070104_add_service_name_to_active_storage_blobs.active_storage.rb @@ -0,0 +1,22 @@ +# This migration comes from active_storage (originally 20190112182829) +class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0] + def up + return unless table_exists?(:active_storage_blobs) + + unless column_exists?(:active_storage_blobs, :service_name) + add_column :active_storage_blobs, :service_name, :string + + if configured_service = ActiveStorage::Blob.service.name + ActiveStorage::Blob.unscoped.update_all(service_name: configured_service) + end + + change_column :active_storage_blobs, :service_name, :string, null: false + end + end + + def down + return unless table_exists?(:active_storage_blobs) + + remove_column :active_storage_blobs, :service_name + end +end diff --git a/demo/db/migrate/20240304070105_create_active_storage_variant_records.active_storage.rb b/demo/db/migrate/20240304070105_create_active_storage_variant_records.active_storage.rb new file mode 100644 index 00000000..94ac83af --- /dev/null +++ b/demo/db/migrate/20240304070105_create_active_storage_variant_records.active_storage.rb @@ -0,0 +1,27 @@ +# This migration comes from active_storage (originally 20191206030411) +class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0] + def change + return unless table_exists?(:active_storage_blobs) + + # Use Active Record's configured type for primary key + create_table :active_storage_variant_records, id: primary_key_type, if_not_exists: true do |t| + t.belongs_to :blob, null: false, index: false, type: blobs_primary_key_type + t.string :variation_digest, null: false + + t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true + t.foreign_key :active_storage_blobs, column: :blob_id + end + end + + private + def primary_key_type + config = Rails.configuration.generators + config.options[config.orm][:primary_key_type] || :primary_key + end + + def blobs_primary_key_type + pkey_name = connection.primary_key(:active_storage_blobs) + pkey_column = connection.columns(:active_storage_blobs).find { |c| c.name == pkey_name } + pkey_column.bigint? ? :bigint : pkey_column.type + end +end diff --git a/demo/db/migrate/20240304070106_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb b/demo/db/migrate/20240304070106_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb new file mode 100644 index 00000000..93c8b85a --- /dev/null +++ b/demo/db/migrate/20240304070106_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb @@ -0,0 +1,8 @@ +# This migration comes from active_storage (originally 20211119233751) +class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0] + def change + return unless table_exists?(:active_storage_blobs) + + change_column_null(:active_storage_blobs, :checksum, true) + end +end diff --git a/demo/db/schema.rb b/demo/db/schema.rb index 0a6464f3..901dfb5d 100644 --- a/demo/db/schema.rb +++ b/demo/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2022_07_02_103514) do +ActiveRecord::Schema[7.1].define(version: 2024_03_04_070106) do create_table "active_storage_attachments", force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false diff --git a/package.json b/package.json index 4a73b089..7f2e3026 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,9 @@ }, "devDependencies": { "@floating-ui/dom": "^1.5.3", - "@rollup/plugin-node-resolve": "^15.2.1", + "@rollup/plugin-node-resolve": "^15.2.3", "@shopify/polaris": "^11.19.0", - "postcss": "^8.4.29", + "postcss": "^8.4.35", "postcss-cli": "^10.1.0", "postcss-import": "^15.1.0", "postcss-nested": "^6.0.1", @@ -41,6 +41,6 @@ }, "dependencies": { "@hotwired/stimulus": "^3.2.2", - "@rails/request.js": "^0.0.8" + "@rails/request.js": "^0.0.9" } } diff --git a/polaris_view_components.gemspec b/polaris_view_components.gemspec index 3f746db8..36abaa77 100644 --- a/polaris_view_components.gemspec +++ b/polaris_view_components.gemspec @@ -26,9 +26,8 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "rails", ">= 5.0.0" spec.add_runtime_dependency "view_component", ">= 3.0.0", "< 4.0.0" - spec.add_development_dependency "capybara", "~> 3" spec.add_development_dependency "webdrivers", "~> 5.0" - spec.add_development_dependency "selenium-webdriver", "~> 4.1" + spec.add_development_dependency "selenium-webdriver", "~> 4.18" spec.add_development_dependency "minitest", "~> 5.0" spec.add_development_dependency "pry" spec.add_development_dependency "sprockets-rails" diff --git a/yarn.lock b/yarn.lock index 8bf9533b..a295f0cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -76,15 +76,15 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@rails/request.js@^0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@rails/request.js/-/request.js-0.0.8.tgz#5e2e8da15013b1af7f04d759e4e9d1cff981865c" - integrity sha512-ysHYZDl+XjBwFVXz7EI7XW+ZWiTFY8t7TrC/ahpAPt0p7NE4DZxm1nJQY9gmF4PBf+4pAYa+D/rLIGmrn1ZMvg== +"@rails/request.js@^0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@rails/request.js/-/request.js-0.0.9.tgz#89e2a575405dc07eb8a9b3d2fe04289e1f057cd0" + integrity sha512-VleYUyrA3rwKMvYnz7MI9Ada85Vekjb/WVz7NuGgDO24Y3Zy9FFSpDMQW+ea/tlftD+CdX/W/sUosRA9/HkDOQ== -"@rollup/plugin-node-resolve@^15.2.1": - version "15.2.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.1.tgz#a15b14fb7969229e26a30feff2816d39eff503f0" - integrity sha512-nsbUg588+GDSu8/NS8T4UAshO6xeaOfINNuXeVHcKV02LJtoRaM1SiOacClw4kws1SFiNhdLGxlbMY9ga/zs/w== +"@rollup/plugin-node-resolve@^15.2.3": + version "15.2.3" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz#e5e0b059bd85ca57489492f295ce88c2d4b0daf9" + integrity sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ== dependencies: "@rollup/pluginutils" "^5.0.1" "@types/resolve" "1.20.2" @@ -592,10 +592,10 @@ nanocolors@^0.2.6: resolved "https://registry.yarnpkg.com/nanocolors/-/nanocolors-0.2.12.tgz#4d05932e70116078673ea4cc6699a1c56cc77777" integrity sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug== -nanoid@^3.3.6: - version "3.3.6" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -704,12 +704,12 @@ postcss-value-parser@^4.0.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== -postcss@^8.4.29: - version "8.4.29" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.29.tgz#33bc121cf3b3688d4ddef50be869b2a54185a1dd" - integrity sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw== +postcss@^8.4.35: + version "8.4.35" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.35.tgz#60997775689ce09011edf083a549cea44aabe2f7" + integrity sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA== dependencies: - nanoid "^3.3.6" + nanoid "^3.3.7" picocolors "^1.0.0" source-map-js "^1.0.2" From 0d18a5146929c99f7d3446256fe43efafa070f64 Mon Sep 17 00:00:00 2001 From: Kirill Platonov Date: Mon, 4 Mar 2024 09:06:39 +0100 Subject: [PATCH 2/3] Standard fixes --- .standard.yml | 1 + app/components/polaris/headless_button.rb | 2 +- app/components/polaris/spinner_component.rb | 2 +- app/helpers/polaris/view_helper.rb | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.standard.yml b/.standard.yml index 4caa5a9d..60c83981 100644 --- a/.standard.yml +++ b/.standard.yml @@ -1,5 +1,6 @@ ignore: - demo/bin/**/* - demo/config/**/* + - demo/db/**/* - '**/*': - Style/ArgumentsForwarding diff --git a/app/components/polaris/headless_button.rb b/app/components/polaris/headless_button.rb index aff52f60..aef63ef3 100644 --- a/app/components/polaris/headless_button.rb +++ b/app/components/polaris/headless_button.rb @@ -87,7 +87,7 @@ def initialize( "Polaris-Button--plain": plain, "Polaris-Button--primary": primary, "Polaris-Button--pressed": pressed, - "Polaris-Button--removeUnderline": (plain && monochrome && remove_underline) + "Polaris-Button--removeUnderline": plain && monochrome && remove_underline ) end diff --git a/app/components/polaris/spinner_component.rb b/app/components/polaris/spinner_component.rb index d4705bea..18d453b1 100644 --- a/app/components/polaris/spinner_component.rb +++ b/app/components/polaris/spinner_component.rb @@ -45,7 +45,7 @@ def span_arguments end def render_accessibility? - (!@has_focusable_parent && @accessibility_label.present?) + !@has_focusable_parent && @accessibility_label.present? end end end diff --git a/app/helpers/polaris/view_helper.rb b/app/helpers/polaris/view_helper.rb index 56992074..851be8c8 100644 --- a/app/helpers/polaris/view_helper.rb +++ b/app/helpers/polaris/view_helper.rb @@ -87,14 +87,14 @@ module ViewHelper }.freeze # standard:enable Layout/HashAlignment POLARIS_HELPERS.each do |name, component| - define_method "polaris_#{name}" do |*args, **kwargs, &block| + define_method :"polaris_#{name}" do |*args, **kwargs, &block| render component.constantize.new(*args, **kwargs), &block end end POLARIS_TEXT_STYLES = %i[subdued strong positive negative code].freeze POLARIS_TEXT_STYLES.each do |name| - define_method "polaris_text_#{name}" do |**kwargs, &block| + define_method :"polaris_text_#{name}" do |**kwargs, &block| polaris_text_style(variation: name, **kwargs, &block) end end From cac5242e90fe4135c46c14fa0a798114a334cb11 Mon Sep 17 00:00:00 2001 From: Kirill Platonov Date: Mon, 4 Mar 2024 09:13:22 +0100 Subject: [PATCH 3/3] Fix selenium-webdriver version --- Gemfile | 2 ++ Gemfile.lock | 5 ++--- polaris_view_components.gemspec | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 8ee0954a..8267c4df 100644 --- a/Gemfile +++ b/Gemfile @@ -15,3 +15,5 @@ gem "foreman" gem "capybara" gem "sqlite3" gem "standard" +# TODO: Keep until support for Ruby 2.7 is dropped +gem "selenium-webdriver", "=4.9.0" diff --git a/Gemfile.lock b/Gemfile.lock index 3a778232..890dc0de 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -246,8 +246,7 @@ GEM rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (1.13.0) rubyzip (2.3.2) - selenium-webdriver (4.18.1) - base64 (~> 0.2) + selenium-webdriver (4.9.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -325,7 +324,7 @@ DEPENDENCIES puma (~> 6.0) rails (~> 7.1.3.2) rake (~> 13.0) - selenium-webdriver (~> 4.18) + selenium-webdriver (= 4.9.0) sprockets-rails sqlite3 standard diff --git a/polaris_view_components.gemspec b/polaris_view_components.gemspec index 36abaa77..1f88532d 100644 --- a/polaris_view_components.gemspec +++ b/polaris_view_components.gemspec @@ -27,7 +27,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "view_component", ">= 3.0.0", "< 4.0.0" spec.add_development_dependency "webdrivers", "~> 5.0" - spec.add_development_dependency "selenium-webdriver", "~> 4.18" + spec.add_development_dependency "selenium-webdriver", "~> 4.1" spec.add_development_dependency "minitest", "~> 5.0" spec.add_development_dependency "pry" spec.add_development_dependency "sprockets-rails"