From 41f3bf30788e46d1a424ece822e0bfbbf312a5b7 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 11 Jun 2015 10:53:47 +0300 Subject: [PATCH] rubocop syntax update --- app/mailers/contact_mailer.rb | 2 ++ app/models/depp/contact.rb | 2 +- app/models/domain.rb | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/mailers/contact_mailer.rb b/app/mailers/contact_mailer.rb index cf8c03d38..8b443d279 100644 --- a/app/mailers/contact_mailer.rb +++ b/app/mailers/contact_mailer.rb @@ -1,4 +1,5 @@ class ContactMailer < ApplicationMailer + # rubocop: disable Metrics/CyclomaticComplexity def email_updated(contact) unless Rails.env.production? return unless TEST_EMAILS.include?(contact.email) || TEST_EMAILS.include?(contact.email_was) @@ -18,4 +19,5 @@ class ContactMailer < ApplicationMailer mail(to: email, subject: "#{I18n.t(:contact_email_update_subject)} [#{@contact.code}]") end end + # rubocop: enable Metrics/CyclomaticComplexity end diff --git a/app/models/depp/contact.rb b/app/models/depp/contact.rb index 063fa0f1f..be0429c2f 100644 --- a/app/models/depp/contact.rb +++ b/app/models/depp/contact.rb @@ -230,7 +230,7 @@ module Depp def extension_xml xml = { _anonymus: [] } - ident = ident_xml[:_anonymus].try(:first) if !persisted? + ident = ident_xml[:_anonymus].try(:first) unless persisted? legal = legal_document_xml[:_anonymus].try(:first) xml[:_anonymus] << ident if ident.present? xml[:_anonymus] << legal if legal.present? diff --git a/app/models/domain.rb b/app/models/domain.rb index e650b118d..61ad23d43 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -1,3 +1,4 @@ +# rubocop: disable Metrics/ClassLength class Domain < ActiveRecord::Base include Versions # version/domain_version.rb has_paper_trail class_name: "DomainVersion", meta: { children: :children_log } @@ -426,7 +427,7 @@ class Domain < ActiveRecord::Base domain_statuses.where(value: DomainStatus::CLIENT_DELETE_PROHIBITED).destroy_all domain_statuses.where(value: DomainStatus::SERVER_DELETE_PROHIBITED).destroy_all domain_statuses.reload - self.force_delete_at = Time.zone.now + Setting.redemption_grace_period.days unless self.force_delete_at + self.force_delete_at = Time.zone.now + Setting.redemption_grace_period.days unless force_delete_at save(validate: false) end @@ -479,3 +480,4 @@ class Domain < ActiveRecord::Base whois_record.blank? ? create_whois_record : whois_record.save end end +# rubocop: enable Metrics/ClassLength