The server cannot process the request due to a client error. Please check the request and try again. If you're the application owner check the logs for more information.
+diff --git a/Gemfile b/Gemfile index 4f7732298f..56e1b531a3 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' -ruby '~> 3.4.8' +ruby '~> 3.4.10' gem 'activerecord-session_store' gem 'bootsnap', require: false @@ -10,16 +10,16 @@ gem 'devise', '~> 5.0.4' gem 'devise_invitable' gem 'pg', '~> 1.5' gem 'puma' -gem 'rails', '~> 7.2.3' +gem 'rails', '~> 8.1.3' gem 'recaptcha' gem 'sanitize' -gem 'solid_cable', '~> 3.0' +gem 'solid_cable', '~> 4.0' gem 'sprockets-rails' gem 'view_component' # Gems for OAuth2 subsystem -gem 'doorkeeper', '>= 4.6' -gem 'omniauth', '~> 2.1' +gem 'doorkeeper' +gem 'omniauth' gem 'omniauth-azure-activedirectory-v2' gem 'omniauth-linkedin-oauth2' gem 'omniauth-okta', git: 'https://github.com/scinote-eln/omniauth-okta', branch: 'org_auth_server_support' @@ -37,7 +37,7 @@ gem 'rack-attack' gem 'rack-cors' gem 'rack-session' -gem 'activerecord-import', '~> 2.2.0' +gem 'activerecord-import', '~> 2.3.0' gem 'acts_as_list' gem 'ajax-datatables-rails', '~> 0.3.1' gem 'auto_strip_attributes', '~> 2.1' # Removes unnecessary whitespaces AR @@ -51,30 +51,30 @@ gem 'fastimage' # Light gem to get image resolution gem 'grover' gem 'httparty', '~> 0.24.0' gem 'i18n-js', '~> 3.6' # Localization in javascript files +gem 'image_processing' gem 'jbuilder' # JSON structures via a Builder-style DSL gem 'mime-types', '~> 3.4' gem 'nested_form_fields' gem 'nokogiri', '~> 1.19.4' # HTML/XML parser -gem 'noticed' +gem 'noticed', '< 2' gem 'oj' gem 'rails_autolink', '~> 1.1', '>= 1.1.6' gem 'rgl' # Graph framework for project diagram calculations -gem 'roo', '~> 2.10.0' # Spreadsheet parser +gem 'roo', '~> 3.0.0' # Spreadsheet parser gem 'rotp' gem 'rqrcode', '~> 2.0' # QR code generator -gem 'rubyzip', '>= 2.3.0' # will load new rubyzip version +gem 'rubyzip' +gem 'ruby-vips' gem 'silencer' # Silence certain Rails logs gem 'turbolinks', '~> 5.2.0' gem 'underscore-rails' gem 'wicked_pdf' -gem 'zip-zip' # will load compatibility for old rubyzip API. -gem 'aws-actionmailer-ses', '~> 1' +gem 'aws-actionmailer-ses' gem 'aws-sdk-lambda' -gem 'aws-sdk-rails', '~> 5' +gem 'aws-sdk-rails' gem 'aws-sdk-s3' gem 'delayed_job_active_record' -gem 'image_processing' gem 'img2zpl', git: 'https://github.com/scinote-eln/img2zpl' gem 'rufus-scheduler' @@ -86,7 +86,7 @@ gem 'cssbundling-rails' gem 'jsbundling-rails' gem 'js-routes' -gem 'tailwindcss-rails', '~> 2.4' +gem 'tailwindcss-rails' gem 'base62' # Used for smart annotations gem 'newrelic_rpm' diff --git a/Gemfile.lock b/Gemfile.lock index a9cf7eb0c8..18d2206a26 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/scinote-eln/canaid - revision: bba1b817d1c9b0c7e0440a83d0f62848aabc0a1b + revision: 0f3629e6a14c181005a18c7fda30359f86190472 specs: canaid (1.0.4) devise (>= 3.4.1) @@ -36,94 +36,96 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.2.3.2) - actionpack (= 7.2.3.2) - activesupport (= 7.2.3.2) + action_text-trix (2.1.19) + railties + actioncable (8.1.3.1) + actionpack (= 8.1.3.1) + activesupport (= 8.1.3.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.3.2) - actionpack (= 7.2.3.2) - activejob (= 7.2.3.2) - activerecord (= 7.2.3.2) - activestorage (= 7.2.3.2) - activesupport (= 7.2.3.2) + actionmailbox (8.1.3.1) + actionpack (= 8.1.3.1) + activejob (= 8.1.3.1) + activerecord (= 8.1.3.1) + activestorage (= 8.1.3.1) + activesupport (= 8.1.3.1) mail (>= 2.8.0) - actionmailer (7.2.3.2) - actionpack (= 7.2.3.2) - actionview (= 7.2.3.2) - activejob (= 7.2.3.2) - activesupport (= 7.2.3.2) + actionmailer (8.1.3.1) + actionpack (= 8.1.3.1) + actionview (= 8.1.3.1) + activejob (= 8.1.3.1) + activesupport (= 8.1.3.1) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.3.2) - actionview (= 7.2.3.2) - activesupport (= 7.2.3.2) - cgi + actionpack (8.1.3.1) + actionview (= 8.1.3.1) + activesupport (= 8.1.3.1) nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4, < 3.3) + rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.3.2) - actionpack (= 7.2.3.2) - activerecord (= 7.2.3.2) - activestorage (= 7.2.3.2) - activesupport (= 7.2.3.2) + actiontext (8.1.3.1) + action_text-trix (~> 2.1.15) + actionpack (= 8.1.3.1) + activerecord (= 8.1.3.1) + activestorage (= 8.1.3.1) + activesupport (= 8.1.3.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.3.2) - activesupport (= 7.2.3.2) + actionview (8.1.3.1) + activesupport (= 8.1.3.1) builder (~> 3.1) - cgi erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - active_model_serializers (0.10.15) + active_model_serializers (0.10.16) actionpack (>= 4.1) activemodel (>= 4.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) - activejob (7.2.3.2) - activesupport (= 7.2.3.2) + activejob (8.1.3.1) + activesupport (= 8.1.3.1) globalid (>= 0.3.6) - activemodel (7.2.3.2) - activesupport (= 7.2.3.2) - activerecord (7.2.3.2) - activemodel (= 7.2.3.2) - activesupport (= 7.2.3.2) + activemodel (8.1.3.1) + activesupport (= 8.1.3.1) + activerecord (8.1.3.1) + activemodel (= 8.1.3.1) + activesupport (= 8.1.3.1) timeout (>= 0.4.0) - activerecord-import (2.2.0) + activerecord-import (2.3.0) activerecord (>= 4.2) - activerecord-session_store (2.2.0) - actionpack (>= 7.0) - activerecord (>= 7.0) + activerecord-session_store (2.3.0) + actionpack (>= 7.1) + activerecord (>= 7.1) cgi (>= 0.3.6) rack (>= 2.0.8, < 4) - railties (>= 7.0) - activestorage (7.2.3.2) - actionpack (= 7.2.3.2) - activejob (= 7.2.3.2) - activerecord (= 7.2.3.2) - activesupport (= 7.2.3.2) + railties (>= 7.1) + activestorage (8.1.3.1) + actionpack (= 8.1.3.1) + activejob (= 8.1.3.1) + activerecord (= 8.1.3.1) + activesupport (= 8.1.3.1) marcel (~> 1.0) - activesupport (7.2.3.2) + activesupport (8.1.3.1) 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, < 6) + minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) - acts_as_list (1.1.0) - activerecord (>= 4.2) + uri (>= 0.13.1) + acts_as_list (1.2.6) + activerecord (>= 6.1) + activesupport (>= 6.1) addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) aes_key_wrap (1.1.0) @@ -131,20 +133,20 @@ GEM railties (>= 3.1) anonymous_loader (0.1.3) version_gem (~> 1.1, >= 1.1.14) - ast (2.4.2) - attr_required (1.0.1) + ast (2.4.3) + attr_required (1.0.2) auth-sanitizer (0.2.3) version_gem (~> 1.1, >= 1.1.14) auto_strip_attributes (2.6.0) activerecord (>= 4.0) awesome_print (1.9.2) - aws-actionmailer-ses (1.0.0) + aws-actionmailer-ses (1.2.0) actionmailer (>= 7.1.0) aws-sdk-ses (~> 1, >= 1.50.0) aws-sdk-sesv2 (~> 1, >= 1.34.0) aws-eventstream (1.4.0) - aws-partitions (1.1196.0) - aws-sdk-core (3.240.0) + aws-partitions (1.1282.0) + aws-sdk-core (3.254.1) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) @@ -152,24 +154,24 @@ GEM bigdecimal jmespath (~> 1, >= 1.6.1) logger - aws-sdk-kms (1.118.0) - aws-sdk-core (~> 3, >= 3.239.1) + aws-sdk-kms (1.130.0) + aws-sdk-core (~> 3, >= 3.254.0) aws-sigv4 (~> 1.5) - aws-sdk-lambda (1.99.0) - aws-sdk-core (~> 3, >= 3.174.0) - aws-sigv4 (~> 1.1) - aws-sdk-rails (5.1.0) + aws-sdk-lambda (1.193.0) + aws-sdk-core (~> 3, >= 3.254.0) + aws-sigv4 (~> 1.5) + aws-sdk-rails (5.2.0) aws-sdk-core (~> 3) railties (>= 7.1.0) - aws-sdk-s3 (1.208.0) - aws-sdk-core (~> 3, >= 3.234.0) + aws-sdk-s3 (1.229.0) + aws-sdk-core (~> 3, >= 3.254.1) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) - aws-sdk-ses (1.85.0) - aws-sdk-core (~> 3, >= 3.225.0) + aws-sdk-ses (1.102.0) + aws-sdk-core (~> 3, >= 3.254.0) aws-sigv4 (~> 1.5) - aws-sdk-sesv2 (1.79.0) - aws-sdk-core (~> 3, >= 3.225.0) + aws-sdk-sesv2 (1.106.0) + aws-sdk-core (~> 3, >= 3.254.0) aws-sigv4 (~> 1.5) aws-sigv4 (1.12.1) aws-eventstream (~> 1, >= 1.0.2) @@ -182,23 +184,24 @@ GEM rack (>= 0.9.0) rouge (>= 1.0.0) bigdecimal (4.1.2) - bindata (2.5.0) - binding_of_caller (1.0.0) - debug_inspector (>= 0.0.1) - bootsnap (1.24.6) - msgpack (~> 1.2) - brakeman (6.1.2) + bindata (3.0.0) + binding_of_caller (2.0.0) + debug_inspector (>= 1.2.0) + bootsnap (1.25.0) + msgpack (~> 1.5) + brakeman (8.0.6) racc builder (3.3.0) - bullet (8.0.7) + bullet (8.1.3) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) - byebug (12.0.0) - capybara (3.39.2) + byebug (13.0.0) + reline (>= 0.6.0) + 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) @@ -208,13 +211,14 @@ GEM mail case_transform (0.2) activesupport - caxlsx (4.0.0) + caxlsx (4.5.0) htmlentities (~> 4.3, >= 4.3.4) marcel (~> 1.0) nokogiri (~> 1.10, >= 1.10.4) - rubyzip (>= 1.3.0, < 3) + rubyzip (>= 2.4, < 4) cgi (0.5.2) - childprocess (4.1.0) + childprocess (5.1.0) + logger (~> 1.5) chunky_png (1.4.0) coderay (1.1.3) coffee-rails (5.0.0) @@ -226,63 +230,62 @@ GEM coffee-script-source (1.12.2) concurrent-ruby (1.3.8) connection_pool (3.0.2) - crack (1.0.0) + crack (1.0.1) bigdecimal rexml crass (1.0.7) cssbundling-rails (1.4.3) railties (>= 6.0.0) - csv (3.3.5) - cucumber (8.0.0) - builder (~> 3.2, >= 3.2.4) - cucumber-ci-environment (~> 9.0, >= 9.0.4) - cucumber-core (~> 11.0, >= 11.0.0) - cucumber-cucumber-expressions (~> 15.1, >= 15.1.1) - cucumber-gherkin (~> 23.0, >= 23.0.1) - cucumber-html-formatter (~> 19.1, >= 19.1.0) - cucumber-messages (~> 18.0, >= 18.0.0) - diff-lcs (~> 1.5, >= 1.5.0) - mime-types (~> 3.4, >= 3.4.1) - multi_test (~> 1.1, >= 1.1.0) - sys-uname (~> 1.2, >= 1.2.2) - cucumber-ci-environment (9.2.0) - cucumber-core (11.0.0) - cucumber-gherkin (~> 23.0, >= 23.0.1) - cucumber-messages (~> 18.0, >= 18.0.0) - cucumber-tag-expressions (~> 4.1, >= 4.1.0) - cucumber-cucumber-expressions (15.2.0) - cucumber-gherkin (23.0.1) - cucumber-messages (~> 18.0, >= 18.0.0) - cucumber-html-formatter (19.2.0) - cucumber-messages (~> 18.0, >= 18.0.0) - cucumber-messages (18.0.0) - cucumber-rails (2.6.1) - capybara (>= 2.18, < 4) - cucumber (>= 3.2, < 9) - mime-types (~> 3.3) - nokogiri (~> 1.10) - railties (>= 5.0, < 8) - rexml (~> 3.0) - webrick (~> 1.7) - cucumber-tag-expressions (4.1.0) + csv (3.3.6) + cucumber (11.1.1) + base64 (~> 0.2) + builder (~> 3.2) + cucumber-ci-environment (> 9, < 12) + cucumber-core (>= 16.2.0, < 17) + cucumber-cucumber-expressions (> 17, < 20) + cucumber-html-formatter (> 21, < 24) + diff-lcs (~> 1.5) + logger (~> 1.6) + mini_mime (~> 1.1) + multi_test (~> 1.1) + sys-uname (~> 1.5) + cucumber-ci-environment (11.0.0) + cucumber-core (16.2.0) + cucumber-gherkin (> 36, < 40) + cucumber-messages (> 31, < 33) + cucumber-tag-expressions (> 6, < 9) + cucumber-cucumber-expressions (19.0.1) + bigdecimal + cucumber-gherkin (39.1.0) + cucumber-messages (>= 31, < 33) + cucumber-html-formatter (23.1.0) + cucumber-messages (> 23, < 33) + cucumber-messages (32.3.1) + cucumber-rails (4.1.0) + capybara (>= 3.25, < 4) + cucumber (>= 7, < 12) + railties (>= 6.1, < 9) + cucumber-tag-expressions (8.1.0) database_cleaner (2.1.0) database_cleaner-active_record (>= 2, < 3) - database_cleaner-active_record (2.2.1) + database_cleaner-active_record (2.2.2) activerecord (>= 5.a) - database_cleaner-core (~> 2.0.0) - database_cleaner-core (2.0.1) + database_cleaner-core (~> 2.0) + database_cleaner-core (2.1.0) date (3.5.1) - debug_inspector (1.1.0) + debug_inspector (1.2.0) deface (1.9.0) actionview (>= 5.2) nokogiri (>= 1.6) polyglot railties (>= 5.2) rainbow (>= 2.1.0) - delayed_job (4.1.11) - activesupport (>= 3.0, < 8.0) - delayed_job_active_record (4.1.7) - activerecord (>= 3.0, < 8.0) + delayed_job (4.2.0) + activesupport (>= 3.0, < 9.0) + benchmark + logger + delayed_job_active_record (4.1.11) + activerecord (>= 3.0, < 9.0) delayed_job (>= 3.0, < 5) devise (5.0.4) bcrypt (~> 3.0) @@ -290,78 +293,69 @@ GEM railties (>= 7.0) responders warden (~> 1.2.3) - devise_invitable (2.0.9) + devise_invitable (2.0.12) actionmailer (>= 5.0) devise (>= 4.6) diff-lcs (1.6.2) - discard (1.2.1) - activerecord (>= 4.2, < 8) - docile (1.4.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - doorkeeper (5.6.6) + discard (2.0.0) + activerecord (>= 7.0, < 9.0) + docile (1.4.1) + domain_name (0.6.20240107) + doorkeeper (5.9.6) railties (>= 5) - down (5.4.1) + down (5.6.0) addressable (~> 2.8) + base64 (~> 0.3) drb (2.2.3) - erb (6.0.6) + erb (6.0.7) erubi (1.13.1) - et-orbi (1.2.11) + et-orbi (1.4.1) tzinfo - execjs (2.8.1) - factory_bot (6.5.1) + execjs (2.10.2) + json (>= 2) + factory_bot (6.6.0) activesupport (>= 6.1.0) - factory_bot_rails (6.4.4) + factory_bot_rails (6.5.1) factory_bot (~> 6.5) - railties (>= 5.0.0) - faker (3.2.0) + railties (>= 6.1.0) + faker (3.8.0) i18n (>= 1.8.11, < 2) faraday (2.14.3) faraday-net_http (>= 2.0, < 3.5) json logger - faraday-follow_redirects (0.3.0) + faraday-follow_redirects (0.5.0) faraday (>= 1, < 3) faraday-net_http (3.4.4) net-http (~> 0.5) - fastimage (2.2.7) - ffi (1.17.4-arm64-darwin) + fastimage (2.4.1) ffi (1.17.4-x86_64-linux-gnu) - ffi-compiler (1.0.1) - ffi (>= 1.0.0) - rake - figaro (1.2.0) + figaro (1.3.0) thor (>= 0.14.0, < 2) - fugit (1.11.1) - et-orbi (~> 1, >= 1.2.11) + fugit (1.13.0) + et-orbi (~> 1.4) raabro (~> 1.4) globalid (1.4.0) activesupport (>= 6.1) - google-protobuf (4.31.1-arm64-darwin) - bigdecimal - rake (>= 13) - google-protobuf (4.31.1-x86_64-linux-gnu) + google-protobuf (4.36.0-x86_64-linux-gnu) bigdecimal - rake (>= 13) - googleapis-common-protos-types (1.20.0) - google-protobuf (>= 3.18, < 5.a) - graphviz (1.2.1) + rake (~> 13.3) + googleapis-common-protos-types (1.23.0) + google-protobuf (~> 4.26) + graphviz (1.3.0) process-pipeline - grover (1.2.3) + grover (1.2.10) nokogiri (~> 1) - hashdiff (1.2.0) + hashdiff (1.2.1) hashie (5.1.0) logger - htmlentities (4.3.4) - http (5.1.1) - addressable (~> 2.8) + htmlentities (4.4.2) + http (6.0.4) http-cookie (~> 1.0) - http-form_data (~> 2.2) - llhttp-ffi (~> 0.4.0) - http-cookie (1.0.5) + llhttp (~> 0.6.1) + http-cookie (1.1.6) domain_name (~> 0.5) - http-form_data (2.3.0) - httparty (0.24.0) + httparty (0.24.2) csv mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) @@ -369,30 +363,29 @@ GEM concurrent-ruby (~> 1.0) i18n-js (3.9.2) i18n (>= 0.6.6) - image_processing (1.12.2) - mini_magick (>= 4.9.5, < 5) - ruby-vips (>= 2.0.17, < 3) + image_processing (2.0.3) iniparse (1.5.0) - io-console (0.8.2) + io-console (0.9.2) irb (1.18.0) pp (>= 0.6.0) prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - jbuilder (2.13.0) - actionview (>= 5.0.0) - activesupport (>= 5.0.0) + jbuilder (2.15.1) + actionview (>= 7.0.0) + activesupport (>= 7.0.0) jmespath (1.6.2) - jquery-rails (4.5.1) + jquery-rails (4.6.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - js-routes (2.2.8) - railties (>= 4) + js-routes (2.4.1) + railties (>= 5) + sorbet-runtime jsbundling-rails (1.3.1) railties (>= 6.0.0) json (2.21.2) - json-jwt (1.16.6) + json-jwt (1.17.2) activesupport (>= 4.2) aes_key_wrap base64 @@ -417,12 +410,13 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) - listen (3.8.0) + language_server-protocol (3.17.0.6) + lint_roller (1.1.0) + listen (3.10.0) + logger rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - llhttp-ffi (0.4.0) - ffi-compiler (~> 1.0) - rake (~> 13.0) + llhttp (0.6.2) logger (1.7.0) loofah (2.25.2) crass (~> 1.0.2) @@ -434,15 +428,19 @@ GEM net-pop net-smtp marcel (1.2.1) - matrix (0.4.2) + matrix (0.4.3) + memoist3 (1.0.0) method_source (1.1.0) - mime-types (3.4.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2023.0218.1) - mini_magick (4.12.0) + mime-types (3.7.0) + logger + mime-types-data (~> 3.2025, >= 3.2025.0507) + mime-types-data (3.2026.0701) + mini_magick (4.13.2) mini_mime (1.1.5) - minitest (5.27.0) - msgpack (1.8.3) + minitest (6.0.6) + drb (~> 2.0) + prism (~> 1.5) + msgpack (1.8.4) multi_test (1.1.0) multi_xml (0.9.1) bigdecimal (>= 3.1, < 5) @@ -457,14 +455,13 @@ GEM net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.2) + net-protocol (0.3.0) timeout net-smtp (0.5.1) net-protocol - newrelic_rpm (9.14.0) + newrelic_rpm (10.7.1) + logger nio4r (2.7.5) - nokogiri (1.19.4-arm64-darwin) - racc (~> 1.4) nokogiri (1.19.4-x86_64-linux-gnu) racc (~> 1.4) noticed (1.6.3) @@ -480,7 +477,7 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0, >= 2.0.7) version_gem (~> 1.1, >= 1.1.14) - oj (3.17.3) + oj (3.17.6) bigdecimal (>= 3.0) ostruct (>= 0.2) omniauth (2.1.4) @@ -488,125 +485,111 @@ GEM logger rack (>= 2.2.3) rack-protection - omniauth-azure-activedirectory-v2 (2.0.1) + omniauth-azure-activedirectory-v2 (2.4.0) omniauth-oauth2 (~> 1.8) omniauth-linkedin-oauth2 (1.0.1) omniauth-oauth2 omniauth-oauth2 (1.9.0) oauth2 (>= 2.0.2, < 3) omniauth (~> 2.0) - omniauth-rails_csrf_protection (1.0.1) + omniauth-rails_csrf_protection (1.0.2) actionpack (>= 4.2) omniauth (~> 2.0) - omniauth-saml (2.2.3) + omniauth-saml (2.2.5) omniauth (~> 2.1) ruby-saml (~> 1.18) - omniauth_openid_connect (0.7.1) + omniauth_openid_connect (0.8.0) omniauth (>= 1.9, < 3) openid_connect (~> 2.2) - openid_connect (2.2.0) + openid_connect (2.5.0) activemodel attr_required (>= 1.0.0) faraday (~> 2.0) faraday-follow_redirects json-jwt (>= 1.16) - net-smtp + mail rack-oauth2 (~> 2.2) swd (~> 2.0) tzinfo - validate_email validate_url webfinger (~> 2.0) - opentelemetry-api (1.5.0) - opentelemetry-common (0.22.0) + opentelemetry-api (1.11.0) + logger + opentelemetry-common (0.25.1) opentelemetry-api (~> 1.0) - opentelemetry-exporter-otlp (0.30.0) + opentelemetry-exporter-otlp (0.34.1) google-protobuf (>= 3.18) googleapis-common-protos-types (~> 1.3) opentelemetry-api (~> 1.1) opentelemetry-common (~> 0.20) - opentelemetry-sdk (~> 1.2) + opentelemetry-sdk (~> 1.10) opentelemetry-semantic_conventions - opentelemetry-helpers-sql (0.1.1) + opentelemetry-helpers-sql (0.4.0) + opentelemetry-api (~> 1.7) + opentelemetry-helpers-sql-processor (0.5.0) opentelemetry-api (~> 1.0) - opentelemetry-helpers-sql-obfuscation (0.3.0) opentelemetry-common (~> 0.21) - opentelemetry-instrumentation-action_mailer (0.4.0) - opentelemetry-api (~> 1.0) - opentelemetry-instrumentation-active_support (~> 0.7) - opentelemetry-instrumentation-base (~> 0.23.0) - opentelemetry-instrumentation-action_pack (0.12.3) - opentelemetry-api (~> 1.0) - opentelemetry-instrumentation-base (~> 0.23.0) - opentelemetry-instrumentation-rack (~> 0.21) - opentelemetry-instrumentation-action_view (0.9.0) - opentelemetry-api (~> 1.0) - opentelemetry-instrumentation-active_support (~> 0.7) - opentelemetry-instrumentation-base (~> 0.23.0) - opentelemetry-instrumentation-active_job (0.8.0) - opentelemetry-api (~> 1.0) - opentelemetry-instrumentation-base (~> 0.23.0) - opentelemetry-instrumentation-active_record (0.9.0) - opentelemetry-api (~> 1.0) - opentelemetry-instrumentation-base (~> 0.23.0) - opentelemetry-instrumentation-active_storage (0.1.1) - opentelemetry-api (~> 1.0) - opentelemetry-instrumentation-active_support (~> 0.7) - opentelemetry-instrumentation-base (~> 0.23.0) - opentelemetry-instrumentation-active_support (0.8.0) - opentelemetry-api (~> 1.0) - opentelemetry-instrumentation-base (~> 0.23.0) - opentelemetry-instrumentation-base (0.23.0) - opentelemetry-api (~> 1.0) + opentelemetry-instrumentation-action_mailer (0.8.1) + opentelemetry-instrumentation-active_support (~> 0.10) + opentelemetry-instrumentation-action_pack (0.18.1) + opentelemetry-instrumentation-rack (~> 0.29) + opentelemetry-instrumentation-action_view (0.13.0) + opentelemetry-instrumentation-active_support (~> 0.10) + opentelemetry-instrumentation-active_job (0.13.0) + opentelemetry-instrumentation-base (~> 0.25) + opentelemetry-instrumentation-active_record (0.13.0) + opentelemetry-instrumentation-base (~> 0.25) + opentelemetry-instrumentation-active_storage (0.5.1) + opentelemetry-instrumentation-active_support (~> 0.10) + opentelemetry-instrumentation-active_support (0.12.1) + opentelemetry-instrumentation-base (~> 0.25) + opentelemetry-instrumentation-base (0.26.1) + opentelemetry-api (~> 1.7) opentelemetry-common (~> 0.21) opentelemetry-registry (~> 0.1) - opentelemetry-instrumentation-concurrent_ruby (0.22.0) - opentelemetry-api (~> 1.0) - opentelemetry-instrumentation-base (~> 0.23.0) - opentelemetry-instrumentation-pg (0.30.1) - opentelemetry-api (~> 1.0) + opentelemetry-instrumentation-concurrent_ruby (0.25.0) + opentelemetry-instrumentation-base (~> 0.25) + opentelemetry-instrumentation-pg (0.37.0) opentelemetry-helpers-sql - opentelemetry-helpers-sql-obfuscation - opentelemetry-instrumentation-base (~> 0.23.0) - opentelemetry-instrumentation-rack (0.26.0) - opentelemetry-api (~> 1.0) - opentelemetry-instrumentation-base (~> 0.23.0) - opentelemetry-instrumentation-rails (0.36.0) - opentelemetry-api (~> 1.0) - opentelemetry-instrumentation-action_mailer (~> 0.4.0) - opentelemetry-instrumentation-action_pack (~> 0.12.0) - opentelemetry-instrumentation-action_view (~> 0.9.0) - opentelemetry-instrumentation-active_job (~> 0.8.0) - opentelemetry-instrumentation-active_record (~> 0.9.0) - opentelemetry-instrumentation-active_storage (~> 0.1.0) - opentelemetry-instrumentation-active_support (~> 0.8.0) - opentelemetry-instrumentation-base (~> 0.23.0) - opentelemetry-instrumentation-concurrent_ruby (~> 0.22.0) - opentelemetry-propagator-xray (0.24.0) - opentelemetry-api (~> 1.0) - opentelemetry-registry (0.4.0) + opentelemetry-helpers-sql-processor + opentelemetry-instrumentation-base (~> 0.25) + opentelemetry-instrumentation-rack (0.31.1) + opentelemetry-instrumentation-base (~> 0.25) + opentelemetry-instrumentation-rails (0.42.0) + opentelemetry-instrumentation-action_mailer (~> 0.7) + opentelemetry-instrumentation-action_pack (~> 0.17) + opentelemetry-instrumentation-action_view (~> 0.12) + opentelemetry-instrumentation-active_job (~> 0.11) + opentelemetry-instrumentation-active_record (~> 0.12) + opentelemetry-instrumentation-active_storage (~> 0.4) + opentelemetry-instrumentation-active_support (~> 0.11) + opentelemetry-instrumentation-concurrent_ruby (~> 0.25) + opentelemetry-propagator-xray (0.27.0) + opentelemetry-api (~> 1.7) + opentelemetry-registry (0.6.3) opentelemetry-api (~> 1.1) - opentelemetry-sdk (1.8.0) + opentelemetry-sdk (1.13.0) + logger opentelemetry-api (~> 1.1) opentelemetry-common (~> 0.20) opentelemetry-registry (~> 0.2) opentelemetry-semantic_conventions - opentelemetry-semantic_conventions (1.11.0) + opentelemetry-semantic_conventions (1.44.0) opentelemetry-api (~> 1.0) orm_adapter (0.5.0) ostruct (0.6.3) - overcommit (0.60.0) - childprocess (>= 0.6.3, < 5) + overcommit (0.72.0) + childprocess (>= 0.6.3, < 6) iniparse (~> 1.4) - rexml (~> 3.2) - pairing_heap (3.0.1) - parallel (1.23.0) + rexml (>= 3.4.2) + pairing_heap (3.1.1) + parallel (2.1.0) parallel_tests (5.7.0) parallel - parser (3.2.2.3) + parser (3.3.12.0) ast (~> 2.4.1) racc - pg (1.5.9) + pg (1.6.3-x86_64-linux) polyglot (0.3.5) pp (0.6.4) prettyprint @@ -618,25 +601,27 @@ GEM process-group process-terminal (0.2.0) ffi - pry (0.15.2) + pry (0.16.0) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.11.0) - byebug (~> 12.0) - pry (>= 0.13, < 0.16) + reline (>= 0.6.0) + pry-byebug (3.12.0) + byebug (~> 13.0) + pry (>= 0.13, < 0.17) pry-rails (0.3.11) pry (>= 0.13.0) public_suffix (7.0.5) - puma (7.1.0) + puma (8.0.2) nio4r (~> 2.0) - raabro (1.4.0) + raabro (1.5.0) racc (1.8.1) rack (3.2.7) rack-attack (6.8.0) rack (>= 1.0, < 4) - rack-cors (2.0.2) - rack (>= 2.0.0) - rack-oauth2 (2.2.0) + rack-cors (3.0.0) + logger + rack (>= 3.0.14) + rack-oauth2 (2.3.0) activesupport attr_required faraday (~> 2.0) @@ -654,20 +639,20 @@ GEM rack (>= 1.3) rackup (2.3.1) rack (>= 3) - rails (7.2.3.2) - actioncable (= 7.2.3.2) - actionmailbox (= 7.2.3.2) - actionmailer (= 7.2.3.2) - actionpack (= 7.2.3.2) - actiontext (= 7.2.3.2) - actionview (= 7.2.3.2) - activejob (= 7.2.3.2) - activemodel (= 7.2.3.2) - activerecord (= 7.2.3.2) - activestorage (= 7.2.3.2) - activesupport (= 7.2.3.2) + rails (8.1.3.1) + actioncable (= 8.1.3.1) + actionmailbox (= 8.1.3.1) + actionmailer (= 8.1.3.1) + actionpack (= 8.1.3.1) + actiontext (= 8.1.3.1) + actionview (= 8.1.3.1) + activejob (= 8.1.3.1) + activemodel (= 8.1.3.1) + activerecord (= 8.1.3.1) + activestorage (= 8.1.3.1) + activesupport (= 8.1.3.1) bundler (>= 1.15.0) - railties (= 7.2.3.2) + railties (= 8.1.3.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -683,10 +668,9 @@ GEM actionview (> 3.1) activesupport (> 3.1) railties (> 3.1) - railties (7.2.3.2) - actionpack (= 7.2.3.2) - activesupport (= 7.2.3.2) - cgi + railties (8.1.3.1) + actionpack (= 8.1.3.1) + activesupport (= 8.1.3.1) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -696,9 +680,9 @@ GEM rainbow (3.1.1) rake (13.4.2) rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) - rbs (4.1.1) + rbs (4.2.0) logger prism (>= 1.6.0) tsort @@ -707,63 +691,72 @@ GEM prism (>= 1.6.0) rbs (>= 4.0.0) tsort - recaptcha (5.17.0) - regexp_parser (2.8.1) - reline (0.6.3) + recaptcha (5.21.2) + regexp_parser (2.12.0) + reline (0.7.0) io-console (~> 0.5) responders (3.2.0) actionpack (>= 7.0) railties (>= 7.0) - rexml (3.4.2) - rgl (0.6.3) - pairing_heap (>= 0.3.0) + rexml (3.4.4) + rgl (0.6.7) + pairing_heap (>= 0.3, < 4.0) rexml (~> 3.2, >= 3.2.4) stream (~> 0.5.3) - roo (2.10.0) + roo (3.0.0) + base64 (~> 0.2) + csv (~> 3) + logger (~> 1) nokogiri (~> 1) - rubyzip (>= 1.3.0, < 3.0.0) + rubyzip (>= 3.0.0, < 4.0.0) rotp (6.3.0) - rouge (4.1.2) + rouge (5.1.0) + strscan (~> 3.1) rqrcode (2.2.0) chunky_png (~> 1.0) rqrcode_core (~> 1.0) rqrcode_core (1.2.0) - rspec-core (3.13.4) + rspec-core (3.13.6) rspec-support (~> 3.13.0) rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.5) + rspec-mocks (3.13.8) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (8.0.0) + rspec-rails (8.0.4) actionpack (>= 7.2) activesupport (>= 7.2) railties (>= 7.2) - rspec-core (~> 3.13) - rspec-expectations (~> 3.13) - rspec-mocks (~> 3.13) - rspec-support (~> 3.13) - rspec-support (3.13.4) - rubocop (1.52.1) - json (~> 2.3) - parallel (~> 1.10) - parser (>= 3.2.2.3) + rspec-core (>= 3.13.0, < 5.0.0) + rspec-expectations (>= 3.13.0, < 5.0.0) + rspec-mocks (>= 3.13.0, < 5.0.0) + rspec-support (>= 3.13.0, < 5.0.0) + rspec-support (3.13.7) + rubocop (1.90.0) + json (>= 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.0, < 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.18.0) - rubocop (>= 1.7.0, < 2.0) - rubocop-ast (>= 0.4.0) - rubocop-rails (2.19.1) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.50.0) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-performance (1.27.0) + lint_roller (~> 1.1) + rubocop (>= 1.89.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) + rubocop-rails (2.37.0) activesupport (>= 4.2.0) + lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.33.0, < 2.0) + rubocop (>= 1.89.0, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) ruby-progressbar (1.13.0) ruby-saml (1.18.1) nokogiri (>= 1.13.10) @@ -771,58 +764,59 @@ GEM ruby-vips (2.3.0) ffi (~> 1.12) logger - rubyzip (2.3.2) - rufus-scheduler (3.9.1) - fugit (~> 1.1, >= 1.1.6) - sanitize (6.0.2) + rubyzip (3.5.0) + rufus-scheduler (3.9.2) + fugit (~> 1.1, >= 1.11.1) + sanitize (7.0.0) crass (~> 1.0.2) - nokogiri (>= 1.12.0) + nokogiri (>= 1.16.8) sdoc (1.1.0) rdoc (>= 5.0) securerandom (0.4.1) - selenium-webdriver (4.10.0) + selenium-webdriver (4.47.0) + base64 (~> 0.2) + logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2, < 3.0) + rubyzip (>= 1.2.2, < 4.0) websocket (~> 1.0) - shoulda-matchers (6.5.0) - activesupport (>= 5.2.0) + shoulda-matchers (8.0.1) + activesupport (>= 7.2) silencer (2.0.0) - simplecov (0.22.0) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) - simplecov_json_formatter (0.1.4) + simplecov (1.1.1) snaky_hash (2.0.7) hashie (>= 0.1.0, < 6) version_gem (~> 1.1, >= 1.1.14) - solid_cable (3.0.12) + solid_cable (4.0.2) actioncable (>= 7.2) activejob (>= 7.2) activerecord (>= 7.2) railties (>= 7.2) - sprockets (4.2.0) - concurrent-ruby (~> 1.0) + sorbet-runtime (0.6.13449) + sprockets (4.4.1) + concurrent-ruby (~> 1.1) + logger rack (>= 2.2.4, < 4) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) - stream (0.5.5) - swd (2.0.2) + stream (0.5.6) + strscan (3.1.8) + swd (2.0.3) activesupport (>= 3) attr_required (>= 0.0.5) faraday (~> 2.0) faraday-follow_redirects - sys-uname (1.2.3) + sys-uname (1.5.1) ffi (~> 1.1) - tailwindcss-rails (2.4.0-arm64-darwin) - railties (>= 6.0.0) - tailwindcss-rails (2.4.0-x86_64-linux) - railties (>= 6.0.0) + memoist3 (~> 1.0.0) + tailwindcss-rails (4.6.0) + railties (>= 7.0.0) + tailwindcss-ruby (~> 4.0) + tailwindcss-ruby (4.3.3-x86_64-linux-gnu) thor (1.5.0) - tilt (2.4.0) - timecop (0.9.6) + tilt (2.9.0) + timecop (0.9.11) timeout (0.6.1) tsort (0.2.0) turbolinks (5.2.1) @@ -831,63 +825,56 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) underscore-rails (1.8.3) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) - unicode-display_width (2.4.2) - uniform_notifier (1.17.0) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) + uniform_notifier (1.18.0) uri (1.1.1) useragent (0.16.11) - validate_email (0.1.6) - activemodel (>= 3.0) - mail (>= 2.2.5) validate_url (1.0.15) activemodel (>= 3.0.0) public_suffix version_gem (1.1.15) - view_component (4.12.0) + view_component (4.15.0) actionview (>= 7.1.0) activesupport (>= 7.1.0) concurrent-ruby (~> 1) warden (1.2.9) rack (>= 2.0.9) - webfinger (2.1.2) + webfinger (2.1.3) activesupport faraday (~> 2.0) faraday-follow_redirects - webmock (3.25.1) + webmock (3.26.3) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.9.2) - websocket (1.2.9) + websocket (1.2.11) websocket-driver (0.8.2) base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - wicked_pdf (2.7.0) + wicked_pdf (2.8.2) activesupport + ostruct xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.8.2) - zip-zip (0.3) - rubyzip (>= 1.0.0) + zeitwerk (2.8.3) PLATFORMS - arm64-darwin x86_64-linux DEPENDENCIES active_model_serializers (~> 0.10.15) - activerecord-import (~> 2.2.0) + activerecord-import (~> 2.3.0) activerecord-session_store acts_as_list ajax-datatables-rails (~> 0.3.1) auto_strip_attributes (~> 2.1) awesome_print - aws-actionmailer-ses (~> 1) + aws-actionmailer-ses aws-sdk-lambda - aws-sdk-rails (~> 5) + aws-sdk-rails aws-sdk-s3 base62 bcrypt (~> 3.1.22) @@ -910,7 +897,7 @@ DEPENDENCIES devise (~> 5.0.4) devise_invitable discard - doorkeeper (>= 4.6) + doorkeeper down (~> 5.0) factory_bot_rails faker @@ -934,9 +921,9 @@ DEPENDENCIES nested_form_fields newrelic_rpm nokogiri (~> 1.19.4) - noticed + noticed (< 2) oj - omniauth (~> 2.1) + omniauth omniauth-azure-activedirectory-v2 omniauth-linkedin-oauth2 omniauth-okta! @@ -959,19 +946,20 @@ DEPENDENCIES rack-attack rack-cors rack-session - rails (~> 7.2.3) + rails (~> 8.1.3) rails-controller-testing rails_autolink (~> 1.1, >= 1.1.6) recaptcha rgl - roo (~> 2.10.0) + roo (~> 3.0.0) rotp rqrcode (~> 2.0) rspec-rails rubocop rubocop-performance rubocop-rails - rubyzip (>= 2.3.0) + ruby-vips + rubyzip rufus-scheduler sanitize sdoc (~> 1.0) @@ -979,9 +967,9 @@ DEPENDENCIES shoulda-matchers silencer simplecov - solid_cable (~> 3.0) + solid_cable (~> 4.0) sprockets-rails - tailwindcss-rails (~> 2.4) + tailwindcss-rails timecop turbolinks (~> 5.2.0) tzinfo-data @@ -989,10 +977,9 @@ DEPENDENCIES view_component webmock wicked_pdf - zip-zip RUBY VERSION - ruby 3.4.8p72 + ruby 3.4.10p104 BUNDLED WITH 2.5.22 diff --git a/app/models/asset.rb b/app/models/asset.rb index 49d62d2586..3c31042c5c 100644 --- a/app/models/asset.rb +++ b/app/models/asset.rb @@ -16,7 +16,7 @@ class Asset < ApplicationRecord WOPI_LOCK_DURATION = 60 * 30 SEARCHABLE_ATTRIBUTES = ['active_storage_blobs.filename', 'asset_text_data.data_vector'].freeze - enum view_mode: { thumbnail: 0, list: 1, inline: 2 } + enum :view_mode, { thumbnail: 0, list: 1, inline: 2 } # ActiveStorage configuration has_one_versioned_attached :file diff --git a/app/models/calendar_event.rb b/app/models/calendar_event.rb index 5868442c64..4745721f92 100644 --- a/app/models/calendar_event.rb +++ b/app/models/calendar_event.rb @@ -9,9 +9,7 @@ class CalendarEvent < ApplicationRecord before_save :reset_reminder_sent, if: -> { start_date_changed? || start_datetime_changed? } - enum event_type: { - equipment_booking: 0 - } + enum :event_type, { equipment_booking: 0 } scope :repository_rows_filter, ->(subject_ids) { where(subject_type: 'RepositoryRow', subject_id: subject_ids) } scope :repository_filter, ->(repository_id) { diff --git a/app/models/concerns/shareable.rb b/app/models/concerns/shareable.rb index 93b46c1697..3f673dffb4 100644 --- a/app/models/concerns/shareable.rb +++ b/app/models/concerns/shareable.rb @@ -8,7 +8,7 @@ module Shareable has_many :teams_shared_with, through: :team_shared_objects, source: :team, dependent: :destroy if column_names.include? 'permission_level' - enum permission_level: Extends::SHARED_OBJECTS_PERMISSION_LEVELS + enum :permission_level, Extends::SHARED_OBJECTS_PERMISSION_LEVELS define_method :globally_shareable? do true end diff --git a/app/models/label_printer.rb b/app/models/label_printer.rb index 291b82b9e0..3ec254fb99 100644 --- a/app/models/label_printer.rb +++ b/app/models/label_printer.rb @@ -11,9 +11,9 @@ class LabelPrinter < ApplicationRecord } ).freeze - enum type_of: { fluics: 0 } - enum language_type: { zpl: 0 } - enum status: { ready: 0, busy: 1, out_of_labels: 2, unreachable: 3, error: 4 } + enum :type_of, { fluics: 0 } + enum :language_type, { zpl: 0 } + enum :status, { ready: 0, busy: 1, out_of_labels: 2, unreachable: 3, error: 4 } validates :name, presence: true validates :type_of, presence: true diff --git a/app/models/linked_repository.rb b/app/models/linked_repository.rb index 5e1872924c..6100a8377b 100644 --- a/app/models/linked_repository.rb +++ b/app/models/linked_repository.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class LinkedRepository < Repository - enum permission_level: Extends::SHARED_OBJECTS_PERMISSION_LEVELS.except(:shared_write) + enum :permission_level, Extends::SHARED_OBJECTS_PERMISSION_LEVELS.except(:shared_write) def shareable_write? false diff --git a/app/models/my_module.rb b/app/models/my_module.rb index 8e637efbc7..b398123505 100644 --- a/app/models/my_module.rb +++ b/app/models/my_module.rb @@ -21,8 +21,8 @@ class InvalidContentError < StandardError; end attr_accessor :transition_error_rollback, :status_changed_by - enum state: Extends::TASKS_STATES - enum provisioning_status: { done: 0, in_progress: 1, failed: 2 } + enum :state, Extends::TASKS_STATES + enum :provisioning_status, { done: 0, in_progress: 1, failed: 2 } before_validation :archiving_and_restoring_extras, on: :update, if: :archived_changed? before_save -> { report_elements.destroy_all }, if: -> { !new_record? && experiment_id_changed? } diff --git a/app/models/my_module_status_flow.rb b/app/models/my_module_status_flow.rb index 2cd6e422d1..b1975e5814 100644 --- a/app/models/my_module_status_flow.rb +++ b/app/models/my_module_status_flow.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class MyModuleStatusFlow < ApplicationRecord - enum visibility: { global: 0, in_team: 1 } + enum :visibility, { global: 0, in_team: 1 } has_many :my_module_statuses, dependent: :destroy belongs_to :team, optional: true diff --git a/app/models/project.rb b/app/models/project.rb index 72d3f6c99c..9d38ca6f46 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -16,7 +16,7 @@ class Project < ApplicationRecord include Favoritable include MetadataModel - enum visibility: { hidden: 0, visible: 1 } + enum :visibility, { hidden: 0, visible: 1 } auto_strip_attributes :name, nullify: false auto_strip_attributes :description, nullify: true diff --git a/app/models/protocol.rb b/app/models/protocol.rb index 6c02350181..bed446cc1e 100644 --- a/app/models/protocol.rb +++ b/app/models/protocol.rb @@ -18,8 +18,8 @@ class Protocol < ApplicationRecord before_create -> { self.skip_user_assignments = true }, if: -> { in_module? } - enum visibility: { hidden: 0, visible: 1 } - enum protocol_type: { + enum :visibility, { hidden: 0, visible: 1 } + enum :protocol_type, { unlinked: 0, linked: 1, in_repository_private: 2, # Deprecated @@ -465,7 +465,7 @@ def self.clone_contents(src, dest, current_user, clone_keywords, only_contents: def self.clone_step(protocol_dest, current_user, step, include_file_versions, load_mode: 'replace') position = load_mode == 'replace' ? step.position : nil - step.duplicate(protocol_dest, current_user, step_position: position, include_file_versions: include_file_versions, load_mode: load_mode) + step.duplicate(protocol_dest, current_user, step_position: position, include_file_versions: include_file_versions) end def self.clone_result(protocol_dest, current_user, result) diff --git a/app/models/repository_column.rb b/app/models/repository_column.rb index fdde405b2d..2c35bdf5a8 100644 --- a/app/models/repository_column.rb +++ b/app/models/repository_column.rb @@ -24,7 +24,7 @@ class RepositoryColumn < ApplicationRecord accepts_nested_attributes_for :repository_checklist_items, allow_destroy: true accepts_nested_attributes_for :repository_stock_unit_items, allow_destroy: true - enum data_type: Extends::REPOSITORY_DATA_TYPES + enum :data_type, Extends::REPOSITORY_DATA_TYPES store_accessor :metadata, %i(reminder_value reminder_unit reminder_message) diff --git a/app/models/repository_snapshot.rb b/app/models/repository_snapshot.rb index 044db7b2c9..ddf7ddf537 100644 --- a/app/models/repository_snapshot.rb +++ b/app/models/repository_snapshot.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class RepositorySnapshot < RepositoryBase - enum status: { provisioning: 0, ready: 1, failed: 2 } + enum :status, { provisioning: 0, ready: 1, failed: 2 } after_save :refresh_report_references, if: :saved_change_to_selected before_destroy :refresh_report_references_on_destroy, prepend: true diff --git a/app/models/repository_table_filter_element.rb b/app/models/repository_table_filter_element.rb index 3a69effd96..0c660af1dc 100644 --- a/app/models/repository_table_filter_element.rb +++ b/app/models/repository_table_filter_element.rb @@ -1,28 +1,28 @@ # frozen_string_literal: true class RepositoryTableFilterElement < ApplicationRecord - enum operator: { contains: 0, - doesnt_contain: 1, - empty: 2, - any_of: 3, - none_of: 4, - all_of: 5, - equal_to: 6, - unequal_to: 7, - greater_than: 8, - less_than: 9, - greater_than_or_equal_to: 10, - less_than_or_equal_to: 11, - between: 12, - file_attached: 13, - file_not_attached: 14, - file_contains: 15, - today: 16, - yesterday: 17, - last_week: 18, - this_month: 19, - last_year: 20, - this_year: 21 } + enum :operator, { contains: 0, + doesnt_contain: 1, + empty: 2, + any_of: 3, + none_of: 4, + all_of: 5, + equal_to: 6, + unequal_to: 7, + greater_than: 8, + less_than: 9, + greater_than_or_equal_to: 10, + less_than_or_equal_to: 11, + between: 12, + file_attached: 13, + file_not_attached: 14, + file_contains: 15, + today: 16, + yesterday: 17, + last_week: 18, + this_month: 19, + last_year: 20, + this_year: 21 } belongs_to :repository_table_filter, inverse_of: :repository_table_filter_elements belongs_to :repository_column, inverse_of: :repository_table_filter_elements diff --git a/app/models/result_base.rb b/app/models/result_base.rb index 5fc39816b4..2dca3215be 100644 --- a/app/models/result_base.rb +++ b/app/models/result_base.rb @@ -13,7 +13,7 @@ class ResultBase < ApplicationRecord auto_strip_attributes :name, nullify: false validates :name, length: { maximum: Constants::NAME_MAX_LENGTH } - enum assets_view_mode: { thumbnail: 0, list: 1, inline: 2 } + enum :assets_view_mode, { thumbnail: 0, list: 1, inline: 2 } belongs_to :user, inverse_of: :results belongs_to :last_modified_by, class_name: 'User', optional: true diff --git a/app/models/soft_locked_repository.rb b/app/models/soft_locked_repository.rb index 43e44c73d2..d74daf94ce 100644 --- a/app/models/soft_locked_repository.rb +++ b/app/models/soft_locked_repository.rb @@ -3,7 +3,7 @@ class SoftLockedRepository < Repository # this is for repositories only editable via API - enum permission_level: Extends::SHARED_OBJECTS_PERMISSION_LEVELS.except(:shared_write) + enum :permission_level, Extends::SHARED_OBJECTS_PERMISSION_LEVELS.except(:shared_write) def shareable_write? false diff --git a/app/models/step.rb b/app/models/step.rb index eb387f861f..6c9794a661 100644 --- a/app/models/step.rb +++ b/app/models/step.rb @@ -11,7 +11,7 @@ class Step < ApplicationRecord attr_accessor :skip_position_adjust # to be used in bulk deletion - enum assets_view_mode: { thumbnail: 0, list: 1, inline: 2 } + enum :assets_view_mode, { thumbnail: 0, list: 1, inline: 2 } auto_strip_attributes :name, :description, nullify: false validates :name, diff --git a/app/models/team_shared_object.rb b/app/models/team_shared_object.rb index 28404f2872..2d0b0bb6d6 100644 --- a/app/models/team_shared_object.rb +++ b/app/models/team_shared_object.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class TeamSharedObject < ApplicationRecord - enum permission_level: Extends::SHARED_OBJECTS_PERMISSION_LEVELS.except(:not_shared) + enum :permission_level, Extends::SHARED_OBJECTS_PERMISSION_LEVELS.except(:not_shared) belongs_to :team belongs_to :shared_object, polymorphic: true, inverse_of: :team_shared_objects diff --git a/app/models/webhook.rb b/app/models/webhook.rb index 4fc61105f9..aea0522a49 100644 --- a/app/models/webhook.rb +++ b/app/models/webhook.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class Webhook < ApplicationRecord - enum http_method: { get: 0, post: 1, patch: 2 } + enum :http_method, { get: 0, post: 1, patch: 2 } belongs_to :activity_filter validates :http_method, presence: true diff --git a/bin/ci b/bin/ci new file mode 100755 index 0000000000..4137ad5bb0 --- /dev/null +++ b/bin/ci @@ -0,0 +1,6 @@ +#!/usr/bin/env ruby +require_relative "../config/boot" +require "active_support/continuous_integration" + +CI = ActiveSupport::ContinuousIntegration +require_relative "../config/ci.rb" diff --git a/bin/dev b/bin/dev new file mode 100755 index 0000000000..5f91c20545 --- /dev/null +++ b/bin/dev @@ -0,0 +1,2 @@ +#!/usr/bin/env ruby +exec "./bin/rails", "server", *ARGV diff --git a/bin/rubocop b/bin/rubocop index 40330c0ff1..5a20504716 100755 --- a/bin/rubocop +++ b/bin/rubocop @@ -2,7 +2,7 @@ require "rubygems" require "bundler/setup" -# explicit rubocop config increases performance slightly while avoiding config confusion. +# Explicit RuboCop config increases performance slightly while avoiding config confusion. ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) load Gem.bin_path("rubocop", "rubocop") diff --git a/bin/setup b/bin/setup index 0c9ab5bb5f..81be011e87 100755 --- a/bin/setup +++ b/bin/setup @@ -2,7 +2,6 @@ require "fileutils" APP_ROOT = File.expand_path("..", __dir__) -APP_NAME = "scinote" def system!(*args) system(*args, exception: true) @@ -14,7 +13,6 @@ FileUtils.chdir APP_ROOT do # Add necessary setup steps to this file. puts "== Installing dependencies ==" - system! "gem install bundler --conservative" system("bundle check") || system!("bundle install") # puts "\n== Copying sample files ==" @@ -24,14 +22,14 @@ FileUtils.chdir APP_ROOT do puts "\n== Preparing database ==" system! "bin/rails db:prepare" + system! "bin/rails db:reset" if ARGV.include?("--reset") puts "\n== Removing old logs and tempfiles ==" system! "bin/rails log:clear tmp:clear" - puts "\n== Restarting application server ==" - system! "bin/rails restart" - - # puts "\n== Configuring puma-dev ==" - # system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}" - # system "curl -Is https://#{APP_NAME}.test/up | head -n 1" + unless ARGV.include?("--skip-server") + puts "\n== Starting development server ==" + STDOUT.flush # flush the output before exec(2) so that it displays + exec "bin/dev" + end end diff --git a/config/ci.rb b/config/ci.rb new file mode 100644 index 0000000000..99399939d0 --- /dev/null +++ b/config/ci.rb @@ -0,0 +1,19 @@ +# Run using bin/ci + +CI.run do + step "Setup", "bin/setup --skip-server" + + step "Style: Ruby", "bin/rubocop" + + step "Security: Importmap vulnerability audit", "bin/importmap audit" + step "Security: Brakeman code analysis", "bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error" + + + # Optional: set a green GitHub commit status to unblock PR merge. + # Requires the `gh` CLI and `gh extension install basecamp/gh-signoff`. + # if success? + # step "Signoff: All systems go. Ready for merge and deploy.", "gh signoff" + # else + # failure "Signoff: CI failed. Do not merge or deploy.", "Fix the issues and try again." + # end +end diff --git a/config/environments/development.rb b/config/environments/development.rb index 0554563392..79210e61c9 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -23,20 +23,20 @@ # Enable server timing. config.server_timing = true - # Enable/disable caching. By default caching is disabled. - # Run rails dev:cache to toggle caching. + # Enable/disable Action Controller caching. By default Action Controller caching is disabled. + # Run rails dev:cache to toggle Action Controller 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 = :memory_store - config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } + config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false - - config.cache_store = :null_store end + # Change to :null_store to avoid any caching. + config.cache_store = :memory_store + # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = ENV['ACTIVESTORAGE_SERVICE'] || :local @@ -49,19 +49,12 @@ # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false - # Disable caching for Action Mailer templates even if Action Controller - # caching is enabled. + # Make template changes take effect immediately. config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log - # 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 = [] - # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load @@ -71,14 +64,23 @@ # Highlight code that enqueued background job in logs. config.active_job.verbose_enqueue_logs = true + # Append comments with runtime information tags to SQL queries in logs. + config.active_record.query_log_tags_enabled = true + # Suppress logger output for asset requests. config.assets.quiet = true + # Highlight code that triggered redirect in logs. + config.action_dispatch.verbose_redirect_logs = true + # Raises error for missing translations. config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. - # config.action_view.annotate_rendered_view_with_filenames = true + 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 diff --git a/config/environments/production.rb b/config/environments/production.rb index a8eb18da7e..3f6c655dd0 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -6,16 +6,18 @@ # Code is not reloaded between requests. 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 - # and those relying on copy on write to perform better. - # Rake tasks automatically ignore this option for performance. + # Eager load code on boot for better performance and memory savings (ignored by Rake tasks). config.eager_load = ENV['RAILS_DISABLE_EAGER_LOAD'] != 'true' - # Full error reports are disabled and caching is turned on. + # Full error reports are disabled. config.consider_all_requests_local = false + + # Turn on fragment caching in view templates. config.action_controller.perform_caching = true + # Cache assets for far-future expiry since they are all digest stamped. + config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" } + Rails.application.routes.default_url_options = { host: ENV['WEB_SERVER_URL'] || ENV['MAIL_SERVER_URL'] } @@ -73,7 +75,6 @@ config.active_storage.service = ENV['ACTIVESTORAGE_SERVICE'] || :local # 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. @@ -83,23 +84,25 @@ # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } config.ssl_options = { redirect: { exclude: ->(request) { request.path =~ %r{api/health|status} } } } - # Log to STDOUT by default - config.logger = ActiveSupport::Logger.new(STDOUT) - .tap { |logger| logger.formatter = ::Logger::Formatter.new } - .then { |logger| ActiveSupport::TaggedLogging.new(logger) } + # Log to STDOUT with the current request id as a default log tag. + config.logger = ActiveSupport::TaggedLogging.logger(STDOUT) # 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". + # Change to "debug" to log everything (including potentially personally-identifiable information!). config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") - # Use a different cache store in production. + # Prevent health checks from clogging up the logs. + config.silence_healthcheck_path = "/up" + + # Don't log any deprecations. + config.active_support.report_deprecations = false + + # Replace the default in-process memory cache store with a durable alternative. # config.cache_store = :mem_cache_store - # Use a real queuing backend for Active Job (and separate queues per environment). + # Replace the default in-process and non-durable queuing backend for Active Job. # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "scinote_production" diff --git a/config/environments/test.rb b/config/environments/test.rb index 1e63074369..5b676cfa63 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,5 +1,3 @@ -require "active_support/core_ext/integer/time" - # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped @@ -17,13 +15,11 @@ # 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 - config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" } + # Configure public file server for tests with cache-control for performance. + config.public_file_server.headers = { "cache-control" => "public, max-age=3600" } - # Show full error reports and disable caching. + # Show full error reports. config.consider_all_requests_local = true - config.action_controller.perform_caching = false config.cache_store = :null_store # Render exception templates for rescuable exceptions and raise for other exceptions. @@ -35,16 +31,12 @@ # Store uploaded files on the local file system in a temporary directory. config.active_storage.service = :test - # Disable caching for Action Mailer templates even if Action Controller - # caching is enabled. - config.action_mailer.perform_caching = false - Rails.application.routes.default_url_options = { host: ENV['WEB_SERVER_URL'] || ENV['MAIL_SERVER_URL'] || 'localhost' } + # Set host to be used by links generated in mailer templates. config.action_mailer.default_url_options = { host: Rails.application.routes.default_url_options[:host] } - config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index eef6ad484b..e4fa4cdcfb 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -33,7 +33,11 @@ end # Set the nonce only to specific directives -Rails.application.config.content_security_policy_nonce_directives = %w(script-src) +Rails.application.config.content_security_policy_nonce_directives = %w(script-src style-src) + +# Automatically add `nonce` to `javascript_tag`, `javascript_include_tag`, and `stylesheet_link_tag` +# if the corresponding directives are specified in `content_security_policy_nonce_directives`. +Rails.application.config.content_security_policy_nonce_auto = true # Report CSP violations to a specified URI # For further information see the following documentation: diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb index 3b9603bfa4..0c5dd99ac6 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -1,26 +1,16 @@ # Be sure to restart your server when you modify this file. # Avoid CORS issues when API is called from the frontend app. -# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests. +# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin Ajax requests. # Read more: https://github.com/cyu/rack-cors -if ENV['SCINOTE_PWA_DOMAIN_NAME'].present? - Rails.application.config.middleware.insert_before 0, Rack::Cors do - allow do - origins ENV['SCINOTE_PWA_DOMAIN_NAME'] - - resource '/oauth/token', - headers: :any, - methods: %i(post) - - resource '/rails/active_storage/*', - headers: :any, - methods: %i(get post options head) - - resource '/api/*', - headers: :any, - methods: %i(get post put patch delete options head) - end - end -end +# Rails.application.config.middleware.insert_before 0, Rack::Cors do +# allow do +# origins "example.com" +# +# resource "*", +# headers: :any, +# methods: [:get, :post, :put, :patch, :delete, :options, :head] +# end +# end diff --git a/config/initializers/new_framework_defaults_8_1.rb b/config/initializers/new_framework_defaults_8_1.rb new file mode 100644 index 0000000000..8569b5b1c3 --- /dev/null +++ b/config/initializers/new_framework_defaults_8_1.rb @@ -0,0 +1,74 @@ +# Be sure to restart your server when you modify this file. +# +# This file eases your Rails 8.1 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 `8.1`. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. +# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html + +### +# Skips escaping HTML entities and line separators. When set to `false`, the +# JSON renderer no longer escapes these to improve performance. +# +# Example: +# class PostsController < ApplicationController +# def index +# render json: { key: "\u2028\u2029<>&" } +# end +# end +# +# Renders `{"key":"\u2028\u2029\u003c\u003e\u0026"}` with the previous default, but `{"key":" <>&"}` with the config +# set to `false`. +# +# Applications that want to keep the escaping behavior can set the config to `true`. +#++ +# Rails.configuration.action_controller.escape_json_responses = false + +### +# Skips escaping LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029) in JSON. +# +# Historically these characters were not valid inside JavaScript literal strings but that changed in ECMAScript 2019. +# As such it's no longer a concern in modern browsers: https://caniuse.com/mdn-javascript_builtins_json_json_superset. +#++ +# Rails.configuration.active_support.escape_js_separators_in_json = false + +### +# Raises an error when order dependent finder methods (e.g. `#first`, `#second`) are called without `order` values +# on the relation, and the model does not have any order columns (`implicit_order_column`, `query_constraints`, or +# `primary_key`) to fall back on. +# +# The current behavior of not raising an error has been deprecated, and this configuration option will be removed in +# Rails 8.2. +#++ +# Rails.configuration.active_record.raise_on_missing_required_finder_order_columns = true + +### +# Controls how Rails handles path relative URL redirects. +# When set to `:raise`, Rails will raise an `ActionController::Redirecting::UnsafeRedirectError` +# for relative URLs without a leading slash, which can help prevent open redirect vulnerabilities. +# +# Example: +# redirect_to "example.com" # Raises UnsafeRedirectError +# redirect_to "@attacker.com" # Raises UnsafeRedirectError +# redirect_to "/safe/path" # Works correctly +# +# Applications that want to allow these redirects can set the config to `:log` (previous default) +# to only log warnings, or `:notify` to send ActiveSupport notifications. +#++ +# Rails.configuration.action_controller.action_on_path_relative_redirect = :raise + +### +# Use a Ruby parser to track dependencies between Action View templates +#++ +# Rails.configuration.action_view.render_tracker = :ruby + +### +# When enabled, hidden inputs generated by `form_tag`, `token_tag`, `method_tag`, and the hidden parameter fields +# included in `button_to` forms will omit the `autocomplete="off"` attribute. +# +# Applications that want to keep generating the `autocomplete` attribute for those tags can set it to `false`. +#++ +# Rails.configuration.action_view.remove_hidden_field_autocomplete = true diff --git a/config/puma.rb b/config/puma.rb index 4c868c51c6..38c4b86596 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,13 +1,18 @@ # This configuration file will be evaluated by Puma. The top-level methods that # are invoked here are part of Puma's configuration DSL. For more information # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. - +# # Puma starts a configurable number of processes (workers) and each process # serves each request in a thread from an internal thread pool. # +# You can control the number of workers using ENV["WEB_CONCURRENCY"]. You +# should only set this value when you want to run 2 or more workers. The +# default is already 1. You can set it to `auto` to automatically start a worker +# for each available processor. +# # The ideal number of threads per worker depends both on how much time the # application spends waiting for IO operations and on how much you wish to -# to prioritize throughput over latency. +# prioritize throughput over latency. # # As a rule of thumb, increasing the number of threads will increase how much # traffic a given process can handle (throughput), but due to CRuby's @@ -20,9 +25,8 @@ # Any libraries that use a connection pool or another resource pool should # be configured to provide at least as many connections as the number of # threads. This includes Active Record's `pool` parameter in `database.yml`. -min_threads_count = ENV.fetch('RAILS_MIN_THREADS', 0) -max_threads_count = ENV.fetch('RAILS_MAX_THREADS', 5) -threads min_threads_count, max_threads_count +threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) +threads threads_count, threads_count # Specifies the `port` that Puma will listen on to receive requests; default is 3000. port ENV.fetch("PORT", 3000) @@ -30,6 +34,9 @@ # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart +# Run the Solid Queue supervisor inside of Puma for single-server deployments. +plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"] + # Specify the PID file. Defaults to tmp/pids/server.pid in development. # In other environments, only set the PID file if requested. pidfile ENV["PIDFILE"] if ENV["PIDFILE"] diff --git a/config/routes.rb b/config/routes.rb index 313763e3fd..fa4caeaf9b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -959,7 +959,7 @@ post 'repository_stock_value', to: 'repository_stock_values#create_or_update', as: 'update_repository_stock' end resources :repository_stock_values, only: %i(new create edit update) - resources :repository_cells, only: :hide_reminder do + resources :repository_cells, only: [] do post :hide_reminder, to: 'hidden_repository_cell_reminders#create' post :hide_reminders, to: 'hidden_repository_cell_reminders#create_all' end diff --git a/db/migrate/20210716124649_create_label_templates.rb b/db/migrate/20210716124649_create_label_templates.rb index c58b86ba7d..e92b0c8091 100644 --- a/db/migrate/20210716124649_create_label_templates.rb +++ b/db/migrate/20210716124649_create_label_templates.rb @@ -2,7 +2,7 @@ class CreateLabelTemplates < ActiveRecord::Migration[6.1] class LabelTemplate < ApplicationRecord - enum language_type: { zpl: 0 } + enum :language_type, { zpl: 0 } end def change diff --git a/db/migrate/20220516111152_add_team_level_permissions.rb b/db/migrate/20220516111152_add_team_level_permissions.rb index 22b3183d61..c2c5a8d197 100644 --- a/db/migrate/20220516111152_add_team_level_permissions.rb +++ b/db/migrate/20220516111152_add_team_level_permissions.rb @@ -8,7 +8,7 @@ class UserAssignment < ApplicationRecord belongs_to :user belongs_to :assigned_by, class_name: 'User', optional: true - enum assigned: { automatically: 0, manually: 1 }, _suffix: true + enum :assigned, { automatically: 0, manually: 1 }, _suffix: true validates :user, uniqueness: { scope: %i(assignable) } end diff --git a/db/migrate/20220624091046_migrate_shared_repositories_to_user_assignments.rb b/db/migrate/20220624091046_migrate_shared_repositories_to_user_assignments.rb index b77649ad6b..a8a32b2b85 100644 --- a/db/migrate/20220624091046_migrate_shared_repositories_to_user_assignments.rb +++ b/db/migrate/20220624091046_migrate_shared_repositories_to_user_assignments.rb @@ -3,7 +3,7 @@ class MigrateSharedRepositoriesToUserAssignments < ActiveRecord::Migration[6.1] class TeamRepository < ApplicationRecord self.table_name = 'team_repositories' - enum permission_level: { not_shared: 0, shared_read: 1, shared_write: 2 } + enum :permission_level, { not_shared: 0, shared_read: 1, shared_write: 2 } belongs_to :team belongs_to :repository end diff --git a/public/400.html b/public/400.html new file mode 100644 index 0000000000..640de03397 --- /dev/null +++ b/public/400.html @@ -0,0 +1,135 @@ + + + + +
+ +The server cannot process the request due to a client error. Please check the request and try again. If you're the application owner check the logs for more information.
+