Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Replace old references to Whois::Client#query #219

Merged
merged 1 commit into from

2 participants

Linmiao Xu Simone Carletti
Linmiao Xu

This fixes ./bin/ruby-whois and some scripts in ./utils by updating calls from Whois::Client#query to Whois::Client#lookup. Also updated some comments.

Simone Carletti
Owner

Excellent, thank you! I must create some test for the CLI.

Simone Carletti weppos merged commit 6cc9486 into from
Simone Carletti weppos was assigned
Simone Carletti
Owner

I released the v3.1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 4, 2013
  1. Linmiao Xu
This page is out of date. Refresh to see the latest.
2  bin/ruby-whois
View
@@ -56,7 +56,7 @@ object = ARGV.shift
begin
@client = Whois::Client.new(options)
- puts @client.query(object)
+ puts @client.lookup(object)
rescue Whois::Error => e
abort(e.message)
rescue Timeout::Error => e
2  lib/whois.rb
View
@@ -35,7 +35,7 @@ class << self
# # => #<Whois::Record>
#
# # Equivalent to
- # Whois::Client.new.query("google.com")
+ # Whois::Client.new.lookup("google.com")
#
def query(object)
Client.new.lookup(object)
8 lib/whois/client.rb
View
@@ -48,20 +48,20 @@ class Client
#
# @example Creating a new Client
# client = Whois::Client.new
- # client.query("google.com")
+ # client.lookup("google.com")
#
# @example Creating a new Client with custom settings
# client = Whois::Client.new(:timeout => nil)
- # client.query("google.com")
+ # client.lookup("google.com")
#
# @example Creating a new Client an yield the instance
# Whois::Client.new do |c|
- # c.query("google.com")
+ # c.lookup("google.com")
# end
#
# @example Binding the requests to a custom local IP
# client = Whois::Client.new(:bind_host => "127.0.0.1", :bind_port => 80)
- # client.query("google.com")
+ # client.lookup("google.com")
#
def initialize(settings = {})
settings = settings.dup
2  utils/bm_shell_vs_pure.rb
View
@@ -9,6 +9,6 @@
DOMAINS.each { |d| `whois #{d}` }
end
x.report("pure") do
- DOMAINS.each { |d| Whois::Client.new.query(d) }
+ DOMAINS.each { |d| Whois::Client.new.lookup(d) }
end
end
2  utils/fixupd.rb
View
@@ -26,7 +26,7 @@
subdir = node["_subdir"] ? "/#{node["_subdir"]}" : ""
fixtures.each do |name, domain|
begin
- record = client.query(domain)
+ record = client.lookup(domain)
part = record.parts.first
target = File.expand_path("../../spec/fixtures/responses/#{part.host}#{subdir}/#{name}.txt", __FILE__)
FileUtils.mkdir_p(File.dirname(target))
Something went wrong with that request. Please try again.