mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +02:00
Update whois body
This commit is contained in:
parent
60f4198094
commit
dfe93bd347
1 changed files with 7 additions and 2 deletions
|
@ -15,6 +15,7 @@ class WhoisRecord < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
@disclosed = []
|
||||||
h[:name] = domain.name
|
h[:name] = domain.name
|
||||||
h[:registrant] = domain.registrant.name
|
h[:registrant] = domain.registrant.name
|
||||||
h[:status] = domain.domain_statuses.map(&:human_value).join(', ')
|
h[:status] = domain.domain_statuses.map(&:human_value).join(', ')
|
||||||
|
@ -28,6 +29,7 @@ class WhoisRecord < ActiveRecord::Base
|
||||||
h[:registrar_update_at] = domain.registrar.updated_at.to_s(:db)
|
h[:registrar_update_at] = domain.registrar.updated_at.to_s(:db)
|
||||||
h[:admin_contacts] = []
|
h[:admin_contacts] = []
|
||||||
domain.admin_contacts.each do |ac|
|
domain.admin_contacts.each do |ac|
|
||||||
|
@disclosed << [:email, ac.email]
|
||||||
h[:admin_contacts] << {
|
h[:admin_contacts] << {
|
||||||
name: ac.name,
|
name: ac.name,
|
||||||
email: ac.email,
|
email: ac.email,
|
||||||
|
@ -37,6 +39,7 @@ class WhoisRecord < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
h[:tech_contacts] = []
|
h[:tech_contacts] = []
|
||||||
domain.tech_contacts.each do |tc|
|
domain.tech_contacts.each do |tc|
|
||||||
|
@disclosed << [:email, tc.email]
|
||||||
h[:tech_contacts] << {
|
h[:tech_contacts] << {
|
||||||
name: tc.name,
|
name: tc.name,
|
||||||
email: tc.email,
|
email: tc.email,
|
||||||
|
@ -52,6 +55,8 @@ class WhoisRecord < ActiveRecord::Base
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
h[:disclosed] = @disclosed
|
||||||
|
|
||||||
self.name = h[:name]
|
self.name = h[:name]
|
||||||
self.body = generated_body
|
self.body = generated_body
|
||||||
self.json = h
|
self.json = h
|
||||||
|
@ -89,7 +94,7 @@ More information at http://internet.ee
|
||||||
out << (admins.size > 1 ? "\nAdministrative contacts" : "\nAdministrative contact")
|
out << (admins.size > 1 ? "\nAdministrative contacts" : "\nAdministrative contact")
|
||||||
admins.each do |c|
|
admins.each do |c|
|
||||||
out << "\n name: #{c[:name]}"
|
out << "\n name: #{c[:name]}"
|
||||||
out << "\n e-mail: Not Disclosed - Visit www.internet.ee for webbased WHOIS"
|
out << "\n email: Not Disclosed - Visit www.internet.ee for webbased WHOIS"
|
||||||
out << "\n registrar: #{c[:registrar]}"
|
out << "\n registrar: #{c[:registrar]}"
|
||||||
out << "\n created: #{c[:created_at]}"
|
out << "\n created: #{c[:created_at]}"
|
||||||
out << "\n"
|
out << "\n"
|
||||||
|
@ -98,7 +103,7 @@ More information at http://internet.ee
|
||||||
out << (techs.size > 1 ? "\nTechnical contacts" : "\nTechnical contact:")
|
out << (techs.size > 1 ? "\nTechnical contacts" : "\nTechnical contact:")
|
||||||
techs.each do |c|
|
techs.each do |c|
|
||||||
out << "\n name: #{c[:name]}"
|
out << "\n name: #{c[:name]}"
|
||||||
out << "\n e-mail: Not Disclosed - Visit www.internet.ee for webbased WHOIS"
|
out << "\n email: Not Disclosed - Visit www.internet.ee for webbased WHOIS"
|
||||||
out << "\n registrar: #{c[:registrar]}"
|
out << "\n registrar: #{c[:registrar]}"
|
||||||
out << "\n created: #{c[:created_at]}"
|
out << "\n created: #{c[:created_at]}"
|
||||||
out << "\n"
|
out << "\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue