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