mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
rubocop autocorret to get tests green
This commit is contained in:
parent
c0caf53878
commit
2d6ed7fa45
24 changed files with 105 additions and 112 deletions
|
@ -2,12 +2,12 @@ desc 'Commands for whois'
|
|||
|
||||
desc 'generate whois files'
|
||||
task 'whois:generate' => :environment do
|
||||
Dir.mkdir("./tmp/whois") unless File.exists?("./tmp/whois") #a folder for ze stuff
|
||||
Dir.mkdir('./tmp/whois') unless File.exist?('./tmp/whois') # a folder for ze stuff
|
||||
|
||||
alphabet = (("a".."z").to_a << %w(ö õ ü ä) ).flatten!
|
||||
alphabet = (('a'..'z').to_a << %w(ö õ ü ä)).flatten!
|
||||
@domains = {}
|
||||
alphabet.each do |letter|
|
||||
domains = Domain.where([ 'name LIKE ?', "#{letter}%" ])
|
||||
domains = Domain.where(['name LIKE ?', "#{letter}%"])
|
||||
@domains[letter] = {}
|
||||
|
||||
domains.each do |domain|
|
||||
|
@ -22,9 +22,8 @@ task 'whois:generate' => :environment do
|
|||
end
|
||||
end
|
||||
|
||||
@domains.each do |k,v|
|
||||
@domains.each do |k, v|
|
||||
file = File.open("tmp/whois/#{k}_domain.yaml", 'w') { |f| f.write(v.to_yaml) }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue