Skip to content

Commit

Permalink
Move Debian/Linux Whois files to the C folder
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed Aug 23, 2010
1 parent ee6b778 commit 7096e8c
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 6 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions tasks/server.rake
Expand Up @@ -3,7 +3,7 @@ namespace :server do
desc "server:convert_file_tlds" desc "server:convert_file_tlds"
task :convert_file_tlds do task :convert_file_tlds do
list = parse_list_tld list = parse_list_tld
File.open("data/tlds.txt", "w+") do |f| File.open("data/c/tlds.txt", "w+") do |f|
f.write(list) f.write(list)
end end
puts "Created file with #{list.size} servers." puts "Created file with #{list.size} servers."
Expand All @@ -12,7 +12,7 @@ namespace :server do
desc "server:convert_file_ipv4" desc "server:convert_file_ipv4"
task :convert_file_ipv4 do task :convert_file_ipv4 do
list = parse_list_ipv4 list = parse_list_ipv4
File.open("data/ipv4.txt", "w+") do |f| File.open("data/c/ipv4.txt", "w+") do |f|
f.write(list) f.write(list)
end end
puts "Created file with #{list.size} servers." puts "Created file with #{list.size} servers."
Expand All @@ -21,15 +21,15 @@ namespace :server do
desc "server:convert_file_ipv6" desc "server:convert_file_ipv6"
task :convert_file_ipv6 do task :convert_file_ipv6 do
list = parse_list_ipv6 list = parse_list_ipv6
File.open("data/ipv6.txt", "w+") do |f| File.open("data/c/ipv6.txt", "w+") do |f|
f.write(list) f.write(list)
end end
puts "Created file with #{list.size} servers." puts "Created file with #{list.size} servers."
end end




def parse_list_tld def parse_list_tld
File.readlines("data/tld_serv_list").map do |line| File.readlines("data/c/tld_serv_list").map do |line|
line.chomp! line.chomp!
line.gsub!(/^\s*(.*)\s*$/, '\1') line.gsub!(/^\s*(.*)\s*$/, '\1')
line.gsub!(/\s*#.*$/, '') line.gsub!(/\s*#.*$/, '')
Expand Down Expand Up @@ -58,7 +58,7 @@ Whois::Server.define :tld, #{extension.inspect}, \
end end


def parse_list_ipv4 def parse_list_ipv4
File.readlines("data/ip_del_list").map do |line| File.readlines("data/c/ip_del_list").map do |line|
line.chomp! line.chomp!
line.gsub!(/^\s*(.*)\s*$/, '\1') line.gsub!(/^\s*(.*)\s*$/, '\1')
line.gsub!(/\s*#.*$/, '') line.gsub!(/\s*#.*$/, '')
Expand All @@ -81,7 +81,7 @@ Whois::Server.define :ipv4, #{range.inspect}, \
end end


def parse_list_ipv6 def parse_list_ipv6
File.readlines("data/ip6_del_list").map do |line| File.readlines("data/c/ip6_del_list").map do |line|
line.chomp! line.chomp!
line.gsub!(/^\s*(.*)\s*$/, '\1') line.gsub!(/^\s*(.*)\s*$/, '\1')
line.gsub!(/\s*#.*$/, '') line.gsub!(/\s*#.*$/, '')
Expand Down

0 comments on commit 7096e8c

Please sign in to comment.