From a03fb140a3ae98c2a55c4be54d657f87a68f4385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergei=20Ts=C3=B5ganov?= Date: Wed, 31 Aug 2022 14:27:43 +0300 Subject: [PATCH] Fixed codeclimate issues --- app/jobs/send_monthly_invoices_job.rb | 4 +++- app/models/concerns/registrar/book_keeping.rb | 2 +- app/models/registrar.rb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/jobs/send_monthly_invoices_job.rb b/app/jobs/send_monthly_invoices_job.rb index 00a003444..0684dc992 100644 --- a/app/jobs/send_monthly_invoices_job.rb +++ b/app/jobs/send_monthly_invoices_job.rb @@ -1,4 +1,4 @@ -class SendMonthlyInvoicesJob < ApplicationJob +class SendMonthlyInvoicesJob < ApplicationJob # rubocop:disable Metrics/ClassLength queue_as :default def perform(dry: false) @@ -112,6 +112,7 @@ class SendMonthlyInvoicesJob < ApplicationJob private + # rubocop:disable Metrics/MethodLength def normalize(summary, lines: []) sum = summary.dup line_map = Hash.new 0 @@ -127,6 +128,7 @@ class SendMonthlyInvoicesJob < ApplicationJob sum['invoice_lines'] = summarize_lines(lines) sum end + # rubocop:enable Metrics/MethodLength def summarize_lines(invoice_lines, lines: []) line_map = Hash.new 0 diff --git a/app/models/concerns/registrar/book_keeping.rb b/app/models/concerns/registrar/book_keeping.rb index c74ae3987..fc1defe9a 100644 --- a/app/models/concerns/registrar/book_keeping.rb +++ b/app/models/concerns/registrar/book_keeping.rb @@ -1,4 +1,4 @@ -module Registrar::BookKeeping +module Registrar::BookKeeping # rubocop:disable Metrics/ModuleLength extend ActiveSupport::Concern DOMAIN_TO_PRODUCT = { 'ee': '01EE', 'com.ee': '02COM', 'pri.ee': '03PRI', diff --git a/app/models/registrar.rb b/app/models/registrar.rb index 811fc3921..1dbd2061d 100644 --- a/app/models/registrar.rb +++ b/app/models/registrar.rb @@ -1,4 +1,4 @@ -class Registrar < ApplicationRecord +class Registrar < ApplicationRecord # rubocop:disable Metrics/ClassLength include Versions # version/registrar_version.rb include Registrar::BookKeeping include EmailVerifable