Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 23 lines (17 sloc) 0.521 kB
#!/usr/bin/env ruby -wKU
$:.unshift(File.expand_path("../../lib", __FILE__))
require "fileutils"
require "whois"
begin
require File.expand_path("../whois-utf8", __FILE__)
rescue LoadError
end
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.