rubocop syntax update

This commit is contained in:
Priit Tark 2015-06-11 10:53:47 +03:00
parent 11f149bd53
commit 41f3bf3078
3 changed files with 6 additions and 2 deletions

View file

@ -1,4 +1,5 @@
class ContactMailer < ApplicationMailer class ContactMailer < ApplicationMailer
# rubocop: disable Metrics/CyclomaticComplexity
def email_updated(contact) def email_updated(contact)
unless Rails.env.production? unless Rails.env.production?
return unless TEST_EMAILS.include?(contact.email) || TEST_EMAILS.include?(contact.email_was) 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}]") mail(to: email, subject: "#{I18n.t(:contact_email_update_subject)} [#{@contact.code}]")
end end
end end
# rubocop: enable Metrics/CyclomaticComplexity
end end

View file

@ -230,7 +230,7 @@ module Depp
def extension_xml def extension_xml
xml = { _anonymus: [] } 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) legal = legal_document_xml[:_anonymus].try(:first)
xml[:_anonymus] << ident if ident.present? xml[:_anonymus] << ident if ident.present?
xml[:_anonymus] << legal if legal.present? xml[:_anonymus] << legal if legal.present?

View file

@ -1,3 +1,4 @@
# rubocop: disable Metrics/ClassLength
class Domain < ActiveRecord::Base class Domain < ActiveRecord::Base
include Versions # version/domain_version.rb include Versions # version/domain_version.rb
has_paper_trail class_name: "DomainVersion", meta: { children: :children_log } 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::CLIENT_DELETE_PROHIBITED).destroy_all
domain_statuses.where(value: DomainStatus::SERVER_DELETE_PROHIBITED).destroy_all domain_statuses.where(value: DomainStatus::SERVER_DELETE_PROHIBITED).destroy_all
domain_statuses.reload 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) save(validate: false)
end end
@ -479,3 +480,4 @@ class Domain < ActiveRecord::Base
whois_record.blank? ? create_whois_record : whois_record.save whois_record.blank? ? create_whois_record : whois_record.save
end end
end end
# rubocop: enable Metrics/ClassLength