From 5b624e6c30f538eae210a6e985d52ae60adeec96 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Tue, 26 Dec 2023 01:21:15 +0100 Subject: [PATCH] Merge branch 'prod' --- .gitignore | 1 + .ruby-version | 2 +- Gemfile | 31 +- Gemfile.lock | 462 ++++++++++-------- bin/rails | 3 +- bin/rake | 1 - bin/setup | 21 +- config/boot.rb | 2 +- config/database.yml | 4 +- config/environments/test.rb | 2 + config/initializers/assets.rb | 4 +- .../initializers/content_security_policy.rb | 47 +- .../initializers/filter_parameter_logging.rb | 4 +- config/initializers/inflections.rb | 8 +- .../new_framework_defaults_7_0.rb | 143 ++++++ .../new_framework_defaults_7_1.rb | 223 +++++++++ ...e_storage_blobs_checksum.active_storage.rb | 8 + db/schema.rb | 39 +- lib/deb_importer.rb | 29 +- 19 files changed, 724 insertions(+), 310 deletions(-) create mode 100644 config/initializers/new_framework_defaults_7_0.rb create mode 100644 config/initializers/new_framework_defaults_7_1.rb create mode 100644 db/migrate/20231126173151_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb diff --git a/.gitignore b/.gitignore index 0dfcef0..266557b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ *.pdf /debshots2.sublime-workspace +/node_modules/ /vendor/bundle/ruby/ /vendor/ruby/ /.rbenv-vars diff --git a/.ruby-version b/.ruby-version index 338a5b5..2c9b4ef 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.6 +2.7.3 diff --git a/Gemfile b/Gemfile index b0ebf1b..8bcd5fb 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,14 @@ source 'https://rubygems.org' -ruby '2.6.6' + +ruby '2.7.3' +#ruby '3.2.1' + +# https://github.com/ruby/net-protocol/issues/10 +gem 'net-http' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 6.0' +#gem 'rails', '~> 6.0' +gem 'rails', '~> 7.0.0' gem 'bootsnap' #gem 'webpacker' @@ -17,21 +23,26 @@ gem 'fastimage' # Use Puma as the app server gem 'puma', '~> 3.0' + # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' +# todo: ruby sass is decprecated + # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' -# Use CoffeeScript for .coffee assets and views -#gem 'coffee-rails', '~> 4.2' + # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby # Use jquery as the JavaScript library gem 'jquery-rails' + # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' + # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder -gem 'jbuilder', '~> 2.5' +#gem 'jbuilder', '~> 2.5' + # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 3.0' # Use ActiveModel has_secure_password @@ -45,7 +56,7 @@ gem 'rails-healthcheck' group :development do # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. #gem 'web-console' - gem 'listen', '~> 3.0.5' + gem 'listen', '~> 3.5' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' @@ -59,14 +70,15 @@ group :development do # VS Code code-intelligence gem 'solargraph' + gem 'rufo' end # See https://github.com/sstephenson/execjs#readme for more supported runtimes -gem 'therubyracer', platforms: :ruby +# gem 'therubyracer', platforms: :ruby group :doc do # bundle exec rake doc:rails generates the API under doc/api. - gem 'sdoc', '~> 0.4.0' + gem 'sdoc' end # PostgreSQL support @@ -111,7 +123,8 @@ gem 'pg_search' gem 'slim-rails' # Requires: apt-get install libbz2-dev -gem 'bzip2-ruby', :git => 'https://github.com/chewi/bzip2-ruby.git' +#gem 'bzip2-ruby', :git => 'https://github.com/chewi/bzip2-ruby.git' +# a decade old and does not support Ruby 3 # Authentication gem 'devise' diff --git a/Gemfile.lock b/Gemfile.lock index 3fc2915..2d564f3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,73 +1,73 @@ -GIT - remote: https://github.com/chewi/bzip2-ruby.git - revision: 92d492c2b40c32a5c039314666655ebc2f52a817 - specs: - bzip2-ruby (0.2.7) - GEM remote: https://rubygems.org/ specs: - actioncable (6.1.4.1) - actionpack (= 6.1.4.1) - activesupport (= 6.1.4.1) + actioncable (7.0.8) + actionpack (= 7.0.8) + activesupport (= 7.0.8) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.1) - actionpack (= 6.1.4.1) - activejob (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.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) mail (>= 2.7.1) - actionmailer (6.1.4.1) - actionpack (= 6.1.4.1) - actionview (= 6.1.4.1) - activejob (= 6.1.4.1) - activesupport (= 6.1.4.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) mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp rails-dom-testing (~> 2.0) - actionpack (6.1.4.1) - actionview (= 6.1.4.1) - activesupport (= 6.1.4.1) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.8) + actionview (= 7.0.8) + activesupport (= 7.0.8) + 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 (6.1.4.1) - actionpack (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + actiontext (7.0.8) + actionpack (= 7.0.8) + activerecord (= 7.0.8) + activestorage (= 7.0.8) + activesupport (= 7.0.8) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.4.1) - activesupport (= 6.1.4.1) + actionview (7.0.8) + activesupport (= 7.0.8) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.4.1) - activesupport (= 6.1.4.1) + activejob (7.0.8) + activesupport (= 7.0.8) globalid (>= 0.3.6) - activemodel (6.1.4.1) - activesupport (= 6.1.4.1) - activerecord (6.1.4.1) - activemodel (= 6.1.4.1) - activesupport (= 6.1.4.1) - activestorage (6.1.4.1) - actionpack (= 6.1.4.1) - activejob (= 6.1.4.1) - activerecord (= 6.1.4.1) - activesupport (= 6.1.4.1) - marcel (~> 1.0.0) + 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) + marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.1) + activesupport (7.0.8) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) aes_key_wrap (1.1.0) ansi (1.5.0) ast (2.4.2) @@ -77,21 +77,22 @@ GEM babel-source (>= 4.0, < 6) execjs (~> 2.0) backport (1.2.0) - bcrypt (3.1.16) - benchmark (0.2.0) - better_errors (2.9.1) - coderay (>= 1.0.0) + base64 (0.2.0) + bcrypt (3.1.20) + benchmark (0.3.0) + better_errors (2.10.1) erubi (>= 1.0.0) rack (>= 0.9.0) - bindata (2.4.10) + rouge (>= 1.0.0) + bindata (2.4.15) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) - bootsnap (1.9.3) - msgpack (~> 1.0) + bootsnap (1.17.0) + msgpack (~> 1.2) builder (3.2.4) byebug (11.1.3) - cancancan (3.3.0) - capybara (3.36.0) + cancancan (3.5.0) + capybara (3.39.2) addressable matrix mini_mime (>= 0.1.3) @@ -100,38 +101,45 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - childprocess (4.1.0) choice (0.2.0) coderay (1.1.3) - concurrent-ruby (1.1.9) + concurrent-ruby (1.2.2) content_disposition (1.0.0) crass (1.0.6) - debug_inspector (1.1.0) - devise (4.8.0) + date (3.3.4) + debug_inspector (1.2.0) + devise (4.9.3) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - diff-lcs (1.4.4) - down (5.2.4) + diff-lcs (1.5.0) + down (5.4.1) addressable (~> 2.8) e2mmap (0.1.0) - erubi (1.10.0) - execjs (2.8.1) - fastimage (2.2.5) - ffi (1.15.4) - font-awesome-rails (4.7.0.7) - railties (>= 3.2, < 7) - formatador (0.3.0) + erubi (1.12.0) + execjs (2.9.1) + faraday (2.8.1) + base64 + faraday-net_http (>= 2.0, < 3.1) + ruby2_keywords (>= 0.0.4) + faraday-follow_redirects (0.3.0) + faraday (>= 1, < 3) + faraday-net_http (3.0.2) + fastimage (2.3.0) + ffi (1.16.3) + font-awesome-rails (4.7.0.8) + railties (>= 3.2, < 8.0) + formatador (1.1.0) foundation-rails (6.6.2.0) railties (>= 3.1.0) sass (>= 3.3.0) sprockets-es6 (>= 0.9.0) - globalid (0.5.2) - activesupport (>= 5.0) + globalid (1.2.1) + activesupport (>= 6.1) gravtastic (3.2.6) - guard (2.18.0) + guard (2.18.1) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) lumberjack (>= 1.0.12, < 2.0) @@ -148,124 +156,144 @@ GEM guard (~> 2.11) guard-compat (~> 1.0) hashie (5.0.0) - httpclient (2.8.3) - i18n (1.8.11) + i18n (1.14.1) concurrent-ruby (~> 1.0) - image_processing (1.12.1) + image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) - jaro_winkler (1.5.4) - jbuilder (2.11.3) - activesupport (>= 5.0.0) - jquery-rails (4.4.0) + jaro_winkler (1.5.6) + jquery-rails (4.6.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (1.8.6) - json-jwt (1.13.0) + json (2.7.1) + json-jwt (1.16.3) activesupport (>= 4.2) aes_key_wrap bindata - kramdown (2.3.1) + faraday (~> 2.0) + faraday-follow_redirects + kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - libv8 (3.16.14.19) - listen (3.0.8) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - loofah (2.12.0) + language_server-protocol (3.17.0.3) + listen (3.8.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + loofah (2.22.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - lumberjack (1.2.8) - mail (2.7.1) + nokogiri (>= 1.12.0) + lumberjack (1.2.10) + mail (2.8.1) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp marcel (1.0.2) matrix (0.4.2) method_source (1.0.0) - mini_magick (4.11.0) - mini_mime (1.1.2) - mini_portile2 (2.6.1) - minitest (5.14.4) - minitest-rails (6.1.0) + mini_magick (4.12.0) + mini_mime (1.1.5) + minitest (5.20.0) + minitest-rails (7.0.1) minitest (~> 5.10) - railties (~> 6.1.0) - minitest-reporters (1.4.3) + railties (~> 7.0.0) + minitest-reporters (1.6.1) ansi builder minitest (>= 5.0) ruby-progressbar - msgpack (1.4.2) + msgpack (1.7.2) nenv (0.3.0) - nio4r (2.5.8) - nokogiri (1.12.5) - mini_portile2 (~> 2.6.1) + net-http (0.4.0) + uri + net-imap (0.4.9) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.4.0) + net-protocol + nio4r (2.7.0) + nokogiri (1.15.5-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) - omniauth (1.9.1) + omniauth (2.1.2) hashie (>= 3.4.6) - rack (>= 1.6.2, < 3) - omniauth-rails_csrf_protection (0.1.2) + rack (>= 2.2.3) + rack-protection + omniauth-rails_csrf_protection (1.0.1) actionpack (>= 4.2) - omniauth (>= 1.3.1) - omniauth_openid_connect (0.3.5) - addressable (~> 2.5) - omniauth (~> 1.9) - openid_connect (~> 1.1) - openid_connect (1.3.0) + omniauth (~> 2.0) + omniauth_openid_connect (0.7.1) + omniauth (>= 1.9, < 3) + openid_connect (~> 2.2) + openid_connect (2.2.0) activemodel attr_required (>= 1.0.0) - json-jwt (>= 1.5.0) - rack-oauth2 (>= 1.6.1) - swd (>= 1.0.0) + faraday (~> 2.0) + faraday-follow_redirects + json-jwt (>= 1.16) + net-smtp + rack-oauth2 (~> 2.2) + swd (~> 2.0) tzinfo validate_email validate_url - webfinger (>= 1.0.1) + webfinger (~> 2.0) orm_adapter (0.5.0) - parallel (1.21.0) - parser (3.0.2.0) + parallel (1.24.0) + parser (3.2.2.4) ast (~> 2.4.1) - pg (1.2.3) - pg_search (2.3.5) + racc + pg (1.5.4) + pg_search (2.3.6) activerecord (>= 5.2) activesupport (>= 5.2) - pry (0.14.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (4.0.6) + psych (5.1.2) + stringio + public_suffix (5.0.4) puma (3.12.6) - racc (1.6.0) - rack (2.2.3) - rack-oauth2 (1.19.0) + racc (1.7.3) + rack (2.2.8) + rack-oauth2 (2.2.0) activesupport attr_required - httpclient + faraday (~> 2.0) + faraday-follow_redirects json-jwt (>= 1.11.0) rack (>= 2.1.0) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (6.1.4.1) - actioncable (= 6.1.4.1) - actionmailbox (= 6.1.4.1) - actionmailer (= 6.1.4.1) - actionpack (= 6.1.4.1) - actiontext (= 6.1.4.1) - actionview (= 6.1.4.1) - activejob (= 6.1.4.1) - activemodel (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + rack-protection (3.1.0) + rack (~> 2.2, >= 2.2.4) + 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) bundler (>= 1.15.0) - railties (= 6.1.4.1) - sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + railties (= 7.0.8) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-erd (1.6.1) + rails-erd (1.7.2) activerecord (>= 4.2) activesupport (>= 4.2) choice (~> 0.2.0) @@ -273,45 +301,53 @@ GEM rails-healthcheck (1.4.0) actionpack railties - rails-html-sanitizer (1.4.2) - loofah (~> 2.3) - railties (6.1.4.1) - actionpack (= 6.1.4.1) - activesupport (= 6.1.4.1) + 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 - rake (>= 0.13) + rake (>= 12.2) thor (~> 1.0) - rainbow (3.0.0) - rake (13.0.6) - rb-fsevent (0.11.0) + zeitwerk (~> 2.5) + rainbow (3.1.1) + rake (13.1.0) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - rdoc (4.3.0) - ref (2.0.0) - regexp_parser (2.1.1) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) + rbs (2.8.4) + rdoc (6.6.2) + psych (>= 4.0.0) + regexp_parser (2.8.3) + responders (3.1.1) + actionpack (>= 5.2) + railties (>= 5.2) reverse_markdown (2.1.1) nokogiri - rexml (3.2.5) - rubocop (1.23.0) + rexml (3.2.6) + rouge (4.2.0) + rubocop (1.59.0) + json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.12.0, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.13.0) - parser (>= 3.0.1.1) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) ruby-graphviz (1.2.5) rexml - ruby-progressbar (1.11.0) - ruby-vips (2.1.4) + ruby-progressbar (1.13.0) + ruby-vips (2.2.0) ffi (~> 1.12) + ruby2_keywords (0.0.5) rubyzip (2.3.2) + rufo (0.16.3) sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -323,36 +359,36 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sdoc (0.4.2) - json (~> 1.7, >= 1.7.7) - rdoc (~> 4.0) - selenium-webdriver (4.1.0) - childprocess (>= 0.5, < 5.0) + sdoc (2.6.1) + rdoc (>= 5.0) + selenium-webdriver (4.9.0) rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) shellany (0.0.1) - shrine (3.4.0) + shrine (3.5.0) content_disposition (~> 1.0) down (~> 5.1) - slim (4.1.0) - temple (>= 0.7.6, < 0.9) - tilt (>= 2.0.6, < 2.1) - slim-rails (3.3.0) + slim (5.2.0) + temple (~> 0.10.0) + tilt (>= 2.1.0) + slim-rails (3.6.3) actionpack (>= 3.1) railties (>= 3.1) - slim (>= 3.0, < 5.0) - solargraph (0.44.2) + slim (>= 3.0, < 6.0, != 5.0.0) + solargraph (0.50.0) backport (~> 1.2) benchmark - bundler (>= 1.17.2) + bundler (~> 2.0) diff-lcs (~> 1.4) e2mmap jaro_winkler (~> 1.5) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.1) parser (~> 3.0) - reverse_markdown (>= 1.0.5, < 3) - rubocop (>= 0.52) + rbs (~> 2.0) + reverse_markdown (~> 2.0) + rubocop (~> 1.38) thor (~> 1.0) tilt (~> 2.0) yard (~> 0.9, >= 0.9.24) @@ -367,59 +403,61 @@ GEM babel-source (>= 5.8.11) babel-transpiler sprockets (>= 3.0.0) - sprockets-rails (3.4.1) + sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - swd (1.3.0) + stringio (3.1.0) + swd (2.0.2) activesupport (>= 3) attr_required (>= 0.0.5) - httpclient (>= 2.4) - temple (0.8.2) - therubyracer (0.12.3) - libv8 (~> 3.16.14.15) - ref - thor (1.1.0) - tilt (2.0.10) + faraday (~> 2.0) + faraday-follow_redirects + temple (0.10.3) + thor (1.3.0) + tilt (2.3.0) + timeout (0.4.1) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (2.0.4) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (2.1.0) + unicode-display_width (2.5.0) + uri (0.13.0) validate_email (0.1.6) activemodel (>= 3.0) mail (>= 2.2.5) - validate_url (1.0.13) + validate_url (1.0.15) activemodel (>= 3.0.0) public_suffix warden (1.2.9) rack (>= 2.0.9) - webfinger (1.2.0) + webfinger (2.1.2) activesupport - httpclient (>= 2.4) - websocket-driver (0.7.5) + faraday (~> 2.0) + faraday-follow_redirects + websocket (1.2.10) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - will_paginate (3.3.1) + will_paginate (4.0.0) will_paginate-foundation (6.2.1) will_paginate (>= 3.0.3) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.26) - zeitwerk (2.5.1) + yard (0.9.34) + zeitwerk (2.6.12) PLATFORMS - ruby + x86_64-linux DEPENDENCIES better_errors binding_of_caller bootsnap byebug - bzip2-ruby! cancancan capybara devise @@ -430,23 +468,24 @@ DEPENDENCIES guard-minitest guard-rails image_processing - jbuilder (~> 2.5) jquery-rails - listen (~> 3.0.5) + listen (~> 3.5) mini_magick minitest-rails minitest-reporters + net-http omniauth omniauth-rails_csrf_protection omniauth_openid_connect pg pg_search puma (~> 3.0) - rails (~> 6.0) + rails (~> 7.0.0) rails-erd rails-healthcheck + rufo sass-rails (~> 5.0) - sdoc (~> 0.4.0) + sdoc selenium-webdriver shrine (~> 3.0) slim-rails @@ -454,14 +493,13 @@ DEPENDENCIES spring spring-watcher-listen (~> 2.0.0) sprockets - therubyracer turbolinks (~> 5) uglifier (>= 1.3.0) will_paginate will_paginate-foundation RUBY VERSION - ruby 2.6.6p146 + ruby 2.7.3p183 BUNDLED WITH - 1.17.2 + 2.2.33 diff --git a/bin/rails b/bin/rails index 21d3e02..efc0377 100755 --- a/bin/rails +++ b/bin/rails @@ -1,5 +1,4 @@ #!/usr/bin/env ruby -load File.expand_path("spring", __dir__) -APP_PATH = File.expand_path('../config/application', __dir__) +APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" diff --git a/bin/rake b/bin/rake index 7327f47..4fbf10b 100755 --- a/bin/rake +++ b/bin/rake @@ -1,5 +1,4 @@ #!/usr/bin/env ruby -load File.expand_path("spring", __dir__) require_relative "../config/boot" require "rake" Rake.application.run diff --git a/bin/setup b/bin/setup index 90700ac..ec47b79 100755 --- a/bin/setup +++ b/bin/setup @@ -2,7 +2,7 @@ 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 ==") @@ -13,24 +13,21 @@ 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') - - # Install JavaScript dependencies - system! 'bin/yarn' + puts "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") # puts "\n== Copying sample files ==" - # unless File.exist?('config/database.yml') - # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' + # unless File.exist?("config/database.yml") + # FileUtils.cp "config/database.yml.sample", "config/database.yml" # end puts "\n== Preparing database ==" - system! 'bin/rails db:prepare' + 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/config/boot.rb b/config/boot.rb index 3cda23b..988a5dd 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,4 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/config/database.yml b/config/database.yml index 5f7737b..8ebdef9 100644 --- a/config/database.yml +++ b/config/database.yml @@ -6,7 +6,7 @@ development: adapter: postgresql database: debshots_dev - username: debshots + username: debshots_dev password: GonwannEn0 host: localhost pool: 5 @@ -18,7 +18,7 @@ development: test: adapter: postgresql database: debshots_test - username: debshots + username: debshots_test password: GonwannEn0 host: localhost pool: 5 diff --git a/config/environments/test.rb b/config/environments/test.rb index 3761c4e..2f2ee06 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -48,6 +48,7 @@ Rails.application.configure do # Raise exceptions for disallowed deprecations. config.active_support.disallowed_deprecation = :raise + # Tell Active Support which deprecation messages to disallow. config.active_support.disallowed_deprecation_warnings = [] @@ -57,6 +58,7 @@ Rails.application.configure do # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true + # DEB package repositories to parse when running "rake debshots:... tasks" config.package_sources = [ { diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 4b828e8..2eeef96 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -1,12 +1,10 @@ # Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = '1.0' +Rails.application.config.assets.version = "1.0" # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path -# Add Yarn node_modules folder to the asset load path. -Rails.application.config.assets.paths << Rails.root.join('node_modules') # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 35d0f26..54f47cf 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -1,30 +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 -# # If you are using webpack-dev-server then specify webpack-dev-server host -# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development? - -# # 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 and inline scripts +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-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/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 4b34a03..adc6568 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/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 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/config/initializers/inflections.rb b/config/initializers/inflections.rb index ac033bf..3860f65 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -4,13 +4,13 @@ # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" +# inflect.irregular "person", "people" # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym 'RESTful' +# inflect.acronym "RESTful" # end diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb new file mode 100644 index 0000000..b13ef5e --- /dev/null +++ b/config/initializers/new_framework_defaults_7_0.rb @@ -0,0 +1,143 @@ +# Be sure to restart your server when you modify this file. +# +# This file eases your Rails 7.0 framework defaults upgrade. +# +# Uncomment each configuration one by one to switch to the new default. +# Once your application is ready to run with all new defaults, you can remove +# this file and set the `config.load_defaults` to `7.0`. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. +# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html + +# `button_to` view helper will render `