Merge pull request #5404 from consuldemocracy/ruby3.2
Upgrade Ruby to version 3.2.3
This commit is contained in:
@@ -3,7 +3,7 @@ stages:
|
|||||||
- lint
|
- lint
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
image: "ruby:3.1.4"
|
image: "ruby:3.2.3"
|
||||||
stage: test
|
stage: test
|
||||||
services:
|
services:
|
||||||
- postgres:10.10
|
- postgres:10.10
|
||||||
@@ -35,7 +35,7 @@ tests:
|
|||||||
# PRONTO_GITLAB_API_PRIVATE_TOKEN to your repository CI/CD settings
|
# PRONTO_GITLAB_API_PRIVATE_TOKEN to your repository CI/CD settings
|
||||||
# giving it the value of the Personal Access Token
|
# giving it the value of the Personal Access Token
|
||||||
linters:
|
linters:
|
||||||
image: "ruby:3.1.4"
|
image: "ruby:3.2.3"
|
||||||
stage: lint
|
stage: lint
|
||||||
cache:
|
cache:
|
||||||
key: consul
|
key: consul
|
||||||
|
|||||||
@@ -647,6 +647,9 @@ Style/AccessorGrouping:
|
|||||||
Style/AndOr:
|
Style/AndOr:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/ArgumentsForwarding:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Style/ArrayCoercion:
|
Style/ArrayCoercion:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
3.1.4
|
3.2.3
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM ruby:3.1.4-bullseye
|
FROM ruby:3.2.3-bullseye
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
|||||||
@@ -777,4 +777,4 @@ DEPENDENCIES
|
|||||||
wkhtmltopdf-binary (~> 0.12.6)
|
wkhtmltopdf-binary (~> 0.12.6)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.3.26
|
2.4.19
|
||||||
|
|||||||
@@ -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)
|
**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
|
```bash
|
||||||
git clone https://github.com/consuldemocracy/consuldemocracy.git
|
git clone https://github.com/consuldemocracy/consuldemocracy.git
|
||||||
|
|||||||
@@ -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)
|
**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
|
```bash
|
||||||
git clone https://github.com/consuldemocracy/consuldemocracy.git
|
git clone https://github.com/consuldemocracy/consuldemocracy.git
|
||||||
|
|||||||
@@ -7,13 +7,8 @@ class Admin::Budgets::ActionsComponent < ApplicationComponent
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def action(action_name, **options)
|
def action(action_name, **)
|
||||||
render Admin::ActionComponent.new(
|
render Admin::ActionComponent.new(action_name, budget, "aria-describedby": true, **)
|
||||||
action_name,
|
|
||||||
budget,
|
|
||||||
"aria-describedby": true,
|
|
||||||
**options
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def actions
|
def actions
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ class Admin::Budgets::LinksComponent < ApplicationComponent
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def action(action_name, **options)
|
def action(action_name, **)
|
||||||
render Admin::ActionComponent.new(action_name, budget, **options)
|
render Admin::ActionComponent.new(action_name, budget, **)
|
||||||
end
|
end
|
||||||
|
|
||||||
def results_text
|
def results_text
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ class Admin::TableActionsComponent < ApplicationComponent
|
|||||||
@options = options
|
@options = options
|
||||||
end
|
end
|
||||||
|
|
||||||
def action(action_name, **args)
|
def action(action_name, **)
|
||||||
render Admin::ActionComponent.new(action_name, record, "aria-label": true, **args)
|
render Admin::ActionComponent.new(action_name, record, "aria-label": true, **)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ module FeatureFlags
|
|||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
class_methods do
|
class_methods do
|
||||||
def feature_flag(name, *options)
|
def feature_flag(name, *)
|
||||||
before_action(*options) do
|
before_action(*) do
|
||||||
check_feature_flag(name)
|
check_feature_flag(name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ module HasFilters
|
|||||||
end
|
end
|
||||||
|
|
||||||
class_methods do
|
class_methods do
|
||||||
def has_filters(valid_filters, *args)
|
def has_filters(valid_filters, *)
|
||||||
before_action(*args) do
|
before_action(*) do
|
||||||
@valid_filters = valid_filters.respond_to?(:call) ? valid_filters.call(self) : valid_filters
|
@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
|
@current_filter = @valid_filters.include?(params[:filter]) ? params[:filter] : @valid_filters.first
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ module HasOrders
|
|||||||
end
|
end
|
||||||
|
|
||||||
class_methods do
|
class_methods do
|
||||||
def has_orders(valid_orders, *args)
|
def has_orders(valid_orders, *)
|
||||||
before_action(*args) do |c|
|
before_action(*) do |c|
|
||||||
@valid_orders = valid_orders.respond_to?(:call) ? valid_orders.call(c) : valid_orders.dup
|
@valid_orders = valid_orders.respond_to?(:call) ? valid_orders.call(c) : valid_orders.dup
|
||||||
@valid_orders.delete("relevance") if params[:search].blank?
|
@valid_orders.delete("relevance") if params[:search].blank?
|
||||||
@current_order = @valid_orders.include?(params[:order]) ? params[:order] : @valid_orders.first
|
@current_order = @valid_orders.include?(params[:order]) ? params[:order] : @valid_orders.first
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
module RemotelyTranslatable
|
module RemotelyTranslatable
|
||||||
private
|
private
|
||||||
|
|
||||||
def detect_remote_translations(*args)
|
def detect_remote_translations(*)
|
||||||
return [] unless Setting["feature.remote_translations"].present? && api_key_has_been_set_in_secrets?
|
return [] unless Setting["feature.remote_translations"].present? && api_key_has_been_set_in_secrets?
|
||||||
|
|
||||||
RemoteTranslation.for(*args)
|
RemoteTranslation.for(*)
|
||||||
end
|
end
|
||||||
|
|
||||||
def api_key_has_been_set_in_secrets?
|
def api_key_has_been_set_in_secrets?
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ module ApplicationHelper
|
|||||||
%i[ar fa he].include?(locale)
|
%i[ar fa he].include?(locale)
|
||||||
end
|
end
|
||||||
|
|
||||||
def markdown(text, **render_options)
|
def markdown(...)
|
||||||
MarkdownConverter.new(text, **render_options).render
|
MarkdownConverter.new(...).render
|
||||||
end
|
end
|
||||||
|
|
||||||
def wysiwyg(text)
|
def wysiwyg(text)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
module LinkListHelper
|
module LinkListHelper
|
||||||
def link_list(*links, **options)
|
def link_list(...)
|
||||||
render Shared::LinkListComponent.new(*links, **options)
|
render Shared::LinkListComponent.new(...)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ class RemoteTranslation < ApplicationRecord
|
|||||||
RemoteTranslations::Caller.new(self).delay.call
|
RemoteTranslations::Caller.new(self).delay.call
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.for(*args)
|
def self.for(*)
|
||||||
resources_groups(*args).flatten.select { |resource| translation_empty?(resource) }.map do |resource|
|
resources_groups(*).flatten.select { |resource| translation_empty?(resource) }.map do |resource|
|
||||||
new(remote_translatable: resource, locale: I18n.locale)
|
new(remote_translatable: resource, locale: I18n.locale)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -409,8 +409,8 @@ class User < ApplicationRecord
|
|||||||
followables.compact.map { |followable| followable.tags.map(&:name) }.flatten.compact.uniq
|
followables.compact.map { |followable| followable.tags.map(&:name) }.flatten.compact.uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_devise_notification(notification, *args)
|
def send_devise_notification(notification, *)
|
||||||
devise_mailer.send(notification, self, *args).deliver_later
|
devise_mailer.send(notification, self, *).deliver_later
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_subscriptions_token
|
def add_subscriptions_token
|
||||||
|
|||||||
Reference in New Issue
Block a user