diff --git a/.github/workflows/tests-next.yml b/.github/workflows/tests-next.yml index 9c400317..4f653b4b 100644 --- a/.github/workflows/tests-next.yml +++ b/.github/workflows/tests-next.yml @@ -35,7 +35,7 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: "3.2.3" + ruby-version: "3.4.10" - name: Build App run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4aa80abb..44244801 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: "3.2.3" + ruby-version: "3.4.10" bundler-cache: true - name: Build App diff --git a/.rubocop.yml b/.rubocop.yml index 518470c7..87884fe5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,6 +7,7 @@ inherit_gem: AllCops: SuggestExtensions: false NewCops: enable + TargetRubyVersion: 3.4 Exclude: # ignore files in these directories when running the linter - bin/**/* - node_modules/**/* diff --git a/Gemfile b/Gemfile index 067b2cb5..fd18f501 100644 --- a/Gemfile +++ b/Gemfile @@ -4,15 +4,23 @@ def next? File.basename(__FILE__) == "Gemfile.next" end -ruby "3.2.3" +ruby "3.4.10" git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") "https://github.com/#{repo_name}.git" end -gem "rails", "~> 8.0.0" +if next? + gem "rails", "~> 8.1.0" + gem "mutex_m" +else + gem "rails", "~> 8.0.0" +end + # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' +gem "rails-observers" +gem "csv" gem "bootstrap-sass", "3.4.1" @@ -44,7 +52,7 @@ gem "jquery-rails" gem "pg" -gem "jquery-ui-rails", "~> 6.0" +gem "jquery-ui-rails", "~> 8.0" gem "acts_as_list" gem "mimemagic", "~> 0.3.8" diff --git a/Gemfile.lock b/Gemfile.lock index 237782e2..afb692a8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,15 +83,19 @@ GEM uri (>= 0.13.1) acts_as_list (1.1.0) activerecord (>= 4.2) - addressable (2.8.5) - public_suffix (>= 2.0.2, < 6.0) - ast (2.4.2) + addressable (2.9.0) + public_suffix (>= 2.0.2, < 8.0) + anonymous_loader (0.1.3) + version_gem (~> 1.1, >= 1.1.14) + ast (2.4.3) + auth-sanitizer (0.2.3) + version_gem (~> 1.1, >= 1.1.14) autoprefixer-rails (10.4.15.0) execjs (~> 2) - base64 (0.1.2) - bcrypt (3.1.20) - benchmark (0.4.1) - bigdecimal (3.2.2) + base64 (0.3.0) + bcrypt (3.1.22) + benchmark (0.5.0) + bigdecimal (4.1.2) bindex (0.8.1) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) @@ -117,18 +121,19 @@ GEM execjs coffee-script-source (1.12.2) colorize (1.1.0) - concurrent-ruby (1.3.5) - connection_pool (2.5.3) - crass (1.0.6) + concurrent-ruby (1.3.7) + connection_pool (3.0.2) + crass (1.0.7) + csv (3.3.5) database_cleaner-active_record (2.2.2) activerecord (>= 5.a) database_cleaner-core (~> 2.0) database_cleaner-core (2.0.1) - date (3.4.1) - devise (4.9.4) + date (3.5.1) + devise (5.0.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0) + railties (>= 7.0) responders warden (~> 1.2.3) diff-lcs (1.6.2) @@ -138,31 +143,33 @@ GEM dotenv (= 2.8.1) railties (>= 3.2) drb (2.2.3) - erb (5.0.1) + erb (6.0.5) erubi (1.13.1) execjs (2.9.1) - factory_bot (6.2.1) - activesupport (>= 5.0.0) - factory_bot_rails (6.2.0) - factory_bot (~> 6.2.0) - railties (>= 5.0.0) + factory_bot (6.6.0) + activesupport (>= 6.1.0) + factory_bot_rails (6.5.1) + factory_bot (~> 6.5) + railties (>= 6.1.0) faker (3.2.1) i18n (>= 1.8.11, < 2) - faraday (2.13.1) + faraday (2.14.3) faraday-net_http (>= 2.0, < 3.5) json logger - faraday-net_http (3.4.0) - net-http (>= 0.5.0) + faraday-net_http (3.4.4) + net-http (~> 0.5) ffi (1.16.3) - globalid (1.3.0) + globalid (1.4.0) activesupport (>= 6.1) - hashie (5.0.0) - i18n (1.14.7) + hashie (5.1.0) + logger + i18n (1.15.2) concurrent-ruby (~> 1.0) - io-console (0.8.0) - irb (1.15.2) + io-console (0.8.2) + irb (1.18.0) pp (>= 0.6.0) + prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) jbuilder (2.14.1) @@ -172,12 +179,12 @@ GEM rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (6.0.1) + jquery-ui-rails (8.0.0) railties (>= 3.2.16) - json (2.6.3) - jwt (2.10.1) + json (2.21.1) + jwt (3.2.0) base64 - language_server-protocol (3.17.0.3) + language_server-protocol (3.17.0.6) launchy (2.5.2) addressable (~> 2.8) lint_roller (1.1.0) @@ -185,30 +192,32 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) logger (1.7.0) - loofah (2.24.1) + loofah (2.25.2) crass (~> 1.0.2) nokogiri (>= 1.12.0) madmin (1.2.8) pagy (>= 3.5) rails (>= 6.0.3) - mail (2.9.0) + mail (2.9.1) logger mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.1.0) + marcel (1.2.1) matrix (0.4.2) mimemagic (0.3.10) nokogiri (~> 1) rake mini_mime (1.1.5) - minitest (5.25.5) - multi_xml (0.7.2) - bigdecimal (~> 3.1) - net-http (0.6.0) - uri - net-imap (0.6.4) + minitest (6.0.6) + drb (~> 2.0) + prism (~> 1.5) + multi_xml (0.9.1) + bigdecimal (>= 3.1, < 5) + net-http (0.9.1) + uri (>= 0.11.1) + net-imap (0.6.4.1) date net-protocol net-pop (0.1.2) @@ -221,59 +230,66 @@ GEM next_rails (1.3.0) colorize (>= 0.8.1) nio4r (2.7.5) - nokogiri (1.18.8-arm64-darwin) + nokogiri (1.19.4-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.8-x86_64-darwin) + nokogiri (1.19.4-x86_64-darwin) racc (~> 1.4) - nokogiri (1.18.8-x86_64-linux-gnu) + nokogiri (1.19.4-x86_64-linux-gnu) racc (~> 1.4) - oauth2 (2.0.12) + oauth2 (2.0.25) + anonymous_loader (~> 0.1, >= 0.1.3) + auth-sanitizer (~> 0.2, >= 0.2.3) faraday (>= 0.17.3, < 4.0) jwt (>= 1.0, < 4.0) logger (~> 1.2) multi_xml (~> 0.5) rack (>= 1.2, < 4) - snaky_hash (~> 2.0, >= 2.0.3) - version_gem (>= 1.1.8, < 3) - ombu_labs-auth (1.1.0) - devise (~> 4.9) + snaky_hash (~> 2.0, >= 2.0.7) + version_gem (~> 1.1, >= 1.1.14) + ombu_labs-auth (1.2.0) + devise (>= 4.9) omniauth (~> 2.1.0) omniauth-github (~> 2.0.0) + omniauth-google-oauth2 (~> 1.1) omniauth-rails_csrf_protection - rails (>= 6.0, < 8.1) - omniauth (2.1.3) + rails (>= 6.0) + omniauth (2.1.4) hashie (>= 3.4.6) + logger rack (>= 2.2.3) rack-protection omniauth-github (2.0.1) omniauth (~> 2.0) omniauth-oauth2 (~> 1.8) - omniauth-oauth2 (1.8.0) - oauth2 (>= 1.4, < 3) + omniauth-google-oauth2 (1.2.2) + jwt (>= 2.9.2) + oauth2 (~> 2.0) + omniauth (~> 2.0) + omniauth-oauth2 (~> 1.8) + omniauth-oauth2 (1.9.0) + oauth2 (>= 2.0.2, < 3) omniauth (~> 2.0) - omniauth-rails_csrf_protection (1.0.2) + omniauth-rails_csrf_protection (2.0.1) actionpack (>= 4.2) omniauth (~> 2.0) orm_adapter (0.5.0) pagy (6.1.0) - parallel (1.23.0) - parser (3.2.2.4) + parallel (2.1.0) + parser (3.3.12.0) ast (~> 2.4.1) racc pg (1.5.4) - pp (0.6.2) + pp (0.6.4) prettyprint prettyprint (0.2.0) - psych (5.2.6) - date - stringio - public_suffix (5.0.3) + prism (1.9.0) + public_suffix (7.0.5) puma (7.2.1) nio4r (~> 2.0) pundit (2.3.1) activesupport (>= 3.0.0) racc (1.8.1) - rack (2.2.17) + rack (2.2.23) rack-mini-profiler (3.1.1) rack (>= 1.2.0) rack-protection (3.2.0) @@ -308,9 +324,11 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.2) - loofah (~> 2.21) + rails-html-sanitizer (1.7.1) + loofah (~> 2.25, >= 2.25.2) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + rails-observers (0.1.5) + activemodel (>= 4.0) railties (8.0.5) actionpack (= 8.0.5) activesupport (= 8.0.5) @@ -321,22 +339,28 @@ GEM tsort (>= 0.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.3.0) + rake (13.4.2) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - rdoc (6.14.0) + rbs (4.0.3) + logger + prism (>= 1.6.0) + tsort + rdoc (8.0.0) erb - psych (>= 4.0.0) + prism (>= 1.6.0) + rbs (>= 4.0.0) + tsort recursive-open-struct (1.1.3) redcarpet (3.5.1) - regexp_parser (2.8.1) - reline (0.6.1) + regexp_parser (2.12.0) + reline (0.6.3) io-console (~> 0.5) - responders (3.1.1) - actionpack (>= 5.2) - railties (>= 5.2) - rexml (3.2.6) + responders (3.2.0) + actionpack (>= 7.0) + railties (>= 7.0) + rexml (3.4.4) rspec-core (3.13.6) rspec-support (~> 3.13.0) rspec-expectations (3.13.5) @@ -354,23 +378,24 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.7) - rubocop (1.56.4) - base64 (~> 0.1.1) + rubocop (1.88.2) json (~> 2.3) - language_server-protocol (>= 3.17.0) - parallel (~> 1.10) - parser (>= 3.2.2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (>= 1.10) + 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) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.49.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.1) - rubocop (>= 1.7.0, < 2.0) - rubocop-ast (>= 0.4.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.50.0) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-performance (1.26.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) ruby-progressbar (1.13.0) rubyzip (2.3.2) sass (3.7.4) @@ -405,9 +430,9 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - snaky_hash (2.0.3) + snaky_hash (2.0.7) hashie (>= 0.1.0, < 6) - version_gem (>= 1.1.8, < 3) + version_gem (~> 1.1, >= 1.1.14) spring (3.0.0) sprockets (3.7.2) concurrent-ruby (~> 1.0) @@ -417,36 +442,37 @@ GEM activesupport (>= 5.2) sprockets (>= 3.0.0) stackprof (0.2.26) - standard (1.31.1) + standard (1.56.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.56.2) + rubocop (~> 1.88.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.2) + standard-performance (~> 1.8) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.2.0) + standard-performance (1.9.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.19.0) + rubocop-performance (~> 1.26.0) standardrb (1.0.1) standard - stringio (3.1.7) terser (1.1.18) execjs (>= 0.3.0, < 3) - thor (1.3.2) + thor (1.5.0) tilt (2.3.0) - timeout (0.4.3) + timeout (0.6.1) tsort (0.2.0) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - uri (1.0.3) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) + uri (1.1.1) useragent (0.16.11) - version_gem (1.1.8) + version_gem (1.1.14) warden (1.2.9) rack (>= 2.0.9) web-console (4.2.1) @@ -458,19 +484,20 @@ GEM nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0, < 4.11) - webrick (1.9.1) + webrick (1.9.2) websocket (1.2.10) - websocket-driver (0.8.0) + websocket-driver (0.8.2) base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.3) + zeitwerk (2.8.2) PLATFORMS arm64-darwin-23 arm64-darwin-24 + arm64-darwin-25 x86_64-darwin-21 x86_64-darwin-22 x86_64-linux @@ -484,13 +511,14 @@ DEPENDENCIES capybara capybara-screenshot coffee-script + csv database_cleaner-active_record (>= 2.1.0) dotenv-rails factory_bot_rails faker jbuilder (~> 2.13) jquery-rails - jquery-ui-rails (~> 6.0) + jquery-ui-rails (~> 8.0) listen (~> 3.7) madmin (~> 1.2) matrix @@ -504,6 +532,7 @@ DEPENDENCIES rack-mini-profiler rails (~> 8.0.0) rails-controller-testing + rails-observers recursive-open-struct redcarpet (~> 3.5.1) rspec-rails (~> 6.1) @@ -522,7 +551,7 @@ DEPENDENCIES webdrivers RUBY VERSION - ruby 3.2.3p157 + ruby 3.4.10p104 BUNDLED WITH 2.4.13 diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 777d2a6f..f30b1160 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -10,29 +10,31 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (8.0.5) - actionpack (= 8.0.5) - activesupport (= 8.0.5) + action_text-trix (2.1.19) + railties + actioncable (8.1.3) + actionpack (= 8.1.3) + activesupport (= 8.1.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.0.5) - actionpack (= 8.0.5) - activejob (= 8.0.5) - activerecord (= 8.0.5) - activestorage (= 8.0.5) - activesupport (= 8.0.5) + actionmailbox (8.1.3) + actionpack (= 8.1.3) + activejob (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) mail (>= 2.8.0) - actionmailer (8.0.5) - actionpack (= 8.0.5) - actionview (= 8.0.5) - activejob (= 8.0.5) - activesupport (= 8.0.5) + actionmailer (8.1.3) + actionpack (= 8.1.3) + actionview (= 8.1.3) + activejob (= 8.1.3) + activesupport (= 8.1.3) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.0.5) - actionview (= 8.0.5) - activesupport (= 8.0.5) + actionpack (8.1.3) + actionview (= 8.1.3) + activesupport (= 8.1.3) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -40,42 +42,43 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.0.5) - actionpack (= 8.0.5) - activerecord (= 8.0.5) - activestorage (= 8.0.5) - activesupport (= 8.0.5) + actiontext (8.1.3) + action_text-trix (~> 2.1.15) + actionpack (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.0.5) - activesupport (= 8.0.5) + actionview (8.1.3) + activesupport (= 8.1.3) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (8.0.5) - activesupport (= 8.0.5) + activejob (8.1.3) + activesupport (= 8.1.3) globalid (>= 0.3.6) - activemodel (8.0.5) - activesupport (= 8.0.5) - activerecord (8.0.5) - activemodel (= 8.0.5) - activesupport (= 8.0.5) + activemodel (8.1.3) + activesupport (= 8.1.3) + activerecord (8.1.3) + activemodel (= 8.1.3) + activesupport (= 8.1.3) timeout (>= 0.4.0) - activestorage (8.0.5) - actionpack (= 8.0.5) - activejob (= 8.0.5) - activerecord (= 8.0.5) - activesupport (= 8.0.5) + activestorage (8.1.3) + actionpack (= 8.1.3) + activejob (= 8.1.3) + activerecord (= 8.1.3) + activesupport (= 8.1.3) marcel (~> 1.0) - activesupport (8.0.5) + activesupport (8.1.3) base64 - benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + json logger (>= 1.4.2) minitest (>= 5.1) securerandom (>= 0.3) @@ -91,7 +94,6 @@ GEM execjs (~> 2) base64 (0.3.0) bcrypt (3.1.22) - benchmark (0.5.0) bigdecimal (4.1.2) bindex (0.8.1) bootstrap-sass (3.4.1) @@ -123,6 +125,7 @@ GEM concurrent-ruby (1.3.6) connection_pool (3.0.2) crass (1.0.6) + csv (3.3.5) database_cleaner-active_record (2.2.2) activerecord (>= 5.a) database_cleaner-core (~> 2.0) @@ -184,7 +187,7 @@ GEM rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (6.0.1) + jquery-ui-rails (8.0.0) railties (>= 3.2.16) json (2.19.5) jwt (3.1.2) @@ -223,6 +226,7 @@ GEM prism (~> 1.5) multi_xml (0.9.1) bigdecimal (>= 3.1, < 5) + mutex_m (0.3.0) net-http (0.9.1) uri (>= 0.11.1) net-imap (0.6.4) @@ -263,12 +267,13 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0, >= 2.0.3) version_gem (~> 1.1, >= 1.1.9) - ombu_labs-auth (1.1.1) - devise (~> 4.9) + ombu_labs-auth (1.2.0) + devise (>= 4.9) omniauth (~> 2.1.0) omniauth-github (~> 2.0.0) + omniauth-google-oauth2 (~> 1.1) omniauth-rails_csrf_protection - rails (>= 6.0, < 8.1) + rails (>= 6.0) omniauth (2.1.4) hashie (>= 3.4.6) logger @@ -277,6 +282,11 @@ GEM omniauth-github (2.0.1) omniauth (~> 2.0) omniauth-oauth2 (~> 1.8) + omniauth-google-oauth2 (1.2.2) + jwt (>= 2.9.2) + oauth2 (~> 2.0) + omniauth (~> 2.0) + omniauth-oauth2 (~> 1.8) omniauth-oauth2 (1.9.0) oauth2 (>= 2.0.2, < 3) omniauth (~> 2.0) @@ -308,7 +318,7 @@ GEM date stringio public_suffix (7.0.5) - puma (6.6.1) + puma (7.2.1) nio4r (~> 2.0) pundit (2.5.2) activesupport (>= 3.0.0) @@ -326,20 +336,20 @@ GEM rackup (1.0.1) rack (< 3) webrick - rails (8.0.5) - actioncable (= 8.0.5) - actionmailbox (= 8.0.5) - actionmailer (= 8.0.5) - actionpack (= 8.0.5) - actiontext (= 8.0.5) - actionview (= 8.0.5) - activejob (= 8.0.5) - activemodel (= 8.0.5) - activerecord (= 8.0.5) - activestorage (= 8.0.5) - activesupport (= 8.0.5) + rails (8.1.3) + actioncable (= 8.1.3) + actionmailbox (= 8.1.3) + actionmailer (= 8.1.3) + actionpack (= 8.1.3) + actiontext (= 8.1.3) + actionview (= 8.1.3) + activejob (= 8.1.3) + activemodel (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) bundler (>= 1.15.0) - railties (= 8.0.5) + railties (= 8.1.3) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -351,9 +361,11 @@ GEM rails-html-sanitizer (1.7.0) loofah (~> 2.25) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (8.0.5) - actionpack (= 8.0.5) - activesupport (= 8.0.5) + rails-observers (0.1.5) + activemodel (>= 4.0) + railties (8.1.3) + actionpack (= 8.1.3) + activesupport (= 8.1.3) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -536,26 +548,29 @@ DEPENDENCIES capybara capybara-screenshot coffee-script + csv database_cleaner-active_record (>= 2.1.0) dotenv-rails factory_bot_rails faker jbuilder (~> 2.13) jquery-rails - jquery-ui-rails (~> 6.0) + jquery-ui-rails (~> 8.0) listen (~> 3.7) madmin (~> 1.2) matrix mimemagic (~> 0.3.8) + mutex_m newrelic_rpm next_rails ombu_labs-auth pg - puma (~> 6.5) + puma (~> 7.2) pundit (~> 2.2) rack-mini-profiler - rails (~> 8.0.0) + rails (~> 8.1.0) rails-controller-testing + rails-observers recursive-open-struct redcarpet (~> 3.5.1) rspec-rails (~> 6.1) @@ -574,7 +589,7 @@ DEPENDENCIES webdrivers RUBY VERSION - ruby 3.2.3p157 + ruby 3.4.10p104 BUNDLED WITH - 2.6.6 + 2.6.9 diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9b5fc82b..3e4ae363 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,5 +1,6 @@ class ApplicationController < ActionController::Base include Pundit::Authorization + protect_from_forgery with: :exception before_action :toggle_rack_mini_profiler rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized diff --git a/app/controllers/madmin/application_controller.rb b/app/controllers/madmin/application_controller.rb index 12ace7d4..ee531495 100644 --- a/app/controllers/madmin/application_controller.rb +++ b/app/controllers/madmin/application_controller.rb @@ -1,6 +1,7 @@ module Madmin class ApplicationController < Madmin::BaseController include Pundit::Authorization + before_action :ensure_admin def ensure_admin diff --git a/config/application.rb b/config/application.rb index cf756c2b..b855c2a3 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,5 +1,6 @@ require_relative "boot" +require "rails-observers" require "rails/all" # Require the gems listed in Gemfile, including any gems