Merge pull request #258 from internetee/registry-186

Registry 186
This commit is contained in:
Timo Võhmar 2016-11-25 15:31:58 +02:00 committed by GitHub
commit a748b30c41
144 changed files with 2950 additions and 954 deletions

View file

@ -1,3 +1,7 @@
18.11.2016
* Domain expiration emails are now sent out to admin contacts as well. Sending bug is fixed.
* Include detailed registrar's contact info in emails
25.10.2016 25.10.2016
* Outdated specs removed, failing specs fixed, rspec config improved * Outdated specs removed, failing specs fixed, rspec config improved

View file

@ -3,7 +3,7 @@ class Admin::ZonefilesController < ApplicationController
# TODO: Refactor this # TODO: Refactor this
def create def create
if ZonefileSetting.pluck(:origin).include?(params[:origin]) if ZonefileSetting.origins.include?(params[:origin])
@zonefile = ActiveRecord::Base.connection.execute( @zonefile = ActiveRecord::Base.connection.execute(
"select generate_zonefile('#{params[:origin]}')" "select generate_zonefile('#{params[:origin]}')"

View file

@ -0,0 +1,22 @@
class DomainDeleteConfirmEmailJob < Que::Job
def run(domain_id)
domain = Domain.find(domain_id)
log(domain)
DomainDeleteMailer.confirm(domain: domain,
registrar: domain.registrar,
registrant: domain.registrant).deliver_now
end
private
def log(domain)
message = "Send DomainDeleteMailer#confirm email for domain #{domain.name} (##{domain.id})" \
" to #{domain.registrant_email}"
logger.info(message)
end
def logger
Rails.logger
end
end

View file

@ -0,0 +1,22 @@
class DomainDeleteForcedEmailJob < Que::Job
def run(domain_id)
domain = Domain.find(domain_id)
log(domain)
DomainDeleteMailer.forced(domain: domain,
registrar: domain.registrar,
registrant: domain.registrant).deliver_now
end
private
def log(domain)
message = "Send DomainDeleteMailer#forced email for domain #{domain.name} (##{domain.id})" \
" to #{domain.primary_contact_emails.join(', ')}"
logger.info(message)
end
def logger
Rails.logger
end
end

View file

@ -0,0 +1,9 @@
class DomainExpireEmailJob < Que::Job
def run(domain_id)
domain = Domain.find(domain_id)
return if domain.registered?
DomainExpireMailer.expired(domain: domain, registrar: domain.registrar).deliver_now
end
end

View file

@ -16,7 +16,10 @@ class DomainUpdateConfirmJob < Que::Job
domain.clean_pendings! domain.clean_pendings!
raise_errors!(domain) raise_errors!(domain)
when RegistrantVerification::REJECTED when RegistrantVerification::REJECTED
domain.send_mail :pending_update_rejected_notification_for_new_registrant RegistrantChangeMailer.rejected(domain: domain,
registrar: domain.registrar,
registrant: domain.registrant).deliver_now
domain.poll_message!(:poll_pending_update_rejected_by_registrant) domain.poll_message!(:poll_pending_update_rejected_by_registrant)
domain.clean_pendings_lowlevel domain.clean_pendings_lowlevel
end end

View file

@ -0,0 +1,23 @@
class RegistrantChangeConfirmEmailJob < Que::Job
def run(domain_id, new_registrant_id)
domain = Domain.find(domain_id)
new_registrant = Registrant.find(new_registrant_id)
log(domain)
RegistrantChangeMailer.confirm(domain: domain,
registrar: domain.registrar,
current_registrant: domain.registrant,
new_registrant: new_registrant).deliver_now
end
private
def log(domain)
message = "Send RegistrantChangeMailer#confirm email for domain #{domain.name} (##{domain.id}) to #{domain.registrant_email}"
logger.info(message)
end
def logger
Rails.logger
end
end

View file

@ -0,0 +1,20 @@
class RegistrantChangeExpiredEmailJob < Que::Job
def run(domain_id)
domain = Domain.find(domain_id)
log(domain)
RegistrantChangeMailer.expired(domain: domain,
registrar: domain.registrar,
registrant: domain.registrant).deliver_now
end
private
def log(domain)
message = "Send RegistrantChangeMailer#expired email for domain #{domain.name} (##{domain.id}) to #{domain.new_registrant_email}"
logger.info(message)
end
def logger
Rails.logger
end
end

View file

@ -0,0 +1,22 @@
class RegistrantChangeNoticeEmailJob < Que::Job
def run(domain_id, new_registrant_id)
domain = Domain.find(domain_id)
new_registrant = Registrant.find(new_registrant_id)
log(domain, new_registrant)
RegistrantChangeMailer.notice(domain: domain,
registrar: domain.registrar,
current_registrant: domain.registrant,
new_registrant: new_registrant).deliver_now
end
private
def log(domain, new_registrant)
message = "Send RegistrantChangeMailer#notice email for domain #{domain.name} (##{domain.id}) to #{new_registrant.email}"
logger.info(message)
end
def logger
Rails.logger
end
end

View file

View file

@ -0,0 +1,24 @@
class DomainDeleteMailer < ApplicationMailer
def confirm(domain:, registrar:, registrant:)
@domain = DomainPresenter.new(domain: domain, view: view_context)
@registrar = RegistrarPresenter.new(registrar: registrar, view: view_context)
@confirm_url = confirm_url(domain)
subject = default_i18n_subject(domain_name: domain.name)
mail(to: registrant.email, subject: subject)
end
def forced(domain:, registrar:, registrant:)
@domain = DomainPresenter.new(domain: domain, view: view_context)
@registrar = RegistrarPresenter.new(registrar: registrar, view: view_context)
@registrant = RegistrantPresenter.new(registrant: registrant, view: view_context)
mail(to: domain.primary_contact_emails)
end
private
def confirm_url(domain)
registrant_domain_delete_confirm_url(domain, token: domain.registrant_verification_token)
end
end

View file

@ -0,0 +1,38 @@
class DomainExpireMailer < ApplicationMailer
def expired(domain:, registrar:)
@domain = domain_presenter(domain: domain)
@registrar = registrar_presenter(registrar: registrar)
recipient = filter_invalid_emails(emails: domain.primary_contact_emails, domain: domain)
subject = default_i18n_subject(domain_name: domain.name)
logger.info("Send DomainExpireMailer#expired email for domain #{domain.name} (##{domain.id})" \
" to #{recipient.join(', ')}")
mail(to: recipient, subject: subject)
end
private
def domain_presenter(domain:)
DomainPresenter.new(domain: domain, view: view_context)
end
def registrar_presenter(registrar:)
RegistrarPresenter.new(registrar: registrar, view: view_context)
end
# Needed because there are invalid emails in the database, which have been imported from legacy app
def filter_invalid_emails(emails:, domain:)
emails.select do |email|
valid = EmailValidator.new(email).valid?
unless valid
logger.info("Unable to send DomainExpireMailer#expired email for domain #{domain.name} (##{domain.id})" \
" to invalid recipient #{email}")
end
valid
end
end
end

View file

@ -1,15 +1,6 @@
class DomainMailer < ApplicationMailer class DomainMailer < ApplicationMailer
include Que::Mailer include Que::Mailer
def pending_update_request_for_old_registrant(params)
compose_from(params)
end
def pending_update_notification_for_new_registrant(params)
compose_from(params)
end
def registrant_updated_notification_for_new_registrant(domain_id, old_registrant_id, new_registrant_id, should_deliver) def registrant_updated_notification_for_new_registrant(domain_id, old_registrant_id, new_registrant_id, should_deliver)
@domain = Domain.find_by(id: domain_id) @domain = Domain.find_by(id: domain_id)
return unless @domain return unless @domain
@ -39,39 +30,6 @@ class DomainMailer < ApplicationMailer
name: @domain.name)} [#{@domain.name}]") name: @domain.name)} [#{@domain.name}]")
end end
def pending_update_rejected_notification_for_new_registrant(params)
compose_from(params)
end
def pending_update_expired_notification_for_new_registrant(params)
compose_from(params)
end
def pending_deleted(domain_id, old_registrant_id, should_deliver)
@domain = Domain.find_by(id: domain_id)
@old_registrant = Registrant.find(old_registrant_id)
return unless @domain
return if delivery_off?(@domain, should_deliver)
if @domain.registrant_verification_token.blank?
logger.warn "EMAIL NOT DELIVERED: registrant_verification_token is missing for #{@domain.name}"
return
end
if @domain.registrant_verification_asked_at.blank?
logger.warn "EMAIL NOT DELIVERED: registrant_verification_asked_at is missing for #{@domain.name}"
return
end
confirm_path = "#{ENV['registrant_url']}/registrant/domain_delete_confirms"
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
return if whitelist_blocked?(@old_registrant.email)
mail(to: format(@old_registrant.email),
subject: "#{I18n.t(:domain_pending_deleted_subject,
name: @domain.name)} [#{@domain.name}]")
end
def pending_delete_rejected_notification(domain_id, should_deliver) def pending_delete_rejected_notification(domain_id, should_deliver)
@domain = Domain.find_by(id: domain_id) @domain = Domain.find_by(id: domain_id)
return unless @domain return unless @domain
@ -117,29 +75,6 @@ class DomainMailer < ApplicationMailer
name: @domain.name)} [#{@domain.name}]") name: @domain.name)} [#{@domain.name}]")
end end
def expiration_reminder(domain_id)
@domain = Domain.find_by(id: domain_id)
return if @domain.nil? || !@domain.statuses.include?(DomainStatus::EXPIRED) || whitelist_blocked?(@domain.registrant.email)
return if whitelist_blocked?(@domain.registrant.email)
mail(to: format(@domain.registrant.email),
subject: "#{I18n.t(:expiration_remind_subject,
name: @domain.name)} [#{@domain.name}]")
end
def force_delete(domain_id, should_deliver)
@domain = Domain.find_by(id: domain_id)
return if delivery_off?(@domain, should_deliver)
emails = ([@domain.registrant.email] + @domain.admin_contacts.map { |x| format(x.email) }).uniq
return if whitelist_blocked?(emails)
formatted_emails = emails.map { |x| format(x) }
mail(to: formatted_emails,
subject: "#{I18n.t(:force_delete_subject)}"
)
end
private private
# app/models/DomainMailModel provides the data for mail that can be composed_from # app/models/DomainMailModel provides the data for mail that can be composed_from
# which ensures that values of objects are captured when they are valid, not later when this method is executed # which ensures that values of objects are captured when they are valid, not later when this method is executed

View file

@ -0,0 +1,45 @@
class RegistrantChangeMailer < ApplicationMailer
def confirm(domain:, registrar:, current_registrant:, new_registrant:)
@domain = DomainPresenter.new(domain: domain, view: view_context)
@registrar = RegistrarPresenter.new(registrar: registrar, view: view_context)
@new_registrant = RegistrantPresenter.new(registrant: new_registrant, view: view_context)
@confirm_url = confirm_url(domain)
subject = default_i18n_subject(domain_name: domain.name)
mail(to: current_registrant.email, subject: subject)
end
def notice(domain:, registrar:, current_registrant:, new_registrant:)
@domain = DomainPresenter.new(domain: domain, view: view_context)
@registrar = RegistrarPresenter.new(registrar: registrar, view: view_context)
@current_registrant = RegistrantPresenter.new(registrant: current_registrant, view: view_context)
@new_registrant = RegistrantPresenter.new(registrant: new_registrant, view: view_context)
subject = default_i18n_subject(domain_name: domain.name)
mail(to: new_registrant.email, subject: subject)
end
def rejected(domain:, registrar:, registrant:)
@domain = DomainPresenter.new(domain: domain, view: view_context)
@registrar = RegistrarPresenter.new(registrar: registrar, view: view_context)
@registrant = RegistrantPresenter.new(registrant: registrant, view: view_context)
subject = default_i18n_subject(domain_name: domain.name)
mail(to: domain.new_registrant_email, subject: subject)
end
def expired(domain:, registrar:, registrant:)
@domain = DomainPresenter.new(domain: domain, view: view_context)
@registrar = RegistrarPresenter.new(registrar: registrar, view: view_context)
@registrant = RegistrantPresenter.new(registrant: registrant, view: view_context)
subject = default_i18n_subject(domain_name: domain.name)
mail(to: domain.new_registrant_email, subject: subject)
end
private
def confirm_url(domain)
registrant_domain_update_confirm_url(domain, token: domain.registrant_verification_token)
end
end

View file

@ -0,0 +1,31 @@
module Concerns::Domain::Expirable
extend ActiveSupport::Concern
included do
alias_attribute :expire_time, :valid_to
end
class_methods do
def expired
where("#{attribute_alias(:expire_time)} <= ?", Time.zone.now)
end
end
def registered?
!expired?
end
def expired?
expire_time <= Time.zone.now
end
def expirable?
return false if expire_time > Time.zone.now
if statuses.include?(DomainStatus::EXPIRED) && outzone_at.present? && delete_at.present?
return false
end
true
end
end

View file

@ -250,6 +250,13 @@ class Contact < ActiveRecord::Base
kit.to_pdf kit.to_pdf
end end
def names
pluck(:name)
end
def emails
pluck(:email)
end
end end
def roid def roid

View file

@ -3,12 +3,19 @@ class Domain < ActiveRecord::Base
include UserEvents include UserEvents
include Versions # version/domain_version.rb include Versions # version/domain_version.rb
include Statuses include Statuses
include Concerns::Domain::Expirable
has_paper_trail class_name: "DomainVersion", meta: { children: :children_log } has_paper_trail class_name: "DomainVersion", meta: { children: :children_log }
attr_accessor :roles attr_accessor :roles
attr_accessor :legal_document_id attr_accessor :legal_document_id
alias_attribute :on_hold_time, :outzone_at
alias_attribute :force_delete_time, :force_delete_at
alias_attribute :outzone_time, :outzone_at
alias_attribute :delete_time, :delete_at
# 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?
@ -206,11 +213,6 @@ class Domain < ActiveRecord::Base
DomainCron.send(__method__) DomainCron.send(__method__)
end end
def self.start_expire_period
ActiveSupport::Deprecation.instance.deprecation_warning(DomainCron, __method__)
DomainCron.send(__method__)
end
def self.start_redemption_grace_period def self.start_redemption_grace_period
ActiveSupport::Deprecation.instance.deprecation_warning(DomainCron, __method__) ActiveSupport::Deprecation.instance.deprecation_warning(DomainCron, __method__)
DomainCron.send(__method__) DomainCron.send(__method__)
@ -284,16 +286,6 @@ class Domain < ActiveRecord::Base
domain_transfers.find_by(status: DomainTransfer::PENDING) domain_transfers.find_by(status: DomainTransfer::PENDING)
end end
def expirable?
return false if valid_to > Time.zone.now
if statuses.include?(DomainStatus::EXPIRED) && outzone_at.present? && delete_at.present?
return false
end
true
end
def server_holdable? def server_holdable?
return false if statuses.include?(DomainStatus::SERVER_HOLD) return false if statuses.include?(DomainStatus::SERVER_HOLD)
return false if statuses.include?(DomainStatus::SERVER_MANUAL_INZONE) return false if statuses.include?(DomainStatus::SERVER_MANUAL_INZONE)
@ -310,7 +302,7 @@ class Domain < ActiveRecord::Base
def renewable? def renewable?
if Setting.days_to_renew_domain_before_expire != 0 if Setting.days_to_renew_domain_before_expire != 0
# if you can renew domain at days_to_renew before domain expiration # if you can renew domain at days_to_renew before domain expiration
if (valid_to.to_date - Date.today) + 1 > Setting.days_to_renew_domain_before_expire if (expire_time.to_date - Date.today) + 1 > Setting.days_to_renew_domain_before_expire
return false return false
end end
end end
@ -387,10 +379,10 @@ class Domain < ActiveRecord::Base
new_registrant_email = registrant.email new_registrant_email = registrant.email
new_registrant_name = registrant.name new_registrant_name = registrant.name
send_mail :pending_update_request_for_old_registrant RegistrantChangeConfirmEmailJob.enqueue(id, new_registrant_id)
send_mail :pending_update_notification_for_new_registrant RegistrantChangeNoticeEmailJob.enqueue(id, new_registrant_id)
reload # revert back to original reload
self.pending_json = pending_json_cache self.pending_json = pending_json_cache
self.registrant_verification_token = token self.registrant_verification_token = token
@ -402,8 +394,8 @@ class Domain < ActiveRecord::Base
pending_json['new_registrant_name'] = new_registrant_name pending_json['new_registrant_name'] = new_registrant_name
# This pending_update! method is triggered by before_update # This pending_update! method is triggered by before_update
# Note, all before_save callbacks are excecuted before before_update, # Note, all before_save callbacks are executed before before_update,
# thus automatic statuses has already excectued by this point # thus automatic statuses has already executed by this point
# and we need to trigger automatic statuses manually (second time). # and we need to trigger automatic statuses manually (second time).
manage_automatic_statuses manage_automatic_statuses
end end
@ -449,7 +441,7 @@ class Domain < ActiveRecord::Base
pending_delete_confirmation! pending_delete_confirmation!
save(validate: false) # should check if this did succeed save(validate: false) # should check if this did succeed
DomainMailer.pending_deleted(id, registrant_id_was, deliver_emails).deliver DomainDeleteConfirmEmailJob.enqueue(id)
end end
def cancel_pending_delete def cancel_pending_delete
@ -570,12 +562,15 @@ class Domain < ActiveRecord::Base
end end
self.force_delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).utc.beginning_of_day unless force_delete_at self.force_delete_at = (Time.zone.now + (Setting.redemption_grace_period.days + 1.day)).utc.beginning_of_day unless force_delete_at
transaction do transaction do
save!(validate: false) save!(validate: false)
registrar.messages.create!( registrar.messages.create!(
body: I18n.t('force_delete_set_on_domain', domain: name) body: I18n.t('force_delete_set_on_domain', domain: name)
) )
DomainMailer.force_delete(id, true).deliver
DomainDeleteForcedEmailJob.enqueue(id)
return true return true
end end
false false
@ -597,7 +592,7 @@ class Domain < ActiveRecord::Base
end end
def set_graceful_expired def set_graceful_expired
self.outzone_at = valid_to + self.class.expire_warning_period self.outzone_at = expire_time + self.class.expire_warning_period
self.delete_at = outzone_at + self.class.redemption_grace_period self.delete_at = outzone_at + self.class.redemption_grace_period
self.statuses |= [DomainStatus::EXPIRED] self.statuses |= [DomainStatus::EXPIRED]
end end
@ -627,7 +622,7 @@ class Domain < ActiveRecord::Base
when DomainStatus::SERVER_MANUAL_INZONE # removal causes server hold to set when DomainStatus::SERVER_MANUAL_INZONE # removal causes server hold to set
self.outzone_at = Time.zone.now if self.force_delete_at.present? self.outzone_at = Time.zone.now if self.force_delete_at.present?
when DomainStatus::DomainStatus::EXPIRED # removal causes server hold to set when DomainStatus::DomainStatus::EXPIRED # removal causes server hold to set
self.outzone_at = self.valid_to + 15.day self.outzone_at = self.expire_time + 15.day
when DomainStatus::DomainStatus::SERVER_HOLD # removal causes server hold to set when DomainStatus::DomainStatus::SERVER_HOLD # removal causes server hold to set
self.outzone_at = nil self.outzone_at = nil
end end
@ -725,6 +720,33 @@ class Domain < ActiveRecord::Base
DomainMailer.send(action, DomainMailModel.new(self).send(action)).deliver DomainMailer.send(action, DomainMailModel.new(self).send(action)).deliver
end end
def admin_contact_names
admin_contacts.names
end
def admin_contact_emails
admin_contacts.emails
end
def tech_contact_names
tech_contacts.names
end
def nameserver_hostnames
nameservers.hostnames
end
def primary_contact_emails
(admin_contact_emails << registrant_email).uniq
end
def new_registrant_email
pending_json['new_registrant_email']
end
def new_registrant_id
pending_json['new_registrant_id']
end
def self.to_csv def self.to_csv
CSV.generate do |csv| CSV.generate do |csv|
@ -747,5 +769,13 @@ class Domain < ActiveRecord::Base
def self.redemption_grace_period def self.redemption_grace_period
Setting.redemption_grace_period.days Setting.redemption_grace_period.days
end end
def self.outzone_candidates
where("#{attribute_alias(:outzone_time)} < ?", Time.zone.now)
end
def self.delete_candidates
where("#{attribute_alias(:delete_time)} < ?", Time.zone.now)
end
end end
# rubocop: enable Metrics/ClassLength # rubocop: enable Metrics/ClassLength

View file

@ -16,7 +16,7 @@ class DomainCron
end end
count += 1 count += 1
if domain.pending_update? if domain.pending_update?
DomainMailer.pending_update_expired_notification_for_new_registrant(domain.id).deliver RegistrantChangeExpiredEmailJob.enqueue(domain.id)
end end
if domain.pending_delete? || domain.pending_delete_confirmation? if domain.pending_delete? || domain.pending_delete_confirmation?
DomainMailer.pending_delete_expired_notification(domain.id, true).deliver DomainMailer.pending_delete_expired_notification(domain.id, true).deliver
@ -32,18 +32,24 @@ class DomainCron
end end
def self.start_expire_period def self.start_expire_period
STDOUT << "#{Time.zone.now.utc} - Expiring domains\n" unless Rails.env.test?
::PaperTrail.whodunnit = "cron - #{__method__}" ::PaperTrail.whodunnit = "cron - #{__method__}"
domains = Domain.where('valid_to <= ?', Time.zone.now) domains = Domain.expired
marked = 0 marked = 0
real = 0 real = 0
domains.each do |domain| domains.each do |domain|
next unless domain.expirable? next unless domain.expirable?
real += 1 real += 1
domain.set_graceful_expired domain.set_graceful_expired
STDOUT << "#{Time.zone.now.utc} DomainCron.start_expire_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test? STDOUT << "#{Time.zone.now.utc} DomainCron.start_expire_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
domain.save(validate: false) and marked += 1
send_time = domain.valid_to + Setting.expiration_reminder_mail.to_i.days
saved = domain.save(validate: false)
if saved
DomainExpireEmailJob.enqueue(domain.id, run_at: send_time)
marked += 1
end
end end
STDOUT << "#{Time.zone.now.utc} - Successfully expired #{marked} of #{real} domains\n" unless Rails.env.test? STDOUT << "#{Time.zone.now.utc} - Successfully expired #{marked} of #{real} domains\n" unless Rails.env.test?
@ -53,10 +59,12 @@ class DomainCron
STDOUT << "#{Time.zone.now.utc} - Setting server_hold to domains\n" unless Rails.env.test? STDOUT << "#{Time.zone.now.utc} - Setting server_hold to domains\n" unless Rails.env.test?
::PaperTrail.whodunnit = "cron - #{__method__}" ::PaperTrail.whodunnit = "cron - #{__method__}"
d = Domain.where('outzone_at <= ?', Time.zone.now)
domains = Domain.outzone_candidates
marked = 0 marked = 0
real = 0 real = 0
d.each do |domain|
domains.each do |domain|
next unless domain.server_holdable? next unless domain.server_holdable?
real += 1 real += 1
domain.statuses << DomainStatus::SERVER_HOLD domain.statuses << DomainStatus::SERVER_HOLD
@ -96,16 +104,18 @@ class DomainCron
c = 0 c = 0
Domain.where('delete_at <= ?', Time.zone.now.end_of_day.utc).each do |x| domains = Domain.delete_candidates
next unless x.delete_candidateable?
x.statuses << DomainStatus::DELETE_CANDIDATE domains.each do |domain|
next unless domain.delete_candidateable?
domain.statuses << DomainStatus::DELETE_CANDIDATE
# If domain successfully saved, add it to delete schedule # If domain successfully saved, add it to delete schedule
if x.save(validate: false) if domain.save(validate: false)
::PaperTrail.whodunnit = "cron - #{__method__}" ::PaperTrail.whodunnit = "cron - #{__method__}"
DomainDeleteJob.enqueue(x.id, run_at: rand(((24*60) - (DateTime.now.hour * 60 + DateTime.now.minute))).minutes.from_now) DomainDeleteJob.enqueue(domain.id, run_at: rand(((24*60) - (DateTime.now.hour * 60 + DateTime.now.minute))).minutes.from_now)
STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: job added by deleteCandidate status ##{x.id} (#{x.name})\n" unless Rails.env.test? STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: job added by deleteCandidate status ##{domain.id} (#{domain.name})\n" unless Rails.env.test?
c += 1 c += 1
end end
end end

View file

@ -6,44 +6,6 @@ class DomainMailModel
@params = {errors: [], deliver_emails: domain.deliver_emails, id: domain.id} @params = {errors: [], deliver_emails: domain.deliver_emails, id: domain.id}
end end
def pending_update_request_for_old_registrant
registrant_old
subject(:pending_update_request_for_old_registrant_subject)
confirm_update
domain_info
compose
end
def pending_update_notification_for_new_registrant
registrant # new registrant at this point
subject(:pending_update_notification_for_new_registrant_subject)
domain_info
compose
end
def pending_update_rejected_notification_for_new_registrant
registrant_pending
subject(:pending_update_rejected_notification_for_new_registrant_subject)
@params[:deliver_emails] = true # triggered from que
@params[:registrar_name] = @domain.registrar.name
compose
end
def pending_update_expired_notification_for_new_registrant
registrant_pending
subject(:pending_update_expired_notification_for_new_registrant_subject)
domain_info
compose
end
def pending_deleted
registrant
subject(:domain_pending_deleted_subject)
confirm_delete
compose
end
def pending_delete_rejected_notification def pending_delete_rejected_notification
registrant registrant
subject(:pending_delete_rejected_notification_subject) subject(:pending_delete_rejected_notification_subject)
@ -107,10 +69,6 @@ class DomainMailModel
verification_url('domain_update_confirms') verification_url('domain_update_confirms')
end end
def confirm_delete
verification_url('domain_delete_confirms')
end
def compose def compose
@params @params
end end

View file

@ -571,7 +571,6 @@ class Epp::Domain < Domain
frame.css('delete').children.css('delete').attr('verified').to_s.downcase != 'yes' frame.css('delete').children.css('delete').attr('verified').to_s.downcase != 'yes'
registrant_verification_asked!(frame.to_s, user_id) registrant_verification_asked!(frame.to_s, user_id)
self.deliver_emails = true # turn on email delivery for epp
pending_delete! pending_delete!
manage_automatic_statuses manage_automatic_statuses
true # aka 1001 pending_delete true # aka 1001 pending_delete

View file

@ -117,5 +117,9 @@ class Nameserver < ActiveRecord::Base
# ignoring ips # ignoring ips
rel rel
end end
def hostnames
pluck(:hostname)
end
end end
end end

View file

@ -32,6 +32,10 @@ class ZonefileSetting < ActiveRecord::Base
STDOUT << "#{Time.zone.now.utc} - Successfully generated zonefile #{filename}\n" STDOUT << "#{Time.zone.now.utc} - Successfully generated zonefile #{filename}\n"
end end
def self.origins
pluck(:origin)
end
def to_s def to_s
origin origin
end end

View file

@ -0,0 +1,37 @@
class DomainPresenter
delegate :name, :registrant_name, to: :domain
def initialize(domain:, view:)
@domain = domain
@view = view
end
def on_hold_date
view.l(domain.on_hold_time, format: :date) if domain.on_hold_time
end
def delete_date
view.l(domain.delete_time, format: :date) if domain.delete_time
end
def force_delete_date
view.l(domain.force_delete_time, format: :date) if domain.force_delete_time
end
def admin_contact_names
domain.admin_contact_names.join(', ')
end
def tech_contact_names
domain.tech_contact_names.join(', ')
end
def nameserver_names
domain.nameserver_hostnames.join(', ')
end
private
attr_reader :domain
attr_reader :view
end

View file

@ -0,0 +1,17 @@
class RegistrantPresenter
delegate :name, :ident, :email, :priv?, :street, :city, to: :registrant
def initialize(registrant:, view:)
@registrant = registrant
@view = view
end
def country
end
private
attr_reader :registrant
attr_reader :view
end

View file

@ -0,0 +1,27 @@
class RegistrarPresenter
def initialize(registrar:, view:)
@registrar = registrar
@view = view
end
def name
registrar.name
end
def email
registrar.email
end
def phone
registrar.phone
end
def url
registrar.url
end
private
attr_reader :registrar
attr_reader :view
end

View file

@ -12,9 +12,9 @@ class DomainNameValidator < ActiveModel::EachValidator
return true unless value return true unless value
value = value.mb_chars.downcase.strip value = value.mb_chars.downcase.strip
origins = ZonefileSetting.pluck(:origin) origins = ZonefileSetting.origins
# if someone tries to register an origin domain, let this validation pass # if someone tries to register an origin domain, let this validation pass
# the error will be catched in blocked domains validator # the error will be caught in blocked domains validator
return true if origins.include?(value) return true if origins.include?(value)
general_domains = /(#{origins.join('|')})/ general_domains = /(#{origins.join('|')})/

View file

@ -1,11 +1,14 @@
Tere Tere
<br><br> <br><br>
Registrisse laekus taotlus domeeni <%= @domain.name %> kustutamiseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @domain.registrar_name %> poole. Registrisse laekus taotlus domeeni <%= @domain.name %> kustutamiseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole:
<%= render 'mailers/shared/registrar/registrar.et.html', registrar: @registrar %>
<br><br> <br><br>
Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan. Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan.
<br><br> <br><br>
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ise ei kinnita või tagasi lükka.<br> Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ise ei kinnita või tagasi lükka.<br>
<%= link_to @verification_url, @verification_url %> <%= link_to @confirm_url, @confirm_url %>
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
Eesti Interneti Sihtasutus Eesti Interneti Sihtasutus
@ -14,10 +17,13 @@ Eesti Interneti Sihtasutus
<br><br> <br><br>
Hi, Hi,
<br><br> <br><br>
Application for deletion of your domain <%= @domain.name %> has been filed. Please make sure that the application is correct. Incase of problems please contact your registrar <%= @domain.registrar_name %>. Application for deletion of your domain <%= @domain.name %> has been filed. Please make sure that the application is correct. Incase of problems please contact your registrar:
<%= render 'mailers/shared/registrar/registrar.en.html', registrar: @registrar %>
<br><br> <br><br>
To confirm the update please visit this website, once again review the data and press approve:<br> To confirm the update please visit this website, once again review the data and press approve:<br>
<%= link_to @verification_url, @verification_url %> <%= link_to @confirm_url, @confirm_url %>
<br><br> <br><br>
The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automatically rejected if it is not approved nor rejected before. The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automatically rejected if it is not approved nor rejected before.
<br><br> <br><br>

View file

@ -1,11 +1,13 @@
Tere Tere
Registrisse laekus taotlus domeeni <%= @domain.name %> kustutamiseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @domain.registrar_name %> poole. Registrisse laekus taotlus domeeni <%= @domain.name %> kustutamiseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole:
<%= render 'mailers/shared/registrar/registrar.et.text', registrar: @registrar %>
Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan. Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan.
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ise ei kinnita või tagasi lükka. Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ise ei kinnita või tagasi lükka.
<%= link_to @verification_url, @verification_url %> <%= @confirm_url %>
Lugupidamisega Lugupidamisega
Eesti Interneti Sihtasutus Eesti Interneti Sihtasutus
@ -14,10 +16,12 @@ Eesti Interneti Sihtasutus
Hi, Hi,
Application for deletion of your domain <%= @domain.name %> has been filed. Please make sure that the application is correct. Incase of problems please contact your registrar <%= @domain.registrar_name %>. Application for deletion of your domain <%= @domain.name %> has been filed. Please make sure that the application is correct. In case of problems please contact your registrar:
<%= render 'mailers/shared/registrar/registrar.en.text', registrar: @registrar %>
To confirm the update please visit this website, once again review the data and press approve: To confirm the update please visit this website, once again review the data and press approve:
<%= link_to @verification_url, @verification_url %> <%= @confirm_url %>
The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automatically rejected if it is not approved nor rejected before. The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automatically rejected if it is not approved nor rejected before.

View file

@ -1,7 +1,4 @@
<table width="600" cellspacing="0" cellpadding="0" border="0" align="center"><tbody> <table width="600" cellspacing="0" cellpadding="0" border="0" align="center"><tbody>
<tr><td>
<p><img src="http://media.voog.com/0000/0037/4533/photos/eis_logo_rgb_block.png" width="150px" alt="Eesti Interneti Sihtasutus"></p>
</td></tr>
<tr><td> <tr><td>
<table cellspacing="0" cellpadding="0" border="0" align="center" style="text-align: justify; line-height: 16px; font-size: 12px;"><tbody> <table cellspacing="0" cellpadding="0" border="0" align="center" style="text-align: justify; line-height: 16px; font-size: 12px;"><tbody>
<tr><td> <tr><td>
@ -11,56 +8,65 @@
<p>.ee domeeniregistrisse on domeeni <b><%= @domain.name %></b> kohta kantud j&auml;rgmised andmed:</p> <p>.ee domeeniregistrisse on domeeni <b><%= @domain.name %></b> kohta kantud j&auml;rgmised andmed:</p>
<p>Registreerija nimi: <b><%= @domain.registrant %></b><br /> <p>Registreerija nimi: <b><%= @registrant.name %></b><br />
Registrikood: <b><%= @domain.registrant.try(:ident) %></b></p> Registrikood: <b><%= @registrant.ident %></b></p>
<p>Eesti Interneti Sihtasutusele (EIS) on saanud teatavaks, et juriidiline isik registrikoodiga <b><%= @domain.registrant.try(:ident) %></b> on &auml;riregistrist kustutatud.</p> <p>Eesti Interneti Sihtasutusele (EIS) on saanud teatavaks, et juriidiline isik registrikoodiga <b><%= @registrant.ident %></b> on &auml;riregistrist kustutatud.</p>
<p>Kuiv&otilde;rd &auml;riregistrist kustutatud juriidiline isik ei saa olla domeeni registreerijaks, siis algatas EIS <b><%= l(Time.zone.now, format: :date) %></b> vastavalt Domeenireeglite (<a href="http://www.internet.ee/domeenid/" target="_blank">http://www.internet.ee/domeenid/</a>) punktile 6.4 domeeni <b><%= @domain.name %></b> suhtes 30 p&auml;eva pikkuse kustutusmenetluse. Kustutamise k&auml;igus j&auml;&auml;b domeen internetis k&auml;ttesaadavaks.</p> <p>Kuiv&otilde;rd &auml;riregistrist kustutatud juriidiline isik ei saa olla domeeni registreerijaks, siis algatas EIS <b><%= l(Time.zone.now, format: :date) %></b> vastavalt Domeenireeglite (<a href="http://www.internet.ee/domeenid/" target="_blank">http://www.internet.ee/domeenid/</a>) punktile 6.4 domeeni <b><%= @domain.name %></b> suhtes 30 p&auml;eva pikkuse kustutusmenetluse. Kustutamise k&auml;igus j&auml;&auml;b domeen internetis k&auml;ttesaadavaks.</p>
<p>Domeenireeglite punktist 6.4 tulenevalt on domeeni suhtes &otilde;igust omaval registreerijal v&otilde;imalus esitada domeeni <b><%= @domain.name %></b> registripidajale <b><%= @domain.registrar %></b> domeeni &uuml;leandmise taotlus Domeenireeglite p 5.3.6.2 kohaselt. Taotlusele tuleb lisada domeeni omandamist t&otilde;endavad dokumendid, mis asendavad Domeenireeglite punktis 5.3.6.3 s&auml;testatud &uuml;leandva registreerija n&otilde;usolekut. Vastav dokumentatsioon tuleb esitada Registripidajale esimesel v&otilde;imalusel.</p> <p>Domeenireeglite punktist 6.4 tulenevalt on domeeni suhtes &otilde;igust omaval registreerijal v&otilde;imalus esitada domeeni <b><%= @domain.name %></b> registripidajale <b><%= @registrar.name %></b> domeeni &uuml;leandmise taotlus Domeenireeglite p 5.3.6.2 kohaselt. Taotlusele tuleb lisada domeeni omandamist t&otilde;endavad dokumendid, mis asendavad Domeenireeglite punktis 5.3.6.3 s&auml;testatud &uuml;leandva registreerija n&otilde;usolekut. Vastav dokumentatsioon tuleb esitada Registripidajale esimesel v&otilde;imalusel.</p>
<p>Kui &uuml;leandmine ei ole 30 p&auml;eva jooksul toimunud, kustub domeen <b><%= @domain.name %></b> 24 tunni jooksul <b><%= l(@domain.force_delete_at, format: :date) %></b> juhuslikult valitud ajahetkel. Soovi korral on v&otilde;imalik domeen p&auml;rast selle kustumist registrist “kes ees, see mees” p&otilde;him&otilde;ttel uuesti registreerida.</p> <p>Kui &uuml;leandmine ei ole 30 p&auml;eva jooksul toimunud, kustub domeen <b><%= @domain.name %></b> 24 tunni jooksul <b><%= @domain.force_delete_date %></b> juhuslikult valitud ajahetkel. Soovi korral on v&otilde;imalik domeen p&auml;rast selle kustumist registrist “kes ees, see mees” p&otilde;him&otilde;ttel uuesti registreerida.</p>
<p>Lisak&uuml;simuste korral v&otilde;tke palun &uuml;hendust oma registripidajaga <%= @domain.registrar %>. Registripidajate kontaktid leiate aadressilt <a href="http://www.internet.ee/registripidajad" target="_blank">http://www.internet.ee/registripidajad</a></p><br /><br /> <p>Lisak&uuml;simuste korral v&otilde;tke palun &uuml;hendust oma registripidajaga:</p>
<%= render 'mailers/shared/registrar/registrar.et.html', registrar: @registrar %>
<hr>
<strong>Dear contact of <%= @domain.name %> domain</strong> <strong>Dear contact of <%= @domain.name %> domain</strong>
<p>The following details for domain name <b><%= @domain.name %></b> have been entered into the .ee domain registry:</p> <p>The following details for domain name <b><%= @domain.name %></b> have been entered into the .ee domain registry:</p>
<p>Registrant's name: <b><%= @domain.registrant %></b><br /> <p>Registrant's name: <b><%= @registrant.name %></b><br />
Registry code: <b><%= @domain.registrant.try(:ident) %></b></p> Registry code: <b><%= @registrant.ident %></b></p>
<p>Estonian Internet Foundation (EIS) has learned that the legal person with registry code <b><%= @domain.registrant.try(:ident) %></b> has been deleted from the Business Registry.</p> <p>Estonian Internet Foundation (EIS) has learned that the legal person with registry code <b><%= @registrant.ident %></b> has been deleted from the Business Registry.</p>
<p>As a terminated legal person cannot be the registrant of a domain, the EIS started the deletion process of <b><%= @domain.name %></b> domain on <b><%= l(Time.zone.now, format: :date) %></b> according to the Domain Regulation (<a href="http://www.internet.ee/domains/" target="_blank">http://www.internet.ee/domains/</a>), using the 30-day delete procedure. The domain will remain available on the Internet during the delete procedure.</p> <p>As a terminated legal person cannot be the registrant of a domain, the EIS started the deletion process of <b><%= @domain.name %></b> domain on <b><%= l(Time.zone.now, format: :date) %></b> according to the Domain Regulation (<a href="http://www.internet.ee/domains/" target="_blank">http://www.internet.ee/domains/</a>), using the 30-day delete procedure. The domain will remain available on the Internet during the delete procedure.</p>
<p>According to paragraph 6.4 of the Domain Regulation, the registrant holding a right to the domain name <b><%= @domain.name %></b> can submit a domain name transfer application to the registrar <b><%= @domain.registrar %></b> in accordance with paragraph 5.3.6.2 of the Domain Regulation. The application must be submitted together with documents certifying the acquisition of the domain that will replace the consent of the surrendering registrant as laid down in paragraph 5.3.6.3 of the Domain Regulation. The relevant documents should be submitted to the registrar as soon as possible.</p> <p>According to paragraph 6.4 of the Domain Regulation, the registrant holding a right to the domain name <b><%= @domain.name %></b> can submit a domain name transfer application to the registrar <b><%= @registrar.name %></b> in accordance with paragraph 5.3.6.2 of the Domain Regulation. The application must be submitted together with documents certifying the acquisition of the domain that will replace the consent of the surrendering registrant as laid down in paragraph 5.3.6.3 of the Domain Regulation. The relevant documents should be submitted to the registrar as soon as possible.</p>
<p>If the transfer has not been made in 30 days, the domain <b><%= @domain.name %></b> will be deleted at a randomly chosen moment within 24 hours on <b><%= l(@domain.force_delete_at, format: :date) %></b>. After deletion it is possible to reregister the domain on a "first come, first served" basis.</p> <p>If the transfer has not been made in 30 days, the domain <b><%= @domain.name %></b> will be deleted at a randomly chosen moment within 24 hours on <b><%= @domain.force_delete_date %></b>. After deletion it is possible to reregister the domain on a "first come, first served" basis.</p>
<p>Should you have additional questions, please contact your registrar <%= @domain.registrar %>, whose contact information can be found at <a href="http://www.internet.ee/registrars/" target="_blank">http://www.internet.ee/registrars/</a></p><br /><br /> <p>Should you have additional questions, please contact your registrar:</p>
<%= render 'mailers/shared/registrar/registrar.en.html', registrar: @registrar %>
<hr>
<strong>Уважаемое контактное лицо домена <%= @domain.name %></strong> <strong>Уважаемое контактное лицо домена <%= @domain.name %></strong>
<p>В регистр доменов Целевого учреждения Eesti Internet (EIS) внесены следующие данные относительно домена <b><%= @domain.name %></b>:</p> <p>В регистр доменов Целевого учреждения Eesti Internet (EIS) внесены следующие данные относительно домена <b><%= @domain.name %></b>:</p>
<p>Имя регистранта: <b><%= @domain.registrant %></b><br /> <p>Имя регистранта: <b><%= @registrant.name %></b><br />
Регистрационный код: <b><%= @domain.registrant.try(:ident) %></b></p> Регистрационный код: <b><%= @registrant.ident %></b></p>
<p>EIS стало известно, что юридическое лицо с регистрационным кодом <%= @domain.registrant.try(:ident) %> удалено из коммерческого реестра.</p> <p>EIS стало известно, что юридическое лицо с регистрационным кодом <%= @registrant.ident %> удалено из коммерческого реестра.</p>
<p>Поскольку прекратившее деятельность юридическое лицо не может являться регистрантом домена, то согласно пункту 6.4 Правил домена (<a href="http://www.internet.ee/domeny/" target="_blank">http://www.internet.ee/domeny/</a>) EIS <b><%= l(Time.zone.now, format: :date) %></b> инициировало удаление домена <b><%= @domain.name %></b> с применением 30-дневной процедуры удаления. На протяжении процесса удаления домен остается доступным в Интернете.</p> <p>Поскольку прекратившее деятельность юридическое лицо не может являться регистрантом домена, то согласно пункту 6.4 Правил домена (<a href="http://www.internet.ee/domeny/" target="_blank">http://www.internet.ee/domeny/</a>) EIS <b><%= l(Time.zone.now, format: :date) %></b> инициировало удаление домена <b><%= @domain.name %></b> с применением 30-дневной процедуры удаления. На протяжении процесса удаления домен остается доступным в Интернете.</p>
<p>Согласно пункту 6.4 Правил домена регистрант, имеющий право на домен, может подать регистратору <b><%= @domain.registrar %></b> домена <b><%= @domain.name %></b> ходатайство о передаче домена в соответствии с п. 5.3.6.2 Правил домена. К ходатайству следует приложить подтверждающие приобретение домена документы, заменяющие в соответствии с пунктом 5.3.6.3 Правил домена согласие передающего доменное имя регистранта. EIS предлагает представить соответствующую документацию Регистратору при первой возможности, начиная с инициирования процедуры удаления.</p> <p>Согласно пункту 6.4 Правил домена регистрант, имеющий право на домен, может подать регистратору <b><%= @registrar.name %></b> домена <b><%= @domain.name %></b> ходатайство о передаче домена в соответствии с п. 5.3.6.2 Правил домена. К ходатайству следует приложить подтверждающие приобретение домена документы, заменяющие в соответствии с пунктом 5.3.6.3 Правил домена согласие передающего доменное имя регистранта. EIS предлагает представить соответствующую документацию Регистратору при первой возможности, начиная с инициирования процедуры удаления.</p>
<p>Если в течение 30 дней передача не произошла, домен <b><%= @domain.name %></b> удаляется по истечении 24 часов <b><%= l(@domain.force_delete_at, format: :date) %></b> в случайный момент времени. По желанию после удаления из регистра домен можно снова зарегистрировать по принципу "кто успел, тот и съел".</p> <p>Если в течение 30 дней передача не произошла, домен <b><%= @domain.name %></b> удаляется по истечении 24 часов <b><%= @domain.force_delete_date %></b> в случайный момент времени. По желанию после удаления из регистра домен можно снова зарегистрировать по принципу "кто успел, тот и съел".</p>
<p>Просим обратиться к своему регистратору <%= @domain.registrar %>. Контактные данные регистраторов можно найти по адресу <a href="http://www.internet.ee/registratory/" target="_blank">http://www.internet.ee/registratory/</a></p><br /><br /> <p>Просим обратиться к своему регистратору:</p>
<%= render 'mailers/shared/registrar/registrar.ru.html', registrar: @registrar %>
<br /><br />
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" style="text-align: justify; line-height: 16px; font-size: 12px;"><tbody> <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" style="text-align: justify; line-height: 16px; font-size: 12px;"><tbody>
<tr><td align="left" valign="top"> <tr><td align="left" valign="top">
@ -73,4 +79,4 @@ Registry code: <b><%= @domain.registrant.try(:ident) %></b></p>
</tbody> </tbody>
</table> </table>
</td></tr> </td></tr>
</tbody></table> </tbody></table></table>

View file

@ -0,0 +1,67 @@
Lugupeetud domeeni <%= @domain.name %> kontaktisik
.ee domeeniregistrisse on domeeni <%= @domain.name %> kohta kantud järgmised andmed:
Registreerija nimi: <%= @registrant.name %>
Registrikood: <%= @registrant.ident %>
Eesti Interneti Sihtasutusele (EIS) on saanud teatavaks, et juriidiline isik registrikoodiga <%= @registrant.ident %> on äriregistrist kustutatud.
Kuivõrd äriregistrist kustutatud juriidiline isik ei saa olla domeeni registreerijaks, siis algatas EIS <%= l(Time.zone.now, format: :date) %> vastavalt Domeenireeglite (http://www.internet.ee/domeenid/) punktile 6.4 domeeni <%= @domain.name %> suhtes 30 päeva pikkuse kustutusmenetluse. Kustutamise käigus jääb domeen internetis kättesaadavaks.
Domeenireeglite punktist 6.4 tulenevalt on domeeni suhtes õigust omaval registreerijal võimalus esitada domeeni <%= @domain.name %> registripidajale <%= @registrar.name %> domeeni üleandmise taotlus Domeenireeglite p 5.3.6.2 kohaselt. Taotlusele tuleb lisada domeeni omandamist tõendavad dokumendid, mis asendavad Domeenireeglite punktis 5.3.6.3 sätestatud üleandva registreerija nõusolekut. Vastav dokumentatsioon tuleb esitada Registripidajale esimesel võimalusel.
Kui üleandmine ei ole 30 päeva jooksul toimunud, kustub domeen <%= @domain.name %> 24 tunni jooksul <%= @domain.force_delete_date %> juhuslikult valitud ajahetkel. Soovi korral on võimalik domeen pärast selle kustumist registrist "kes ees, see mees" põhimõttel uuesti registreerida.
Lisaküsimuste korral võtke palun ühendust oma registripidajaga:
<%= render 'mailers/shared/registrar/registrar.et.text', registrar: @registrar %>
Dear contact of <%= @domain.name %> domain
The following details for domain name <%= @domain.name %> have been entered into the .ee domain registry:
Registrant's name: <%= @registrant.name %>
Registry code: <%= @registrant.ident %>
Estonian Internet Foundation (EIS) has learned that the legal person with registry code <%= @registrant.ident %> has been deleted from the Business Registry.
As a terminated legal person cannot be the registrant of a domain, the EIS started the deletion process of <%= @domain.name %> domain on <%= l(Time.zone.now, format: :date) %> according to the Domain Regulation (http://www.internet.ee/domains/), using the 30-day delete procedure. The domain will remain available on the Internet during the delete procedure.
According to paragraph 6.4 of the Domain Regulation, the registrant holding a right to the domain name <%= @domain.name %> can submit a domain name transfer application to the registrar <%= @registrar.name %> in accordance with paragraph 5.3.6.2 of the Domain Regulation. The application must be submitted together with documents certifying the acquisition of the domain that will replace the consent of the surrendering registrant as laid down in paragraph 5.3.6.3 of the Domain Regulation. The relevant documents should be submitted to the registrar as soon as possible.
If the transfer has not been made in 30 days, the domain <%= @domain.name %> will be deleted at a randomly chosen moment within 24 hours on <%= @domain.force_delete_date %>. After deletion it is possible to reregister the domain on a "first come, first served" basis.
Should you have additional questions, please contact your registrar:
<%= render 'mailers/shared/registrar/registrar.en.text', registrar: @registrar %>
Уважаемое контактное лицо домена <%= @domain.name %>
В регистр доменов Целевого учреждения Eesti Internet (EIS) внесены следующие данные относительно домена <%= @domain.name %>:
Имя регистранта: <%= @registrant.name %>
Регистрационный код: <%= @registrant.ident %>
EIS стало известно, что юридическое лицо с регистрационным кодом <%= @registrant.ident %> удалено из коммерческого реестра.
Поскольку прекратившее деятельность юридическое лицо не может являться регистрантом домена, то согласно пункту 6.4 Правил домена (http://www.internet.ee/domeny) EIS <%= l(Time.zone.now, format: :date) %> инициировало удаление домена <%= @domain.name %> с применением 30-дневной процедуры удаления. На протяжении процесса удаления домен остается доступным в Интернете.
Согласно пункту 6.4 Правил домена регистрант, имеющий право на домен, может подать регистратору <%= @registrar.name %> домена <%= @domain.name %> ходатайство о передаче домена в соответствии с п. 5.3.6.2 Правил домена. К ходатайству следует приложить подтверждающие приобретение домена документы, заменяющие в соответствии с пунктом 5.3.6.3 Правил домена согласие передающего доменное имя регистранта. EIS предлагает представить соответствующую документацию Регистратору при первой возможности, начиная с инициирования процедуры удаления.
Если в течение 30 дней передача не произошла, домен <%= @domain.name %> удаляется по истечении 24 часов <%= @domain.force_delete_date %> в случайный момент времени. По желанию после удаления из регистра домен можно снова зарегистрировать по принципу "кто успел, тот и съел".
Просим обратиться к своему регистратору:
<%= render 'mailers/shared/registrar/registrar.ru.text', registrar: @registrar %>
Lugupidamisega,
Best Regards,
С уважением,
---
Eesti Interneti Sihtasutus
Estonian Internet Foundation

View file

@ -1,17 +1,19 @@
Domeen <%= @domain.name %> on aegunud<br> Domeen <%= @domain.name %> on aegunud<br>
Lugupeetud .ee domeeni kasutaja<br> Lugupeetud .ee domeeni kasutaja<br>
<br> <br>
Domeeninimi <%= @domain.name %> on aegunud ja ei ole alates <%= l(@domain.outzone_at, format: :date) %> internetis kättesaadav. Alates <%= l(@domain.delete_at, format: :date) %> on domeen <%= @domain.name %> avatud registreerimiseks kõigile huvilistele. Domeeninimi <%= @domain.name %> on aegunud ja ei ole alates <%= @domain.on_hold_date %> internetis kättesaadav. Alates <%= @domain.delete_date %> on domeen <%= @domain.name %> avatud registreerimiseks kõigile huvilistele.
<br><br> <br><br>
Domeeni registreeringu pikendamiseks pöörduge palun oma registripidaja <%= @domain.registrar.name %> poole. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad. Domeeni registreeringu pikendamiseks pöörduge palun oma registripidaja:
<%= render 'mailers/shared/registrar/registrar.et.html', registrar: @registrar %>
<br><br> <br><br>
Domeeni <%= @domain.name %> kohta on registris järgmised andmed: Domeeni <%= @domain.name %> kohta on registris järgmised andmed:
<br><br> <br><br>
Registreerija: <%= @domain.registrant_name %><br> Registreerija: <%= @domain.registrant_name %><br>
Halduskontakt: <%= @domain.admin_contacts.map(&:name).join ', ' %><br> Halduskontakt: <%= @domain.admin_contact_names %><br>
Tehniline kontakt: <%= @domain.tech_contacts.map(&:name).join ', ' %><br> Tehniline kontakt: <%= @domain.tech_contact_names %><br>
Registripidaja: <%= @domain.registrar.name %><br> Nimeserverid: <%= @domain.nameserver_names %><br>
Nimeserverid: <%= @domain.nameservers.join(', ') %><br>
Ülevaate kõikidest endaga seotud domeenidest saate registreerija portaalist. <%= ENV['registrant_url'] %>.<br> Ülevaate kõikidest endaga seotud domeenidest saate registreerija portaalist. <%= ENV['registrant_url'] %>.<br>
<br><br> <br><br>
Lugupidamisega<br> Lugupidamisega<br>
@ -22,17 +24,19 @@ Eesti Interneti Sihtasutus
The <%= @domain.name %> domain has expired<br> The <%= @domain.name %> domain has expired<br>
Dear user of .ee domain,<br> Dear user of .ee domain,<br>
<br> <br>
The domain name <%= @domain.name %> has expired and will not be available on the Internet from <%= l(@domain.outzone_at, format: :date) %>. From <%= l(@domain.delete_at, format: :date) %>, the <%= @domain.name %> domain will be available for registration on a first come first served basis. The domain name <%= @domain.name %> has expired and will not be available on the Internet from <%= @domain.on_hold_date %>. From <%= @domain.delete_date %>, the <%= @domain.name %> domain will be available for registration on a first come first served basis.
<br><br> <br><br>
To renew the domain registration, please contact your registrar <%= @domain.registrar.name %>. You can find the registrar's contacts at http://internet.ee/registrars. To renew the domain registration, please contact your registrar:
<%= render 'mailers/shared/registrar/registrar.en.html', registrar: @registrar %>
<br><br> <br><br>
The following data for the <%= @domain.name %> domain have been entered into the registry: The following data for the <%= @domain.name %> domain have been entered into the registry:
<br><br> <br><br>
Registrant: <%= @domain.registrant_name %><br> Registrant: <%= @domain.registrant_name %><br>
Administrative contact: <%= @domain.admin_contacts.map(&:name).join ', ' %><br> Administrative contact: <%= @domain.admin_contact_names %><br>
Technical contact: <%= @domain.tech_contacts.map(&:name).join ', ' %><br> Technical contact: <%= @domain.tech_contact_names %><br>
Registrar: <%= @domain.registrar.name %><br> Name servers: <%= @domain.nameserver_names %><br>
Name servers: <%= @domain.nameservers.join(', ') %><br>
You can find an overview of all your domains at the registrant's portal. <%= ENV['registrant_url'] %>.<br> You can find an overview of all your domains at the registrant's portal. <%= ENV['registrant_url'] %>.<br>
<br><br> <br><br>
Best Regards,<br> Best Regards,<br>
@ -43,18 +47,27 @@ Estonian Internet Foundation
Домен <%= @domain.name %> устарел<br> Домен <%= @domain.name %> устарел<br>
Уважаемый пользователь домена .ee<br> Уважаемый пользователь домена .ee<br>
<br> <br>
Доменное имя <%= @domain.name %> устарело и с <%= l(@domain.outzone_at, format: :date) %> недоступно в Интернете. С <%= l(@domain.delete_at, format: :date) %> домен <%= @domain.name %> доступен для регистрации всем желающим по принципу "first come, first served".
Доменное имя <%= @domain.name %> устарело и с <%= @domain.on_hold_date %> недоступно в Интернете. С <%= @domain.delete_date %> домен <%= @domain.name %> доступен для регистрации всем желающим по принципу "first come, first served".
<br><br> <br><br>
Для продления регистрации домена просим обратиться к своему регистратору <%= @domain.registrar.name %>. Контактные данные регистраторов можно найти по адресу http://internet.ee/registratory.
Для продления регистрации домена просим обратиться к своему регистратору:
<%= render 'mailers/shared/registrar/registrar.ru.html', registrar: @registrar %>
<br><br> <br><br>
Относительно домена <%= @domain.name %> в реестр внесены следующие данные: Относительно домена <%= @domain.name %> в реестр внесены следующие данные:
<br><br> <br><br>
Регистрант: <%= @domain.registrant_name %><br> Регистрант: <%= @domain.registrant_name %><br>
Административный контакт: <%= @domain.admin_contacts.map(&:name).join ', ' %><br> Административный контакт: <%= @domain.admin_contact_names %><br>
Технический контакт: <%= @domain.tech_contacts.map(&:name).join ', ' %><br> Технический контакт: <%= @domain.tech_contact_names %><br>
Регистратор: <%= @domain.registrar.name %><br> Серверы доменных имен: <%= @domain.nameserver_names %><br>
Серверы доменных имен: <%= @domain.nameservers.join(', ') %><br>
Обзор всех связанных с Вами доменов можете получить на портале регистранта. <%= ENV['registrant_url'] %>.<br> Обзор всех связанных с Вами доменов можете получить на портале регистранта. <%= ENV['registrant_url'] %>.<br>
<br><br> <br><br>
С наилучшими пожеланиями<br> С наилучшими пожеланиями<br>
Целевое учреждение Eesti Internet Целевое учреждение Eesti Internet

View file

@ -0,0 +1,66 @@
Domeen <%= @domain.name %> on aegunud
Lugupeetud .ee domeeni kasutaja
Domeeninimi <%= @domain.name %> on aegunud ja ei ole alates <%= @domain.on_hold_date %> internetis kättesaadav. Alates <%= @domain.delete_date %> on domeen <%= @domain.name %> avatud registreerimiseks kõigile huvilistele.
Domeeni registreeringu pikendamiseks pöörduge palun oma registripidaja:
<%= render 'mailers/shared/registrar/registrar.et.text', registrar: @registrar %>
Domeeni <%= @domain.name %> kohta on registris järgmised andmed:
Registreerija: <%= @domain.registrant_name %>
Halduskontakt: <%= @domain.admin_contact_names %>
Tehniline kontakt: <%= @domain.tech_contact_names %>
Nimeserverid: <%= @domain.nameserver_names %>
Ülevaate kõikidest endaga seotud domeenidest saate registreerija portaalist. <%= ENV['registrant_url'] %>.
Parimate soovidega
Eesti Interneti Sihtasutus
--------------------------------------
The <%= @domain.name %> domain has expired
Dear user of .ee domain,
The domain name <%= @domain.name %> has expired and will not be available on the Internet from <%= @domain.on_hold_date %>. From <%= @domain.delete_date %>, the <%= @domain.name %> domain will be available for registration on a first come first served basis.
To renew the domain registration, please contact your registrar:
<%= render 'mailers/shared/registrar/registrar.en.text', registrar: @registrar %>
The following data for the <%= @domain.name %> domain have been entered into the registry:
Registrant: <%= @domain.registrant_name %>
Administrative contact: <%= @domain.admin_contact_names %>
Technical contact: <%= @domain.tech_contact_names %>
Name servers: <%= @domain.nameserver_names %>
You can find an overview of all your domains at the registrant's portal. <%= ENV['registrant_url'] %>.
Best Regards,
Estonian Internet Foundation
--------------------------------------
Домен <%= @domain.name %> устарел
Уважаемый пользователь домена .ee
Доменное имя <%= @domain.name %> устарело и с <%= @domain.on_hold_date %> недоступно в Интернете. С <%= @domain.delete_date %> домен <%= @domain.name %> доступен для регистрации всем желающим по принципу "first come, first served".
Для продления регистрации домена просим обратиться к своему регистратору:
<%= render 'mailers/shared/registrar/registrar.ru.text', registrar: @registrar %>
Относительно домена <%= @domain.name %> в реестр внесены следующие данные:
Регистрант: <%= @domain.registrant_name %>
Административный контакт: <%= @domain.admin_contact_names %>
Технический контакт: <%= @domain.tech_contact_names %>
Серверы доменных имен: <%= @domain.nameserver_names %>
Обзор всех связанных с Вами доменов можете получить на портале регистранта. <%= ENV['registrant_url'] %>.
С наилучшими пожеланиями
Целевое учреждение Eesti Internet

View file

@ -1,60 +0,0 @@
Domeen <%= @domain.name %> on aegunud
Lugupeetud .ee domeeni kasutaja
Domeeninimi <%= @domain.name %> on aegunud ja ei ole alates <%= l(@domain.outzone_at, format: :date) %> internetis kättesaadav. Alates <%= l(@domain.delete_at, format: :date) %> on domeen <%= @domain.name %> avatud registreerimiseks kõigile huvilistele.
Domeeni registreeringu pikendamiseks pöörduge palun oma registripidaja <%= @domain.registrar.name %> poole. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
Domeeni <%= @domain.name %> kohta on registris järgmised andmed:
Registreerija: <%= @domain.registrant_name %>
Halduskontakt: <%= @domain.admin_contacts.map(&:name).join ', ' %>
Tehniline kontakt: <%= @domain.tech_contacts.map(&:name).join ', ' %>
Registripidaja: <%= @domain.registrar.name %>
Nimeserverid: <%= @domain.nameservers.join(', ') %>
Ülevaate kõikidest endaga seotud domeenidest saate registreerija portaalist. <%= ENV['registrant_url'] %>.
Parimate soovidega
Eesti Interneti Sihtasutus
--------------------------------------
The <%= @domain.name %> domain has expired
Dear user of .ee domain,
The domain name <%= @domain.name %> has expired and will not be available on the Internet from <%= l(@domain.outzone_at, format: :date) %>. From <%= l(@domain.delete_at, format: :date) %>, the <%= @domain.name %> domain will be available for registration on a first come first served basis.
To renew the domain registration, please contact your registrar <%= @domain.registrar.name %>. You can find the registrar's contacts at http://internet.ee/registrars.
The following data for the <%= @domain.name %> domain have been entered into the registry:
Registrant: <%= @domain.registrant_name %>
Administrative contact: <%= @domain.admin_contacts.map(&:name).join ', ' %>
Technical contact: <%= @domain.tech_contacts.map(&:name).join ', ' %>
Registrar: <%= @domain.registrar.name %>
Name servers: <%= @domain.nameservers.join(', ') %>
You can find an overview of all your domains at the registrant's portal. <%= ENV['registrant_url'] %>.
Best Regards,
Estonian Internet Foundation
--------------------------------------
Домен <%= @domain.name %> устарел
Уважаемый пользователь домена .ee
Доменное имя <%= @domain.name %> устарело и с <%= l(@domain.outzone_at, format: :date) %> недоступно в Интернете. С <%= l(@domain.delete_at, format: :date) %> домен <%= @domain.name %> доступен для регистрации всем желающим по принципу "first come, first served".
Для продления регистрации домена просим обратиться к своему регистратору <%= @domain.registrar.name %>. Контактные данные регистраторов можно найти по адресу http://internet.ee/registratory.
Относительно домена <%= @domain.name %> в реестр внесены следующие данные:
Регистрант: <%= @domain.registrant_name %>
Административный контакт: <%= @domain.admin_contacts.map(&:name).join ', ' %>
Технический контакт: <%= @domain.tech_contacts.map(&:name).join ', ' %>
Регистратор: <%= @domain.registrar.name %>
Серверы доменных имен: <%= @domain.nameservers.join(', ') %>
Обзор всех связанных с Вами доменов можете получить на портале регистранта. <%= ENV['registrant_url'] %>.
С наилучшими пожеланиями
Целевое учреждение Eesti Internet

View file

@ -1,63 +0,0 @@
Lugupeetud domeeni <%= @domain.name %> kontaktisik
.ee domeeniregistrisse on domeeni <%= @domain.name %> kohta kantud järgmised andmed:
Registreerija nimi: <%= @domain.registrant %>
Registrikood: <%= @domain.registrant.try(:ident) %>
Eesti Interneti Sihtasutusele (EIS) on saanud teatavaks, et juriidiline isik registrikoodiga <%= @domain.registrant.try(:ident) %> on äriregistrist kustutatud.
Kuivõrd äriregistrist kustutatud juriidiline isik ei saa olla domeeni registreerijaks, siis algatas EIS <%= l(Time.zone.now, format: :date) %> vastavalt Domeenireeglite (http://www.internet.ee/domeenid/) punktile 6.4 domeeni <%= @domain.name %> suhtes 30 päeva pikkuse kustutusmenetluse. Kustutamise käigus jääb domeen internetis kättesaadavaks.
Domeenireeglite punktist 6.4 tulenevalt on domeeni suhtes õigust omaval registreerijal võimalus esitada domeeni <%= @domain.name %> registripidajale <%= @domain.registrar %> domeeni üleandmise taotlus Domeenireeglite p 5.3.6.2 kohaselt. Taotlusele tuleb lisada domeeni omandamist tõendavad dokumendid, mis asendavad Domeenireeglite punktis 5.3.6.3 sätestatud üleandva registreerija nõusolekut. Vastav dokumentatsioon tuleb esitada Registripidajale esimesel võimalusel.
Kui üleandmine ei ole 30 päeva jooksul toimunud, kustub domeen <%= @domain.name %> 24 tunni jooksul <%= l(@domain.force_delete_at, format: :date) %> juhuslikult valitud ajahetkel. Soovi korral on võimalik domeen pärast selle kustumist registrist "kes ees, see mees" põhimõttel uuesti registreerida.
Lisaküsimuste korral võtke palun ühendust oma registripidajaga <%= @domain.registrar %>. Registripidajate kontaktid leiate aadressilt http://www.internet.ee/registripidajad/
Dear contact of <%= @domain.name %> domain
The following details for domain name <%= @domain.name %> have been entered into the .ee domain registry:
Registrant's name: <%= @domain.registrant %>
Registry code: <%= @domain.registrant.try(:ident) %>
Estonian Internet Foundation (EIS) has learned that the legal person with registry code <%= @domain.registrant.try(:ident) %> has been deleted from the Business Registry.
As a terminated legal person cannot be the registrant of a domain, the EIS started the deletion process of <%= @domain.name %> domain on <%= l(Time.zone.now, format: :date) %> according to the Domain Regulation (http://www.internet.ee/domains/), using the 30-day delete procedure. The domain will remain available on the Internet during the delete procedure.
According to paragraph 6.4 of the Domain Regulation, the registrant holding a right to the domain name <%= @domain.name %> can submit a domain name transfer application to the registrar <%= @domain.registrar %> in accordance with paragraph 5.3.6.2 of the Domain Regulation. The application must be submitted together with documents certifying the acquisition of the domain that will replace the consent of the surrendering registrant as laid down in paragraph 5.3.6.3 of the Domain Regulation. The relevant documents should be submitted to the registrar as soon as possible.
If the transfer has not been made in 30 days, the domain <%= @domain.name %> will be deleted at a randomly chosen moment within 24 hours on <%= l(@domain.force_delete_at, format: :date) %>. After deletion it is possible to reregister the domain on a "first come, first served" basis.
Should you have additional questions, please contact your registrar <%= @domain.registrar %>, whose contact information can be found at http://www.internet.ee/registrars/
Уважаемое контактное лицо домена <%= @domain.name %>
В регистр доменов Целевого учреждения Eesti Internet (EIS) внесены следующие данные относительно домена <%= @domain.name %>:
Имя регистранта: <%= @domain.registrant %>
Регистрационный код: <%= @domain.registrant.try(:ident) %>
EIS стало известно, что юридическое лицо с регистрационным кодом <%= @domain.registrant.try(:ident) %> удалено из коммерческого реестра.
Поскольку прекратившее деятельность юридическое лицо не может являться регистрантом домена, то согласно пункту 6.4 Правил домена (http://www.internet.ee/domeny) EIS <%= l(Time.zone.now, format: :date) %> инициировало удаление домена <%= @domain.name %> с применением 30-дневной процедуры удаления. На протяжении процесса удаления домен остается доступным в Интернете.
Согласно пункту 6.4 Правил домена регистрант, имеющий право на домен, может подать регистратору <%= @domain.registrar %> домена <%= @domain.name %> ходатайство о передаче домена в соответствии с п. 5.3.6.2 Правил домена. К ходатайству следует приложить подтверждающие приобретение домена документы, заменяющие в соответствии с пунктом 5.3.6.3 Правил домена согласие передающего доменное имя регистранта. EIS предлагает представить соответствующую документацию Регистратору при первой возможности, начиная с инициирования процедуры удаления.
Если в течение 30 дней передача не произошла, домен <%= @domain.name %> удаляется по истечении 24 часов <%= l(@domain.force_delete_at, format: :date) %> в случайный момент времени. По желанию после удаления из регистра домен можно снова зарегистрировать по принципу "кто успел, тот и съел".
Просим обратиться к своему регистратору <%= @domain.registrar %>. Контактные данные регистраторов можно найти по адресу http://www.internet.ee/registratory
Lugupidamisega,
Best Regards,
С уважением,
---
Eesti Interneti Sihtasutus
Estonian Internet Foundation

View file

@ -1,19 +0,0 @@
Tere
<br><br>
Domeeni <%= @params[:name] %> registreerija <%= @params[:registrant_name] %> ei kinnitanud tähtaegselt registreerija vahetuse taotlust. Domeeni <%= @params[:name] %> registreerija vahetus on sellest tulenevalt tühistatud.
<br><br>
Küsimuste korral palun võtke ühendust oma registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi,
<br><br>
Domain registrant change request has been expired for the domain <%= @params[:name] %>.
<br><br>
Please contact to your registrar <%= @params[:registrar_name] %> if you have any questions. You can find the registrar's contacts at http://internet.ee/registrars.
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -1,19 +0,0 @@
Tere
Domeeni <%= @params[:name] %> registreerija <%= @params[:registrant_name] %> ei kinnitanud tähtaegselt registreerija vahetuse taotlust. Domeeni <%= @params[:name] %> registreerija vahetus on sellest tulenevalt tühistatud.
Küsimuste korral palun võtke ühendust oma registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
Lugupidamisega
Eesti Interneti Sihtasutus
--------------------------------------
Hi,
Domain registrant change request has been expired for the domain <%= @params[:name] %>.
Please contact to your registrar <%= @params[:registrar_name] %> if you have any questions. You can find the registrar's contacts at http://internet.ee/registrars.
Best Regards,
Estonian Internet Foundation

View file

@ -1,53 +0,0 @@
Tere
<br><br>
Registripidaja <%= @params[:registrar_name] %> vahendusel on algatatud <%= @params[:name] %> domeeni omanikuvahetuse protseduur.
<br><br>
Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @params[:registrar_name] %> poole.
<br><br>
Uue registreerija andmed:<br>
Nimi: <%= @params[:registrant_name] %><br>
<% if @params[:registrant_priv] %>
Isikukood: <%= @params[:registrant_ident] %><br>
<% else %>
Äriregistrikood: <%= @params[:registrant_ident] %><br>
<% end %>
Tänav: <%= @params[:registrant_street] %><br>
Linn: <%= @params[:registrant_city] %><br>
Riik: <%= @params[:registrant_country] %>
<br><br>
Juhime Teie tähelepanu asjaolule, et omanikuvahetuse protseduur viiakse lõpule vaid juhul, kui domeeni hetkel kehtiv registreerija <%= @params[:old_registrant_name] %> omanikuvahetuse tähtaegselt kinnitab.
<br><br>
Juhul kui <%= @params[:old_registrant_name] %> lükkab omanikuvahetuse taotluse tagasi või ei anna kinnitust enne <%= Setting.expire_pending_confirmation %> tundi, omanikuvahetuse protseduur tühistatakse.
<br><br>
Küsimuste korral palun võtke ühendust registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi,
<br><br>
Registrant change process for the domain <%= @params[:name] %> has been started.
<br><br>
Please verify the details of the following change request. In case of problems contact your registrar <%= @params[:registrar_name] %>
<br><br>
New registrant:<br>
Name: <%= @params[:registrant_name] %><br>
<% if @params[:registrant_priv] %>
Personal code: <%= @params[:registrant_ident] %><br>
<% else %>
Business Registry code: <%= @params[:registrant_ident] %><br>
<% end %>
Street: <%= @params[:registrant_street] %><br>
City: <%= @params[:registrant_city] %><br>
Country: <%= @params[:registrant_country] %>
<br><br>
The registrant change procedure will be completed only after the current registrant <%= @params[:old_registrant_name] %> has approved it.
<br><br>
Change request will be cancelled in case <%= @params[:old_registrant_name] %> rejects or does not approve it in <%= Setting.expire_pending_confirmation %> hours.
<br><br>
Please contact registrar <%= @params[:registrar_name] %> in case of questions. You can find the registrar's contacts at http://internet.ee/registrars.
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -1,53 +0,0 @@
Tere
Registripidaja <%= @params[:registrar_name] %> vahendusel on algatatud <%= @params[:name] %> domeeni omanikuvahetuse protseduur.
Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @params[:registrar_name] %> poole.
Uue registreerija andmed:
Nimi: <%= @params[:registrant_name] %>
<% if @params[:registrant_priv] %>
Isikukood: <%= @params[:registrant_ident] %>
<% else %>
Äriregistrikood: <%= @params[:registrant_ident] %>
<% end %>
Tänav: <%= @params[:registrant_street] %>
Linn: <%= @params[:registrant_city] %>
Riik: <%= @params[:registrant_country] %>
Juhime Teie tähelepanu asjaolule, et omanikuvahetuse protseduur viiakse lõpule vaid juhul, kui domeeni hetkel kehtiv registreerija <%= @params[:old_registrant_name] %> omanikuvahetuse tähtaegselt kinnitab.
Juhul kui <%= @params[:old_registrant_name] %> lükkab omanikuvahetuse taotluse tagasi või ei anna kinnitust enne <%= Setting.expire_pending_confirmation %> tundi, omanikuvahetuse protseduur tühistatakse.
Küsimuste korral palun võtke ühendust registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
Lugupidamisega
Eesti Interneti Sihtasutus
--------------------------------------
Hi,
Registrant change process for the domain <%= @params[:name] %> has been started.
Please verify the details of the following change request. In case of problems contact your registrar <%= @params[:registrar_name] %>
New registrant:
Name: <%= @params[:registrant_name] %>
<% if @params[:registrant_priv] %>
Personal code: <%= @params[:registrant_ident] %>
<% else %>
Business Registry code: <%= @params[:registrant_ident] %>
<% end %>
Street: <%= @params[:registrant_street] %>
City: <%= @params[:registrant_city] %>
Country: <%= @params[:registrant_country] %>
The registrant change procedure will be completed only after the current registrant <%= @params[:old_registrant_name] %> has approved it.
Change request will be cancelled in case <%= @params[:old_registrant_name] %> rejects or does not approve it in <%= Setting.expire_pending_confirmation %> hours.
Please contact registrar <%= @params[:registrar_name] %> in case of questions. You can find the registrar's contacts at http://internet.ee/registrars.
Best Regards,
Estonian Internet Foundation

View file

@ -1,19 +0,0 @@
Tere
<br><br>
Domeeni <%= @params[:name] %> registreerija <%= @params[:old_registrant_name] %> on domeeni registreerija vahetamise taotluse tagasi lükanud.
<br><br>
Küsimuste korral võtke palun ühendust oma registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi,
<br><br>
Registrant change for the domain <%= @params[:name] %> was rejected by the registrant <%= @params[:old_registrant_name] %>.
<br><br>
Please contact your registrar <%= @params[:registrar_name] %> if you have any questions. You can find the registrar's contacts at http://internet.ee/registrars.
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -1,20 +0,0 @@
Tere
Domeeni <%= @params[:name] %> registreerija <%= @params[:old_registrant_name] %> on domeeni registreerija vahetamise taotluse tagasi lükanud.
Küsimuste korral võtke palun ühendust oma registripidajaga <%= @params[:registrar_name] %>. Registripidajate kontaktid leiate aadressilt www.internet.ee/registripidajad.
Lugupidamisega
Eesti Interneti Sihtasutus
--------------------------------------
Hi,
Registrant change for the domain <%= @params[:name] %> was rejected by the registrant <%= @params[:old_registrant_name] %>
.
Please contact your registrar <%= @params[:registrar_name] %> if you have any questions. You can find the registrar's contacts at http://internet.ee/registrars.
Best Regards,
Estonian Internet Foundation

View file

@ -1,48 +0,0 @@
Tere
<br><br>
Registrisse laekus taotlus domeeni <%= @params[:name] %> registreerija vahetuseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @params[:registrar_name] %> poole.
<br><br>
Uue registreerija andmed:<br>
Nimi: <%= @params[:registrant_name] %><br>
<% if @params[:registrant_priv] %>
Isikukood: <%= @params[:registrant_ident] %><br>
<% else %>
Äriregistrikood: <%= @params[:registrant_ident] %><br>
<% end %>
Tänav: <%= @params[:registrant_street] %><br>
Linn: <%= @params[:registrant_city] %><br>
Riik: <%= @params[:registrant_country] %>
<br><br>
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ei kinnita või tagasi lükka.
<br><br>
Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan:<br>
<%= link_to @params[:verification_url], @params[:verification_url] %>
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi,
<br><br>
Application for changing registrant of your domain <%= @params[:name] %> has been filed. Please make sure that the update and information are correct. Incase of problems please turn to your registrar. Your registrar is <%= @params[:registrar_name] %>
<br><br>
New registrant:<br>
Name: <%= @params[:registrant_name] %><br>
<% if @params[:registrant_priv] %>
Personal code: <%= @params[:registrant_ident] %><br>
<% else %>
Business Registry code: <%= @params[:registrant_ident] %><br>
<% end %>
Street: <%= @params[:registrant_street] %><br>
City: <%= @params[:registrant_city] %><br>
Country: <%= @params[:registrant_country] %>
<br><br>
The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automaticcally rejected if it is not approved nor rejected before.
<br><br>
To confirm the update please visit this website, once again review the data and press approve:<br>
<%= link_to @params[:verification_url], @params[:verification_url] %>
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -1,45 +0,0 @@
Tere
Registrisse laekus taotlus domeeni <%= @params[:name] %> registreerija vahetuseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @params[:registrar_name] %> poole.
Uue registreerija andmed:
Nimi: <%= @params[:registrant_name] %>
<% if @params[:registrant_priv] %>
Isikukood: <%= @params[:registrant_ident] %>
<% else %>
Äriregistrikood: <%= @params[:registrant_ident] %>
<% end %>
Tänav: <%= @params[:registrant_street] %>
Linn: <%= @params[:registrant_city] %>
Riik: <%= @params[:registrant_country] %>
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ei kinnita või tagasi lükka.
Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan:
<%= @params[:verification_url] %>
Lugupidamisega
Eesti Interneti Sihtasutus
--------------------------------------
Hi,
Application for changing registrant of your domain <%= @params[:name] %> has been filed. Please make sure that the update and information are correct. Incase of problems please turn to your registrar. Your registrar is <%= @params[:registrar_name] %>
New registrant:
Name: <%= @params[:registrant_name] %>
<% if @params[:registrant_priv] %>
Personal code: <%= @params[:registrant_ident] %>
<% else %>
Business Registry code: <%= @params[:registrant_ident] %>
<% end %>
Street: <%= @params[:registrant_street] %>
City: <%= @params[:registrant_city] %>
Country: <%= @params[:registrant_country] %>
The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automaticcally rejected if it is not approved nor rejected before.
To confirm the update please visit this website, once again review the data and press approve:
<%= @params[:verification_url] %>
Best Regards,
Estonian Internet Foundation

View file

@ -0,0 +1,38 @@
Tere
<br><br>
Registrisse laekus taotlus domeeni <%= @domain.name %> registreerija vahetuseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole:
<%= render 'mailers/shared/registrar/registrar.et.html', registrar: @registrar %>
<br><br>
Uue registreerija andmed:<br>
<%= render 'mailers/shared/registrant/registrant.et.html', registrant: @new_registrant %>
<br><br>
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ei kinnita või tagasi lükka.
<br><br>
Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan:<br>
<%= link_to @confirm_url, @confirm_url %>
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi,
<br><br>
Application for changing registrant of your domain <%= @domain.name %> has been filed. Please make sure that the update and information are correct. In case of problems please turn to your registrar:
<%= render 'mailers/shared/registrar/registrar.en.html', registrar: @registrar %>
<br><br>
New registrant:<br>
<%= render 'mailers/shared/registrant/registrant.en.html', registrant: @new_registrant %>
<br><br>
The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automaticcally rejected if it is not approved nor rejected before.
<br><br>
To confirm the update please visit this website, once again review the data and press approve:<br>
<%= link_to @confirm_url, @confirm_url %>
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -0,0 +1,33 @@
Tere
Registrisse laekus taotlus domeeni <%= @domain.name %> registreerija vahetuseks. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole:
<%= render 'mailers/shared/registrar/registrar.et.text', registrar: @registrar %>
Uue registreerija andmed:
<%= render 'mailers/shared/registrant/registrant.et.text', registrant: @new_registrant %>
Taotlus on aktiivne <%= Setting.expire_pending_confirmation %> tundi ja lükatakse automaatselt tagasi kui te seda enne ei kinnita või tagasi lükka.
Muudatuse kinnitamiseks külastage palun allolevat lehekülge, kontrollige uuesti üle muudatuse andmed ning vajutage nuppu kinnitan:
<%= @confirm_url %>
Lugupidamisega
Eesti Interneti Sihtasutus
--------------------------------------
Hi,
Application for changing registrant of your domain <%= @domain.name %> has been filed. Please make sure that the update and information are correct. In case of problems please turn to your registrar:
<%= render 'mailers/shared/registrar/registrar.en.text', registrar: @registrar %>
New registrant:
<%= render 'mailers/shared/registrant/registrant.en.text', registrant: @new_registrant %>
The application will remain in pending status for <%= Setting.expire_pending_confirmation %> hrs and will be automaticcally rejected if it is not approved nor rejected before.
To confirm the update please visit this website, once again review the data and press approve:
<%= @confirm_url %>
Best Regards,
Estonian Internet Foundation

View file

@ -0,0 +1,25 @@
Tere
<br><br>
Domeeni <%= @domain.name %> registreerija <%= @registrant.name %> ei kinnitanud tähtaegselt registreerija vahetuse taotlust. Domeeni <%= @domain.name %> registreerija vahetus on sellest tulenevalt tühistatud.
<br><br>
Küsimuste korral palun võtke ühendust oma registripidajaga:
<%= render 'mailers/shared/registrar/registrar.et.html', registrar: @registrar %>
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi,
<br><br>
Domain registrant change request has been expired for the domain <%= @domain.name %>.
<br><br>
Please contact to your registrar if you have any questions:
<%= render 'mailers/shared/registrar/registrar.en.html', registrar: @registrar %>
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -0,0 +1,23 @@
Tere
Domeeni <%= @domain.name %> registreerija <%= @registrant.name %> ei kinnitanud tähtaegselt registreerija vahetuse taotlust. Domeeni <%= @domain.name %> registreerija vahetus on sellest tulenevalt tühistatud.
Küsimuste korral palun võtke ühendust oma registripidajaga:
<%= render 'mailers/shared/registrar/registrar.et.text', registrar: @registrar %>
Lugupidamisega
Eesti Interneti Sihtasutus
--------------------------------------
Hi,
Domain registrant change request has been expired for the domain <%= @domain.name %>.
Please contact to your registrar if you have any questions:
<%= render 'mailers/shared/registrar/registrar.en.text', registrar: @registrar %>
Best Regards,
Estonian Internet Foundation

View file

@ -0,0 +1,39 @@
Tere
<br><br>
Registripidaja <%= @registrar.name %> vahendusel on algatatud <%= @domain.name %> domeeni omanikuvahetuse protseduur.
<br><br>
Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole:
<%= render 'mailers/shared/registrar/registrar.et.html', registrar: @registrar %>
<br><br>
Uue registreerija andmed:<br>
<%= render 'mailers/shared/registrant/registrant.et.html', registrant: @new_registrant %>
<br><br>
Juhime Teie tähelepanu asjaolule, et omanikuvahetuse protseduur viiakse lõpule vaid juhul, kui domeeni hetkel kehtiv registreerija <%= @current_registrant.name %> omanikuvahetuse tähtaegselt kinnitab.
<br><br>
Juhul kui <%= @current_registrant.name %> lükkab omanikuvahetuse taotluse tagasi või ei anna kinnitust enne <%= Setting.expire_pending_confirmation %> tundi, omanikuvahetuse protseduur tühistatakse.
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi,
<br><br>
Registrant change process for the domain <%= @domain.name %> has been started.
<br><br>
Please verify the details of the following change request. In case of problems contact your registrar:
<%= render 'mailers/shared/registrar/registrar.en.html', registrar: @registrar %>
<br><br>
New registrant:<br>
<%= render 'mailers/shared/registrant/registrant.en.html', registrant: @new_registrant %>
<br><br>
The registrant change procedure will be completed only after the current registrant <%= @current_registrant.name %> has approved it.
<br><br>
Change request will be cancelled in case <%= @current_registrant.name %> rejects or does not approve it in <%= Setting.expire_pending_confirmation %> hours.
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -0,0 +1,37 @@
Tere
Registripidaja <%= @registrar.name %> vahendusel on algatatud <%= @domain.name %> domeeni omanikuvahetuse protseduur.
Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole:
<%= render 'mailers/shared/registrar/registrar.et.text', registrar: @registrar %>
Uue registreerija andmed:
<%= render 'mailers/shared/registrant/registrant.et.text', registrant: @new_registrant %>
Juhime Teie tähelepanu asjaolule, et omanikuvahetuse protseduur viiakse lõpule vaid juhul, kui domeeni hetkel kehtiv registreerija <%= @current_registrant.name %> omanikuvahetuse tähtaegselt kinnitab.
Juhul kui <%= @current_registrant.name %> lükkab omanikuvahetuse taotluse tagasi või ei anna kinnitust enne <%= Setting.expire_pending_confirmation %> tundi, omanikuvahetuse protseduur tühistatakse.
Lugupidamisega
Eesti Interneti Sihtasutus
--------------------------------------
Hi,
Registrant change process for the domain <%= @domain.name %> has been started.
Please verify the details of the following change request. In case of problems contact your registrar:
<%= render 'mailers/shared/registrar/registrar.en.text', registrar: @registrar %>
New registrant:
<%= render 'mailers/shared/registrant/registrant.en.text', registrant: @new_registrant %>
The registrant change procedure will be completed only after the current registrant <%= @current_registrant.name %> has approved it.
Change request will be cancelled in case <%= @current_registrant.name %> rejects or does not approve it in <%= Setting.expire_pending_confirmation %> hours.
Best Regards,
Estonian Internet Foundation

View file

@ -0,0 +1,25 @@
Tere
<br><br>
Domeeni <%= @domain.name %> registreerija <%= @registrant.name %> on domeeni registreerija vahetamise taotluse tagasi lükanud.
<br><br>
Küsimuste korral võtke palun ühendust oma registripidajaga:
<%= render 'mailers/shared/registrar/registrar.et.html', registrar: @registrar %>
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi,
<br><br>
Registrant change for the domain <%= @domain.name %> was rejected by the registrant <%= @registrant.name %>.
<br><br>
Please contact your registrar if you have any questions:
<%= render 'mailers/shared/registrar/registrar.en.html', registrar: @registrar %>
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -0,0 +1,23 @@
Tere
Domeeni <%= @domain.name %> registreerija <%= @registrant.name %> on domeeni registreerija vahetamise taotluse tagasi lükanud.
Küsimuste korral võtke palun ühendust oma registripidajaga:
<%= render 'mailers/shared/registrar/registrar.et.text', registrar: @registrar %>
Lugupidamisega
Eesti Interneti Sihtasutus
--------------------------------------
Hi,
Registrant change for the domain <%= @domain.name %> was rejected by the registrant <%= @registrant.name %>.
Please contact your registrar if you have any questions:
<%= render 'mailers/shared/registrar/registrar.en.text', registrar: @registrar %>
Best Regards,
Estonian Internet Foundation

View file

@ -0,0 +1,9 @@
Name: <%= registrant.name %><br>
<% if registrant.priv? %>
Personal code: <%= registrant.ident %><br>
<% else %>
Business Registry code: <%= registrant.ident %><br>
<% end %>
Street: <%= registrant.street %><br>
City: <%= registrant.city %><br>
Country: <%= registrant.country %>

View file

@ -0,0 +1,9 @@
Name: <%= registrant.name %>
<% if registrant.priv? %>
Personal code: <%= registrant.ident %>
<% else %>
Business Registry code: <%= registrant.ident %>
<% end %>
Street: <%= registrant.street %>
City: <%= registrant.city %>
Country: <%= registrant.country %>

View file

@ -0,0 +1,9 @@
Nimi: <%= registrant.name %><br>
<% if registrant.priv? %>
Isikukood: <%= registrant.ident %><br>
<% else %>
Äriregistrikood: <%= registrant.ident %><br>
<% end %>
Tänav: <%= registrant.street %><br>
Linn: <%= registrant.city %><br>
Riik: <%= registrant.country %>

View file

@ -0,0 +1,9 @@
Nimi: <%= registrant.name %>
<% if registrant.priv? %>
Isikukood: <%= registrant.ident %>
<% else %>
Äriregistrikood: <%= registrant.ident %>
<% end %>
Tänav: <%= registrant.street %>
Linn: <%= registrant.city %>
Riik: <%= registrant.country %>

View file

@ -0,0 +1,6 @@
<p>
<%= registrar.name %><br>
Email: <%= registrar.email %><br>
Phone: <%= registrar.phone %><br>
Website: <%= registrar.url %>
</p>

View file

@ -0,0 +1,4 @@
<%= registrar.name %>
Email: <%= registrar.email %>
Phone: <%= registrar.phone %>
Website: <%= registrar.url %>

View file

@ -0,0 +1,6 @@
<p>
<%= registrar.name %><br>
Email: <%= registrar.email %><br>
Telefon: <%= registrar.phone %><br>
Veebileht: <%= registrar.url %>
</p>

View file

@ -0,0 +1,4 @@
<%= registrar.name %>
Email: <%= registrar.email %>
Telefon: <%= registrar.phone %>
Veebileht: <%= registrar.url %>

View file

@ -0,0 +1,6 @@
<p>
<%= registrar.name %><br>
Электронная почта: <%= registrar.email %><br>
Телефон: <%= registrar.phone %><br>
Веб-сайт: <%= registrar.url %>
</p>

View file

@ -0,0 +1,4 @@
<%= registrar.name %>
Электронная почта: <%= registrar.email %>
Телефон: <%= registrar.phone %>
Веб-сайт: <%= registrar.url %>

View file

@ -1,4 +1,8 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
# #
# This file was generated by Bundler. # This file was generated by Bundler.
# #

View file

@ -1,19 +1,15 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
# This file loads spring without using Bundler, in order to be fast # This file loads spring without using Bundler, in order to be fast.
# It gets overwritten when you run the `spring binstub` command # It gets overwritten when you run the `spring binstub` command.
unless defined?(Spring) unless defined?(Spring)
require 'rubygems' require "rubygems"
require 'bundler' require "bundler"
match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m) if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
if match Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
ENV['GEM_PATH'] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) gem "spring", match[1]
ENV['GEM_HOME'] = nil require "spring/binstub"
Gem.paths = ENV
gem 'spring', match[1]
require 'spring/binstub'
end end
end end

View file

@ -35,6 +35,7 @@ module Registry
# Autoload all model subdirs # Autoload all model subdirs
config.autoload_paths += Dir[Rails.root.join('app', 'models', '**/')] config.autoload_paths += Dir[Rails.root.join('app', 'models', '**/')]
config.autoload_paths << Rails.root.join('lib') config.autoload_paths << Rails.root.join('lib')
config.eager_load_paths << config.root.join('lib', 'validators')
# Add the fonts path # Add the fonts path
config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts') config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts')

View file

@ -60,6 +60,7 @@ Rails.application.configure do
Bullet.add_whitelist type: :counter_cache, class_name: 'Contact', association: :versions Bullet.add_whitelist type: :counter_cache, class_name: 'Contact', association: :versions
end end
config.active_job.queue_adapter = :test
config.logger = ActiveSupport::Logger.new(nil) config.logger = ActiveSupport::Logger.new(nil)
end end

View file

@ -339,7 +339,6 @@ en:
contact_details: 'Contact details' contact_details: 'Contact details'
ident: 'Ident' ident: 'Ident'
ident_type: 'Ident type' ident_type: 'Ident type'
address: 'Address'
country: 'Country' country: 'Country'
city: 'City' city: 'City'
street: 'Street' street: 'Street'
@ -795,13 +794,8 @@ en:
unimplemented_object_service: 'Unimplemented object service' unimplemented_object_service: 'Unimplemented object service'
contact_email_update_subject: 'Teie domeenide kontakt epostiaadress on muutunud / Contact e-mail addresses of your domains have changed' contact_email_update_subject: 'Teie domeenide kontakt epostiaadress on muutunud / Contact e-mail addresses of your domains have changed'
object_status_prohibits_operation: 'Object status prohibits operation' object_status_prohibits_operation: 'Object status prohibits operation'
pending_update_request_for_old_registrant_subject: "Kinnitustaotlus domeeni %{name} registreerija vahetuseks / Application for approval for registrant change of %{name}"
pending_update_notification_for_new_registrant_subject: "Domeeni %{name} registreerija vahetus protseduur on algatatud / %{name} registrant change"
pending_update_rejected_notification_for_new_registrant_subject: "Domeeni %{name} registreerija vahetuse taotlus tagasi lükatud / %{name} registrant change declined"
pending_update_expired_notification_for_new_registrant_subject: "Domeeni %{name} registreerija vahetuse taotlus on tühistatud / %{name} registrant change cancelled"
registrant_updated_notification_for_new_registrant_subject: 'Domeeni %{name} registreerija vahetus teostatud / Registrant change of %{name} has been finished.' registrant_updated_notification_for_new_registrant_subject: 'Domeeni %{name} registreerija vahetus teostatud / Registrant change of %{name} has been finished.'
registrant_updated_notification_for_old_registrant_subject: 'Domeeni %{name} registreerija vahetus teostatud / Registrant change of %{name} has been finished.' registrant_updated_notification_for_old_registrant_subject: 'Domeeni %{name} registreerija vahetus teostatud / Registrant change of %{name} has been finished.'
domain_pending_deleted_subject: "Kinnitustaotlus domeeni %{name} kustutamiseks .ee registrist / Application for approval for deletion of %{name}"
pending_delete_rejected_notification_subject: "Domeeni %{name} kustutamise taotlus tagasi lükatud / %{name} deletion declined" pending_delete_rejected_notification_subject: "Domeeni %{name} kustutamise taotlus tagasi lükatud / %{name} deletion declined"
pending_delete_expired_notification_subject: "Domeeni %{name} kustutamise taotlus on tühistatud / %{name} deletion cancelled" pending_delete_expired_notification_subject: "Domeeni %{name} kustutamise taotlus on tühistatud / %{name} deletion cancelled"
delete_confirmation_subject: "Domeeni %{name} kustutatud / %{name} deleted" delete_confirmation_subject: "Domeeni %{name} kustutatud / %{name} deleted"
@ -937,13 +931,11 @@ en:
new_mail_template: New mail template new_mail_template: New mail template
failure: "It was not saved" failure: "It was not saved"
contact_is_not_valid: 'Contact %{value} is not valid, please fix the invalid contact' contact_is_not_valid: 'Contact %{value} is not valid, please fix the invalid contact'
force_delete_subject: 'Kustutusmenetluse teade'
welcome_to_eis_registrar_portal: 'Welcome to EIS Registrar portal' welcome_to_eis_registrar_portal: 'Welcome to EIS Registrar portal'
interfaces: 'Interfaces' interfaces: 'Interfaces'
list_format_is_in_yaml: 'List format is in YAML' list_format_is_in_yaml: 'List format is in YAML'
if_auth_info_is_left_empty_it_will_be_auto_generated: 'If auth info is left empty, it will be auto generated.' if_auth_info_is_left_empty_it_will_be_auto_generated: 'If auth info is left empty, it will be auto generated.'
each_domain_name_must_end_with_colon_sign: 'Each domain name must end with colon (:) sign.' each_domain_name_must_end_with_colon_sign: 'Each domain name must end with colon (:) sign.'
expiration_remind_subject: 'The %{name} domain has expired'
next: 'Next' next: 'Next'
previous: 'Previous' previous: 'Previous'
personal_domain_verification_url: 'Personal domain verification url' personal_domain_verification_url: 'Personal domain verification url'

View file

@ -0,0 +1,6 @@
en:
domain_delete_mailer:
confirm:
subject: Kinnitustaotlus domeeni %{domain_name} kustutamiseks .ee registrist / Application for approval for deletion of %{domain_name}
forced:
subject: Kustutusmenetluse teade

View file

@ -0,0 +1,4 @@
en:
domain_expire_mailer:
expired:
subject: The %{domain_name} domain has expired

View file

@ -0,0 +1,10 @@
en:
registrant_change_mailer:
confirm:
subject: Kinnitustaotlus domeeni %{domain_name} registreerija vahetuseks / Application for approval for registrant change of %{domain_name}
notice:
subject: Domeeni %{domain_name} registreerija vahetus protseduur on algatatud / %{domain_name} registrant change
rejected:
subject: Domeeni %{domain_name} registreerija vahetuse taotlus tagasi lükatud / %{domain_name} registrant change declined
expired:
subject: Domeeni %{domain_name} registreerija vahetuse taotlus on tühistatud / %{domain_name} registrant change cancelled

View file

@ -0,0 +1,15 @@
class EmailValidator
def self.regexp
Devise::email_regexp
end
def initialize(email)
@email = email
end
def valid?
email =~ self.class.regexp
end
attr_reader :email
end

View file

@ -0,0 +1,5 @@
FactoryGirl.define do
factory :admin_domain_contact, parent: :domain_contact, class: AdminDomainContact do
end
end

16
spec/factories/contact.rb Normal file
View file

@ -0,0 +1,16 @@
FactoryGirl.define do
factory :contact do
name 'test'
sequence(:code) { |n| "test#{n}" }
phone '+123.456789'
email 'test@test.com'
street 'test'
city 'test'
zip 12345
country_code 'EE'
ident '37605030299'
ident_type 'priv'
ident_country_code 'EE'
registrar
end
end

15
spec/factories/dnskey.rb Normal file
View file

@ -0,0 +1,15 @@
FactoryGirl.define do
factory :dnskey do
alg Dnskey::ALGORITHMS.first
flags Dnskey::FLAGS.first
protocol Dnskey::PROTOCOLS.first
ds_digest_type 2
domain
public_key 'AwEAAaOf5+lz3ftsL+0CCvfJbhUF/NVsNh8BKo61oYs5fXVbuWDiH872 '\
'LC8uKDO92TJy7Q4TF9XMAKMMlf1GMAxlRspD749SOCTN00sqfWx1OMTu '\
'a28L1PerwHq7665oDJDKqR71btcGqyLKhe2QDvCdA0mENimF1NudX1BJ '\
'DDFi6oOZ0xE/0CuveB64I3ree7nCrwLwNs56kXC4LYoX3XdkOMKiJLL/ '\
'MAhcxXa60CdZLoRtTEW3z8/oBq4hEAYMCNclpbd6y/exScwBxFTdUfFk '\
'KsdNcmvai1lyk9vna0WQrtpYpHKMXvY9LFHaJxCOLR4umfeQ42RuTd82 lqfU6ClMeXs='
end
end

15
spec/factories/domain.rb Normal file
View file

@ -0,0 +1,15 @@
FactoryGirl.define do
factory :domain do
sequence(:name) { |n| "test#{n}.com" }
period 1
period_unit 'y' # Year
registrar
registrant
after :build do |domain|
domain.nameservers << FactoryGirl.build_pair(:nameserver)
domain.admin_domain_contacts << FactoryGirl.build(:admin_domain_contact)
domain.tech_domain_contacts << FactoryGirl.build(:tech_domain_contact)
end
end
end

View file

@ -0,0 +1,5 @@
FactoryGirl.define do
factory :domain_contact do
contact
end
end

View file

@ -0,0 +1,6 @@
FactoryGirl.define do
factory :nameserver do
sequence(:hostname) { |n| "ns.test#{n}.ee" }
ipv4 '192.168.1.1'
end
end

View file

@ -0,0 +1,5 @@
FactoryGirl.define do
factory :registrant, parent: :contact, class: Registrant do
name 'test'
end
end

View file

@ -0,0 +1,13 @@
FactoryGirl.define do
factory :registrar do
sequence(:name) { |n| "test#{n}" }
sequence(:code) { |n| "test#{n}" }
sequence(:reg_no) { |n| "test#{n}" }
street 'test'
city 'test'
state 'test'
zip 'test'
email 'test@test.com'
country_code 'EE'
end
end

View file

@ -0,0 +1,5 @@
FactoryGirl.define do
factory :tech_domain_contact, parent: :domain_contact, class: TechDomainContact do
end
end

View file

@ -0,0 +1,7 @@
require_relative 'rails_helper'
RSpec.describe 'FactoryGirl', db: true do
it 'lints factories' do
FactoryGirl.lint
end
end

View file

@ -0,0 +1,40 @@
require 'rails_helper'
RSpec.describe DomainDeleteConfirmEmailJob do
describe '#run' do
let(:domain) { instance_double(Domain) }
let(:message) { instance_double(ActionMailer::MessageDelivery) }
before :example do
expect(Domain).to receive(:find).and_return(domain)
allow(domain).to receive_messages(
id: 1,
name: 'test.com',
registrant_email: 'registrant@test.com',
registrar: 'registrar',
registrant: 'registrant')
end
after :example do
domain_id = 1
described_class.enqueue(domain_id)
end
it 'creates log record' do
log_message = 'Send DomainDeleteMailer#confirm email for domain test.com (#1) to registrant@test.com'
allow(DomainDeleteMailer).to receive(:confirm).and_return(message)
allow(message).to receive(:deliver_now)
expect(Rails.logger).to receive(:info).with(log_message)
end
it 'sends email' do
expect(DomainDeleteMailer).to receive(:confirm).with(domain: domain,
registrar: 'registrar',
registrant: 'registrant')
.and_return(message)
expect(message).to receive(:deliver_now)
end
end
end

View file

@ -0,0 +1,40 @@
require 'rails_helper'
RSpec.describe DomainDeleteForcedEmailJob do
describe '#run' do
let(:domain) { instance_double(Domain) }
let(:message) { instance_double(ActionMailer::MessageDelivery) }
before :example do
expect(Domain).to receive(:find).and_return(domain)
allow(domain).to receive_messages(
id: 1,
name: 'test.com',
registrar: 'registrar',
registrant: 'registrant',
primary_contact_emails: %w(test@test.com test@test.com))
end
after :example do
domain_id = 1
described_class.enqueue(domain_id)
end
it 'creates log record' do
log_message = 'Send DomainDeleteMailer#forced email for domain test.com (#1) to test@test.com, test@test.com'
allow(DomainDeleteMailer).to receive(:forced).and_return(message)
allow(message).to receive(:deliver_now)
expect(Rails.logger).to receive(:info).with(log_message)
end
it 'sends email' do
expect(DomainDeleteMailer).to receive(:forced).with(domain: domain,
registrar: 'registrar',
registrant: 'registrant')
.and_return(message)
expect(message).to receive(:deliver_now)
end
end
end

View file

@ -0,0 +1,43 @@
require 'rails_helper'
RSpec.describe DomainExpireEmailJob do
describe '#run' do
let(:domain) { instance_double(Domain) }
before :example do
expect(Domain).to receive(:find).and_return(domain)
end
after :example do
domain_id = 1
described_class.enqueue(domain_id)
end
context 'when domain is expired' do
let(:message) { instance_double(ActionMailer::MessageDelivery) }
before :example do
allow(domain).to receive_messages(
registrar: 'registrar',
registered?: false,
primary_contact_emails: %w(test@test.com test@test.com))
end
it 'sends email' do
expect(DomainExpireMailer).to receive(:expired).with(domain: domain, registrar: 'registrar')
.and_return(message)
expect(message).to receive(:deliver_now)
end
end
context 'when domain is registered' do
before :example do
allow(domain).to receive(:registered?).and_return(true)
end
it 'does not send email' do
expect(DomainExpireMailer).to_not receive(:expired)
end
end
end
end

View file

@ -0,0 +1,43 @@
require 'rails_helper'
RSpec.describe RegistrantChangeConfirmEmailJob do
describe '#run' do
let(:domain) { instance_double(Domain) }
let(:message) { instance_double(ActionMailer::MessageDelivery) }
before :example do
expect(Domain).to receive(:find).and_return(domain)
expect(Registrant).to receive(:find).and_return('new registrant')
allow(domain).to receive_messages(
id: 1,
name: 'test.com',
registrant_email: 'registrant@test.com',
registrar: 'registrar',
registrant: 'registrant')
end
after :example do
domain_id = 1
new_registrant_id = 1
described_class.enqueue(domain_id, new_registrant_id)
end
it 'creates log record' do
log_message = 'Send RegistrantChangeMailer#confirm email for domain test.com (#1) to registrant@test.com'
allow(RegistrantChangeMailer).to receive(:confirm).and_return(message)
allow(message).to receive(:deliver_now)
expect(Rails.logger).to receive(:info).with(log_message)
end
it 'sends email' do
expect(RegistrantChangeMailer).to receive(:confirm).with(domain: domain,
registrar: 'registrar',
current_registrant: 'registrant',
new_registrant: 'new registrant')
.and_return(message)
expect(message).to receive(:deliver_now)
end
end
end

View file

@ -0,0 +1,40 @@
require 'rails_helper'
RSpec.describe RegistrantChangeExpiredEmailJob do
describe '#run' do
let(:domain) { instance_double(Domain,
id: 1,
name: 'test.com',
new_registrant_email: 'new-registrant@test.com',
registrar: 'registrar',
registrant: 'registrant')
}
let(:message) { instance_double(ActionMailer::MessageDelivery) }
before :example do
expect(Domain).to receive(:find).and_return(domain)
end
after :example do
domain_id = 1
described_class.enqueue(domain_id)
end
it 'creates log record' do
log_message = 'Send RegistrantChangeMailer#expired email for domain test.com (#1) to new-registrant@test.com'
allow(RegistrantChangeMailer).to receive(:expired).and_return(message)
allow(message).to receive(:deliver_now)
expect(Rails.logger).to receive(:info).with(log_message)
end
it 'sends email' do
expect(RegistrantChangeMailer).to receive(:expired).with(domain: domain,
registrar: 'registrar',
registrant: 'registrant')
.and_return(message)
expect(message).to receive(:deliver_now)
end
end
end

View file

@ -0,0 +1,44 @@
require 'rails_helper'
RSpec.describe RegistrantChangeNoticeEmailJob do
describe '#run' do
let(:domain) { instance_double(Domain,
id: 1,
name: 'test.com',
registrant_email: 'registrant@test.com',
registrar: 'registrar',
registrant: 'registrant')
}
let(:new_registrant) { instance_double(Registrant, email: 'new-registrant@test.com') }
let(:message) { instance_double(ActionMailer::MessageDelivery) }
before :example do
expect(Domain).to receive(:find).and_return(domain)
expect(Registrant).to receive(:find).and_return(new_registrant)
end
after :example do
domain_id = 1
new_registrant_id = 1
described_class.enqueue(domain_id, new_registrant_id)
end
it 'creates log record' do
log_message = 'Send RegistrantChangeMailer#notice email for domain test.com (#1) to new-registrant@test.com'
allow(RegistrantChangeMailer).to receive(:notice).and_return(message)
allow(message).to receive(:deliver_now)
expect(Rails.logger).to receive(:info).with(log_message)
end
it 'sends email' do
expect(RegistrantChangeMailer).to receive(:notice).with(domain: domain,
registrar: 'registrar',
current_registrant: 'registrant',
new_registrant: new_registrant)
.and_return(message)
expect(message).to receive(:deliver_now)
end
end
end

View file

@ -0,0 +1,23 @@
require 'spec_helper'
RSpec.describe EmailValidator do
describe '#valid?' do
subject(:valid) { described_class.new(email).valid? }
context 'when email is valid' do
let(:email) { 'test@test.com' }
it 'returns truthy' do
expect(valid).to be_truthy
end
end
context 'when email is invalid' do
let(:email) { 'invalid' }
it 'returns falsey' do
expect(valid).to be_falsey
end
end
end
end

View file

@ -0,0 +1,82 @@
require 'rails_helper'
RSpec.describe DomainDeleteMailer do
describe '#confirm' do
let(:domain) { instance_spy(Domain, name: 'test.com') }
let(:registrar) { instance_spy(Registrar) }
let(:registrant) { instance_spy(Registrant, email: 'registrant@test.com') }
let(:domain_presenter) { instance_spy(DomainPresenter) }
let(:registrar_presenter) { instance_spy(RegistrarPresenter) }
subject(:message) { described_class.confirm(domain: domain,
registrar: registrar,
registrant: registrant)
}
before :example do
expect(DomainPresenter).to receive(:new).and_return(domain_presenter)
expect(RegistrarPresenter).to receive(:new).and_return(registrar_presenter)
end
it 'has sender' do
expect(message.from).to eq(['noreply@internet.ee'])
end
it 'has registrant\'s email as a recipient' do
expect(message.to).to match_array(['registrant@test.com'])
end
it 'has subject' do
subject = 'Kinnitustaotlus domeeni test.com kustutamiseks .ee registrist' \
' / Application for approval for deletion of test.com'
expect(message.subject).to eq(subject)
end
it 'has confirm url' do
allow(domain).to receive(:id).and_return(1)
expect(domain).to receive(:registrant_verification_token).and_return('test')
url = registrant_domain_delete_confirm_url(domain, token: 'test')
expect(message.body.parts.first.decoded).to include(url)
end
it 'sends message' do
expect { message.deliver_now }.to change { ActionMailer::Base.deliveries.count }.by(1)
end
end
describe '#forced' do
let(:domain) { instance_spy(Domain, name: 'test.com') }
let(:domain_presenter) { instance_spy(DomainPresenter) }
let(:registrar_presenter) { instance_spy(RegistrarPresenter) }
let(:registrant_presenter) { instance_spy(RegistrantPresenter) }
subject(:message) { described_class.forced(domain: domain,
registrar: 'registrar',
registrant: 'registrant')
}
before :example do
expect(DomainPresenter).to receive(:new).and_return(domain_presenter)
expect(RegistrarPresenter).to receive(:new).and_return(registrar_presenter)
expect(RegistrantPresenter).to receive(:new).and_return(registrant_presenter)
end
it 'has sender' do
expect(message.from).to eq(['noreply@internet.ee'])
end
it 'has recipient' do
expect(domain).to receive(:primary_contact_emails).and_return(['recipient@test.com'])
expect(message.to).to match_array(['recipient@test.com'])
end
it 'has valid subject' do
expect(message.subject).to eq('Kustutusmenetluse teade')
end
it 'sends message' do
expect { message.deliver_now }.to change { ActionMailer::Base.deliveries.count }.by(1)
end
end
end

View file

@ -0,0 +1,71 @@
require 'rails_helper'
RSpec.describe DomainExpireMailer do
describe '#expired' do
let(:domain) { instance_spy(Domain,
id: 1,
name: 'test.com',
primary_contact_emails: recipient)
}
let(:domain_presenter) { instance_spy(DomainPresenter) }
let(:registrar_presenter) { instance_spy(RegistrarPresenter) }
subject(:message) { described_class.expired(domain: domain, registrar: nil) }
before :example do
expect(DomainPresenter).to receive(:new).and_return(domain_presenter)
expect(RegistrarPresenter).to receive(:new).and_return(registrar_presenter)
end
context 'when all recipients are valid' do
let(:recipient) { %w[recipient@test.com recipient@test.com] }
it 'has sender' do
expect(message.from).to eq(['noreply@internet.ee'])
end
it 'delivers to all recipients' do
expect(message.to).to match_array(%w[recipient@test.com recipient@test.com])
end
it 'has subject' do
expect(message.subject).to eq('The test.com domain has expired')
end
it 'logs valid emails' do
log_message = 'Send DomainExpireMailer#expired email for domain test.com (#1) to recipient@test.com,' \
' recipient@test.com'
expect(described_class.logger).to receive(:info).with(log_message)
message.deliver_now
end
it 'sends message' do
expect { message.deliver_now }.to change { ActionMailer::Base.deliveries.count }.by(1)
end
end
context 'when some recipient is invalid' do
let(:recipient) { %w[invalid_email valid@test.com] }
before :example do
allow(described_class.logger).to receive(:info)
end
it 'does not deliver to invalid recipient' do
expect(message.to).to match_array(%w[valid@test.com])
end
it 'does not log invalid email in success message' do
log_message = 'Send DomainExpireMailer#expired email for domain test.com (#1) to valid@test.com'
expect(described_class.logger).to receive(:info).with(log_message)
message.deliver_now
end
it 'logs invalid email in error message' do
log_message = 'Unable to send DomainExpireMailer#expired email for domain test.com (#1) to' \
' invalid recipient invalid_email'
expect(described_class.logger).to receive(:info).with(log_message)
message.deliver_now
end
end
end
end

View file

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe DomainMailer do
end

View file

@ -0,0 +1,176 @@
require 'rails_helper'
RSpec.describe RegistrantChangeMailer do
describe '#confirm' do
let(:domain) { instance_spy(Domain, name: 'test.com') }
let(:registrar) { instance_spy(Registrar) }
let(:current_registrant) { instance_spy(Registrant, email: 'registrant@test.com') }
let(:new_registrant) { instance_spy(Registrant) }
let(:domain_presenter) { instance_spy(DomainPresenter) }
let(:registrar_presenter) { instance_spy(RegistrarPresenter) }
let(:new_registrant_presenter) { instance_spy(RegistrantPresenter) }
subject(:message) { described_class.confirm(domain: domain,
registrar: registrar,
current_registrant: current_registrant,
new_registrant: new_registrant)
}
before :example do
expect(DomainPresenter).to receive(:new).and_return(domain_presenter)
expect(RegistrarPresenter).to receive(:new).and_return(registrar_presenter)
expect(RegistrantPresenter).to receive(:new).and_return(new_registrant_presenter)
end
it 'has sender' do
expect(message.from).to eq(['noreply@internet.ee'])
end
it 'has current registrant\s email as a recipient' do
expect(message.to).to match_array(['registrant@test.com'])
end
it 'has subject' do
subject = 'Kinnitustaotlus domeeni test.com registreerija vahetuseks' \
' / Application for approval for registrant change of test.com'
expect(message.subject).to eq(subject)
end
it 'has confirmation url' do
allow(domain).to receive(:id).and_return(1)
expect(domain).to receive(:registrant_verification_token).and_return('test')
url = registrant_domain_update_confirm_url(domain, token: 'test')
expect(message.body.parts.first.decoded).to include(url)
end
it 'sends message' do
expect { message.deliver_now }.to change { ActionMailer::Base.deliveries.count }.by(1)
end
end
describe '#notice' do
let(:domain) { instance_spy(Domain, name: 'test.com') }
let(:registrar) { instance_spy(Registrar) }
let(:current_registrant) { instance_spy(Registrant) }
let(:new_registrant) { instance_spy(Registrant, email: 'registrant@test.com') }
let(:domain_presenter) { instance_spy(DomainPresenter) }
let(:registrar_presenter) { instance_spy(RegistrarPresenter) }
let(:current_registrant_presenter) { instance_spy(RegistrantPresenter) }
let(:new_registrant_presenter) { instance_spy(RegistrantPresenter) }
subject(:message) { described_class.notice(domain: domain,
registrar: registrar,
current_registrant: current_registrant,
new_registrant: new_registrant)
}
before :example do
expect(DomainPresenter).to receive(:new).and_return(domain_presenter)
expect(RegistrarPresenter).to receive(:new).and_return(registrar_presenter)
expect(RegistrantPresenter).to receive(:new).with(registrant: current_registrant, view: anything).and_return(current_registrant_presenter)
expect(RegistrantPresenter).to receive(:new).with(registrant: new_registrant, view: anything).and_return(new_registrant_presenter)
end
it 'has sender' do
expect(message.from).to eq(['noreply@internet.ee'])
end
it 'has new registrant\s email as a recipient' do
expect(message.to).to match_array(['registrant@test.com'])
end
it 'has subject' do
subject = 'Domeeni test.com registreerija vahetus protseduur on algatatud' \
' / test.com registrant change'
expect(message.subject).to eq(subject)
end
it 'sends message' do
expect { message.deliver_now }.to change { ActionMailer::Base.deliveries.count }.by(1)
end
end
describe '#rejected' do
let(:domain) { instance_spy(Domain, name: 'test.com', new_registrant_email: 'new.registrant@test.com') }
let(:registrar) { instance_spy(Registrar) }
let(:registrant) { instance_spy(Registrant) }
let(:domain_presenter) { instance_spy(DomainPresenter) }
let(:registrar_presenter) { instance_spy(RegistrarPresenter) }
let(:registrant_presenter) { instance_spy(RegistrantPresenter) }
subject(:message) { described_class.rejected(domain: domain,
registrar: registrar,
registrant: registrant)
}
before :example do
expect(DomainPresenter).to receive(:new).and_return(domain_presenter)
expect(RegistrarPresenter).to receive(:new).and_return(registrar_presenter)
expect(RegistrantPresenter).to receive(:new).and_return(registrant_presenter)
end
it 'has sender' do
expect(message.from).to eq(['noreply@internet.ee'])
end
it 'has new registrant\s email as a recipient' do
expect(message.to).to match_array(['new.registrant@test.com'])
end
it 'has subject' do
subject = 'Domeeni test.com registreerija vahetuse taotlus tagasi lükatud' \
' / test.com registrant change declined'
expect(message.subject).to eq(subject)
end
it 'sends message' do
expect { message.deliver_now }.to change { ActionMailer::Base.deliveries.count }.by(1)
end
end
describe '#expired' do
let(:domain) { instance_spy(Domain, name: 'test.com', new_registrant_email: 'new.registrant@test.com') }
let(:registrar) { instance_spy(Registrar) }
let(:registrant) { instance_spy(Registrant) }
let(:domain_presenter) { instance_spy(DomainPresenter) }
let(:registrar_presenter) { instance_spy(RegistrarPresenter) }
let(:registrant_presenter) { instance_spy(RegistrantPresenter) }
subject(:message) { described_class.expired(domain: domain,
registrar: registrar,
registrant: registrant)
}
before :example do
expect(DomainPresenter).to receive(:new).and_return(domain_presenter)
expect(RegistrarPresenter).to receive(:new).and_return(registrar_presenter)
expect(RegistrantPresenter).to receive(:new).and_return(registrant_presenter)
end
it 'has sender' do
expect(message.from).to eq(['noreply@internet.ee'])
end
it 'has new registrant\s email as a recipient' do
expect(message.to).to match_array(['new.registrant@test.com'])
end
it 'has subject' do
subject = 'Domeeni test.com registreerija vahetuse taotlus on tühistatud' \
' / test.com registrant change cancelled'
expect(message.subject).to eq(subject)
end
it 'sends message' do
expect { message.deliver_now }.to change { ActionMailer::Base.deliveries.count }.by(1)
end
end
end

View file

@ -34,17 +34,6 @@ describe BankTransaction do
@bank_transaction.errors.full_messages.should match_array([]) @bank_transaction.errors.full_messages.should match_array([])
end end
it 'should bind transaction with invoice manually' do
r = Fabricate(:registrar_with_no_account_activities, reference_no: 'RF7086666663')
invoice = r.issue_prepayment_invoice(200, 'add some money')
bt = Fabricate(:bank_transaction, { sum: 240 })
bt.bind_invoice(invoice.number)
invoice.receipt_date.should_not be_blank
r.cash_account.balance.should == 200.0
end
it 'should not bind transaction with mismatching sums' do it 'should not bind transaction with mismatching sums' do
r = Fabricate(:registrar_with_no_account_activities, reference_no: 'RF7086666663') r = Fabricate(:registrar_with_no_account_activities, reference_no: 'RF7086666663')
invoice = r.issue_prepayment_invoice(200, 'add some money') invoice = r.issue_prepayment_invoice(200, 'add some money')

View file

@ -0,0 +1,65 @@
require 'rails_helper'
RSpec.describe Domain, db: false do
it { is_expected.to alias_attribute(:expire_time, :valid_to) }
describe '::expired', db: true do
before :example do
travel_to Time.zone.parse('05.07.2010 00:00')
Fabricate(:zonefile_setting, origin: 'ee')
Fabricate.create(:domain, id: 1, expire_time: Time.zone.parse('04.07.2010 23:59'))
Fabricate.create(:domain, id: 2, expire_time: Time.zone.parse('05.07.2010 00:00'))
Fabricate.create(:domain, id: 3, expire_time: Time.zone.parse('05.07.2010 00:01'))
end
it 'returns expired domains' do
expect(described_class.expired.ids).to eq([1, 2])
end
end
describe '#registered?' do
let(:domain) { described_class.new }
context 'when not expired' do
before :example do
expect(domain).to receive(:expired?).and_return(false)
end
specify { expect(domain).to be_registered }
end
context 'when expired' do
before :example do
expect(domain).to receive(:expired?).and_return(true)
end
specify { expect(domain).to_not be_registered }
end
end
describe '#expired?' do
before :example do
travel_to Time.zone.parse('05.07.2010 00:00')
end
context 'when :expire_time is in the past' do
let(:domain) { described_class.new(expire_time: Time.zone.parse('04.07.2010 23:59')) }
specify { expect(domain).to be_expired }
end
context 'when :expire_time is now' do
let(:domain) { described_class.new(expire_time: Time.zone.parse('05.07.2010 00:00')) }
specify { expect(domain).to be_expired }
end
context 'when :expire_time is in the future' do
let(:domain) { described_class.new(expire_time: Time.zone.parse('05.07.2010 00:01')) }
specify { expect(domain).to_not be_expired }
end
end
end

View file

@ -1,9 +1,8 @@
require 'rails_helper' require 'rails_helper'
describe Contact do RSpec.describe Contact do
before :example do before :example do
Fabricate(:zonefile_setting, origin: 'ee') Fabricate(:zonefile_setting, origin: 'ee')
@api_user = Fabricate(:api_user)
end end
context 'about class' do context 'about class' do
@ -363,3 +362,25 @@ describe Contact, '.destroy_orphans' do
Contact.count.should == cc Contact.count.should == cc
end end
end end
RSpec.describe Contact, db: false do
describe '::names' do
before :example do
expect(described_class).to receive(:pluck).with(:name).and_return('names')
end
it 'returns names' do
expect(described_class.names).to eq('names')
end
end
describe '::emails' do
before :example do
expect(described_class).to receive(:pluck).with(:email).and_return('emails')
end
it 'returns emails' do
expect(described_class.emails).to eq('emails')
end
end
end

View file

@ -2,6 +2,25 @@ require 'rails_helper'
describe Dnskey do describe Dnskey do
before :example do before :example do
Setting.ds_algorithm = 2
Setting.ds_data_allowed = true
Setting.ds_data_with_key_allowed = true
Setting.key_data_allowed = true
Setting.dnskeys_min_count = 0
Setting.dnskeys_max_count = 9
Setting.ns_min_count = 2
Setting.ns_max_count = 11
Setting.transfer_wait_time = 0
Setting.admin_contacts_min_count = 1
Setting.admin_contacts_max_count = 10
Setting.tech_contacts_min_count = 0
Setting.tech_contacts_max_count = 10
Setting.client_side_status_editing_enabled = true
Fabricate(:zonefile_setting, origin: 'ee') Fabricate(:zonefile_setting, origin: 'ee')
end end

View file

@ -1,12 +1,12 @@
require 'rails_helper' require 'rails_helper'
describe DomainContact do describe DomainContact do
before :all do before :example do
@api_user = Fabricate(:domain_contact) @api_user = Fabricate(:domain_contact)
end end
context 'with invalid attribute' do context 'with invalid attribute' do
before :all do before :example do
@domain_contact = DomainContact.new @domain_contact = DomainContact.new
end end
@ -31,7 +31,7 @@ describe DomainContact do
end end
context 'with valid attributes' do context 'with valid attributes' do
before :all do before :example do
@domain_contact = Fabricate(:domain_contact) @domain_contact = Fabricate(:domain_contact)
end end
@ -51,10 +51,12 @@ describe DomainContact do
end end
it 'should have one version' do it 'should have one version' do
@domain_contact = Fabricate.create(:domain_contact)
with_versioning do with_versioning do
@domain_contact.versions.reload.should == [] @domain_contact.versions.reload.should == []
@domain_contact.updated_at = Time.zone.now # trigger new version @domain_contact.contact = Fabricate.create(:contact)
@domain_contact.save @domain_contact.save!
@domain_contact.errors.full_messages.should match_array([]) @domain_contact.errors.full_messages.should match_array([])
@domain_contact.versions.size.should == 1 @domain_contact.versions.size.should == 1
end end
@ -62,7 +64,7 @@ describe DomainContact do
end end
context 'with valid attributes with tech domain contact' do context 'with valid attributes with tech domain contact' do
before :all do before :example do
@domain_contact = Fabricate(:tech_domain_contact) @domain_contact = Fabricate(:tech_domain_contact)
end end
@ -82,10 +84,12 @@ describe DomainContact do
end end
it 'should have one version' do it 'should have one version' do
@domain_contact = Fabricate.create(:domain_contact)
with_versioning do with_versioning do
@domain_contact.versions.reload.should == [] @domain_contact.versions.reload.should == []
@domain_contact.updated_at = Time.zone.now # trigger new version @domain_contact.contact = Fabricate.create(:contact)
@domain_contact.save @domain_contact.save!
@domain_contact.errors.full_messages.should match_array([]) @domain_contact.errors.full_messages.should match_array([])
@domain_contact.versions.size.should == 1 @domain_contact.versions.size.should == 1
end end
@ -93,7 +97,7 @@ describe DomainContact do
end end
context 'with valid attributes with admin domain contact' do context 'with valid attributes with admin domain contact' do
before :all do before :example do
@domain_contact = Fabricate(:admin_domain_contact) @domain_contact = Fabricate(:admin_domain_contact)
end end
@ -115,7 +119,7 @@ describe DomainContact do
it 'should have one version' do it 'should have one version' do
with_versioning do with_versioning do
@domain_contact.versions.reload.should == [] @domain_contact.versions.reload.should == []
@domain_contact.updated_at = Time.zone.now # trigger new version @domain_contact.contact = Fabricate.create(:contact)
@domain_contact.save @domain_contact.save
@domain_contact.errors.full_messages.should match_array([]) @domain_contact.errors.full_messages.should match_array([])
@domain_contact.versions.size.should == 1 @domain_contact.versions.size.should == 1

View file

@ -0,0 +1,41 @@
require 'rails_helper'
RSpec.describe DomainCron do
it 'should expire domains' do
Fabricate(:zonefile_setting, origin: 'ee')
@domain = Fabricate(:domain)
Setting.expire_warning_period = 1
Setting.redemption_grace_period = 1
described_class.start_expire_period
@domain.statuses.include?(DomainStatus::EXPIRED).should == false
old_valid_to = Time.zone.now - 10.days
@domain.valid_to = old_valid_to
@domain.save
described_class.start_expire_period
@domain.reload
@domain.statuses.include?(DomainStatus::EXPIRED).should == true
described_class.start_expire_period
@domain.reload
@domain.statuses.include?(DomainStatus::EXPIRED).should == true
end
it 'should start redemption grace period' do
Fabricate(:zonefile_setting, origin: 'ee')
@domain = Fabricate(:domain)
old_valid_to = Time.zone.now - 10.days
@domain.valid_to = old_valid_to
@domain.statuses = [DomainStatus::EXPIRED]
@domain.outzone_at, @domain.delete_at = nil, nil
@domain.save
described_class.start_expire_period
@domain.reload
@domain.statuses.include?(DomainStatus::EXPIRED).should == true
end
end

View file

@ -2,6 +2,25 @@ require 'rails_helper'
RSpec.describe Domain do RSpec.describe Domain do
before :example do before :example do
Setting.ds_algorithm = 2
Setting.ds_data_allowed = true
Setting.ds_data_with_key_allowed = true
Setting.key_data_allowed = true
Setting.dnskeys_min_count = 0
Setting.dnskeys_max_count = 9
Setting.ns_min_count = 2
Setting.ns_max_count = 11
Setting.transfer_wait_time = 0
Setting.admin_contacts_min_count = 1
Setting.admin_contacts_max_count = 10
Setting.tech_contacts_min_count = 0
Setting.tech_contacts_max_count = 10
Setting.client_side_status_editing_enabled = true
Fabricate(:zonefile_setting, origin: 'ee') Fabricate(:zonefile_setting, origin: 'ee')
Fabricate(:zonefile_setting, origin: 'pri.ee') Fabricate(:zonefile_setting, origin: 'pri.ee')
Fabricate(:zonefile_setting, origin: 'med.ee') Fabricate(:zonefile_setting, origin: 'med.ee')
@ -157,24 +176,11 @@ RSpec.describe Domain do
end end
it 'should start redemption grace period' do it 'should start redemption grace period' do
DomainCron.start_redemption_grace_period domain = Fabricate(:domain)
@domain.reload
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == false
@domain.outzone_at = Time.zone.now
@domain.statuses << DomainStatus::SERVER_MANUAL_INZONE # this prohibits server_hold
@domain.save
DomainCron.start_redemption_grace_period DomainCron.start_redemption_grace_period
@domain.reload domain.reload
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == false domain.statuses.include?(DomainStatus::SERVER_HOLD).should == false
@domain.statuses = []
@domain.save
DomainCron.start_redemption_grace_period
@domain.reload
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == true
end end
it 'should set force delete time' do it 'should set force delete time' do
@ -329,139 +335,6 @@ RSpec.describe Domain do
end end
end end
it 'should start redemption grace period' do
DomainCron.start_redemption_grace_period
@domain.reload
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == false
@domain.outzone_at = Time.zone.now
@domain.statuses << DomainStatus::SERVER_MANUAL_INZONE # this prohibits server_hold
@domain.save
DomainCron.start_redemption_grace_period
@domain.reload
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == false
@domain.statuses = []
@domain.save
DomainCron.start_redemption_grace_period
@domain.reload
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == true
end
it 'should know its create price' do
Fabricate(:pricelist, {
category: 'ee',
operation_category: 'create',
duration: '1year',
price: 1.50,
valid_from: Time.zone.parse('2015-01-01'),
valid_to: nil
})
domain = Fabricate(:domain)
domain.pricelist('create').price.amount.should == 1.50
domain = Fabricate(:domain, period: 12, period_unit: 'm')
domain.pricelist('create').price.amount.should == 1.50
domain = Fabricate(:domain, period: 365, period_unit: 'd')
domain.pricelist('create').price.amount.should == 1.50
Fabricate(:pricelist, {
category: 'ee',
operation_category: 'create',
duration: '2years',
price: 3,
valid_from: Time.zone.parse('2015-01-01'),
valid_to: nil
})
domain = Fabricate(:domain, period: 2)
domain.pricelist('create').price.amount.should == 3.0
domain = Fabricate(:domain, period: 24, period_unit: 'm')
domain.pricelist('create').price.amount.should == 3.0
domain = Fabricate(:domain, period: 730, period_unit: 'd')
domain.pricelist('create').price.amount.should == 3.0
Fabricate(:pricelist, {
category: 'ee',
operation_category: 'create',
duration: '3years',
price: 6,
valid_from: Time.zone.parse('2015-01-01'),
valid_to: nil
})
domain = Fabricate(:domain, period: 3)
domain.pricelist('create').price.amount.should == 6.0
domain = Fabricate(:domain, period: 36, period_unit: 'm')
domain.pricelist('create').price.amount.should == 6.0
domain = Fabricate(:domain, period: 1095, period_unit: 'd')
domain.pricelist('create').price.amount.should == 6.0
end
it 'should know its renew price' do
Fabricate(:pricelist, {
category: 'ee',
operation_category: 'renew',
duration: '1year',
price: 1.30,
valid_from: Time.zone.parse('2015-01-01'),
valid_to: nil
})
domain = Fabricate(:domain)
domain.pricelist('renew').price.amount.should == 1.30
domain = Fabricate(:domain, period: 12, period_unit: 'm')
domain.pricelist('renew').price.amount.should == 1.30
domain = Fabricate(:domain, period: 365, period_unit: 'd')
domain.pricelist('renew').price.amount.should == 1.30
Fabricate(:pricelist, {
category: 'ee',
operation_category: 'renew',
duration: '2years',
price: 3.1,
valid_from: Time.zone.parse('2015-01-01'),
valid_to: nil
})
domain = Fabricate(:domain, period: 2)
domain.pricelist('renew').price.amount.should == 3.1
domain = Fabricate(:domain, period: 24, period_unit: 'm')
domain.pricelist('renew').price.amount.should == 3.1
domain = Fabricate(:domain, period: 730, period_unit: 'd')
domain.pricelist('renew').price.amount.should == 3.1
Fabricate(:pricelist, {
category: 'ee',
operation_category: 'renew',
duration: '3years',
price: 6.1,
valid_from: Time.zone.parse('2015-01-01'),
valid_to: nil
})
domain = Fabricate(:domain, period: 3)
domain.pricelist('renew').price.amount.should == 6.1
domain = Fabricate(:domain, period: 36, period_unit: 'm')
domain.pricelist('renew').price.amount.should == 6.1
domain = Fabricate(:domain, period: 1095, period_unit: 'd')
domain.pricelist('renew').price.amount.should == 6.1
end
it 'should set pending update' do it 'should set pending update' do
@domain.statuses = DomainStatus::OK # restore @domain.statuses = DomainStatus::OK # restore
@domain.save @domain.save
@ -826,6 +699,11 @@ RSpec.describe Domain do
end end
RSpec.describe Domain, db: false do RSpec.describe Domain, db: false do
it { is_expected.to alias_attribute(:on_hold_time, :outzone_at) }
it { is_expected.to alias_attribute(:delete_time, :delete_at) }
it { is_expected.to alias_attribute(:force_delete_time, :force_delete_at) }
it { is_expected.to alias_attribute(:outzone_time, :outzone_at) }
describe '::expire_warning_period', db: true do describe '::expire_warning_period', db: true do
before :example do before :example do
Setting.expire_warning_period = 1 Setting.expire_warning_period = 1
@ -863,6 +741,70 @@ RSpec.describe Domain, db: false do
end end
end end
describe '#admin_contact_names' do
let(:domain) { described_class.new }
before :example do
expect(Contact).to receive(:names).and_return('names')
end
it 'returns admin contact names' do
expect(domain.admin_contact_names).to eq('names')
end
end
describe '#admin_contact_emails' do
let(:domain) { described_class.new }
before :example do
expect(Contact).to receive(:emails).and_return('emails')
end
it 'returns admin contact emails' do
expect(domain.admin_contact_emails).to eq('emails')
end
end
describe '#tech_contact_names' do
let(:domain) { described_class.new }
before :example do
expect(Contact).to receive(:names).and_return('names')
end
it 'returns technical contact names' do
expect(domain.tech_contact_names).to eq('names')
end
end
describe '#nameserver_hostnames' do
let(:domain) { described_class.new }
before :example do
expect(Nameserver).to receive(:hostnames).and_return('hostnames')
end
it 'returns name server hostnames' do
expect(domain.nameserver_hostnames).to eq('hostnames')
end
end
describe '#primary_contact_emails' do
let(:domain) { described_class.new }
before :example do
expect(domain).to receive(:registrant_email).and_return('registrant@test.com')
expect(domain).to receive(:admin_contact_emails).and_return(%w(admin.contact@test.com admin.contact@test.com))
end
it 'returns unique list of registrant and administrative contact emails' do
expect(domain.primary_contact_emails).to match_array(%w(
registrant@test.com
admin.contact@test.com
))
end
end
describe '#set_graceful_expired' do describe '#set_graceful_expired' do
let(:domain) { described_class.new } let(:domain) { described_class.new }
@ -882,4 +824,52 @@ RSpec.describe Domain, db: false do
expect(domain.delete_at).to eq(Time.zone.parse('08.07.2010 10:30')) expect(domain.delete_at).to eq(Time.zone.parse('08.07.2010 10:30'))
end end
end end
describe '::outzone_candidates', db: true do
before :example do
travel_to Time.zone.parse('05.07.2010 00:00')
Fabricate(:zonefile_setting, origin: 'ee')
Fabricate.create(:domain, id: 1, outzone_time: Time.zone.parse('04.07.2010 23:59'))
Fabricate.create(:domain, id: 2, outzone_time: Time.zone.parse('05.07.2010 00:00'))
Fabricate.create(:domain, id: 3, outzone_time: Time.zone.parse('05.07.2010 00:01'))
end
it 'returns domains with outzone time in the past' do
expect(described_class.outzone_candidates.ids).to eq([1])
end
end
describe '::delete_candidates', db: true do
before :example do
travel_to Time.zone.parse('05.07.2010 00:00')
Fabricate(:zonefile_setting, origin: 'ee')
Fabricate.create(:domain, id: 1, delete_time: Time.zone.parse('04.07.2010 23:59'))
Fabricate.create(:domain, id: 2, delete_time: Time.zone.parse('05.07.2010 00:00'))
Fabricate.create(:domain, id: 3, delete_time: Time.zone.parse('05.07.2010 00:01'))
end
it 'returns domains with delete time in the past' do
expect(described_class.delete_candidates.ids).to eq([1])
end
end
describe '#new_registrant_email' do
let(:domain) { described_class.new(pending_json: { new_registrant_email: 'test@test.com' }) }
it 'returns new registrant\'s email' do
expect(domain.new_registrant_email).to eq('test@test.com')
end
end
describe '#new_registrant_id' do
let(:domain) { described_class.new(pending_json: { new_registrant_id: 1 }) }
it 'returns new registrant\'s id' do
expect(domain.new_registrant_id).to eq(1)
end
end
end end

View file

@ -2,6 +2,25 @@ require 'rails_helper'
describe DomainTransfer do describe DomainTransfer do
before :example do before :example do
Setting.ds_algorithm = 2
Setting.ds_data_allowed = true
Setting.ds_data_with_key_allowed = true
Setting.key_data_allowed = true
Setting.dnskeys_min_count = 0
Setting.dnskeys_max_count = 9
Setting.ns_min_count = 2
Setting.ns_max_count = 11
Setting.transfer_wait_time = 0
Setting.admin_contacts_min_count = 1
Setting.admin_contacts_max_count = 10
Setting.tech_contacts_min_count = 0
Setting.tech_contacts_max_count = 10
Setting.client_side_status_editing_enabled = true
Fabricate(:zonefile_setting, origin: 'ee') Fabricate(:zonefile_setting, origin: 'ee')
end end

View file

@ -1,7 +0,0 @@
require 'rails_helper'
describe Epp::Domain do
context 'with sufficient settings' do
let(:domain) { Fabricate(:epp_domain) }
end
end

View file

@ -2,6 +2,25 @@ require 'rails_helper'
describe Keyrelay do describe Keyrelay do
before :example do before :example do
Setting.ds_algorithm = 2
Setting.ds_data_allowed = true
Setting.ds_data_with_key_allowed = true
Setting.key_data_allowed = true
Setting.dnskeys_min_count = 0
Setting.dnskeys_max_count = 9
Setting.ns_min_count = 2
Setting.ns_max_count = 11
Setting.transfer_wait_time = 0
Setting.admin_contacts_min_count = 1
Setting.admin_contacts_max_count = 10
Setting.tech_contacts_min_count = 0
Setting.tech_contacts_max_count = 10
Setting.client_side_status_editing_enabled = true
Fabricate(:zonefile_setting, origin: 'ee') Fabricate(:zonefile_setting, origin: 'ee')
end end

Some files were not shown because too many files have changed in this diff Show more