From 0791203d3a81e8373240cbbd88b57d147dc6debe Mon Sep 17 00:00:00 2001 From: Sascha Karnatz <122262394+sascha-karnatz@users.noreply.github.com> Date: Fri, 25 Aug 2023 11:29:27 +0200 Subject: [PATCH] Standardrb rules update standardrb was updated and the rules changed a bit. This commit only updates the effected files. --- app/models/alchemy/node.rb | 2 +- lib/alchemy/i18n.rb | 4 ++-- spec/rails_helper.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/alchemy/node.rb b/app/models/alchemy/node.rb index d737d3cd74..fc21f9b6db 100644 --- a/app/models/alchemy/node.rb +++ b/app/models/alchemy/node.rb @@ -52,7 +52,7 @@ def available_menu_names # def read_definitions_file if ::File.exist?(definitions_file_path) - ::YAML.safe_load(File.read(definitions_file_path)) || [] + ::YAML.safe_load_file(definitions_file_path) || [] else raise LoadError, "Could not find menus.yml file! Please run `rails generate alchemy:install`" end diff --git a/lib/alchemy/i18n.rb b/lib/alchemy/i18n.rb index 5e97abf841..148166f974 100644 --- a/lib/alchemy/i18n.rb +++ b/lib/alchemy/i18n.rb @@ -12,8 +12,8 @@ class << self # # Alchemy.t(:hello) # - def t(msg, **kwargs) - Alchemy::I18n.translate(msg, **kwargs) + def t(msg, **) + Alchemy::I18n.translate(msg, **) end end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 5ef2fb3717..c1e840a958 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./spec_helper" +require_relative "spec_helper" # Configure Rails Environment ENV["RAILS_ENV"] = "test"