diff --git a/app/controllers/repp/v1/base_controller.rb b/app/controllers/repp/v1/base_controller.rb index 37d4b95be..c29f2137f 100644 --- a/app/controllers/repp/v1/base_controller.rb +++ b/app/controllers/repp/v1/base_controller.rb @@ -74,7 +74,7 @@ module Repp render_epp_error end - def render_epp_error(status = :bad_request, data = {}) + def render_epp_error(status = :bad_request, **data) @epp_errors ||= ActiveModel::Errors.new(self) @epp_errors.add(:epp_errors, msg: 'Command failed', code: '2304') if data != {} diff --git a/app/controllers/repp/v1/contacts_controller.rb b/app/controllers/repp/v1/contacts_controller.rb index 92f89a160..652df706d 100644 --- a/app/controllers/repp/v1/contacts_controller.rb +++ b/app/controllers/repp/v1/contacts_controller.rb @@ -43,7 +43,7 @@ module Repp return end - render_success(create_update_success_body) + render_success(**create_update_success_body) end api :PUT, '/repp/v1/contacts/:contact_code' diff --git a/app/interactions/domains/bulk_renew/single_domain_renew.rb b/app/interactions/domains/bulk_renew/single_domain_renew.rb index 5ae3826cd..a0df129b6 100644 --- a/app/interactions/domains/bulk_renew/single_domain_renew.rb +++ b/app/interactions/domains/bulk_renew/single_domain_renew.rb @@ -11,9 +11,7 @@ module Domains renewed_expire_time = prepare_renewed_expire_time in_transaction_with_retries do check_balance - success = domain.renew(renewed_expire_time: renewed_expire_time, - period: period, - unit: unit) + success = domain.renew(renewed_expire_time, period, unit) if success check_balance reduce_balance diff --git a/app/jobs/domain_expire_email_job.rb b/app/jobs/domain_expire_email_job.rb index 1aad4aed9..bb6e69c08 100644 --- a/app/jobs/domain_expire_email_job.rb +++ b/app/jobs/domain_expire_email_job.rb @@ -8,13 +8,13 @@ class DomainExpireEmailJob < ApplicationJob attrs = { domain: domain, registrar: domain.registrar, - email: email, + email: email } if domain.force_delete_scheduled? - DomainExpireMailer.expired_soft(attrs).deliver_now + DomainExpireMailer.expired_soft(**attrs).deliver_now else - DomainExpireMailer.expired(attrs).deliver_now + DomainExpireMailer.expired(**attrs).deliver_now end end end diff --git a/app/models/epp/domain.rb b/app/models/epp/domain.rb index 0b3f1ad7f..ad4e3c34e 100644 --- a/app/models/epp/domain.rb +++ b/app/models/epp/domain.rb @@ -173,7 +173,7 @@ class Epp::Domain < Domain ### RENEW ### - def renew(renewed_expire_time:, period:, unit:) + def renew(renewed_expire_time, period, unit) @is_renewal = true add_renew_epp_errors unless renewable? diff --git a/app/validators/domain_nameserver_validator.rb b/app/validators/domain_nameserver_validator.rb index 55ceb1c96..9603b924e 100644 --- a/app/validators/domain_nameserver_validator.rb +++ b/app/validators/domain_nameserver_validator.rb @@ -7,6 +7,6 @@ class DomainNameserverValidator < ActiveModel::EachValidator return if values.size.between?(min, max) association = options[:association] || attribute - record.errors.add(association, :out_of_range, { min: min, max: max }) + record.errors.add(association, :out_of_range, **{ min: min, max: max }) end end diff --git a/app/validators/object_count_validator.rb b/app/validators/object_count_validator.rb index d2d880fea..01d6a55f8 100644 --- a/app/validators/object_count_validator.rb +++ b/app/validators/object_count_validator.rb @@ -5,6 +5,6 @@ class ObjectCountValidator < ActiveModel::EachValidator return if values.size.between?(min, max) association = options[:association] || attribute - record.errors.add(association, :out_of_range, { min: min, max: max }) + record.errors.add(association, :out_of_range, **{ min: min, max: max }) end end diff --git a/lib/gem_monkey_patches/i18n.rb b/lib/gem_monkey_patches/i18n.rb index 7d0613247..194a11733 100644 --- a/lib/gem_monkey_patches/i18n.rb +++ b/lib/gem_monkey_patches/i18n.rb @@ -6,7 +6,7 @@ module I18n def localize(object, options = {}) options.merge!({ default: '-' }) - object.present? ? original_localize(object, options) : '' + object.present? ? original_localize(object, **options) : '' end end end