From 40263ec1e73d9d2aeeafea2c6b0a9de765185896 Mon Sep 17 00:00:00 2001 From: Jez Caudle Date: Mon, 6 Mar 2023 11:53:59 +0000 Subject: [PATCH] Upgraded to Rails 7.0.4.2 --- Gemfile | 2 +- Gemfile.lock | 148 +++++++++++++++++----------------- app/javascript/application.js | 4 +- app/javascript/script.js | 1 + app/views/cafs/_caf.html.erb | 31 ++++++- config/importmap.rb | 5 +- config/initializers/devise.rb | 3 + 7 files changed, 111 insertions(+), 83 deletions(-) create mode 100644 app/javascript/script.js diff --git a/Gemfile b/Gemfile index 1625f12..9cc4957 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'cancancan' ruby "3.1.3" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" -gem "rails", "~> 7.0.2.3" +gem "rails", "~> 7.0.4.2" # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] gem "sprockets-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 3b1a45e..3a4e217 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,75 +1,75 @@ GIT remote: https://github.com/puma/puma - revision: b67e6d594a473d5e0ab6317efb034ee5009570fe + revision: c8be369234350f7c7a4390cdfd866f1d7d7011ec branch: master specs: - puma (6.0.2) + puma (6.1.1) nio4r (~> 2.0) GEM remote: https://rubygems.org/ specs: - actioncable (7.0.2.4) - actionpack (= 7.0.2.4) - activesupport (= 7.0.2.4) + actioncable (7.0.4.2) + actionpack (= 7.0.4.2) + activesupport (= 7.0.4.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.2.4) - actionpack (= 7.0.2.4) - activejob (= 7.0.2.4) - activerecord (= 7.0.2.4) - activestorage (= 7.0.2.4) - activesupport (= 7.0.2.4) + actionmailbox (7.0.4.2) + actionpack (= 7.0.4.2) + activejob (= 7.0.4.2) + activerecord (= 7.0.4.2) + activestorage (= 7.0.4.2) + activesupport (= 7.0.4.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.2.4) - actionpack (= 7.0.2.4) - actionview (= 7.0.2.4) - activejob (= 7.0.2.4) - activesupport (= 7.0.2.4) + actionmailer (7.0.4.2) + actionpack (= 7.0.4.2) + actionview (= 7.0.4.2) + activejob (= 7.0.4.2) + activesupport (= 7.0.4.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.2.4) - actionview (= 7.0.2.4) - activesupport (= 7.0.2.4) + actionpack (7.0.4.2) + actionview (= 7.0.4.2) + activesupport (= 7.0.4.2) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.2.4) - actionpack (= 7.0.2.4) - activerecord (= 7.0.2.4) - activestorage (= 7.0.2.4) - activesupport (= 7.0.2.4) + actiontext (7.0.4.2) + actionpack (= 7.0.4.2) + activerecord (= 7.0.4.2) + activestorage (= 7.0.4.2) + activesupport (= 7.0.4.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.2.4) - activesupport (= 7.0.2.4) + actionview (7.0.4.2) + activesupport (= 7.0.4.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.2.4) - activesupport (= 7.0.2.4) + activejob (7.0.4.2) + activesupport (= 7.0.4.2) globalid (>= 0.3.6) - activemodel (7.0.2.4) - activesupport (= 7.0.2.4) - activerecord (7.0.2.4) - activemodel (= 7.0.2.4) - activesupport (= 7.0.2.4) - activestorage (7.0.2.4) - actionpack (= 7.0.2.4) - activejob (= 7.0.2.4) - activerecord (= 7.0.2.4) - activesupport (= 7.0.2.4) + activemodel (7.0.4.2) + activesupport (= 7.0.4.2) + activerecord (7.0.4.2) + activemodel (= 7.0.4.2) + activesupport (= 7.0.4.2) + activestorage (7.0.4.2) + actionpack (= 7.0.4.2) + activejob (= 7.0.4.2) + activerecord (= 7.0.4.2) + activesupport (= 7.0.4.2) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.2.4) + activesupport (7.0.4.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -78,10 +78,10 @@ GEM public_suffix (>= 2.0.2, < 6.0) bcrypt (3.1.18) bindex (0.8.1) - bootsnap (1.15.0) + bootsnap (1.16.0) msgpack (~> 1.2) builder (3.2.4) - cancancan (3.4.0) + cancancan (3.5.0) capybara (3.38.0) addressable matrix @@ -91,13 +91,13 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - concurrent-ruby (1.2.0) + concurrent-ruby (1.2.2) crass (1.0.6) date (3.3.3) debug (1.7.1) irb (>= 1.5.0) reline (>= 0.3.1) - devise (4.8.1) + devise (4.9.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -124,7 +124,7 @@ GEM loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.8.0.1) + mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop @@ -135,8 +135,8 @@ GEM mini_magick (4.12.0) mini_mime (1.1.2) mini_portile2 (2.8.1) - minitest (5.17.0) - msgpack (1.6.0) + minitest (5.18.0) + msgpack (1.6.1) mysql2 (0.5.5) net-imap (0.3.4) date @@ -148,53 +148,53 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.5.8) - nokogiri (1.14.0) + nokogiri (1.14.2) mini_portile2 (~> 2.8.0) racc (~> 1.4) orm_adapter (0.5.0) public_suffix (5.0.1) racc (1.6.2) - rack (2.2.6.2) + rack (2.2.6.3) rack-test (2.0.2) rack (>= 1.3) - rails (7.0.2.4) - actioncable (= 7.0.2.4) - actionmailbox (= 7.0.2.4) - actionmailer (= 7.0.2.4) - actionpack (= 7.0.2.4) - actiontext (= 7.0.2.4) - actionview (= 7.0.2.4) - activejob (= 7.0.2.4) - activemodel (= 7.0.2.4) - activerecord (= 7.0.2.4) - activestorage (= 7.0.2.4) - activesupport (= 7.0.2.4) + rails (7.0.4.2) + actioncable (= 7.0.4.2) + actionmailbox (= 7.0.4.2) + actionmailer (= 7.0.4.2) + actionpack (= 7.0.4.2) + actiontext (= 7.0.4.2) + actionview (= 7.0.4.2) + activejob (= 7.0.4.2) + activemodel (= 7.0.4.2) + activerecord (= 7.0.4.2) + activestorage (= 7.0.4.2) + activesupport (= 7.0.4.2) bundler (>= 1.15.0) - railties (= 7.0.2.4) + railties (= 7.0.4.2) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.5.0) loofah (~> 2.19, >= 2.19.1) - railties (7.0.2.4) - actionpack (= 7.0.2.4) - activesupport (= 7.0.2.4) + railties (7.0.4.2) + actionpack (= 7.0.4.2) + activesupport (= 7.0.4.2) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rake (13.0.6) - regexp_parser (2.6.2) + regexp_parser (2.7.0) reline (0.3.2) io-console (~> 0.5) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) + responders (3.1.0) + actionpack (>= 5.2) + railties (>= 5.2) rexml (3.2.5) ruby-vips (2.1.4) ffi (~> 1.12) rubyzip (2.3.2) - selenium-webdriver (4.8.0) + selenium-webdriver (4.8.1) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -209,12 +209,12 @@ GEM stimulus-rails (1.2.1) railties (>= 6.0.0) thor (1.2.1) - timeout (0.3.1) - turbo-rails (1.3.2) + timeout (0.3.2) + turbo-rails (1.4.0) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) - tzinfo (2.0.5) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) warden (1.2.9) rack (>= 2.0.9) @@ -233,7 +233,7 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.6) + zeitwerk (2.6.7) PLATFORMS x86_64-openbsd @@ -249,7 +249,7 @@ DEPENDENCIES jbuilder mysql2 (~> 0.5) puma! - rails (~> 7.0.2.3) + rails (~> 7.0.4.2) selenium-webdriver spring sprockets-rails diff --git a/app/javascript/application.js b/app/javascript/application.js index 39b446f..a1dad47 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -1,6 +1,8 @@ // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails import "jquery" import "@hotwired/turbo-rails" -//import "controllers" +import "controllers" import "trix" import "@rails/actiontext" + +window.importmapScriptsLoaded = true; diff --git a/app/javascript/script.js b/app/javascript/script.js new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/app/javascript/script.js @@ -0,0 +1 @@ + diff --git a/app/views/cafs/_caf.html.erb b/app/views/cafs/_caf.html.erb index 46b6e8e..5928062 100644 --- a/app/views/cafs/_caf.html.erb +++ b/app/views/cafs/_caf.html.erb @@ -40,8 +40,31 @@ <% end %> <% end %> - diff --git a/config/importmap.rb b/config/importmap.rb index 4ac6bc6..fdd6fc1 100644 --- a/config/importmap.rb +++ b/config/importmap.rb @@ -4,6 +4,5 @@ pin "application", preload: true pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true -pin_all_from "app/javascript/controllers", under: "controllers" -pin "trix" -pin "@rails/actiontext", to: "actiontext.js" +pin "script" +# pin_all_from "app/javascript/controllers", under: "controllers" diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index b948b3b..45c952f 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -308,4 +308,7 @@ Devise.setup do |config| # When set to false, does not sign a user in automatically after their password is # changed. Defaults to true, so a user is signed in automatically after changing a password. # config.sign_in_after_change_password = true + + config.responder.error_status = :unprocessable_entity + config.responder.redirect_status = :see_other end