Merge pull request #5404 from consuldemocracy/ruby3.2

Upgrade Ruby to version 3.2.3
This commit is contained in:
Javi Martín
2024-04-11 18:39:03 +02:00
committed by GitHub
18 changed files with 32 additions and 34 deletions

View File

@@ -3,7 +3,7 @@ stages:
- lint
tests:
image: "ruby:3.1.4"
image: "ruby:3.2.3"
stage: test
services:
- postgres:10.10
@@ -35,7 +35,7 @@ tests:
# PRONTO_GITLAB_API_PRIVATE_TOKEN to your repository CI/CD settings
# giving it the value of the Personal Access Token
linters:
image: "ruby:3.1.4"
image: "ruby:3.2.3"
stage: lint
cache:
key: consul

View File

@@ -647,6 +647,9 @@ Style/AccessorGrouping:
Style/AndOr:
Enabled: true
Style/ArgumentsForwarding:
Enabled: true
Style/ArrayCoercion:
Enabled: true

View File

@@ -1 +1 @@
3.1.4
3.2.3

View File

@@ -1,4 +1,4 @@
FROM ruby:3.1.4-bullseye
FROM ruby:3.2.3-bullseye
ENV DEBIAN_FRONTEND noninteractive

View File

@@ -777,4 +777,4 @@ DEPENDENCIES
wkhtmltopdf-binary (~> 0.12.6)
BUNDLED WITH
2.3.26
2.4.19

View File

@@ -35,7 +35,7 @@ You can access the main website of the project at [http://consuldemocracy.org](h
**NOTE**: For more detailed instructions check the [docs](https://docs.consuldemocracy.org)
Prerequisites: install git, Ruby 3.1.4, CMake, pkg-config, shared-mime-info, Node.js 18.18.2 and PostgreSQL (>=9.5).
Prerequisites: install git, Ruby 3.2.3, CMake, pkg-config, shared-mime-info, Node.js 18.18.2 and PostgreSQL (>=9.5).
```bash
git clone https://github.com/consuldemocracy/consuldemocracy.git

View File

@@ -34,7 +34,7 @@ Puedes acceder a la página principal del proyecto en [http://consuldemocracy.or
**NOTA**: para unas instrucciones más detalladas consulta la [documentación](https://docs.consuldemocracy.org)
Prerequisitos: tener instalado git, Ruby 3.1.4, CMake, pkg-config, shared-mime-info, Node.js 18.18.2 y PostgreSQL (9.5 o superior).
Prerequisitos: tener instalado git, Ruby 3.2.3, CMake, pkg-config, shared-mime-info, Node.js 18.18.2 y PostgreSQL (9.5 o superior).
```bash
git clone https://github.com/consuldemocracy/consuldemocracy.git

View File

@@ -7,13 +7,8 @@ class Admin::Budgets::ActionsComponent < ApplicationComponent
private
def action(action_name, **options)
render Admin::ActionComponent.new(
action_name,
budget,
"aria-describedby": true,
**options
)
def action(action_name, **)
render Admin::ActionComponent.new(action_name, budget, "aria-describedby": true, **)
end
def actions

View File

@@ -8,8 +8,8 @@ class Admin::Budgets::LinksComponent < ApplicationComponent
private
def action(action_name, **options)
render Admin::ActionComponent.new(action_name, budget, **options)
def action(action_name, **)
render Admin::ActionComponent.new(action_name, budget, **)
end
def results_text

View File

@@ -6,8 +6,8 @@ class Admin::TableActionsComponent < ApplicationComponent
@options = options
end
def action(action_name, **args)
render Admin::ActionComponent.new(action_name, record, "aria-label": true, **args)
def action(action_name, **)
render Admin::ActionComponent.new(action_name, record, "aria-label": true, **)
end
private

View File

@@ -2,8 +2,8 @@ module FeatureFlags
extend ActiveSupport::Concern
class_methods do
def feature_flag(name, *options)
before_action(*options) do
def feature_flag(name, *)
before_action(*) do
check_feature_flag(name)
end
end

View File

@@ -7,8 +7,8 @@ module HasFilters
end
class_methods do
def has_filters(valid_filters, *args)
before_action(*args) do
def has_filters(valid_filters, *)
before_action(*) do
@valid_filters = valid_filters.respond_to?(:call) ? valid_filters.call(self) : valid_filters
@current_filter = @valid_filters.include?(params[:filter]) ? params[:filter] : @valid_filters.first
end

View File

@@ -7,8 +7,8 @@ module HasOrders
end
class_methods do
def has_orders(valid_orders, *args)
before_action(*args) do |c|
def has_orders(valid_orders, *)
before_action(*) do |c|
@valid_orders = valid_orders.respond_to?(:call) ? valid_orders.call(c) : valid_orders.dup
@valid_orders.delete("relevance") if params[:search].blank?
@current_order = @valid_orders.include?(params[:order]) ? params[:order] : @valid_orders.first

View File

@@ -1,10 +1,10 @@
module RemotelyTranslatable
private
def detect_remote_translations(*args)
def detect_remote_translations(*)
return [] unless Setting["feature.remote_translations"].present? && api_key_has_been_set_in_secrets?
RemoteTranslation.for(*args)
RemoteTranslation.for(*)
end
def api_key_has_been_set_in_secrets?

View File

@@ -10,8 +10,8 @@ module ApplicationHelper
%i[ar fa he].include?(locale)
end
def markdown(text, **render_options)
MarkdownConverter.new(text, **render_options).render
def markdown(...)
MarkdownConverter.new(...).render
end
def wysiwyg(text)

View File

@@ -1,5 +1,5 @@
module LinkListHelper
def link_list(*links, **options)
render Shared::LinkListComponent.new(*links, **options)
def link_list(...)
render Shared::LinkListComponent.new(...)
end
end

View File

@@ -12,8 +12,8 @@ class RemoteTranslation < ApplicationRecord
RemoteTranslations::Caller.new(self).delay.call
end
def self.for(*args)
resources_groups(*args).flatten.select { |resource| translation_empty?(resource) }.map do |resource|
def self.for(*)
resources_groups(*).flatten.select { |resource| translation_empty?(resource) }.map do |resource|
new(remote_translatable: resource, locale: I18n.locale)
end
end

View File

@@ -409,8 +409,8 @@ class User < ApplicationRecord
followables.compact.map { |followable| followable.tags.map(&:name) }.flatten.compact.uniq
end
def send_devise_notification(notification, *args)
devise_mailer.send(notification, self, *args).deliver_later
def send_devise_notification(notification, *)
devise_mailer.send(notification, self, *).deliver_later
end
def add_subscriptions_token