mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
parent
857b35417a
commit
f0a7edd6d8
14 changed files with 18 additions and 24 deletions
|
@ -56,6 +56,8 @@ class Contact < ApplicationRecord
|
||||||
|
|
||||||
after_save :update_related_whois_records
|
after_save :update_related_whois_records
|
||||||
|
|
||||||
|
self.ignored_columns = %w[legacy_id legacy_history_id]
|
||||||
|
|
||||||
ORG = 'org'
|
ORG = 'org'
|
||||||
PRIV = 'priv'
|
PRIV = 'priv'
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ class Dnskey < ApplicationRecord
|
||||||
FLAGS = %w(0 256 257) # 256 = ZSK, 257 = KSK
|
FLAGS = %w(0 256 257) # 256 = ZSK, 257 = KSK
|
||||||
DS_DIGEST_TYPE = [1,2]
|
DS_DIGEST_TYPE = [1,2]
|
||||||
|
|
||||||
|
self.ignored_columns = %w[legacy_domain_id]
|
||||||
|
|
||||||
def epp_code_map
|
def epp_code_map
|
||||||
{
|
{
|
||||||
'2005' => [
|
'2005' => [
|
||||||
|
|
|
@ -169,6 +169,8 @@ class Domain < ApplicationRecord
|
||||||
attr_accessor :registrant_typeahead, :update_me,
|
attr_accessor :registrant_typeahead, :update_me,
|
||||||
:epp_pending_update, :epp_pending_delete, :reserved_pw
|
:epp_pending_update, :epp_pending_delete, :reserved_pw
|
||||||
|
|
||||||
|
self.ignored_columns = %w[legacy_id legacy_registrar_id legacy_registrant_id]
|
||||||
|
|
||||||
def subordinate_nameservers
|
def subordinate_nameservers
|
||||||
nameservers.select { |x| x.hostname.end_with?(name) }
|
nameservers.select { |x| x.hostname.end_with?(name) }
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,8 @@ class DomainContact < ApplicationRecord
|
||||||
|
|
||||||
attr_accessor :value_typeahead
|
attr_accessor :value_typeahead
|
||||||
|
|
||||||
|
self.ignored_columns = %w[legacy_domain_id legacy_contact_id]
|
||||||
|
|
||||||
def epp_code_map
|
def epp_code_map
|
||||||
{
|
{
|
||||||
'2302' => [
|
'2302' => [
|
||||||
|
|
|
@ -34,6 +34,8 @@ class Nameserver < ApplicationRecord
|
||||||
|
|
||||||
delegate :name, to: :domain, prefix: true
|
delegate :name, to: :domain, prefix: true
|
||||||
|
|
||||||
|
self.ignored_columns = %w[legacy_domain_id]
|
||||||
|
|
||||||
def epp_code_map
|
def epp_code_map
|
||||||
{
|
{
|
||||||
'2302' => [
|
'2302' => [
|
||||||
|
|
|
@ -46,6 +46,8 @@ class Registrar < ApplicationRecord
|
||||||
RegenerateRegistrarWhoisesJob.enqueue id
|
RegenerateRegistrarWhoisesJob.enqueue id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.ignored_columns = %w[legacy_id]
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
def ordered
|
def ordered
|
||||||
order(name: :asc)
|
order(name: :asc)
|
||||||
|
|
|
@ -8,6 +8,8 @@ class ReservedDomain < ApplicationRecord
|
||||||
|
|
||||||
alias_attribute :registration_code, :password
|
alias_attribute :registration_code, :password
|
||||||
|
|
||||||
|
self.ignored_columns = %w[legacy_id]
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
def pw_for(domain_name)
|
def pw_for(domain_name)
|
||||||
name_in_ascii = SimpleIDN.to_ascii(domain_name)
|
name_in_ascii = SimpleIDN.to_ascii(domain_name)
|
||||||
|
|
|
@ -5,6 +5,8 @@ class User < ApplicationRecord
|
||||||
|
|
||||||
attr_accessor :phone
|
attr_accessor :phone
|
||||||
|
|
||||||
|
self.ignored_columns = %w[legacy_id]
|
||||||
|
|
||||||
def id_role_username
|
def id_role_username
|
||||||
"#{self.id}-#{self.class}: #{self.username}"
|
"#{self.id}-#{self.class}: #{self.username}"
|
||||||
end
|
end
|
||||||
|
|
|
@ -60,9 +60,6 @@ Content-Type: application/json
|
||||||
"period_unit":"y",
|
"period_unit":"y",
|
||||||
"creator_str":null,
|
"creator_str":null,
|
||||||
"updator_str":null,
|
"updator_str":null,
|
||||||
"legacy_id":null,
|
|
||||||
"legacy_registrar_id":null,
|
|
||||||
"legacy_registrant_id":null,
|
|
||||||
"outzone_at":"2016-09-24T09:11:14.861Z",
|
"outzone_at":"2016-09-24T09:11:14.861Z",
|
||||||
"delete_date":"2016-10-24",
|
"delete_date":"2016-10-24",
|
||||||
"registrant_verification_asked_at":null,
|
"registrant_verification_asked_at":null,
|
||||||
|
@ -175,9 +172,6 @@ Content-Type: application/json
|
||||||
"period_unit":"y",
|
"period_unit":"y",
|
||||||
"creator_str":null,
|
"creator_str":null,
|
||||||
"updator_str":null,
|
"updator_str":null,
|
||||||
"legacy_id":null,
|
|
||||||
"legacy_registrar_id":null,
|
|
||||||
"legacy_registrant_id":null,
|
|
||||||
"outzone_at":"2016-09-24T09:11:14.861Z",
|
"outzone_at":"2016-09-24T09:11:14.861Z",
|
||||||
"delete_date":"2016-10-24",
|
"delete_date":"2016-10-24",
|
||||||
"registrant_verification_asked_at":null,
|
"registrant_verification_asked_at":null,
|
||||||
|
@ -282,9 +276,6 @@ Content-Type: application/json
|
||||||
"period_unit":"y",
|
"period_unit":"y",
|
||||||
"creator_str":null,
|
"creator_str":null,
|
||||||
"updator_str":null,
|
"updator_str":null,
|
||||||
"legacy_id":null,
|
|
||||||
"legacy_registrar_id":null,
|
|
||||||
"legacy_registrant_id":null,
|
|
||||||
"outzone_at":"2016-09-24T09:11:14.861Z",
|
"outzone_at":"2016-09-24T09:11:14.861Z",
|
||||||
"delete_date":"2016-10-24",
|
"delete_date":"2016-10-24",
|
||||||
"registrant_verification_asked_at":null,
|
"registrant_verification_asked_at":null,
|
||||||
|
|
|
@ -60,9 +60,6 @@ Content-Type: application/json
|
||||||
"period_unit":"y",
|
"period_unit":"y",
|
||||||
"creator_str":null,
|
"creator_str":null,
|
||||||
"updator_str":null,
|
"updator_str":null,
|
||||||
"legacy_id":null,
|
|
||||||
"legacy_registrar_id":null,
|
|
||||||
"legacy_registrant_id":null,
|
|
||||||
"outzone_at":"2016-09-24T09:11:14.861Z",
|
"outzone_at":"2016-09-24T09:11:14.861Z",
|
||||||
"delete_date":"2016-10-24",
|
"delete_date":"2016-10-24",
|
||||||
"registrant_verification_asked_at":null,
|
"registrant_verification_asked_at":null,
|
||||||
|
@ -204,9 +201,6 @@ Content-Type: application/json
|
||||||
"period_unit":"y",
|
"period_unit":"y",
|
||||||
"creator_str":null,
|
"creator_str":null,
|
||||||
"updator_str":null,
|
"updator_str":null,
|
||||||
"legacy_id":null,
|
|
||||||
"legacy_registrar_id":null,
|
|
||||||
"legacy_registrant_id":null,
|
|
||||||
"outzone_at":"2016-09-24T09:11:14.861Z",
|
"outzone_at":"2016-09-24T09:11:14.861Z",
|
||||||
"delete_date":"2016-10-24",
|
"delete_date":"2016-10-24",
|
||||||
"registrant_verification_asked_at":null,
|
"registrant_verification_asked_at":null,
|
||||||
|
|
|
@ -50,7 +50,6 @@ Content-Type: application/json
|
||||||
"zip": "11111",
|
"zip": "11111",
|
||||||
"country_code": "EE",
|
"country_code": "EE",
|
||||||
"state": null,
|
"state": null,
|
||||||
"legacy_id": null,
|
|
||||||
"statuses": [
|
"statuses": [
|
||||||
"ok"
|
"ok"
|
||||||
],
|
],
|
||||||
|
|
|
@ -48,9 +48,6 @@ Content-Type: application/json
|
||||||
"period_unit": "y",
|
"period_unit": "y",
|
||||||
"creator_str": null,
|
"creator_str": null,
|
||||||
"updator_str": null,
|
"updator_str": null,
|
||||||
"legacy_id": null,
|
|
||||||
"legacy_registrar_id": null,
|
|
||||||
"legacy_registrant_id": null,
|
|
||||||
"outzone_at": "2016-09-24T09:11:14.861Z",
|
"outzone_at": "2016-09-24T09:11:14.861Z",
|
||||||
"delete_date": "2016-10-24",
|
"delete_date": "2016-10-24",
|
||||||
"registrant_verification_asked_at": null,
|
"registrant_verification_asked_at": null,
|
||||||
|
|
|
@ -32,9 +32,6 @@ module Serializers
|
||||||
period_unit: domain.period_unit,
|
period_unit: domain.period_unit,
|
||||||
creator_str: domain.creator_str,
|
creator_str: domain.creator_str,
|
||||||
updator_str: domain.updator_str,
|
updator_str: domain.updator_str,
|
||||||
legacy_id: domain.legacy_id,
|
|
||||||
legacy_registrar_id: domain.legacy_registrar_id,
|
|
||||||
legacy_registrant_id: domain.legacy_registrant_id,
|
|
||||||
outzone_at: domain.outzone_at,
|
outzone_at: domain.outzone_at,
|
||||||
delete_date: domain.delete_date,
|
delete_date: domain.delete_date,
|
||||||
registrant_verification_asked_at: domain.registrant_verification_asked_at,
|
registrant_verification_asked_at: domain.registrant_verification_asked_at,
|
||||||
|
|
|
@ -70,7 +70,7 @@ class SerializersRegistrantApiDomainTest < ActiveSupport::TestCase
|
||||||
def test_other_fields_are_also_present
|
def test_other_fields_are_also_present
|
||||||
keys = %i[id name registrar registered_at valid_to created_at updated_at
|
keys = %i[id name registrar registered_at valid_to created_at updated_at
|
||||||
registrant tech_contacts admin_contacts transfer_code name_dirty name_puny period
|
registrant tech_contacts admin_contacts transfer_code name_dirty name_puny period
|
||||||
period_unit creator_str updator_str legacy_id legacy_registrar_id legacy_registrant_id
|
period_unit creator_str updator_str
|
||||||
outzone_at delete_date registrant_verification_asked_at
|
outzone_at delete_date registrant_verification_asked_at
|
||||||
registrant_verification_token pending_json force_delete_date statuses
|
registrant_verification_token pending_json force_delete_date statuses
|
||||||
locked_by_registrant_at status_notes nameservers]
|
locked_by_registrant_at status_notes nameservers]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue