diff --git a/.config/.rubocop.yml b/.config/.rubocop.yml index cc781ea1b..a3a2b6210 100644 --- a/.config/.rubocop.yml +++ b/.config/.rubocop.yml @@ -110,6 +110,9 @@ Style/MethodCallWithArgsParentheses: Style/RedundantReturn: AllowMultipleReturnValues: true +Style/SafeNavigationChainLength: + Max: 4 + Style/StringLiterals: EnforcedStyle: double_quotes diff --git a/.config/commands/deps.justfile b/.config/commands/deps.justfile new file mode 100644 index 000000000..fb7feed15 --- /dev/null +++ b/.config/commands/deps.justfile @@ -0,0 +1,22 @@ +[private] +help: + @just --list --justfile {{source_file()}} + +# Shows the Dependabot alerts on GitHub +alerts: + #!/usr/bin/env bash + xdg-open https://github.com/MaMpf-HD/mampf/security/dependabot + +# Updates the Bundler package manager itself (NOT the Ruby gems) +update-bundler: + bundle update --bundler + +# Updates Ruby gems +update-gems: + bundle update + +# Updates Node.js packages +update-nodejs: + # You may have to run this command beforehand: + # sudo chown your_user_name -R ./node_modules/ + yarn upgrade diff --git a/.justfile b/.justfile index db8231023..d0e002ea4 100644 --- a/.justfile +++ b/.justfile @@ -5,14 +5,17 @@ help: @just --list -# Test-related commands +# Commands to test the MaMpf codebase mod test ".config/commands/test.justfile" # see https://github.com/casey/just/issues/2216 # alias t := test -# Docker-related commands +# Commands to manage the docker containers mod docker ".config/commands/docker.justfile" +# Commands to manage dependencies +mod deps ".config/commands/deps.justfile" + # Some utils, e.g. ERD-generation etc. mod utils ".config/commands/utils.justfile" diff --git a/Gemfile.lock b/Gemfile.lock index 9cda0844b..4bd07aa0e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -90,7 +90,7 @@ GEM erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - active_model_serializers (0.10.14) + active_model_serializers (0.10.15) actionpack (>= 4.1) activemodel (>= 4.1) case_transform (>= 0.2) @@ -348,7 +348,7 @@ GEM mini_magick (4.13.2) mini_mime (1.1.5) minitest (5.25.2) - mobility (1.2.9) + mobility (1.3.1) i18n (>= 0.6.10, < 2) request_store (~> 1.0) msgpack (1.7.5) @@ -473,8 +473,8 @@ GEM psych (>= 4.0.0) redis-client (0.22.2) connection_pool - regexp_parser (2.9.2) - reline (0.5.11) + regexp_parser (2.9.3) + reline (0.5.12) io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) @@ -518,17 +518,17 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.1) - rubocop (1.68.0) + rubocop (1.69.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rubocop-ast (>= 1.32.2, < 2.0) + rubocop-ast (>= 1.36.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.36.1) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.36.2) parser (>= 3.3.1.0) rubocop-performance (1.23.0) rubocop (>= 1.48.1, < 2.0) @@ -636,7 +636,9 @@ GEM turbolinks-source (5.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.6.0) + unicode-display_width (3.1.2) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) warden (1.2.9) rack (>= 2.0.9) web-console (4.2.1) diff --git a/app/helpers/submissions_helper.rb b/app/helpers/submissions_helper.rb index 480418fd3..81b232ed1 100644 --- a/app/helpers/submissions_helper.rb +++ b/app/helpers/submissions_helper.rb @@ -39,7 +39,7 @@ def submission_color(submission, assignment) else return "bg-submission-darker-green" if submission&.correction - if submission&.manuscript && submission&.too_late? + if submission&.manuscript && submission.too_late? return "bg-submission-orange" if submission.accepted.nil? return "bg-submission-green" if submission.accepted @@ -58,7 +58,7 @@ def submission_status_icon(submission, assignment) else return "far fa-smile" if submission&.correction - if submission&.manuscript && submission&.too_late? + if submission&.manuscript && submission.too_late? return "fas fa-hourglass-start" if submission.accepted return "fas fa-exclamation-triangle" @@ -76,7 +76,7 @@ def submission_status_text(submission, assignment) else return t("submission.with_correction") if submission&.correction - if submission&.manuscript && submission&.too_late? + if submission&.manuscript && submission.too_late? return t("submission.too_late") if submission.accepted.nil? return t("submission.too_late_accepted") if submission.accepted diff --git a/app/views/media/_basics.html.erb b/app/views/media/_basics.html.erb index 2e6cdd877..773b09975 100644 --- a/app/views/media/_basics.html.erb +++ b/app/views/media/_basics.html.erb @@ -183,11 +183,11 @@