mirror of
https://github.com/internetee/registry.git
synced 2025-08-12 12:39:34 +02:00
Merge branch 'registry-660' into registry-661
This commit is contained in:
commit
9238348b8e
11 changed files with 12 additions and 13 deletions
|
@ -4,9 +4,6 @@ env:
|
||||||
- DB=postgresql
|
- DB=postgresql
|
||||||
bundler_args: --without development staging production
|
bundler_args: --without development staging production
|
||||||
before_script:
|
before_script:
|
||||||
- "psql -c 'create database registry_test;' -U postgres"
|
|
||||||
- "psql -c 'create database registry_whois_test;' -U postgres"
|
|
||||||
- "psql -c 'create database registry_api_log_test;' -U postgres"
|
|
||||||
- "cp config/application-example.yml config/application.yml"
|
- "cp config/application-example.yml config/application.yml"
|
||||||
- "cp config/database-travis.yml config/database.yml"
|
- "cp config/database-travis.yml config/database.yml"
|
||||||
- "bundle exec rake db:setup:all"
|
- "bundle exec rake db:setup:all"
|
||||||
|
|
|
@ -35,9 +35,11 @@ module Repp
|
||||||
|
|
||||||
if errors.none?
|
if errors.none?
|
||||||
status 204
|
status 204
|
||||||
|
body false
|
||||||
|
@response = {}
|
||||||
else
|
else
|
||||||
status 400
|
status 400
|
||||||
{ errors: errors }
|
@response = { errors: errors }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -67,7 +67,7 @@ module Versions
|
||||||
map do |ver|
|
map do |ver|
|
||||||
o = new(ver.object)
|
o = new(ver.object)
|
||||||
o.version_loader = ver
|
o.version_loader = ver
|
||||||
ver.object_changes.to_h.each { |k, v| o[k]=v[-1] }
|
ver.object_changes.to_h.each { |k, v| o.public_send("#{k}=", v[-1]) }
|
||||||
o
|
o
|
||||||
end
|
end
|
||||||
not_in_history = where(id: (ids.to_a - from_history.map(&:id)))
|
not_in_history = where(id: (ids.to_a - from_history.map(&:id)))
|
||||||
|
|
|
@ -18,6 +18,7 @@ class Contact < ActiveRecord::Base
|
||||||
|
|
||||||
attr_accessor :legal_document_id
|
attr_accessor :legal_document_id
|
||||||
alias_attribute :kind, :ident_type
|
alias_attribute :kind, :ident_type
|
||||||
|
alias_attribute :copy_from_id, :original_id # Old attribute name; for PaperTrail
|
||||||
|
|
||||||
accepts_nested_attributes_for :legal_documents
|
accepts_nested_attributes_for :legal_documents
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ class Domain < ActiveRecord::Base
|
||||||
|
|
||||||
alias_attribute :on_hold_time, :outzone_at
|
alias_attribute :on_hold_time, :outzone_at
|
||||||
alias_attribute :outzone_time, :outzone_at
|
alias_attribute :outzone_time, :outzone_at
|
||||||
|
alias_attribute :auth_info, :transfer_code # Old attribute name; for PaperTrail
|
||||||
|
|
||||||
# TODO: whois requests ip whitelist for full info for own domains and partial info for other domains
|
# TODO: whois requests ip whitelist for full info for own domains and partial info for other domains
|
||||||
# TODO: most inputs should be trimmed before validatation, probably some global logic?
|
# TODO: most inputs should be trimmed before validatation, probably some global logic?
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
- @versions.each do |version|
|
- @versions.each do |version|
|
||||||
- if version
|
- if version
|
||||||
- contact = Contact.new(version.object.to_h)
|
- contact = Contact.new(version.object.to_h)
|
||||||
- version.object_changes.to_h.each{|k,v| contact[k]=v.last}
|
- version.object_changes.to_h.each { |k,v| contact.public_send("#{k}=", v.last) }
|
||||||
|
|
||||||
%tr
|
%tr
|
||||||
%td= link_to(contact.name, admin_contact_version_path(version.id))
|
%td= link_to(contact.name, admin_contact_version_path(version.id))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- contact = Contact.new(@version.object.to_h)
|
- contact = Contact.new(@version.object.to_h)
|
||||||
- @version.object_changes.to_h.each{|k,v| contact[k]=v.last}
|
- @version.object_changes.to_h.each { |k,v| contact.public_send("#{k}=", v.last ) }
|
||||||
= render 'shared/title', name: contact.name
|
= render 'shared/title', name: contact.name
|
||||||
|
|
||||||
.row
|
.row
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
- @versions.each do |version|
|
- @versions.each do |version|
|
||||||
- if version
|
- if version
|
||||||
- domain = Domain.new(version.object.to_h)
|
- domain = Domain.new(version.object.to_h)
|
||||||
- version.object_changes.to_h.each{|k,v| domain[k]=v.last}
|
- version.object_changes.to_h.each{|k,v| domain.public_send("#{k}=", v.last) }
|
||||||
|
|
||||||
%tr
|
%tr
|
||||||
%td= link_to(domain.name, admin_domain_version_path(version.id))
|
%td= link_to(domain.name, admin_domain_version_path(version.id))
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
- else
|
- else
|
||||||
- contact = Contact.all_versions_for([domain.registrant_id], version.created_at).first
|
- contact = Contact.all_versions_for([domain.registrant_id], version.created_at).first
|
||||||
- if contact.nil? && ver = ContactVersion.where(item_id: domain.registrant_id).last
|
- if contact.nil? && ver = ContactVersion.where(item_id: domain.registrant_id).last
|
||||||
- contact = Contact.new(ver.object.to_h.merge(ver.object_changes.to_h.each_with_object({}){|(k,v), o| o[k]=v.last } ))
|
- contact = Contact.new(ver.object.to_h.merge(ver.object_changes.to_h.each_with_object({}){|(k,v), o| o.public_send("#{k}=", v.last) } ))
|
||||||
= contact.try(:name)
|
= contact.try(:name)
|
||||||
= " ".html_safe
|
= " ".html_safe
|
||||||
= "(#{t(:deleted)})"
|
= "(#{t(:deleted)})"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- domain = Domain.new(@version.object.to_h)
|
- domain = Domain.new(@version.object.to_h)
|
||||||
- @version.object_changes.to_h.each{|k,v| domain[k]=v.last}
|
- @version.object_changes.to_h.each{|k,v| domain.public_send("#{k}=", v.last) }
|
||||||
|
|
||||||
- if @version
|
- if @version
|
||||||
- children = HashWithIndifferentAccess.new(@version.children)
|
- children = HashWithIndifferentAccess.new(@version.children)
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
%td
|
%td
|
||||||
%p.nowrap
|
%p.nowrap
|
||||||
= l(domain.updated_at, format: :shorts)
|
= l domain.updated_at
|
||||||
-#- if statuses_link
|
-#- if statuses_link
|
||||||
%br= link_to t(:edit_statuses), edit_admin_domain_path(params[:domain_id])
|
%br= link_to t(:edit_statuses), edit_admin_domain_path(params[:domain_id])
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,8 @@ en:
|
||||||
longer: "%a, %e. %b %Y, %H:%M"
|
longer: "%a, %e. %b %Y, %H:%M"
|
||||||
long: "%A, %e. %B %Y, %H:%M"
|
long: "%A, %e. %B %Y, %H:%M"
|
||||||
short: "%d.%m.%y, %H:%M"
|
short: "%d.%m.%y, %H:%M"
|
||||||
shorts: "%d.%m.%y, %H:%M:%S"
|
|
||||||
date: "%Y-%m-%d"
|
date: "%Y-%m-%d"
|
||||||
date_long: "%d. %B %Y"
|
date_long: "%d. %B %Y"
|
||||||
ydate: "%Y.%m.%d"
|
|
||||||
filename: "%Y-%m-%d_%H.%M"
|
filename: "%Y-%m-%d_%H.%M"
|
||||||
date:
|
date:
|
||||||
formats:
|
formats:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue