Merge pull request #8431 from SuperTux88/gem-updates

Updating all ruby dependencies to current versions
This commit is contained in:
Benjamin Neff
2023-06-28 02:38:11 +02:00
9 changed files with 418 additions and 405 deletions

View File

@@ -1,7 +1,7 @@
require: rubocop-rails
AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0
NewCops: enable
Exclude:
- "bin/**/*"
@@ -39,7 +39,7 @@ Metrics/PerceivedComplexity:
# Some blocks are longer.
Metrics/BlockLength:
ExcludedMethods:
AllowedMethods:
- "namespace"
- "create_table"
Exclude:
@@ -168,6 +168,11 @@ Style/Documentation:
Naming/BinaryOperatorParameterName:
Enabled: false
# Defining constants in tests is fine, and it's good to have them close to the test where they are used.
Lint/ConstantDefinitionInBlock:
Exclude:
- "spec/**/*"
# There are valid cases, for example debugging Cucumber steps,
# also they'll fail CI anyway
Lint/Debugger:

107
Gemfile
View File

@@ -2,7 +2,7 @@
source "https://rubygems.org"
gem "rails", "6.1.6.1"
gem "rails", "6.1.7.4"
# needed for actionmailer, can be removed when upgrading to rails 7
gem "net-imap", require: false
@@ -11,30 +11,30 @@ gem "net-smtp", require: false
# Legacy Rails features, remove me!
# responders (class level)
gem "responders", "3.0.1"
gem "responders", "3.1.0"
# Appserver
gem "puma", "5.6.5", require: false
gem "puma", "6.3.0", require: false
# Federation
gem "diaspora_federation-json_schema", "1.0.1"
gem "diaspora_federation-rails", "1.0.1"
gem "diaspora_federation-json_schema", "1.1.0"
gem "diaspora_federation-rails", "1.1.0"
# API and JSON
gem "acts_as_api", "1.0.1"
gem "json", "2.6.2"
gem "json-schema", "3.0.0"
gem "json", "2.6.3"
gem "json-schema", "4.0.0"
gem "yajl-ruby", "1.4.3"
# Authentication
gem "devise", "4.8.1"
gem "devise", "4.9.2"
gem "devise_lastseenable", "0.0.6"
gem "devise-two-factor", "4.0.2"
gem "rqrcode", "2.1.1"
gem "devise-two-factor", "4.1.0"
gem "rqrcode", "2.2.0"
# Captcha
@@ -42,29 +42,29 @@ gem "simple_captcha2", "0.5.0", require: "simple_captcha"
# Background processing
gem "redis", "4.7.0"
gem "sidekiq", "6.5.1"
gem "redis-client", "0.14.1"
gem "sidekiq", "7.1.2"
# Scheduled processing
gem "sidekiq-cron", "1.6.0"
gem "sidekiq-cron", "1.10.1"
# Compression
gem "terser", "1.1.10"
gem "terser", "1.1.16"
# Configuration
gem "configurate", "0.5.0"
gem "toml-rb", "2.1.2"
gem "toml-rb", "2.2.0"
# Cross-origin resource sharing
gem "rack-cors", "1.1.1", require: "rack/cors"
gem "rack-cors", "2.0.1", require: "rack/cors"
# CSS
gem "autoprefixer-rails", "10.4.7.0"
gem "autoprefixer-rails", "10.4.13.0"
gem "bootstrap-sass", "3.4.1"
gem "bootstrap-switch-rails", "3.3.3" # 3.3.4 and 3.3.5 is broken, see https://github.com/Bttstrp/bootstrap-switch/issues/691
gem "sassc-rails", "2.1.2"
@@ -73,19 +73,19 @@ gem "sprockets-rails", "3.4.2"
# Database
group :mysql, optional: true do
gem "mysql2", "0.5.4"
gem "mysql2", "0.5.5"
end
group :postgresql, optional: true do
gem "pg", "1.4.1"
gem "pg", "1.5.3"
end
gem "activerecord-import", "1.4.0"
gem "activerecord-import", "1.4.1"
# File uploading
gem "carrierwave", "2.2.4"
gem "fog-aws", "3.14.0"
gem "mini_magick", "4.11.0"
gem "fog-aws", "3.19.0"
gem "mini_magick", "4.12.0"
# GUID generation
gem "uuid", "2.3.9"
@@ -97,21 +97,21 @@ gem "handlebars_assets", "0.23.9"
gem "jquery-rails", "4.5.0"
gem "jquery-ui-rails", "5.0.5"
gem "js_image_paths", "0.2.0"
gem "js-routes", "2.2.4"
gem "js-routes", "2.2.5"
# Localization
gem "http_accept_language", "2.1.1"
gem "rails-i18n", "6.0.0"
gem "rails-i18n", "7.0.7"
# Map
gem "leaflet-rails", "1.7.0"
gem "leaflet-rails", "1.9.3"
# Parsing
gem "nokogiri", "1.13.7"
gem "nokogiri", "1.15.2"
gem "open_graph_reader", "0.7.2" # also update User-Agent in features/support/webmock.rb and open_graph_cache_spec.rb
gem "redcarpet", "3.5.1"
gem "redcarpet", "3.6.0"
gem "ruby-oembed", "0.16.1"
gem "twitter-text", "3.1.0"
@@ -121,23 +121,23 @@ gem "string-direction", "1.2.2"
# Security Headers
gem "secure_headers", "6.3.3"
gem "secure_headers", "6.5.0"
# Services
gem "omniauth", "2.1.0"
gem "omniauth", "2.1.1"
gem "omniauth-rails_csrf_protection", "1.0.1"
gem "omniauth-tumblr", "1.2"
gem "omniauth-twitter", "1.4.0"
gem "omniauth-wordpress", "0.2.2"
gem "twitter", "7.0.0"
gem "twitter", "8.0.0"
# OpenID Connect
gem "openid_connect", "1.3.0"
gem "openid_connect", "2.2.0"
# Serializers
gem "active_model_serializers", "0.9.8"
gem "active_model_serializers", "0.9.9"
# Tags
@@ -145,19 +145,20 @@ gem "acts-as-taggable-on", "9.0.1"
# URIs and HTTP
gem "addressable", "2.8.0", require: "addressable/uri"
gem "faraday", "1.10.0"
gem "addressable", "2.8.4", require: "addressable/uri"
gem "faraday", "2.7.7"
gem "faraday-cookie_jar", "0.0.7"
gem "faraday-follow_redirects", "0.3.0"
gem "faraday-typhoeus", "1.0.0", require: false
gem "typhoeus", "1.4.0"
# Views
gem "gon", "6.4.0"
gem "hamlit", "2.16.0"
gem "hamlit", "3.0.3"
gem "mobile-fu", "1.4.0"
gem "rails-timeago", "2.20.0"
gem "will_paginate", "3.3.1"
gem "will_paginate", "4.0.0"
# Logging
@@ -172,7 +173,7 @@ gem "rubyzip", "2.3.2", require: "zip"
# https://github.com/gitlabhq/gitlabhq/issues/3826
# https://github.com/gitlabhq/gitlabhq/pull/3852
# https://github.com/discourse/discourse/pull/238
gem "minitest", "5.15.0"
gem "minitest", "5.18.1"
gem "versionist", "2.0.1"
@@ -193,30 +194,30 @@ group :production do # we don"t install these on travis to speed up test runs
# Third party asset hosting
gem "asset_sync", "2.15.2", require: false
gem "asset_sync", "2.18.0", require: false
end
group :development do
# Linters
gem "haml_lint", "0.40.0", require: false
gem "pronto", "0.11.0", require: false
gem "pronto-eslint", "0.11.0", require: false
gem "haml_lint", "0.46.0", require: false
gem "pronto", "0.11.1", require: false
gem "pronto-eslint", "0.11.1", require: false
gem "pronto-haml", "0.11.1", require: false
gem "pronto-rubocop", "0.11.1", require: false
gem "pronto-rubocop", "0.11.5", require: false
gem "pronto-scss", "0.11.0", require: false
gem "rubocop", "0.93.1", require: false
gem "rubocop-rails", "2.9.1", require: false
gem "rubocop", "1.53.1", require: false
gem "rubocop-rails", "2.20.2", require: false
# Debugging
gem "pry"
gem "pry-byebug"
# test coverage
gem "simplecov", "0.21.2", require: false
gem "simplecov", "0.22.0", require: false
gem "turbo_dev_assets", "0.0.2"
gem "listen", "3.7.1"
gem "listen", "3.8.0"
end
group :test do
@@ -230,26 +231,26 @@ group :test do
gem "capybara", "3.39.2"
gem "cuprite", "0.14.3"
gem "database_cleaner-active_record", "2.0.1"
gem "database_cleaner-active_record", "2.1.0"
gem "cucumber-api-steps", "0.14", require: false
# General helpers
gem "factory_bot_rails", "6.2.0"
gem "shoulda-matchers", "4.5.1"
gem "timecop", "0.9.5"
gem "webmock", "3.14.0", require: false
gem "shoulda-matchers", "5.3.0"
gem "timecop", "0.9.6"
gem "webmock", "3.18.1", require: false
gem "diaspora_federation-test", "1.0.1"
gem "diaspora_federation-test", "1.1.0"
end
group :development, :test do
# RSpec (unit tests, some integration tests)
gem "rspec-rails", "5.1.2"
gem "rspec-rails", "6.0.3"
# Cucumber (integration tests)
gem "cucumber-rails", "2.5.1", require: false
gem "cucumber-rails", "2.6.1", require: false
# Jasmine (client side application tests (JS))
gem "chrome_remote", "0.3.0"

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,7 @@ class InvitationsController < ApplicationController
session[:invalid_email_invites] = invalid_emails
unless valid_emails.empty?
Workers::Mail::InviteEmail.perform_async(valid_emails.join(","), current_user.id, inviter_params)
Workers::Mail::InviteEmail.perform_async(valid_emails.join(","), current_user.id, inviter_params.to_h)
end
if emails.empty?

View File

@@ -31,7 +31,7 @@ module Workers
!(Process.pid.to_s == process_id.split(":")[1] && Thread.current.object_id.to_s(36) == thread_id) &&
ArchiveBase.subclasses.map(&:to_s).include?(work["payload"]["class"])
end
rescue Redis::CannotConnectError
rescue RedisClient::CannotConnectError
# If code gets to this point and there is no Redis conenction, we're
# running in a Test environment and have not mocked Sidekiq::Workers, so
# we're not testing the concurrency-limiting behavior.

View File

@@ -6,7 +6,7 @@
# Use net_http in test, that's better supported by webmock
unless Rails.env.test?
require 'typhoeus/adapters/faraday'
require "faraday/typhoeus"
Faraday.default_adapter = :typhoeus
end

View File

@@ -1,13 +1,13 @@
# frozen_string_literal: true
require 'will_paginate/array'
require "will_paginate/array"
# Optional for Bootstrap :renderer => WillPaginate::ActionView::BootstrapLinkRenderer
# https://github.com/yrgoldteeth/bootstrap-will_paginate
module WillPaginate
module ActionView
def will_paginate(collection = nil, options = {} )
def will_paginate(collection=nil, options={})
options, collection = collection, nil if collection.is_a? Hash
# Taken from original will_paginate code to handle if the helper is not passed a collection object.
collection ||= infer_collection_from_controller
@@ -23,15 +23,19 @@ module WillPaginate
end
def page_number(page)
tag :li, link(page, page, :rel => rel_value(page)), :class => ('active' if page == current_page)
tag :li, link(page, page, rel: rel_value(page)), class: ("active" if page == current_page)
end
def gap
tag :li, link(super, '#'), :class => 'disabled'
tag :li, link(super, "#"), class: "disabled"
end
def previous_or_next_page(page, text, classname)
tag :li, link(text, page || '#'), :class => [classname[0..3], classname, ('disabled' unless page)].join(' ')
def previous_or_next_page(page, text, classname, aria_label=nil)
tag :li, link(text, page || "#"),
{
class: [classname[0..3], classname, ("disabled" unless page)].join(" "),
"aria-label": aria_label
}
end
end
end

View File

@@ -128,7 +128,8 @@ if [ -n "$redis_url" ]
then
redis_param="url: '$redis_url'"
fi
if [ "$(bin/bundle exec ruby -e "require 'redis'; puts Redis.new($redis_param).ping" 2> /dev/null | grep -vE "is not writable|as your home directory temporarily" )" != "PONG" ]
echo $redis_param
if [ "$(bin/bundle exec ruby -e "require 'redis-client'; puts RedisClient.config($redis_param).new_client.call('PING')" 2> /dev/null | grep -vE "is not writable|as your home directory temporarily" )" != "PONG" ]
then
fatal "Can't connect to redis. Please check if it's running and if environment.redis is configured correctly in $CONFIG_FILE."
fi

View File

@@ -39,7 +39,7 @@ describe InvitationsController, type: :controller do
it "creates an InviteEmail worker" do
expect(Workers::Mail::InviteEmail).to receive(:perform_async).with(
emails, alice.id, invite_params[:email_inviter]
emails, alice.id, invite_params[:email_inviter].stringify_keys
)
post :create, params: invite_params
end
@@ -85,7 +85,7 @@ describe InvitationsController, type: :controller do
it "creates an InviteEmail worker" do
expect(Workers::Mail::InviteEmail).to receive(:perform_async).with(
valid_emails, alice.id, invite_params[:email_inviter]
valid_emails, alice.id, invite_params[:email_inviter].stringify_keys
)
post :create, params: invite_params
end