mirror of
https://github.com/internetee/registry.git
synced 2025-06-13 08:04:45 +02:00
commit
b6a2de0878
8 changed files with 14 additions and 6 deletions
|
@ -34,7 +34,7 @@ class WhoisRecord < ActiveRecord::Base
|
||||||
h[:status] = domain.statuses.map { |x| status_map[x] || x }
|
h[:status] = domain.statuses.map { |x| status_map[x] || x }
|
||||||
h[:registered] = domain.registered_at.try(:to_s, :iso8601)
|
h[:registered] = domain.registered_at.try(:to_s, :iso8601)
|
||||||
h[:changed] = domain.updated_at.try(:to_s, :iso8601)
|
h[:changed] = domain.updated_at.try(:to_s, :iso8601)
|
||||||
h[:expire] = domain.valid_to.try(:to_date).try(:to_s)
|
h[:expire] = domain.valid_to.to_date.to_s
|
||||||
h[:outzone] = domain.outzone_at.try(:to_date).try(:to_s)
|
h[:outzone] = domain.outzone_at.try(:to_date).try(:to_s)
|
||||||
h[:delete] = [domain.delete_at, domain.force_delete_at].compact.min.try(:to_date).try(:to_s)
|
h[:delete] = [domain.delete_at, domain.force_delete_at].compact.min.try(:to_date).try(:to_s)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ xml.epp_head do
|
||||||
xml.tag!('domain:creData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
|
xml.tag!('domain:creData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
|
||||||
xml.tag!('domain:name', @domain.name)
|
xml.tag!('domain:name', @domain.name)
|
||||||
xml.tag!('domain:crDate', @domain.created_at.try(:iso8601))
|
xml.tag!('domain:crDate', @domain.created_at.try(:iso8601))
|
||||||
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
|
xml.tag!('domain:exDate', @domain.valid_to.iso8601)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ xml.epp_head do
|
||||||
xml.tag!('domain:upDate', @domain.updated_at.try(:iso8601))
|
xml.tag!('domain:upDate', @domain.updated_at.try(:iso8601))
|
||||||
end
|
end
|
||||||
|
|
||||||
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
|
xml.tag!('domain:exDate', @domain.valid_to.iso8601)
|
||||||
|
|
||||||
# TODO Make domain transferrable
|
# TODO Make domain transferrable
|
||||||
#xml.tag!('domain:trDate', @domain.transferred_at) if @domain.transferred_at
|
#xml.tag!('domain:trDate', @domain.transferred_at) if @domain.transferred_at
|
||||||
|
|
|
@ -5,5 +5,5 @@ builder.tag!('domain:trnData', 'xmlns:domain' => 'https://epp.tld.ee/schema/doma
|
||||||
builder.tag!('domain:reDate', dt.transfer_requested_at.try(:iso8601))
|
builder.tag!('domain:reDate', dt.transfer_requested_at.try(:iso8601))
|
||||||
builder.tag!('domain:acID', dt.old_registrar.code)
|
builder.tag!('domain:acID', dt.old_registrar.code)
|
||||||
builder.tag!('domain:acDate', dt.transferred_at.try(:iso8601) || dt.wait_until.try(:iso8601))
|
builder.tag!('domain:acDate', dt.transferred_at.try(:iso8601) || dt.wait_until.try(:iso8601))
|
||||||
builder.tag!('domain:exDate', dt.domain_valid_to.try(:iso8601))
|
builder.tag!('domain:exDate', dt.domain_valid_to.iso8601)
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,7 +7,7 @@ xml.epp_head do
|
||||||
xml.resData do
|
xml.resData do
|
||||||
xml.tag!('domain:renData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
|
xml.tag!('domain:renData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
|
||||||
xml.tag!('domain:name', @domain[:name])
|
xml.tag!('domain:name', @domain[:name])
|
||||||
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
|
xml.tag!('domain:exDate', @domain.valid_to.iso8601)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class ChangeDomainsValidToToNotNull < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
change_column_null :domains, :valid_to, false
|
||||||
|
end
|
||||||
|
end
|
|
@ -872,7 +872,7 @@ CREATE TABLE domains (
|
||||||
registrar_id integer NOT NULL,
|
registrar_id integer NOT NULL,
|
||||||
registered_at timestamp without time zone,
|
registered_at timestamp without time zone,
|
||||||
status character varying,
|
status character varying,
|
||||||
valid_to timestamp without time zone,
|
valid_to timestamp without time zone NOT NULL,
|
||||||
registrant_id integer NOT NULL,
|
registrant_id integer NOT NULL,
|
||||||
transfer_code character varying NOT NULL,
|
transfer_code character varying NOT NULL,
|
||||||
created_at timestamp without time zone,
|
created_at timestamp without time zone,
|
||||||
|
@ -4714,3 +4714,5 @@ INSERT INTO schema_migrations (version) VALUES ('20180314122722');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20180327151906');
|
INSERT INTO schema_migrations (version) VALUES ('20180327151906');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20180331200125');
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ FactoryBot.define do
|
||||||
sequence(:name) { |n| "test#{n}.com" }
|
sequence(:name) { |n| "test#{n}.com" }
|
||||||
period 1
|
period 1
|
||||||
period_unit 'y' # Year
|
period_unit 'y' # Year
|
||||||
|
valid_to Time.zone.parse('2010-07-05')
|
||||||
registrar
|
registrar
|
||||||
registrant
|
registrant
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue