mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Fix rubocop
This commit is contained in:
parent
2fb632b7a9
commit
ae746be970
4 changed files with 10 additions and 4 deletions
|
@ -236,6 +236,8 @@ class EppController < ApplicationController
|
||||||
end
|
end
|
||||||
# rubocop: enable Style/PredicateName
|
# rubocop: enable Style/PredicateName
|
||||||
|
|
||||||
|
# rubocop: disable Metrics/PerceivedComplexity
|
||||||
|
# rubocop: disable Metrics/CyclomaticComplexity
|
||||||
def write_to_epp_log
|
def write_to_epp_log
|
||||||
# return nil if EPP_LOG_ENABLED
|
# return nil if EPP_LOG_ENABLED
|
||||||
request_command = params[:command] || params[:action] # error receives :command, other methods receive :action
|
request_command = params[:command] || params[:action] # error receives :command, other methods receive :action
|
||||||
|
@ -257,4 +259,6 @@ class EppController < ApplicationController
|
||||||
ip: request.ip
|
ip: request.ip
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
# rubocop: enable Metrics/PerceivedComplexity
|
||||||
|
# rubocop: enable Metrics/CyclomaticComplexity
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,8 @@ class Registrant::DomainUpdateConfirmsController < RegistrantController
|
||||||
@domain = nil unless @domain.registrant_update_confirmable?(params[:token])
|
@domain = nil unless @domain.registrant_update_confirmable?(params[:token])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# rubocop: disable Metrics/PerceivedComplexity
|
||||||
|
# rubocop: disable Metrics/CyclomaticComplexity
|
||||||
def update
|
def update
|
||||||
@domain = Domain.find(params[:id])
|
@domain = Domain.find(params[:id])
|
||||||
unless @domain.registrant_update_confirmable?(params[:token])
|
unless @domain.registrant_update_confirmable?(params[:token])
|
||||||
|
@ -37,4 +39,6 @@ class Registrant::DomainUpdateConfirmsController < RegistrantController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# rubocop: enable Metrics/PerceivedComplexity
|
||||||
|
# rubocop: enable Metrics/CyclomaticComplexity
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,9 +14,8 @@ class Certificate < ActiveRecord::Base
|
||||||
validate :validate_csr_and_crt
|
validate :validate_csr_and_crt
|
||||||
|
|
||||||
def validate_csr_and_crt
|
def validate_csr_and_crt
|
||||||
if csr.blank? && crt.blank?
|
return if csr.present? || crt.present?
|
||||||
errors.add(:base, I18n.t(:crt_or_csr_must_be_present))
|
errors.add(:base, I18n.t(:crt_or_csr_must_be_present))
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def parsed_crt
|
def parsed_crt
|
||||||
|
|
|
@ -297,7 +297,6 @@ class Domain < ActiveRecord::Base
|
||||||
registrant.try(:name)
|
registrant.try(:name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# rubocop:disable Lint/Loop
|
# rubocop:disable Lint/Loop
|
||||||
def generate_auth_info
|
def generate_auth_info
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue