From 8387882bc29700477221b0e9b52cc58b256dd184 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 20:39:42 +0000 Subject: [PATCH] chore(deps): update all non-major bundler dependencies (#474) * chore(deps): update all non-major bundler dependencies * fixed artifact * Update Gemfile * update gemfile.lock * Revert "update gemfile.lock" This reverts commit a272942e0e9d00f7a5061f52fd3e908add81bf96. * update gemfile.lock * set default settings to rails 7 * Fixed lint --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: lodewiges <131907615+lodewiges@users.noreply.github.com> Co-authored-by: Jorai Geertsema --- .rubocop.yml | 7 +- Gemfile | 10 +-- Gemfile.lock | 146 +++++++++++++++++++++--------------------- app/models/user.rb | 4 +- config/application.rb | 2 +- 5 files changed, 87 insertions(+), 82 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 5d4f292d..b1f2a4e0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,7 +4,8 @@ require: - rubocop-rails AllCops: - TargetRailsVersion: 5.1 + TargetRailsVersion: 7.0 + TargetRubyVersion: 3.1 Exclude: - 'db/schema.rb' - 'config/initializers/secret_token.rb' @@ -124,9 +125,11 @@ Style/HashTransformValues: Lint/RaiseException: Enabled: true - Lint/StructNewOverride: Enabled: true Naming/InclusiveLanguage: Enabled: false + +Rails/BulkChangeTable: + Enabled: false diff --git a/Gemfile b/Gemfile index 45bbd95b..31dc829d 100644 --- a/Gemfile +++ b/Gemfile @@ -5,13 +5,13 @@ gem 'dav4rack', git: 'https://github.com/csvalpha/dav4rack.git', ref: '8541e53' gem 'bcrypt', '~> 3.1', '>= 3.1.20' gem 'bootsnap', '~> 1.18', '>= 1.18.4' -gem 'carrierwave', '~> 2.1' +gem 'carrierwave', '~> 2.2', '>= 2.2.6' gem 'carrierwave-base64', '~> 2.11' gem 'carrierwave-bombshelter', '~> 0.2', '>= 0.2.2' gem 'case_transform', '~> 0.2' gem 'counter_culture', '~> 3.8', '>= 3.8.2' gem 'dav4rack_ext', '~> 1.0' -gem 'doorkeeper', '~> 5.2' +gem 'doorkeeper', '~> 5.8', '>= 5.8.1' gem 'doorkeeper-i18n', '~> 5.2', '>= 5.2.7' gem 'exifr', '~> 1.4' gem 'friendly_id', '~> 5.5', '>= 5.5.1' @@ -28,11 +28,11 @@ gem 'paper_trail', '~> 14.0' gem 'paranoia', '~> 3.0' gem 'pg', '~> 1.5', '>= 1.5.9' gem 'phonelib' -gem 'puma', '~> 6.0' +gem 'puma', '~> 6.5' 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', '~> 7.0.0', '>= 7.0.8.7' gem 'rails-i18n', '~> 7.0', '>= 7.0.10' gem 'redis', '~> 4.8', '>= 4.8.1' gem 'roo', '~> 2.10', '>= 2.10.1' @@ -43,7 +43,7 @@ gem 'sepa_king', '~> 0.14' gem 'sidekiq', '~> 7.3', '>= 7.3.7' gem 'sidekiq-scheduler', '~> 5.0', '>= 5.0.6' gem 'slack-notifier', '~> 2.4' -gem 'validates_timeliness', '~> 7.0.0.beta2' +gem 'validates_timeliness', '~> 7.0.0' gem 'vpim', '~> 24.2', '>= 24.2.20' group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index c508d849..3c0f32b0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,67 +22,67 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8.6) - actionpack (= 7.0.8.6) - activesupport (= 7.0.8.6) + actioncable (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - 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) + actionmailbox (7.0.8.7) + actionpack (= 7.0.8.7) + activejob (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) mail (>= 2.7.1) net-imap net-pop net-smtp - 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) + actionmailer (7.0.8.7) + actionpack (= 7.0.8.7) + actionview (= 7.0.8.7) + activejob (= 7.0.8.7) + activesupport (= 7.0.8.7) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.8.6) - actionview (= 7.0.8.6) - activesupport (= 7.0.8.6) + actionpack (7.0.8.7) + actionview (= 7.0.8.7) + activesupport (= 7.0.8.7) 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.8.6) - actionpack (= 7.0.8.6) - activerecord (= 7.0.8.6) - activestorage (= 7.0.8.6) - activesupport (= 7.0.8.6) + actiontext (7.0.8.7) + actionpack (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8.6) - activesupport (= 7.0.8.6) + actionview (7.0.8.7) + activesupport (= 7.0.8.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.8.6) - activesupport (= 7.0.8.6) + activejob (7.0.8.7) + activesupport (= 7.0.8.7) globalid (>= 0.3.6) - 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) + activemodel (7.0.8.7) + activesupport (= 7.0.8.7) + activerecord (7.0.8.7) + activemodel (= 7.0.8.7) + activesupport (= 7.0.8.7) + activestorage (7.0.8.7) + actionpack (= 7.0.8.7) + activejob (= 7.0.8.7) + activerecord (= 7.0.8.7) + activesupport (= 7.0.8.7) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.8.6) + activesupport (7.0.8.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -137,8 +137,8 @@ GEM crack (0.4.5) rexml crass (1.0.6) - date (3.3.4) - date (3.3.4-java) + date (3.4.1) + date (3.4.1-java) dav4rack_ext (1.0.0) dav4rack http_router @@ -148,7 +148,7 @@ GEM docile (1.4.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - doorkeeper (5.8.0) + doorkeeper (5.8.1) railties (>= 5) doorkeeper-i18n (5.2.7) doorkeeper (>= 5.2) @@ -188,8 +188,8 @@ GEM fuubar (2.5.1) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) - globalid (1.1.0) - activesupport (>= 5.0) + globalid (1.2.1) + activesupport (>= 6.1) guard (2.18.0) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) @@ -272,14 +272,14 @@ GEM msgpack (1.7.5) msgpack (1.7.5-java) nenv (0.3.0) - net-imap (0.3.7) + net-imap (0.5.5) date net-protocol net-pop (0.1.2) net-protocol net-protocol (0.2.2) timeout - net-smtp (0.3.4) + net-smtp (0.5.0) net-protocol netrc (0.11.0) nio4r (2.7.4) @@ -315,9 +315,9 @@ GEM pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.7) - puma (6.4.3) + puma (6.5.0) nio4r (~> 2.0) - puma (6.4.3-java) + puma (6.5.0-java) nio4r (~> 2.0) pundit (2.4.0) activesupport (>= 3.0.0) @@ -333,20 +333,20 @@ GEM rack (>= 1.2.0) rack-test (2.1.0) rack (>= 1.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) + rails (7.0.8.7) + actioncable (= 7.0.8.7) + actionmailbox (= 7.0.8.7) + actionmailer (= 7.0.8.7) + actionpack (= 7.0.8.7) + actiontext (= 7.0.8.7) + actionview (= 7.0.8.7) + activejob (= 7.0.8.7) + activemodel (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) bundler (>= 1.15.0) - railties (= 7.0.8.6) + railties (= 7.0.8.7) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -357,9 +357,9 @@ GEM rails-i18n (7.0.10) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.0.8.6) - actionpack (= 7.0.8.6) - activesupport (= 7.0.8.6) + railties (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) method_source rake (>= 12.2) thor (~> 1.0) @@ -491,8 +491,8 @@ GEM thor (1.3.2) tilt (2.4.0) timecop (0.9.5) - timeliness (0.4.5) - timeout (0.3.2) + timeliness (0.5.1) + timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) tzinfo-data (1.2022.1) @@ -508,7 +508,7 @@ GEM url_mount (0.2.1) rack uuidtools (2.2.0) - validates_timeliness (7.0.0.beta2) + validates_timeliness (7.0.0) activemodel (>= 7.0.0, < 8) timeliness (>= 0.3.10, < 1) vcard_parser (0.0.9) @@ -519,9 +519,11 @@ GEM crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) webrick (1.7.0) - websocket-driver (0.7.6) + websocket-driver (0.7.7) + base64 websocket-extensions (>= 0.1.0) - websocket-driver (0.7.6-java) + websocket-driver (0.7.7-java) + base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) zeitwerk (2.6.18) @@ -542,7 +544,7 @@ DEPENDENCIES bootsnap (~> 1.18, >= 1.18.4) brakeman bullet - carrierwave (~> 2.1) + carrierwave (~> 2.2, >= 2.2.6) carrierwave-base64 (~> 2.11) carrierwave-bombshelter (~> 0.2, >= 0.2.2) case_transform (~> 0.2) @@ -551,7 +553,7 @@ DEPENDENCIES counter_culture (~> 3.8, >= 3.8.2) dav4rack! dav4rack_ext (~> 1.0) - doorkeeper (~> 5.2) + doorkeeper (~> 5.8, >= 5.8.1) doorkeeper-i18n (~> 5.2, >= 5.2.7) dotenv-rails exifr (~> 1.4) @@ -577,12 +579,12 @@ DEPENDENCIES phonelib pry-byebug pry-rails - puma (~> 6.0) + puma (~> 6.5) 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 (~> 7.0.0, >= 7.0.8.7) rails-i18n (~> 7.0, >= 7.0.10) rb-readline redis (~> 4.8, >= 4.8.1) @@ -607,7 +609,7 @@ DEPENDENCIES terminal-notifier-guard timecop tzinfo-data - validates_timeliness (~> 7.0.0.beta2) + validates_timeliness (~> 7.0.0) vcr vpim (~> 24.2, >= 24.2.20) webmock diff --git a/app/models/user.rb b/app/models/user.rb index d5029281..ac38cfc1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -103,7 +103,7 @@ class User < ApplicationRecord # rubocop:disable Metrics/ClassLength }) def full_name - [first_name, last_name_prefix, last_name].reject(&:blank?).join(' ') + [first_name, last_name_prefix, last_name].compact_blank.join(' ') end alias to_s full_name @@ -114,7 +114,7 @@ def username=(value) def generate_username value = [first_name, '.', last_name_prefix, last_name] - .reject(&:blank?).join.gsub(/\s|-/, '') + .compact_blank.join.gsub(/\s|-/, '') .parameterize.tr('-', '.') usernames_like = User.where('username LIKE ?', "#{value}%") value = "#{value}#{usernames_like.size}" if usernames_like.any? diff --git a/config/application.rb b/config/application.rb index 60de7231..7e03261f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -21,7 +21,7 @@ module Amber class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 6.0 + config.load_defaults 7.0 # Settings in config/environments/* take precedence over those specified here. # Application configuration can go into files in config/initializers