diff --git a/.gitattributes b/.gitattributes index d49e00b1b..8c9dcf505 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ * text eol=lf # Denote all files that are truly binary and should not be modified. +*.jpg binary *.png binary *.ico binary *.gif binary diff --git a/Gemfile b/Gemfile index 1e48694db..c97d4a8eb 100644 --- a/Gemfile +++ b/Gemfile @@ -1,10 +1,10 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '3.1.2' +ruby '3.1.4' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem "rails", "~> 7.0.2.3" +gem "rails", "~> 7.0.4.3" # Use dalli for caching to memcached in production gem "dalli", ">= 2.7" # Ruby wrapper for UglifyJS JavaScript compressor @@ -71,13 +71,11 @@ gem "acts_as_tree" gem "activerecord-import", git: "https://github.com/zdennis/activerecord-import.git", branch: "master" -gem "thredded", - git: "https://github.com/MaMpf-HD/thredded.git", - branch: "master" +gem "thredded" gem "kramdown-parser-gfm" gem "thredded-markdown_katex", - github: "thredded/thredded-markdown_katex", - branch: "master" + git: "https://github.com/thredded/thredded-markdown_katex.git", + branch: "main" gem "rails-i18n" gem "kaminari-i18n" gem "trix-rails", require: "trix" diff --git a/Gemfile.lock b/Gemfile.lock index 31672fe6e..20db4c33d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,36 +8,9 @@ GIT sprockets-rails will_paginate -GIT - remote: https://github.com/MaMpf-HD/thredded.git - revision: e41338d5dea7bb31a7d850bfcdd0a1ba552fd041 - branch: master - specs: - thredded (1.0.0) - active_record_union (>= 1.3.0) - autoprefixer-rails - db_text_search - friendly_id - html-pipeline (< 2.14.1) - htmlentities - inline_svg (>= 1.6.0) - kaminari - kramdown (>= 2.0.0) - kramdown-parser-gfm - nokogiri - onebox (>= 1.8.99) - pundit (>= 1.1.0) - rails (>= 4.2.10, != 6.0.0.rc2) - rails_gravatar - rinku - sanitize - sassc-rails (>= 2.0.0) - sprockets-es6 - timeago_js (>= 3.0.2.2) - GIT remote: https://github.com/rails/sprockets-rails - revision: 7137bb169839596b4a84b16173d021de5f988a1e + revision: 73e7351abff3506f6dca6b2da8abedfd5c7c0d77 branch: master specs: sprockets-rails (3.4.2) @@ -47,17 +20,17 @@ GIT GIT remote: https://github.com/sunspot/sunspot.git - revision: f2f01a6278030d086e0efb141dceefdcca8932bd + revision: 414a59413cb7333ba4b2cc7bc23a625c7a965e03 glob: sunspot_rails/*.gemspec specs: - sunspot_rails (2.5.0) + sunspot_rails (2.6.0) rails (>= 3) - sunspot (= 2.5.0) + sunspot (= 2.6.0) GIT remote: https://github.com/thredded/thredded-markdown_katex.git - revision: 051714990bde7ad25a136f4f4e75753803b98279 - branch: master + revision: e2830bdb40880018a0e59d2b82c94b0a9f237365 + branch: main specs: thredded-markdown_katex (1.0.0) katex (>= 0.4.3) @@ -65,60 +38,60 @@ GIT GIT remote: https://github.com/zdennis/activerecord-import.git - revision: 74ea5b1f2f6a9c1e958bff1e29eb46de32860735 + revision: 748309d1ae03fc1fe56d58e54c634a003408c706 branch: master specs: - activerecord-import (1.4.0) + activerecord-import (1.4.1) activerecord (>= 4.2) GEM remote: https://rubygems.org/ specs: Ascii85 (1.1.0) - RubyInline (3.12.5) + RubyInline (3.13.0) ZenTest (~> 4.3) ZenTest (4.12.1) - actioncable (7.0.2.4) - actionpack (= 7.0.2.4) - activesupport (= 7.0.2.4) + actioncable (7.0.4.3) + actionpack (= 7.0.4.3) + activesupport (= 7.0.4.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.2.4) - actionpack (= 7.0.2.4) - activejob (= 7.0.2.4) - activerecord (= 7.0.2.4) - activestorage (= 7.0.2.4) - activesupport (= 7.0.2.4) + actionmailbox (7.0.4.3) + actionpack (= 7.0.4.3) + activejob (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.2.4) - actionpack (= 7.0.2.4) - actionview (= 7.0.2.4) - activejob (= 7.0.2.4) - activesupport (= 7.0.2.4) + actionmailer (7.0.4.3) + actionpack (= 7.0.4.3) + actionview (= 7.0.4.3) + activejob (= 7.0.4.3) + activesupport (= 7.0.4.3) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.2.4) - actionview (= 7.0.2.4) - activesupport (= 7.0.2.4) + actionpack (7.0.4.3) + actionview (= 7.0.4.3) + activesupport (= 7.0.4.3) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.2.4) - actionpack (= 7.0.2.4) - activerecord (= 7.0.2.4) - activestorage (= 7.0.2.4) - activesupport (= 7.0.2.4) + actiontext (7.0.4.3) + actionpack (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.2.4) - activesupport (= 7.0.2.4) + actionview (7.0.4.3) + activesupport (= 7.0.4.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -130,69 +103,67 @@ GEM jsonapi-renderer (>= 0.1.1.beta1, < 0.3) active_record_union (1.3.0) activerecord (>= 4.0) - activejob (7.0.2.4) - activesupport (= 7.0.2.4) + activejob (7.0.4.3) + activesupport (= 7.0.4.3) globalid (>= 0.3.6) - activemodel (7.0.2.4) - activesupport (= 7.0.2.4) - activerecord (7.0.2.4) - activemodel (= 7.0.2.4) - activesupport (= 7.0.2.4) - activerecord-nulldb-adapter (0.8.0) + activemodel (7.0.4.3) + activesupport (= 7.0.4.3) + activerecord (7.0.4.3) + activemodel (= 7.0.4.3) + activesupport (= 7.0.4.3) + activerecord-nulldb-adapter (0.9.0) activerecord (>= 5.2.0, < 7.1) - activestorage (7.0.2.4) - actionpack (= 7.0.2.4) - activejob (= 7.0.2.4) - activerecord (= 7.0.2.4) - activesupport (= 7.0.2.4) + activestorage (7.0.4.3) + actionpack (= 7.0.4.3) + activejob (= 7.0.4.3) + activerecord (= 7.0.4.3) + activesupport (= 7.0.4.3) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.2.4) + activesupport (7.0.4.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - acts_as_list (1.0.4) + acts_as_list (1.1.0) activerecord (>= 4.2) acts_as_tree (2.9.1) activerecord (>= 3.0.0) - acts_as_votable (0.13.2) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + acts_as_votable (0.14.0) + addressable (2.8.2) + public_suffix (>= 2.0.2, < 6.0) afm (0.2.2) ast (2.4.2) - autoprefixer-rails (10.4.7.0) + autoprefixer-rails (10.4.13.0) execjs (~> 2) babel-source (5.8.35) babel-transpiler (0.7.0) babel-source (>= 4.0, < 6) execjs (~> 2.0) barby (0.6.8) - bcrypt (3.1.17) - better_html (1.0.16) - actionview (>= 4.0) - activesupport (>= 4.0) + bcrypt (3.1.18) + better_html (2.0.1) + actionview (>= 6.0) + activesupport (>= 6.0) ast (~> 2.0) erubi (~> 1.4) - html_tokenizer (~> 0.0.6) parser (>= 2.4) smart_properties bindex (0.8.1) - bootsnap (1.11.1) + bootsnap (1.16.0) msgpack (~> 1.2) - bootstrap (4.6.1) + bootstrap (4.6.2) autoprefixer-rails (>= 9.1.0) - popper_js (>= 1.14.3, < 2) + popper_js (>= 1.16.1, < 2) sassc-rails (>= 2.0.0) - bootstrap_form (5.0.0) + bootstrap_form (5.1.0) actionpack (>= 5.2) activemodel (>= 5.2) builder (3.2.4) byebug (11.1.3) - cancancan (3.3.0) + cancancan (3.5.0) case_transform (0.2) activesupport - childprocess (4.1.0) choice (0.2.0) chunky_png (1.4.0) clipboard-rails (1.7.1) @@ -203,8 +174,8 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.10) - connection_pool (2.2.5) + concurrent-ruby (1.2.2) + connection_pool (2.4.0) content_disposition (1.0.0) coveralls (0.7.1) multi_json (~> 1.3) @@ -213,20 +184,21 @@ GEM term-ansicolor thor crass (1.0.6) - css_parser (1.11.0) + css_parser (1.14.0) addressable - cypress-on-rails (1.12.1) + cypress-on-rails (1.13.1) rack - dalli (3.2.1) - database_cleaner (2.0.1) - database_cleaner-active_record (~> 2.0.0) - database_cleaner-active_record (2.0.1) + dalli (3.2.4) + database_cleaner (2.0.2) + database_cleaner-active_record (>= 2, < 3) + database_cleaner-active_record (2.1.0) activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) + date (3.3.3) db_text_search (1.0.0) activerecord (>= 4.1.15) - devise (4.8.1) + devise (4.9.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -234,21 +206,19 @@ GEM warden (~> 1.2.3) devise-bootstrap-views (1.1.0) diff-lcs (1.5.0) - digest (3.1.0) docile (1.4.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - down (5.3.1) + down (5.4.0) addressable (~> 2.8) - erb_lint (0.1.1) + erb_lint (0.4.0) activesupport - better_html (~> 1.0.7) - html_tokenizer + better_html (>= 2.0.1) parser (>= 2.7.1.4) rainbow rubocop smart_properties - erubi (1.10.0) + erubi (1.12.0) erubis (2.7.0) et-orbi (1.2.7) tzinfo @@ -262,9 +232,9 @@ GEM factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faker (2.20.0) + faker (3.1.1) i18n (>= 1.8.11, < 2) - faraday (1.10.0) + faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -280,8 +250,8 @@ GEM faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.3) - multipart-post (>= 1.2, < 3) + faraday-multipart (1.0.4) + multipart-post (~> 2) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) @@ -290,44 +260,42 @@ GEM fastimage (2.2.6) ffi (1.15.5) filesize (0.2.0) - friendly_id (5.4.2) + friendly_id (5.5.0) activerecord (>= 4.0.0) - fugit (1.5.3) + fugit (1.8.1) et-orbi (~> 1, >= 1.2.7) raabro (~> 1.4) fuzzy-string-match (1.0.1) RubyInline (>= 3.8.6) - generator (0.0.1) - globalid (1.0.0) + globalid (1.1.0) activesupport (>= 5.0) - globalize (6.1.0) + globalize (6.2.1) activemodel (>= 4.2, < 7.1) activerecord (>= 4.2, < 7.1) request_store (~> 1.0) globalize-accessors (0.3.0) globalize (>= 5.0.0) hashery (2.1.2) - highline (2.0.3) - html-pipeline (2.14.0) + highline (2.1.0) + html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) - html_tokenizer (0.0.7) htmlentities (4.3.4) http-accept (1.7.0) - http-cookie (1.0.4) + http-cookie (1.0.5) domain_name (~> 0.5) - i18n (1.10.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) - inline_svg (1.8.0) + inline_svg (1.9.0) activesupport (>= 3.0) nokogiri (>= 1.6) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - jquery-rails (4.4.0) + jquery-rails (4.5.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) @@ -361,46 +329,43 @@ GEM kramdown (~> 2.0) kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - launchy (2.5.0) - addressable (~> 2.7) - lazy_priority_queue (0.1.1) + launchy (2.5.2) + addressable (~> 2.8) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - loofah (2.18.0) + loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.1) + mail (2.8.1) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp marcel (1.0.2) method_source (1.0.0) mime-types (3.4.1) mime-types-data (~> 3.2015) - mime-types-data (3.2022.0105) - mini_magick (4.11.0) + mime-types-data (3.2023.0218.1) + mini_magick (4.12.0) mini_mime (1.1.2) - minitest (5.15.0) - msgpack (1.5.1) + minitest (5.18.0) + msgpack (1.7.0) multi_json (1.15.0) - multipart-post (2.1.1) + multipart-post (2.3.0) mustache (1.1.1) - net-imap (0.2.3) - digest + net-imap (0.3.4) + date net-protocol - strscan - net-pop (0.1.1) - digest + net-pop (0.1.2) net-protocol + net-protocol (0.2.1) timeout - net-protocol (0.1.3) - timeout - net-smtp (0.3.1) - digest + net-smtp (0.3.3) net-protocol - timeout netrc (0.11.0) nio4r (2.5.8) - nokogiri (1.13.6-x86_64-linux) + nokogiri (1.14.2-x86_64-linux) racc (~> 1.4) onebox (2.2.19) addressable (~> 2.8.0) @@ -411,125 +376,129 @@ GEM sanitize options (2.3.2) orm_adapter (0.5.0) + pairing_heap (3.0.0) parallel (1.22.1) - parser (3.1.2.0) + parser (3.2.2.0) ast (~> 2.4.1) - pdf-reader (2.10.0) + pdf-reader (2.11.0) Ascii85 (~> 1.0) afm (~> 0.2.1) hashery (~> 2.0) ruby-rc4 ttfunk - pg (1.3.5) + pg (1.4.6) pgreset (0.3) - popper_js (1.16.0) + popper_js (1.16.1) pr_geohash (1.0.0) - premailer (1.16.0) + premailer (1.21.0) addressable - css_parser (>= 1.6.0) + css_parser (>= 1.12.0) htmlentities (>= 4.0.0) - premailer-rails (1.11.1) + premailer-rails (1.12.0) actionmailer (>= 3) + net-smtp premailer (~> 1.7, >= 1.7.9) progress_bar (1.3.3) highline (>= 1.6, < 3) options (~> 2.3.0) - prometheus_exporter (2.0.2) + prometheus_exporter (2.0.8) webrick - public_suffix (4.0.7) + public_suffix (5.0.1) puma (4.3.12) nio4r (~> 2.0) - pundit (2.2.0) + pundit (2.3.0) activesupport (>= 3.0.0) raabro (1.4.0) - racc (1.6.0) - rack (2.2.3) - rack-proxy (0.7.2) + racc (1.6.2) + rack (2.2.6.4) + rack-proxy (0.7.6) rack - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (7.0.2.4) - actioncable (= 7.0.2.4) - actionmailbox (= 7.0.2.4) - actionmailer (= 7.0.2.4) - actionpack (= 7.0.2.4) - actiontext (= 7.0.2.4) - actionview (= 7.0.2.4) - activejob (= 7.0.2.4) - activemodel (= 7.0.2.4) - activerecord (= 7.0.2.4) - activestorage (= 7.0.2.4) - activesupport (= 7.0.2.4) + rack-test (2.1.0) + rack (>= 1.3) + rails (7.0.4.3) + actioncable (= 7.0.4.3) + actionmailbox (= 7.0.4.3) + actionmailer (= 7.0.4.3) + actionpack (= 7.0.4.3) + actiontext (= 7.0.4.3) + actionview (= 7.0.4.3) + activejob (= 7.0.4.3) + activemodel (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) bundler (>= 1.15.0) - railties (= 7.0.2.4) + railties (= 7.0.4.3) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-erd (1.6.1) + rails-erd (1.7.2) activerecord (>= 4.2) activesupport (>= 4.2) choice (~> 0.2.0) ruby-graphviz (~> 1.2) - rails-html-sanitizer (1.4.2) - loofah (~> 2.3) - rails-i18n (7.0.3) + rails-html-sanitizer (1.5.0) + loofah (~> 2.19, >= 2.19.1) + rails-i18n (7.0.6) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) rails_gravatar (1.0.4) actionview - railties (7.0.2.4) - actionpack (= 7.0.2.4) - activesupport (= 7.0.2.4) + railties (7.0.4.3) + actionpack (= 7.0.4.3) + activesupport (= 7.0.4.3) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) - rb-fsevent (0.11.1) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - redis (4.6.0) - regexp_parser (2.4.0) + redis-client (0.14.1) + connection_pool + regexp_parser (2.7.0) request_store (1.5.1) rack (>= 1.4) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) + responders (3.1.0) + actionpack (>= 5.2) + railties (>= 5.2) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) rexml (3.2.5) - rgl (0.5.7) - lazy_priority_queue (~> 0.1.0) + rgl (0.6.2) + pairing_heap (>= 0.3.0) + rexml (~> 3.2, >= 3.2.4) stream (~> 0.5.3) rinku (2.0.6) - rqrcode (2.1.1) + rqrcode (2.1.2) chunky_png (~> 1.0) rqrcode_core (~> 1.0) rqrcode_core (1.2.0) rsolr (2.5.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rspec-core (3.12.1) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-mocks (3.11.1) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-rails (5.1.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - railties (>= 5.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) - rspec-support (3.11.0) + rspec-support (~> 3.12.0) + rspec-rails (6.0.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.11) + rspec-expectations (~> 3.11) + rspec-mocks (~> 3.11) + rspec-support (~> 3.11) + rspec-support (3.12.0) rubocop (0.93.1) parallel (~> 1.10) parser (>= 2.7.1.5) @@ -539,8 +508,8 @@ GEM rubocop-ast (>= 0.6.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.17.0) - parser (>= 3.1.1.0) + rubocop-ast (1.28.0) + parser (>= 3.2.1.0) rubocop-packaging (0.5.1) rubocop (>= 0.89, < 2.0) rubocop-performance (1.10.2) @@ -552,13 +521,13 @@ GEM rubocop (>= 0.90.0, < 2.0) ruby-graphviz (1.2.5) rexml - ruby-progressbar (1.11.0) + ruby-progressbar (1.13.0) ruby-rc4 (0.1.5) ruby-vips (2.1.4) ffi (~> 1.12) ruby2_keywords (0.0.5) rubyzip (2.3.2) - sanitize (6.0.0) + sanitize (6.0.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) sass-rails (6.0.0) @@ -571,22 +540,24 @@ GEM sprockets (> 3.0) sprockets-rails tilt - selenium-webdriver (4.1.0) - childprocess (>= 0.5, < 5.0) + selenium-webdriver (4.8.6) rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) semantic_range (3.0.0) shrine (3.4.0) content_disposition (~> 1.0) down (~> 5.1) - sidekiq (6.4.2) - connection_pool (>= 2.2.2) - rack (~> 2.0) - redis (>= 4.2.0) - sidekiq-cron (1.4.0) - fugit (~> 1) - sidekiq (>= 4.2.1) - simplecov (0.21.2) + sidekiq (7.0.7) + concurrent-ruby (< 2) + connection_pool (>= 2.3.0) + rack (>= 2.2.4) + redis-client (>= 0.11.0) + sidekiq-cron (1.10.0) + fugit (~> 1.8) + globalid (>= 1.0.1) + sidekiq (>= 6) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) @@ -600,31 +571,50 @@ GEM spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - sprockets (4.0.3) + sprockets (4.2.0) concurrent-ruby (~> 1.0) - rack (> 1, < 3) + rack (>= 2.2.4, < 4) sprockets-es6 (0.9.2) babel-source (>= 5.8.11) babel-transpiler sprockets (>= 3.0.0) - sqlite3 (1.4.2) - stream (0.5.3) - generator + sqlite3 (1.6.2-x86_64-linux) + stream (0.5.5) streamio-ffmpeg (3.0.2) multi_json (~> 1.8) - strscan (3.0.3) - sunspot (2.5.0) + sunspot (2.6.0) pr_geohash (~> 1.0) rsolr (>= 1.1.1, < 3) - sunspot_solr (2.5.0) + sunspot_solr (2.6.0) sync (0.5.0) term-ansicolor (1.7.1) tins (~> 1.0) thor (1.2.1) - tilt (2.0.10) + thredded (1.1.0) + active_record_union (>= 1.3.0) + autoprefixer-rails + db_text_search + friendly_id + html-pipeline (>= 2.14.1) + htmlentities + inline_svg (>= 1.6.0) + kaminari + kramdown (>= 2.0.0) + kramdown-parser-gfm + nokogiri + onebox (>= 1.8.99) + pundit (>= 1.1.0) + rails (> 6.0.0.rc2) + rails_gravatar + rinku + sanitize + sassc-rails (>= 2.0.0) + sprockets-es6 + timeago_js (>= 3.0.2.2) + tilt (2.1.0) timeago_js (3.0.2.2) - timeout (0.2.0) - tins (1.31.1) + timeout (0.3.2) + tins (1.32.1) sync trix-rails (2.4.0) rails (> 4.1) @@ -632,13 +622,13 @@ GEM 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) unf (0.1.4) unf_ext - unf_ext (0.0.8.1) + unf_ext (0.0.8.2) unicode-display_width (1.8.0) warden (1.2.9) rack (>= 2.0.9) @@ -647,21 +637,22 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webdrivers (5.0.0) + webdrivers (5.2.0) nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0) - webpacker (5.4.3) + webpacker (5.4.4) activesupport (>= 5.2) rack-proxy (>= 0.6.1) railties (>= 5.2) semantic_range (>= 2.3.0) - webrick (1.7.0) + webrick (1.8.1) + websocket (1.2.9) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) will_paginate (3.3.1) - zeitwerk (2.5.4) + zeitwerk (2.6.7) PLATFORMS x86_64-linux @@ -720,7 +711,7 @@ DEPENDENCIES prometheus_exporter puma (~> 4.1) rack - rails (~> 7.0.2.3) + rails (~> 7.0.4.3) rails-erd rails-i18n responders @@ -746,7 +737,7 @@ DEPENDENCIES streamio-ffmpeg sunspot_rails! sunspot_solr - thredded! + thredded thredded-markdown_katex! trix-rails turbolinks (~> 5) @@ -756,7 +747,7 @@ DEPENDENCIES webpacker (~> 5.x) RUBY VERSION - ruby 3.1.2p20 + ruby 3.1.4p223 BUNDLED WITH 2.3.13 diff --git a/INSTALL.md b/INSTALL.md index 5f8cee666..f495db02f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,27 +1,25 @@ -## Installation (with docker-compose) +## Installation (with docker compose) -To simply try out mampf you can use `docker-compose` ([needs docker](https://docs.docker.com/engine/install/ubuntu/) && `apt install docker-compose`). Simply clone the mampf repository and run docker-compose by executing +To simply try out mampf you can use `docker compose` (needs [Docker](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/)). Simply clone the MaMpf repository and run docker compose by executing ``` $ git clone -b main --recursive https://github.com/MaMpf-HD/mampf.git - $ cd mampf/docker/development/ -# docker-compose up +# docker compose up ``` -NOTE: Please make sure to clone recursively as the pdf compression feature is in an extra repository. -If you have an already checked out version simply run: +NOTE: Please make sure to clone recursively as the pdf compression feature is in a separate repository. -```sh -git submodule init -git submodule update +If you have an already checked out version simply run: +``` +git submodule update --init ``` You now have the following things ready: -* The MaMpf server on localhost:3000 -* The mailcatcher service on localhost:1080 -* The webinterface for ApacheSolr on localhost:8983 +* The MaMpf server on [localhost:3000](http://localhost:3000/) +* The mailcatcher service on [localhost:1080](http://localhost:1080/) +* The webinterface for ApacheSolr on [localhost:8983](http://localhost:8983/) * A test mailserver instance on Ports 1025, 10143, 10993 -* A webpacker dev server on localhost:3035 +* A webpacker dev server on [localhost:3035](http://localhost:3035/) ### Database setup @@ -38,7 +36,7 @@ After setting up everything you can call the MaMpf Server on here and extract the .zip file into the `public/` folder of your project directory. @@ -65,22 +63,22 @@ all assets have to provided. 2. visit the mailcatcher webinterface and confirm your account 3. make your account admin ``` - # docker-compose exec mampf rails r "User.first.update(admin: true)" + # docker compose exec mampf rails r "User.first.update(admin: true)" ``` 4. There you go :tada: -### Common docker-compose commands +### Common docker compose commands -A few common commands for `docker-compose` are: +A few common commands for `docker compose` are: | command | action | | ---------------------------------- | -------------------------------------------------------------- | -| `docker-compose up` | runs the mampf stack | -| `docker-compose up -d` | runs the mampf stack in the background | -| `docker-compose logs -f` | shows you continuous logs from the container | -| `docker-compose down` | deletes all the created containers | -| `docker-compose down --volumes` | deletes all the associated containers and volumes (full reset) | -| `docker-compose exec mampf ` | run an executable in the container | +| `docker compose up` | runs the mampf stack | +| `docker compose up -d` | runs the mampf stack in the background | +| `docker compose logs -f` | shows you continuous logs from the container | +| `docker compose down` | deletes all the created containers | +| `docker compose down --volumes` | deletes all the associated containers and volumes (full reset) | +| `docker compose exec mampf ` | run an executable in the container | If you installed docker compose as a plugin to docker these commands are instead prefixed with `docker compose` (note the space). @@ -95,14 +93,14 @@ createdb -O mampf mampf ``` 2. Create an environment file based on the example in docker/production/docker.env 3. Create a docker-compose file based on docker/production/docker-compose.production.yml . We recommend serving upload caches, submissions and media files by a separate server. They communicate with Mampf using NFS as Docker volumes. See the example options in the sample file. - 4. Launch MaMpf using `docker-compose up -d` - 5. (Optional) Scale MaMpf horizontally by spawning more workers `docker-compose scale worker=5` + 4. Launch MaMpf using `docker compose up -d` + 5. (Optional) Scale MaMpf horizontally by spawning more workers `docker compose scale worker=5` Now you can access *mampf* via `http://localhost:$OUTSIDEPORT`. Use the GUI to register your future admin user. Open a rails console inside the docker container. ``` -docker-compose exec master rails c +docker compose exec master rails c ``` Give admin rights to this user: ``` diff --git a/README.md b/README.md index 3275bd273..3cb0c5187 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,13 @@ -# README +

+ -## About +

MaMpf

+

Mathematische Medienplattform

+

-MaMpf (*Mathematische Medienplattform*) is an innovative open source E-Learning platform for the mathematical sciences. +## 💡 About + +**MaMpf (*Mathematische Medienplattform*)** is an innovative open source E-Learning platform for the mathematical sciences. Central point is the interconnection between different content in the sense of a hypermedia system. @@ -46,18 +51,19 @@ There you can also find a [screenshot gallery](https://mampfdev.wordpress.com/ga MaMpf is implemented in Ruby on Rails. -* Ruby version: 3.0.3 -* Rails Version: 7.0.2.3 +* Ruby version: 3.1.4 +* Rails Version: 7.0.4.3 * Test suite: rspec, cypress * support for I18n -## Installation (with docker-compose) +## 💻 Installation (with docker compose) + +To easily try out MaMpf you can use `docker compose`. Clone the MaMpf repository and run `docker compose`: -To simply try out mampf you can use docker-compose. Simply clone the mampf repository and run docker-compose by executing ``` -git clone -b main --recursive git@github.com:fosterfarrell9/mampf.git +git clone -b main --recursive https://github.com/MaMpf-HD/mampf.git cd mampf/docker/development/ -docker-compose up +docker compose up ``` -For more information about that visit [INSTALL.md](./INSTALL.md). +See the full installation guide [here](./INSTALL.md). diff --git a/app/assets/images/MaMpf-Logo.svg b/app/assets/images/MaMpf-Logo.svg new file mode 100644 index 000000000..1dc830fd5 --- /dev/null +++ b/app/assets/images/MaMpf-Logo.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/app/assets/images/landing-background.jpg b/app/assets/images/landing-background.jpg new file mode 100644 index 000000000..8824cdb2d Binary files /dev/null and b/app/assets/images/landing-background.jpg differ diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 47d354a08..ec1a92641 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -292,4 +292,8 @@ table.submission-table-bordered td { direction: ltr; -webkit-font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; +} + +#main-content-row { + min-width: 100%; } \ No newline at end of file diff --git a/app/assets/stylesheets/landing.scss b/app/assets/stylesheets/landing.scss new file mode 100644 index 000000000..bbd6373b5 --- /dev/null +++ b/app/assets/stylesheets/landing.scss @@ -0,0 +1,92 @@ +@import "bootstrap/functions"; +@import "bootstrap/variables"; +@import "bootstrap/mixins"; + +.landing-box { + background-color: white; + max-width: 1100px; + width: 100%; + border-radius: 8px; + box-shadow: 1px 4px 7px rgba(0, 0, 0, 0.13); + + @include media-breakpoint-down(sm) { + border-radius: 0; + } +} + +#signin-box { + padding: 70px 40px; +} + +#announcement-box { + display: flex; + align-items: baseline; + margin-bottom: 20px; + padding: 15px; + background-color: rgba(255, 255, 255, 0.96); +} + +#language-switch { + position: absolute; + top: 0; + right: 0; + padding: 10px 20px; + font-size: 1.2rem; + background-color: #00243db8; + border-radius: 0 8px; + box-shadow: inset 1px 4px 5px rgba(0, 0, 0, 0.03); + + a { + color: white; + font-size: medium; + } + + @include media-breakpoint-down(sm) { + border-radius: 0; + } +} + +#landing-body { + background-image: image-url('landing-background.jpg'); + background-size: cover; +} + +.ul-no-indentation { + padding-left: 1.1rem; +} + +#mampf-logo { + width: 100px; +} + +#login-form { + margin-top: 20px; +} + +#logo-area { + color: inherit; + text-decoration: none; +} + +#github-corner-svg { + filter: drop-shadow(1px 4px 7px rgba(0, 0, 0, 0.13)); + + @include media-breakpoint-down(sm) { + opacity: 0.4; + } +} + +.remember-me-box { + white-space: nowrap; +} + +#user_remember_me { + vertical-align: top; + position: relative; + top: 6px; +} + +#remember-me-text { + white-space: normal; + display: contents; +} \ No newline at end of file diff --git a/app/assets/stylesheets/navbar.scss b/app/assets/stylesheets/navbar.scss new file mode 100644 index 000000000..282060bcf --- /dev/null +++ b/app/assets/stylesheets/navbar.scss @@ -0,0 +1,43 @@ +.navbars-container { + background: linear-gradient(110deg, #223e62 0%, #405d75 100%); +} + +#mampfbrand { + color: white; + font-weight: bold; + filter: drop-shadow(1px 4px 7px rgba(0, 0, 0, 0.2)); +} + +#mampf-logo { + width: 35px; +} + +.navbar-nav a { + filter: drop-shadow(1px 4px 7px rgba(0, 0, 0, 0.2)); +} + +.navbar { + box-shadow: 1px 4px 7px -2px rgba(0, 0, 0, 0.1); + z-index: 1000; // place navbar and its shadow on top of everything +} + +#navbar-buttons a { + text-decoration: none; + font-size: 1.35rem; + padding: 0 9px; + color: white; + + &::after { + &.active-item { + content: "\2022"; + font-size: 1rem; + position: absolute; + top: 21px; + left: 16px; + } + } +} + +.new-comment { + color: #ffc107 !important; +} \ No newline at end of file diff --git a/app/assets/stylesheets/sidebar.scss b/app/assets/stylesheets/sidebar.scss new file mode 100644 index 000000000..9b9ccc91c --- /dev/null +++ b/app/assets/stylesheets/sidebar.scss @@ -0,0 +1,47 @@ +.sidebar-item { + margin: 3px 0; + border-radius: 10px; + padding: 0; + + a { + display: block; + color: rgb(85, 85, 85); + text-decoration: none; + padding: 8px 6px; + } + + &:hover { + border-radius: 8px; + background-color: #EBF0FE; + } +} + +#sidebar-container { + height: fit-content; + padding: 1rem 0.8rem; + background-color: white; + box-shadow: 5px 6px 9px -6px #00000054; + border-radius: 0 0 10px 0; + + .active-item { + background-color: #EBF0FE; + + a { + color: #4E6ED9; + font-weight: 500; + } + } +} + +li { + display: flex; + align-items: center; + + i { + padding: 0.25rem; + } +} + +.nav-link.disabled a { + color: #cacaca; +} \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 432c32052..c88cfef2e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -283,4 +283,36 @@ def first_course_independent? .natural_sort_by(&:title) &.first&.term_independent end + + def get_announcements + return Announcement.active_on_main.pluck(:details).join + end + + # Navbar items styling based on which page we are on + # https://gist.github.com/mynameispj/5692162 + $active_css_class = "active-item" + + def get_class_for_project(project) + return request.params['project'] == project ? $active_css_class : '' + end + + def get_class_for_path(path) + return request.path == path ? $active_css_class : '' + end + + def get_class_for_path_startswith(path) + return request.path.starts_with?(path) ? $active_css_class : '' + end + + def get_class_for_any_path(paths) + return paths.include?(request.path) ? $active_css_class : '' + end + + def get_class_for_any_path_startswith(paths) + if paths.any? { |path| request.path.starts_with?(path) } + return $active_css_class + end + return '' + end + end diff --git a/app/models/announcement.rb b/app/models/announcement.rb index 74ea23326..43d7bc56e 100644 --- a/app/models/announcement.rb +++ b/app/models/announcement.rb @@ -8,6 +8,8 @@ class Announcement < ApplicationRecord paginates_per 10 + scope :active_on_main, -> { where(on_main_page: true, lecture:nil) } + # does there (still) exist a notification for the announcement for # the given user def active?(user) diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index e1035f14e..92704e649 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb @@ -14,7 +14,7 @@
- <%= f.submit t('.resend_confirmation_instructions', + <%= f.submit t('.resend', default: 'Resend confirmation instructions'), class: 'btn btn-primary' %>
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index b007a5b44..8da75eb5b 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -19,7 +19,7 @@ <%= f.label :password_confirmation, t('.password_confirm') %> <%= f.password_field :password_confirmation, class: 'form-control' %> -
+
<%= f.check_box :consents, id: 'dsgvo-consent', data: { noconsent: t('profile.no_consent') } %> @@ -27,7 +27,7 @@ t('.consent_html', policy: link_to(t('.policy'), 'https://www.uni-heidelberg.de/datenschutzerklaerung_web.html', - target: :_blank)) %> + target: :_blank)), class: "d-inline", for: "dsgvo-consent" %>
<%= f.hidden_field :locale, value: I18n.locale %> <% if ENV['USE_CAPTCHA_SERVICE']%> diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 98192e48a..e8381fc1a 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -17,11 +17,9 @@
<% if devise_mapping.rememberable? %> -
- <%= f.label :remember_me, class: 'form-check-label' do %> - <%= f.check_box :remember_me, class: 'form-check-input' %> - <%= t('.remember') %> - <% end %> +
+ <%= f.check_box :remember_me %> + <%= f.label :remember_me, t('.remember'), id: 'remember-me-text' %>
<% end %> diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb index c59315b42..ac3c0b8a2 100644 --- a/app/views/layouts/_head.html.erb +++ b/app/views/layouts/_head.html.erb @@ -13,6 +13,7 @@ href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous"> + <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>