mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Merge pull request #1948 from internetee/dependabot/bundler/active_interaction-4.0.0
This commit is contained in:
commit
7957d71be7
11 changed files with 34 additions and 29 deletions
2
Gemfile
2
Gemfile
|
@ -1,7 +1,7 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
# core
|
# core
|
||||||
gem 'active_interaction', '~> 3.8'
|
gem 'active_interaction', '~> 4.0'
|
||||||
gem 'apipie-rails', '~> 0.5.18'
|
gem 'apipie-rails', '~> 0.5.18'
|
||||||
gem 'bootsnap', '>= 1.1.0', require: false
|
gem 'bootsnap', '>= 1.1.0', require: false
|
||||||
gem 'iso8601', '0.12.1' # for dates and times
|
gem 'iso8601', '0.12.1' # for dates and times
|
||||||
|
|
|
@ -112,8 +112,8 @@ GEM
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||||
active_interaction (3.8.3)
|
active_interaction (4.0.0)
|
||||||
activemodel (>= 4, < 7)
|
activemodel (>= 5, < 7)
|
||||||
activejob (6.0.3.6)
|
activejob (6.0.3.6)
|
||||||
activesupport (= 6.0.3.6)
|
activesupport (= 6.0.3.6)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
|
@ -507,7 +507,7 @@ PLATFORMS
|
||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
active_interaction (~> 3.8)
|
active_interaction (~> 4.0)
|
||||||
activerecord-import
|
activerecord-import
|
||||||
airbrake
|
airbrake
|
||||||
apipie-rails (~> 0.5.18)
|
apipie-rails (~> 0.5.18)
|
||||||
|
|
|
@ -2,10 +2,10 @@ module Domains
|
||||||
module CancelForceDelete
|
module CancelForceDelete
|
||||||
class CancelForceDelete < Base
|
class CancelForceDelete < Base
|
||||||
def execute
|
def execute
|
||||||
compose(RemoveForceDeleteStatuses, inputs)
|
compose(RemoveForceDeleteStatuses, inputs.to_h)
|
||||||
compose(RestoreStatusesBeforeForceDelete, inputs)
|
compose(RestoreStatusesBeforeForceDelete, inputs.to_h)
|
||||||
compose(ClearForceDeleteData, inputs)
|
compose(ClearForceDeleteData, inputs.to_h)
|
||||||
compose(NotifyRegistrar, inputs)
|
compose(NotifyRegistrar, inputs.to_h)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ module Domains
|
||||||
WhoisRecord.where(domain_id: domain.id).destroy_all
|
WhoisRecord.where(domain_id: domain.id).destroy_all
|
||||||
|
|
||||||
domain.destroy
|
domain.destroy
|
||||||
compose(Domains::Delete::NotifyRegistrar, inputs)
|
Domains::Delete::NotifyRegistrar.run(inputs.to_h)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,9 +7,9 @@ module Domains
|
||||||
|
|
||||||
case action
|
case action
|
||||||
when RegistrantVerification::CONFIRMED
|
when RegistrantVerification::CONFIRMED
|
||||||
compose(ProcessDeleteConfirmed, inputs)
|
compose(ProcessDeleteConfirmed, inputs.to_h)
|
||||||
when RegistrantVerification::REJECTED
|
when RegistrantVerification::REJECTED
|
||||||
compose(ProcessDeleteRejected, inputs)
|
compose(ProcessDeleteRejected, inputs.to_h)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,12 +2,12 @@ module Domains
|
||||||
module ForceDelete
|
module ForceDelete
|
||||||
class SetForceDelete < Base
|
class SetForceDelete < Base
|
||||||
def execute
|
def execute
|
||||||
compose(CheckDiscarded, inputs)
|
compose(CheckDiscarded, inputs.to_h)
|
||||||
compose(PrepareDomain, inputs)
|
compose(PrepareDomain, inputs.to_h)
|
||||||
compose(SetStatus, inputs)
|
compose(SetStatus, inputs.to_h)
|
||||||
compose(PostSetProcess, inputs)
|
compose(PostSetProcess, inputs.to_h)
|
||||||
compose(NotifyRegistrar, inputs)
|
compose(NotifyRegistrar, inputs.to_h)
|
||||||
compose(NotifyByEmail, inputs)
|
compose(NotifyByEmail, inputs.to_h)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,9 +7,9 @@ module Domains
|
||||||
|
|
||||||
case action
|
case action
|
||||||
when RegistrantVerification::CONFIRMED
|
when RegistrantVerification::CONFIRMED
|
||||||
compose(ProcessUpdateConfirmed, inputs)
|
Domains::UpdateConfirm::ProcessUpdateConfirmed.run(inputs.to_h)
|
||||||
when RegistrantVerification::REJECTED
|
when RegistrantVerification::REJECTED
|
||||||
compose(ProcessUpdateRejected, inputs)
|
Domains::UpdateConfirm::ProcessUpdateRejected.run(inputs.to_h)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,7 +13,7 @@ module Whois
|
||||||
Array(names).each do |name|
|
Array(names).each do |name|
|
||||||
record = find_record(klass, name)
|
record = find_record(klass, name)
|
||||||
if record
|
if record
|
||||||
Whois::UpdateRecord.run(record: record, type: type)
|
Whois::UpdateRecord.run(record: { klass: klass.to_s, id: record.id, type: type })
|
||||||
else
|
else
|
||||||
Whois::DeleteRecord.run(name: name, type: type)
|
Whois::DeleteRecord.run(name: name, type: type)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
module Whois
|
module Whois
|
||||||
class UpdateRecord < ActiveInteraction::Base
|
class UpdateRecord < ActiveInteraction::Base
|
||||||
interface :record
|
hash :record do
|
||||||
string :type
|
string :klass
|
||||||
|
integer :id
|
||||||
validates :type, inclusion: { in: %w[reserved blocked domain disputed zone] }
|
string :type
|
||||||
|
end
|
||||||
|
|
||||||
def execute
|
def execute
|
||||||
send "update_#{type}", record
|
data = record['klass'].constantize.find_by(id: record['id'])
|
||||||
|
send "update_#{record['type']}", data
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_domain(domain)
|
def update_domain(domain)
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
class DomainUpdateConfirmJob < ApplicationJob
|
class DomainUpdateConfirmJob < ApplicationJob
|
||||||
def perform(domain_id, action, initiator = nil)
|
def perform(domain_id, action, initiator = nil)
|
||||||
domain = Epp::Domain.find(domain_id)
|
domain = Epp::Domain.find(domain_id)
|
||||||
Domains::UpdateConfirm::ProcessAction.run(domain: domain,
|
attrs = {
|
||||||
action: action,
|
domain: domain,
|
||||||
initiator: initiator)
|
action: action,
|
||||||
|
initiator: initiator,
|
||||||
|
}
|
||||||
|
Domains::UpdateConfirm::ProcessAction.run(attrs)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -56,7 +56,7 @@ class DisputeStatusUpdateJobTest < ActiveJob::TestCase
|
||||||
|
|
||||||
# Dispute status is added automatically if starts_at is not in future
|
# Dispute status is added automatically if starts_at is not in future
|
||||||
perform_enqueued_jobs do
|
perform_enqueued_jobs do
|
||||||
Dispute.create(domain_name: 'shop.test', starts_at: Time.zone.parse('2010-07-05'))
|
Dispute.create(domain_name: 'shop.test', starts_at: Time.zone.today)
|
||||||
end
|
end
|
||||||
domain.reload
|
domain.reload
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue