diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index 68a521df..bd9f8856 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -150,7 +150,7 @@ jobs: env: ${{ needs.metadata.outputs.stage }} - name: Deploy - uses: appleboy/ssh-action@25ce8cbbcb08177468c7ff7ec5cbfa236f9341e1 # v1.1.0 + uses: appleboy/ssh-action@7eaf76671a0d7eec5d98ee897acda4f968735a17 # v1.2.0 env: STAGE: ${{ needs.metadata.outputs.stage }} with: diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 1c37eafe..7d18e0a6 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -128,14 +128,14 @@ jobs: - name: Upload coverage report to Codecov if: ${{ !cancelled() }} - uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 + uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7 with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - name: Upload coverage report artifact if: ${{ !cancelled() }} - uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: coverage path: coverage/ diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index da946c77..11ac7bb1 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -64,7 +64,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push image - uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: push: true context: . diff --git a/Gemfile b/Gemfile index c05a2892..3d9c3724 100644 --- a/Gemfile +++ b/Gemfile @@ -3,48 +3,48 @@ source 'https://rubygems.org' gem 'active_model_otp', git: 'https://github.com/heapsource/active_model_otp.git', ref: '6ed9927' gem 'dav4rack', git: 'https://github.com/csvalpha/dav4rack.git', ref: '8541e53' -gem 'bcrypt', '~> 3.1' -gem 'bootsnap', '~> 1.4' +gem 'bcrypt', '~> 3.1', '>= 3.1.20' +gem 'bootsnap', '~> 1.18', '>= 1.18.4' gem 'carrierwave', '~> 2.1' -gem 'carrierwave-base64', '~> 2.5' -gem 'carrierwave-bombshelter', '~> 0.2' +gem 'carrierwave-base64', '~> 2.11' +gem 'carrierwave-bombshelter', '~> 0.2', '>= 0.2.2' gem 'case_transform', '~> 0.2' -gem 'counter_culture', '~> 3.0' +gem 'counter_culture', '~> 3.8', '>= 3.8.2' gem 'dav4rack_ext', '~> 1.0' gem 'doorkeeper', '~> 5.2' -gem 'doorkeeper-i18n', '~> 5.2' -gem 'exifr', '~> 1.3' -gem 'friendly_id', '~> 5.2' -gem 'http', '~> 5.0' -gem 'iban-tools', '~> 1.1.0' -gem 'icalendar', '~> 2.4' +gem 'doorkeeper-i18n', '~> 5.2', '>= 5.2.7' +gem 'exifr', '~> 1.4' +gem 'friendly_id', '~> 5.5', '>= 5.5.1' +gem 'http', '~> 5.2' +gem 'iban-tools', '~> 1.2.1' +gem 'icalendar', '~> 2.10', '>= 2.10.3' gem 'improvmx', '~> 0.2.1' -gem 'isbn_validation', '~> 1.2' -gem 'jsonapi-authorization', '~> 3.0' -gem 'jsonapi-resources', '~> 0.9.1.beta2' -gem 'message_bus', '~> 4.0' -gem 'mini_magick', '~> 4.6' +gem 'isbn_validation', '~> 1.2', '>= 1.2.2' +gem 'jsonapi-authorization', '~> 3.0', '>= 3.0.2' +gem 'jsonapi-resources', '~> 0.9.1' +gem 'message_bus', '~> 4.3', '>= 4.3.8' +gem 'mini_magick', '~> 4.13', '>= 4.13.2' gem 'paper_trail', '~> 14.0' gem 'paranoia', '~> 3.0' -gem 'pg', '~> 1.0' +gem 'pg', '~> 1.5', '>= 1.5.9' gem 'phonelib' gem 'puma', '~> 6.0' -gem 'pundit', '~> 2.0' -gem 'rack-attack', '~> 6.0' -gem 'rack-cors', '~> 2.0', '>= 2.0.1', require: 'rack/cors' +gem 'pundit', '~> 2.4' +gem 'rack-attack', '~> 6.7' +gem 'rack-cors', '~> 2.0', '>= 2.0.2', require: 'rack/cors' gem 'rails', '~> 7.0', '>= 7.0.4.3' -gem 'rails-i18n', '~> 7.0' -gem 'redis', '~> 4.0' -gem 'roo', '~> 2.9' -gem 'ruby-filemagic', '~> 0.7' -gem 'rubyzip', '~> 2.0' -gem 'sentry-raven', '~> 3.0' -gem 'sepa_king', '~> 0.11' -gem 'sidekiq', '~> 6.0' -gem 'sidekiq-scheduler', '~> 5.0', '>= 5.0.2' -gem 'slack-notifier', '~> 2.0' +gem 'rails-i18n', '~> 7.0', '>= 7.0.10' +gem 'redis', '~> 4.8', '>= 4.8.1' +gem 'roo', '~> 2.10', '>= 2.10.1' +gem 'ruby-filemagic', '~> 0.7', '>= 0.7.3' +gem 'rubyzip', '~> 2.3', '>= 2.3.2' +gem 'sentry-raven', '~> 3.1', '>= 3.1.2' +gem 'sepa_king', '~> 0.14' +gem 'sidekiq', '~> 6.5', '>= 6.5.12' +gem 'sidekiq-scheduler', '~> 5.0', '>= 5.0.6' +gem 'slack-notifier', '~> 2.4' gem 'validates_timeliness', '~> 7.0.0.beta2' -gem 'vpim', '~> 13.11' +gem 'vpim', '~> 24.2', '>= 24.2.20' group :development, :test do gem 'awesome_print' @@ -54,7 +54,7 @@ group :development, :test do gem 'consistency_fail' gem 'dotenv-rails' gem 'factory_bot_rails' - gem 'faker', '~> 3.0' + gem 'faker', '~> 3.5', '>= 3.5.1' gem 'fuubar' gem 'pry-byebug', require: false gem 'pry-rails' diff --git a/Gemfile.lock b/Gemfile.lock index ffc816f9..30cd6549 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,92 +22,93 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + actioncable (7.0.8.6) + actionpack (= 7.0.8.6) + activesupport (= 7.0.8.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - 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) + actionmailbox (7.0.8.6) + actionpack (= 7.0.8.6) + activejob (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) mail (>= 2.7.1) net-imap net-pop net-smtp - 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) + actionmailer (7.0.8.6) + actionpack (= 7.0.8.6) + actionview (= 7.0.8.6) + activejob (= 7.0.8.6) + activesupport (= 7.0.8.6) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.4.3) - actionview (= 7.0.4.3) - activesupport (= 7.0.4.3) - rack (~> 2.0, >= 2.2.0) + actionpack (7.0.8.6) + actionview (= 7.0.8.6) + activesupport (= 7.0.8.6) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4.3) - actionpack (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + actiontext (7.0.8.6) + actionpack (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4.3) - activesupport (= 7.0.4.3) + actionview (7.0.8.6) + activesupport (= 7.0.8.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.4.3) - activesupport (= 7.0.4.3) + activejob (7.0.8.6) + activesupport (= 7.0.8.6) globalid (>= 0.3.6) - 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) - 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) + activemodel (7.0.8.6) + activesupport (= 7.0.8.6) + activerecord (7.0.8.6) + activemodel (= 7.0.8.6) + activesupport (= 7.0.8.6) + activestorage (7.0.8.6) + actionpack (= 7.0.8.6) + activejob (= 7.0.8.6) + activerecord (= 7.0.8.6) + activesupport (= 7.0.8.6) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.4.3) + activesupport (7.0.8.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) ast (2.4.2) awesome_print (1.9.2) - bcrypt (3.1.17) - bcrypt (3.1.17-java) + base64 (0.2.0) + bcrypt (3.1.20) + bcrypt (3.1.20-java) better_errors (2.9.1) coderay (>= 1.0.0) erubi (>= 1.0.0) rack (>= 0.9.0) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) - bootsnap (1.11.1) + bootsnap (1.18.4) msgpack (~> 1.2) brakeman (5.2.3) - builder (3.2.4) + builder (3.3.0) bullet (7.0.1) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) byebug (11.1.3) - carrierwave (2.2.2) + carrierwave (2.2.6) activemodel (>= 5.0.0) activesupport (>= 5.0.0) addressable (~> 2.6) @@ -115,7 +116,7 @@ GEM marcel (~> 1.0.0) mini_mime (>= 0.1.3) ssrf_filter (~> 1.0) - carrierwave-base64 (2.10.0) + carrierwave-base64 (2.11.0) carrierwave (>= 2.2.1) marcel (~> 1.0.0) mime-types (~> 3.0) @@ -130,14 +131,14 @@ GEM concurrent-ruby (1.3.4) connection_pool (2.3.0) consistency_fail (0.3.7) - counter_culture (3.2.1) + counter_culture (3.8.2) activerecord (>= 4.2) activesupport (>= 4.2) crack (0.4.5) rexml crass (1.0.6) - date (3.3.3) - date (3.3.3-java) + date (3.3.4) + date (3.3.4-java) dav4rack_ext (1.0.0) dav4rack http_router @@ -147,24 +148,24 @@ GEM docile (1.4.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - doorkeeper (5.5.4) + doorkeeper (5.8.0) railties (>= 5) - doorkeeper-i18n (5.2.3) + doorkeeper-i18n (5.2.7) doorkeeper (>= 5.2) dotenv (2.7.6) dotenv-rails (2.7.6) dotenv (= 2.7.6) railties (>= 3.2) - erubi (1.12.0) - et-orbi (1.2.7) + erubi (1.13.0) + et-orbi (1.2.11) tzinfo - exifr (1.3.9) + exifr (1.4.0) factory_bot (6.2.1) activesupport (>= 5.0.0) factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faker (3.0.0) + faker (3.5.1) i18n (>= 1.8.11, < 2) faraday (2.2.0) faraday-net_http (~> 2.0) @@ -175,14 +176,14 @@ GEM ffi (1.15.5-java) ffi (1.15.5-x64-mingw32) ffi (1.15.5-x86-mingw32) - ffi-compiler (1.0.1) - ffi (>= 1.0.0) + ffi-compiler (1.3.2) + ffi (>= 1.15.5) rake formatador (1.1.0) - friendly_id (5.4.2) + friendly_id (5.5.1) activerecord (>= 4.0.0) - fugit (1.8.1) - et-orbi (~> 1, >= 1.2.7) + fugit (1.11.1) + et-orbi (~> 1, >= 1.2.11) raabro (~> 1.4) fuubar (2.5.1) rspec-core (~> 3.0) @@ -204,11 +205,12 @@ GEM guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) hashdiff (1.0.1) - http (5.0.4) + http (5.2.0) addressable (~> 2.8) + base64 (~> 0.1) http-cookie (~> 1.0) http-form_data (~> 2.2) - llhttp-ffi (~> 0.4.0) + llhttp-ffi (~> 0.5.0) http-accept (1.7.0) http-cookie (1.0.4) domain_name (~> 0.5) @@ -216,12 +218,13 @@ GEM http_router (0.11.2) rack (>= 1.0.0) url_mount (~> 0.2.1) - i18n (1.14.5) + i18n (1.14.6) concurrent-ruby (~> 1.0) - iban-tools (1.1.0) - icalendar (2.7.1) + iban-tools (1.2.1) + icalendar (2.10.3) ice_cube (~> 0.16) - ice_cube (0.16.4) + ostruct + ice_cube (0.17.0) image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) @@ -239,60 +242,55 @@ GEM listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - llhttp-ffi (0.4.0) + llhttp-ffi (0.5.0) ffi-compiler (~> 1.0) rake (~> 13.0) - loofah (2.20.0) + loofah (2.23.1) crass (~> 1.0.2) - nokogiri (>= 1.5.9) + nokogiri (>= 1.12.0) lumberjack (1.2.8) mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.2) - message_bus (4.2.0) + marcel (1.0.4) + message_bus (4.3.8) rack (>= 1.1.3) - method_source (1.0.0) + method_source (1.1.0) mime-types (3.4.1) mime-types-data (~> 3.2015) mime-types-data (3.2022.0105) mina (1.2.4) open4 (~> 1.3.4) rake - mini_magick (4.11.0) - mini_mime (1.1.2) - mini_portile2 (2.8.2) - minitest (5.24.1) - msgpack (1.4.5) - msgpack (1.4.5-java) + mini_magick (4.13.2) + mini_mime (1.1.5) + mini_portile2 (2.8.8) + minitest (5.25.2) + msgpack (1.7.5) + msgpack (1.7.5-java) nenv (0.3.0) - net-imap (0.3.4) + net-imap (0.3.7) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.3.4) net-protocol netrc (0.11.0) nio4r (2.7.4) nio4r (2.7.4-java) - nokogiri (1.14.3) - mini_portile2 (~> 2.8.0) - racc (~> 1.4) - nokogiri (1.14.3-java) - racc (~> 1.4) - nokogiri (1.14.3-x64-mingw32) - racc (~> 1.4) - nokogiri (1.14.3-x86-mingw32) + nokogiri (1.16.7) + mini_portile2 (~> 2.8.2) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) open4 (1.3.4) + ostruct (0.6.1) paper_trail (14.0.0) activerecord (>= 6.0) request_store (~> 1.4) @@ -301,9 +299,7 @@ GEM activerecord (>= 6, < 8.1) parser (3.1.1.0) ast (~> 2.4.1) - pg (1.3.5) - pg (1.3.5-x64-mingw32) - pg (1.3.5-x86-mingw32) + pg (1.5.9) phonelib (0.6.58) pry (0.13.1) coderay (~> 1.1) @@ -317,56 +313,58 @@ GEM pry (~> 0.13.0) pry-rails (0.3.9) pry (>= 0.10.4) - public_suffix (4.0.6) + public_suffix (4.0.7) puma (6.4.3) nio4r (~> 2.0) puma (6.4.3-java) nio4r (~> 2.0) - pundit (2.2.0) + pundit (2.4.0) activesupport (>= 3.0.0) raabro (1.4.0) - racc (1.6.2) - racc (1.6.2-java) + racc (1.8.1) + racc (1.8.1-java) rack (2.2.10) - rack-attack (6.6.0) - rack (>= 1.0, < 3) + rack-attack (6.7.0) + rack (>= 1.0, < 4) rack-cors (2.0.2) rack (>= 2.0.0) rack-mini-profiler (3.0.0) rack (>= 1.2.0) 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) + rails (7.0.8.6) + actioncable (= 7.0.8.6) + actionmailbox (= 7.0.8.6) + actionmailer (= 7.0.8.6) + actionpack (= 7.0.8.6) + actiontext (= 7.0.8.6) + actionview (= 7.0.8.6) + activejob (= 7.0.8.6) + activemodel (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) bundler (>= 1.15.0) - railties (= 7.0.4.3) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + railties (= 7.0.8.6) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.5.0) - loofah (~> 2.19, >= 2.19.1) - rails-i18n (7.0.3) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + rails-i18n (7.0.10) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + railties (7.0.8.6) + actionpack (= 7.0.8.6) + activesupport (= 7.0.8.6) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) - rake (13.0.6) + rake (13.2.1) rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) @@ -399,7 +397,7 @@ GEM mime-types (>= 1.16, < 4.0) netrc (~> 0.8) rexml (3.2.5) - roo (2.9.0) + roo (2.10.1) nokogiri (~> 1) rubyzip (>= 1.3.0, < 3.0.0) rotp (4.0.2) @@ -451,12 +449,12 @@ GEM ffi (~> 1.12) ruby2_keywords (0.0.5) rubyzip (2.3.2) - rufus-scheduler (3.8.2) - fugit (~> 1.1, >= 1.1.6) + rufus-scheduler (3.9.2) + fugit (~> 1.1, >= 1.11.1) sentry-raven (3.1.2) faraday (>= 1.0) - sepa_king (0.12.0) - activemodel (>= 3.1) + sepa_king (0.14.0) + activemodel (>= 4.2) iban-tools nokogiri shellany (0.0.1) @@ -464,10 +462,10 @@ GEM connection_pool (>= 2.2.5, < 3) rack (~> 2.0) redis (>= 4.5.0, < 5) - sidekiq-scheduler (5.0.2) + sidekiq-scheduler (5.0.6) rufus-scheduler (~> 3.2) sidekiq (>= 6, < 8) - tilt (>= 1.4.0) + tilt (>= 1.4.0, < 3) simplecov (0.21.2) docile (~> 1.1) simplecov-html (~> 0.11) @@ -484,10 +482,10 @@ GEM spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - ssrf_filter (1.0.7) + ssrf_filter (1.0.8) terminal-notifier-guard (1.7.0) - thor (1.2.1) - tilt (2.1.0) + thor (1.3.2) + tilt (2.4.0) timecop (0.9.5) timeliness (0.4.5) timeout (0.3.2) @@ -511,18 +509,18 @@ GEM timeliness (>= 0.3.10, < 1) vcard_parser (0.0.9) vcr (6.1.0) - vpim (13.11.11) + vpim (24.2.20) webmock (3.14.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) webrick (1.7.0) - websocket-driver (0.7.5) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) - websocket-driver (0.7.5-java) + websocket-driver (0.7.6-java) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.8) + zeitwerk (2.6.18) PLATFORMS java @@ -534,71 +532,71 @@ PLATFORMS DEPENDENCIES active_model_otp! awesome_print - bcrypt (~> 3.1) + bcrypt (~> 3.1, >= 3.1.20) better_errors binding_of_caller - bootsnap (~> 1.4) + bootsnap (~> 1.18, >= 1.18.4) brakeman bullet carrierwave (~> 2.1) - carrierwave-base64 (~> 2.5) - carrierwave-bombshelter (~> 0.2) + carrierwave-base64 (~> 2.11) + carrierwave-bombshelter (~> 0.2, >= 0.2.2) case_transform (~> 0.2) colorize consistency_fail - counter_culture (~> 3.0) + counter_culture (~> 3.8, >= 3.8.2) dav4rack! dav4rack_ext (~> 1.0) doorkeeper (~> 5.2) - doorkeeper-i18n (~> 5.2) + doorkeeper-i18n (~> 5.2, >= 5.2.7) dotenv-rails - exifr (~> 1.3) + exifr (~> 1.4) factory_bot_rails - faker (~> 3.0) - friendly_id (~> 5.2) + faker (~> 3.5, >= 3.5.1) + friendly_id (~> 5.5, >= 5.5.1) fuubar guard-rspec - http (~> 5.0) - iban-tools (~> 1.1.0) - icalendar (~> 2.4) + http (~> 5.2) + iban-tools (~> 1.2.1) + icalendar (~> 2.10, >= 2.10.3) improvmx (~> 0.2.1) - isbn_validation (~> 1.2) - jsonapi-authorization (~> 3.0) - jsonapi-resources (~> 0.9.1.beta2) + isbn_validation (~> 1.2, >= 1.2.2) + jsonapi-authorization (~> 3.0, >= 3.0.2) + jsonapi-resources (~> 0.9.1) listen - message_bus (~> 4.0) + message_bus (~> 4.3, >= 4.3.8) mina - mini_magick (~> 4.6) + mini_magick (~> 4.13, >= 4.13.2) paper_trail (~> 14.0) paranoia (~> 3.0) - pg (~> 1.0) + pg (~> 1.5, >= 1.5.9) phonelib pry-byebug pry-rails puma (~> 6.0) - pundit (~> 2.0) - rack-attack (~> 6.0) - rack-cors (~> 2.0, >= 2.0.1) + pundit (~> 2.4) + rack-attack (~> 6.7) + rack-cors (~> 2.0, >= 2.0.2) rack-mini-profiler rails (~> 7.0, >= 7.0.4.3) - rails-i18n (~> 7.0) + rails-i18n (~> 7.0, >= 7.0.10) rb-readline - redis (~> 4.0) - roo (~> 2.9) + redis (~> 4.8, >= 4.8.1) + roo (~> 2.10, >= 2.10.1) rspec-rails rubocop rubocop-performance rubocop-rails rubocop-rspec - ruby-filemagic (~> 0.7) - rubyzip (~> 2.0) - sentry-raven (~> 3.0) - sepa_king (~> 0.11) - sidekiq (~> 6.0) - sidekiq-scheduler (~> 5.0, >= 5.0.2) + ruby-filemagic (~> 0.7, >= 0.7.3) + rubyzip (~> 2.3, >= 2.3.2) + sentry-raven (~> 3.1, >= 3.1.2) + sepa_king (~> 0.14) + sidekiq (~> 6.5, >= 6.5.12) + sidekiq-scheduler (~> 5.0, >= 5.0.6) simplecov simplecov-lcov (~> 0.8.0) - slack-notifier (~> 2.0) + slack-notifier (~> 2.4) spring spring-commands-rspec spring-watcher-listen @@ -607,7 +605,7 @@ DEPENDENCIES tzinfo-data validates_timeliness (~> 7.0.0.beta2) vcr - vpim (~> 13.11) + vpim (~> 24.2, >= 24.2.20) webmock BUNDLED WITH diff --git a/app/controllers/v1/quickpost_messages_controller.rb b/app/controllers/v1/quickpost_messages_controller.rb deleted file mode 100644 index d679a2ce..00000000 --- a/app/controllers/v1/quickpost_messages_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class V1::QuickpostMessagesController < V1::ApplicationController -end diff --git a/app/jobs/user_archive_job.rb b/app/jobs/user_archive_job.rb index 06b27632..68fbe04d 100644 --- a/app/jobs/user_archive_job.rb +++ b/app/jobs/user_archive_job.rb @@ -61,7 +61,6 @@ def keep_entities # rubocop:disable Metrics/MethodLength PhotoAlbum, PhotoTag, Poll, - QuickpostMessage, Form::Form, Form::Response, Forum::Post, diff --git a/app/models/quickpost_message.rb b/app/models/quickpost_message.rb deleted file mode 100644 index 4afe4785..00000000 --- a/app/models/quickpost_message.rb +++ /dev/null @@ -1,14 +0,0 @@ -class QuickpostMessage < ApplicationRecord - belongs_to :author, class_name: 'User' - - validates :message, presence: true, length: { minimum: 1, maximum: 500 } - - after_create :publish_to_message_bus - - private - - def publish_to_message_bus - attributes = { id:, author_id: author.id, message:, created_at: } - MessageBus.publish('/quickpost_messages', attributes.to_json, group_ids: [0]) - end -end diff --git a/app/policies/quickpost_message_policy.rb b/app/policies/quickpost_message_policy.rb deleted file mode 100644 index 2e0e2290..00000000 --- a/app/policies/quickpost_message_policy.rb +++ /dev/null @@ -1,2 +0,0 @@ -class QuickpostMessagePolicy < ApplicationPolicy -end diff --git a/app/resources/v1/quickpost_message_resource.rb b/app/resources/v1/quickpost_message_resource.rb deleted file mode 100644 index 6e1412c7..00000000 --- a/app/resources/v1/quickpost_message_resource.rb +++ /dev/null @@ -1,17 +0,0 @@ -class V1::QuickpostMessageResource < V1::ApplicationResource - attributes :message - - has_one :author, always_include_linkage_data: true - - before_create do - @model.author_id = current_user.id - end - - def self.creatable_fields(_context) - [:message] - end - - def self.searchable_fields - %i[message] - end -end diff --git a/config/routes.rb b/config/routes.rb index d0299850..03c964d5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -73,7 +73,6 @@ end get 'users/me/nextcloud', to: 'users#nextcloud' - jsonapi_resources :quickpost_messages jsonapi_resources :vacancies namespace :debit do diff --git a/db/migrate/20241113091607_remove_quickpost.rb b/db/migrate/20241113091607_remove_quickpost.rb new file mode 100644 index 00000000..db94291c --- /dev/null +++ b/db/migrate/20241113091607_remove_quickpost.rb @@ -0,0 +1,10 @@ +class RemoveQuickpost < ActiveRecord::Migration[7.0] + def change + drop_table :quickpost_messages + + Permission.find_by(name: 'quickpost_message.create')&.destroy + Permission.find_by(name: 'quickpost_message.read')&.destroy + Permission.find_by(name: 'quickpost_message.update')&.destroy + Permission.find_by(name: 'quickpost_message.destroy')&.destroy + end +end diff --git a/db/schema.rb b/db/schema.rb index 1d334e5b..c37d2fec 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,6 @@ # # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema[7.0].define(version: 2024_11_13_104056) do - # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -474,18 +473,7 @@ t.index ["author_id"], name: "index_polls_on_author_id" t.index ["form_id"], name: "index_polls_on_form_id" end - - create_table "quickpost_messages", id: :serial, force: :cascade do |t| - t.integer "author_id" - t.text "message" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil - t.datetime "datetime", precision: nil - t.index ["datetime"], name: "index_quickpost_messages_on_datetime" - t.index ["deleted_at"], name: "index_quickpost_messages_on_deleted_at" - end - + create_table "room_adverts", force: :cascade do |t| t.string "house_name", null: false t.string "contact", null: false diff --git a/db/seeds/content.rb b/db/seeds/content.rb index 2667adc2..d0a6f27a 100644 --- a/db/seeds/content.rb +++ b/db/seeds/content.rb @@ -45,10 +45,6 @@ end end -members.sample(80).each { |user| FactoryBot.create(:quickpost_message, author: user) } -# To ensure at least one user creating (more than) two quickpost messages -members.sample(30).each { |user| FactoryBot.create(:quickpost_message, author: user) } - members.sample(4).each do |user| FactoryBot.create(:activity, author: user) end diff --git a/db/seeds/permissions.rb b/db/seeds/permissions.rb index 2ecc1586..8a20026d 100644 --- a/db/seeds/permissions.rb +++ b/db/seeds/permissions.rb @@ -34,7 +34,6 @@ def create_permissions(permission_map) 'photo' => %i[create read update destroy], 'photo_comment' => %i[create read update destroy], 'photo_tag' => %i[create read update destroy], - 'quickpost_message' => %i[create read update destroy], 'room_advert' => %i[create read update destroy], 'stored_mail' => %i[read destroy], 'forum/category' => %i[create read update destroy], @@ -76,7 +75,6 @@ def create_permissions(permission_map) 'photo' => %i[create read], 'photo_comment' => %i[create read], 'photo_tag' => %i[create read], - 'quickpost_message' => %i[create read], 'room_advert' => %i[create read], 'forum/category' => %i[read], 'forum/thread' => %i[create read], @@ -111,7 +109,6 @@ def create_permissions(permission_map) 'photo' => %i[read], 'photo_comment' => %i[create read], 'photo_tag' => %i[create read], - 'quickpost_message' => %i[create read], 'room_advert' => %i[], 'forum/category' => %i[read], 'forum/thread' => %i[create read], diff --git a/db/seeds/users_and_groups.rb b/db/seeds/users_and_groups.rb index 818d63c6..dd9c6f07 100644 --- a/db/seeds/users_and_groups.rb +++ b/db/seeds/users_and_groups.rb @@ -7,6 +7,14 @@ bestuur = Group.create!(name: 'Bestuur', kind: 'bestuur', description: 'Wij zijn de echte bazen', recognized_at_gma: 'ALV 21', rejected_at_gma: 'ALV 218') +sofia_treasurers = Group.create!(name: 'SOFIA Penningmeester', kind: 'bestuur', + administrative: true) + +sofia_renting_managers = Group.create!(name: 'SOFIA Verhuur Manager', kind: 'bestuur', + administrative: true) + +sofia_main_bartenders = Group.create!(name: 'SOFIA Hoofdtappers', kind: 'groep') + old_members_group = Group.create!(name: 'Oud-Leden', kind: 'groep', description: 'Oud-Alphanen, verenigt u!') @@ -25,6 +33,21 @@ password: 'password1234', password_confirmation: 'password1234') +sofia_treasurer = FactoryBot.create(:user, activated_at: Time.zone.now) +sofia_treasurer.update(username: 'sofia_treasurer', + password: 'password1234', + password_confirmation: 'password1234') + +sofia_renting_manager = FactoryBot.create(:user, activated_at: Time.zone.now) +sofia_renting_manager.update(username: 'sofia_renting_manager', + password: 'password1234', + password_confirmation: 'password1234') + +sofia_bartenders = FactoryBot.create_list(:user, 6, activated_at: Time.zone.now) +sofia_bartenders.first.update(username: 'sofia_main_bartender', + password: 'password1234', + password_confirmation: 'password1234') + old_members = FactoryBot.create_list(:user, 8, activated_at: Time.zone.now) old_members.first.update(username: 'oudlid', password: 'password1234', @@ -49,6 +72,23 @@ function: Faker::Job.title) end +Membership.create(user: sofia_treasurer, group: sofia_treasurers, + start_date: Date.current.months_ago(10)) +Membership.create(user: sofia_treasurer, group: member_group, + start_date: Date.current.months_ago(4), function: Faker::Job.title) + +Membership.create(user: sofia_renting_manager, group: sofia_renting_managers, + start_date: Date.current.months_ago(10)) +Membership.create(user: sofia_renting_manager, group: member_group, + start_date: Date.current.months_ago(4), function: Faker::Job.title) + +sofia_bartenders.each do |user| + Membership.create(user:, group: sofia_main_bartenders, + start_date: Date.current.months_ago(10), function: Faker::Job.title) + Membership.create(user:, group: member_group, start_date: Date.current.months_ago(4), + function: Faker::Job.title) +end + old_members.each do |user| Membership.create(user:, group: old_members_group, start_date: Date.current.months_ago(10), function: Faker::Job.title) diff --git a/spec/factories/inbound_email.rb b/spec/factories/inbound_email.rb index 8b856a51..9a6a0aeb 100644 --- a/spec/factories/inbound_email.rb +++ b/spec/factories/inbound_email.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :inbound_email, class: 'ActionMailbox::InboundEmail' do - from { "#{Faker::Name.first_name} <#{Faker::Internet.safe_email}>" } + from { "#{Faker::Name.first_name} <#{Faker::Internet.email}>" } to { "#{Faker::Internet.user_name}@test.csvalpha.nl" } subject { Faker::Book.title } diff --git a/spec/factories/quickpost_messages.rb b/spec/factories/quickpost_messages.rb deleted file mode 100644 index b5bf61ef..00000000 --- a/spec/factories/quickpost_messages.rb +++ /dev/null @@ -1,6 +0,0 @@ -FactoryBot.define do - factory :quickpost_message do - message { Faker::Lorem.sentence } - association :author, factory: :user - end -end diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 6e05bf3d..96f8a32e 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -23,7 +23,7 @@ user_details_sharing_preference { %w[all_users members_only hidden].sample } username { nil } - sequence(:email) { |n| Faker::Internet.safe_email(name: "#{Faker::Internet.user_name}#{n}") } + sequence(:email) { |n| Faker::Internet.email(name: "#{Faker::Internet.user_name}#{n}") } password = Faker::Internet.password(min_length: 12) password { password } diff --git a/spec/jobs/user_archive_job_spec.rb b/spec/jobs/user_archive_job_spec.rb index 9eb639df..a4d8abaf 100644 --- a/spec/jobs/user_archive_job_spec.rb +++ b/spec/jobs/user_archive_job_spec.rb @@ -17,7 +17,6 @@ create(:photo, uploader: user) create(:photo_album, author: user) create(:poll, author: user) - create(:quickpost_message, author: user) create(:response, user:) create(:form, author: user) create(:post, author: user) @@ -33,7 +32,6 @@ it { expect { job }.to change { Photo.last.uploader }.from(user).to(archive_user) } it { expect { job }.to change { PhotoAlbum.last.author }.from(user).to(archive_user) } it { expect { job }.to change { Poll.last.author }.from(user).to(archive_user) } - it { expect { job }.to change { QuickpostMessage.last.author }.from(user).to(archive_user) } it { expect { job }.to change { Form::Response.last.user }.from(user).to(archive_user) } it { expect { job }.to change { Form::Form.last.author }.from(user).to(archive_user) } it { expect { job }.to change { Forum::Post.last.author }.from(user).to(archive_user) } diff --git a/spec/models/quickpost_message_spec.rb b/spec/models/quickpost_message_spec.rb deleted file mode 100644 index ef68a501..00000000 --- a/spec/models/quickpost_message_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'rails_helper' - -RSpec.describe QuickpostMessage, type: :model do - subject(:quickpost_message) { build(:quickpost_message) } - - describe '#valid?' do - it { expect(quickpost_message.valid?).to be true } - - context 'when with an empty message' do - subject(:quickpost_message) { build(:quickpost_message, message: '') } - - it { expect(quickpost_message.valid?).to be false } - end - - context 'when with a too long message' do - subject(:quickpost_message) do - build(:quickpost_message, message: Faker::Lorem.characters(number: 501)) - end - - it { expect(quickpost_message.valid?).to be false } - end - - context 'when without a user' do - subject(:quickpost_message) { build(:quickpost_message, author: nil) } - - it { expect(quickpost_message.valid?).to be false } - end - end - - describe '#save' do - context 'when it is new' do - it do # rubocop:disable RSpec/ExampleLength - allow(MessageBus).to receive(:publish) - quickpost_message.save - expect(MessageBus).to have_received(:publish).with( - '/quickpost_messages', a_string_including(quickpost_message.author_id.to_s, - quickpost_message.message), - group_ids: [0] - ) - end - end - end -end diff --git a/spec/requests/v1/quickpost_messages_controller/create_spec.rb b/spec/requests/v1/quickpost_messages_controller/create_spec.rb deleted file mode 100644 index 0eccec31..00000000 --- a/spec/requests/v1/quickpost_messages_controller/create_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'rails_helper' - -describe V1::QuickpostMessagesController do - describe 'POST /quickpost_messages', version: 1 do - let(:record) { build_stubbed(:quickpost_message) } - let(:record_url) { '/v1/quickpost_messages' } - let(:record_permission) { 'quickpost_message.create' } - - it_behaves_like 'a creatable and permissible model' do - let(:invalid_attributes) { { message: '' } } - end - - it_behaves_like 'a creatable model with author' - end -end diff --git a/spec/requests/v1/quickpost_messages_controller/destroy_spec.rb b/spec/requests/v1/quickpost_messages_controller/destroy_spec.rb deleted file mode 100644 index 1a28dff2..00000000 --- a/spec/requests/v1/quickpost_messages_controller/destroy_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'rails_helper' - -describe V1::QuickpostMessagesController do - describe 'DELETE /quickpost_messages/:id', version: 1 do - it_behaves_like 'a destroyable and permissible model' do - let(:record) { create(:quickpost_message) } - let(:record_url) { "/v1/quickpost_messages/#{record.id}" } - let(:record_permission) { 'quickpost_message.destroy' } - end - end -end diff --git a/spec/requests/v1/quickpost_messages_controller/index_spec.rb b/spec/requests/v1/quickpost_messages_controller/index_spec.rb deleted file mode 100644 index 52cb583e..00000000 --- a/spec/requests/v1/quickpost_messages_controller/index_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'rails_helper' - -describe V1::QuickpostMessagesController do - describe 'GET /quickpost_messages', version: 1 do - let(:records) { create_list(:quickpost_message, 7) } - let(:record_url) { '/v1/quickpost_messages' } - let(:record_permission) { 'quickpost_message.read' } - - subject(:request) { get(record_url) } - - it_behaves_like 'a permissible model' - it_behaves_like 'an indexable model' - it_behaves_like 'a searchable model', %i[message] - end -end diff --git a/spec/requests/v1/quickpost_messages_controller/show_spec.rb b/spec/requests/v1/quickpost_messages_controller/show_spec.rb deleted file mode 100644 index 01ad41cb..00000000 --- a/spec/requests/v1/quickpost_messages_controller/show_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'rails_helper' - -describe V1::QuickpostMessagesController do - describe 'GET /quickpost_messages/:id', version: 1 do - it_behaves_like 'a permissible model' do - let(:record) { create(:quickpost_message) } - let(:record_url) { "/v1/quickpost_messages/#{record.id}" } - let(:record_permission) { 'quickpost_message.read' } - end - end -end