Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 20 lines (14 sloc) 0.503 kb
#!/usr/bin/env ruby -wKU
$:.unshift(File.expand_path("../../lib", __FILE__))
require "fileutils"
require "whois"
require File.expand_path("../whois-utf8", __FILE__) rescue nil
d = ARGV.shift || raise("Missing domain")
n = ARGV.shift || raise("Missing file name")
r = Whois.query(d)
r.parts.each do |part|
p = File.expand_path("../../spec/fixtures/responses/#{part.host}/#{n}", __FILE__)
FileUtils.mkdir_p(File.dirname(p))
File.open(p, "w+") { |f| f.write(part.body) }
puts "Saved #{p}"
end
Jump to Line
Something went wrong with that request. Please try again.