Merge branch 'master' of github.com:domify/registry

This commit is contained in:
Martin Lensment 2015-02-03 17:12:11 +02:00
commit 994d4140c2
3 changed files with 9 additions and 2 deletions

View file

@ -72,3 +72,8 @@ Style/ClassAndModuleChildren:
# Allow to use Estonian terms/data in comments # Allow to use Estonian terms/data in comments
Style/AsciiComments: Style/AsciiComments:
Enabled: false Enabled: false
# turn off comment intention check during development
# because NerdCommenter honors commented code intentions
Style/CommentIndentation:
Enabled: false

View file

@ -46,7 +46,7 @@ class Epp::ContactsController < EppController
@disclosure_policy = @contact.disclosure.try(:attributes_with_flag) @disclosure_policy = @contact.disclosure.try(:attributes_with_flag)
@owner = owner?(false) @owner = owner?(false)
# need to reload contact eagerly # need to reload contact eagerly
@contact = find_contact('with eager load') if @owner # for clarity, could just be true @contact = find_contact if @owner # for clarity, could just be true
render_epp_response 'epp/contacts/info' render_epp_response 'epp/contacts/info'
end end
@ -114,7 +114,7 @@ class Epp::ContactsController < EppController
## SHARED ## SHARED
def find_contact(eager_load = nil) def find_contact
contact = Contact.find_by(code: @ph[:id]) contact = Contact.find_by(code: @ph[:id])
unless contact unless contact
epp_errors << { code: '2303', epp_errors << { code: '2303',

View file

@ -301,6 +301,7 @@ class Domain < ActiveRecord::Base
log log
end end
# rubocop:disable Metrics/MethodLength
def update_whois_body def update_whois_body
self.whois_body = <<-EOS self.whois_body = <<-EOS
This Whois Server contains information on This Whois Server contains information on
@ -335,6 +336,7 @@ class Domain < ActiveRecord::Base
changed: changed:
EOS EOS
end end
# rubocop:enabled Metrics/MethodLength
def whois_server_update(name, whois_body) def whois_server_update(name, whois_body)
wd = Whois::Domain.find_or_initialize_by(name: name) wd = Whois::Domain.find_or_initialize_by(name: name)