mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +02:00
Move ToStdout to /app/lib folder and include it in app.rb
This commit is contained in:
parent
217f009fa3
commit
1d5c46e6a0
6 changed files with 13 additions and 16 deletions
|
@ -2,7 +2,6 @@ module DNS
|
|||
# Namespace is needed, because a class with the same name is defined by `domain_name` gem,
|
||||
# a dependency of `actionmailer`,
|
||||
class DomainName
|
||||
include ToStdout
|
||||
def initialize(name)
|
||||
@name = name
|
||||
end
|
||||
|
@ -37,7 +36,7 @@ module DNS
|
|||
auction = Auction.new
|
||||
auction.domain = name
|
||||
auction.start
|
||||
to_stdout "Created the auction: #{auction.inspect}"
|
||||
ToStdout.msg "Created the auction: #{auction.inspect}"
|
||||
update_whois_from_auction(auction)
|
||||
end
|
||||
|
||||
|
@ -102,8 +101,8 @@ module DNS
|
|||
whois_record = Whois::Record.find_or_create_by!(name: name) do |record|
|
||||
record.json = {}
|
||||
end
|
||||
to_stdout "Starting to update WHOIS record #{whois_record.inspect}\n\n"\
|
||||
"from auction #{auction.inspect}"
|
||||
ToStdout.msg "Starting to update WHOIS record #{whois_record.inspect}\n\n"\
|
||||
"from auction #{auction.inspect}"
|
||||
whois_record.update_from_auction(auction)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue