Skip to content

Commit

Permalink
Replace old references to Whois::Client#query
Browse files Browse the repository at this point in the history
  • Loading branch information
linrock committed Apr 4, 2013
1 parent a7d26ef commit be50c26
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bin/ruby-whois
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/whois.rb
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions lib/whois/client.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utils/bm_shell_vs_pure.rb
Expand Up @@ -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 changes: 1 addition & 1 deletion utils/fixupd.rb
Expand Up @@ -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))
Expand Down

0 comments on commit be50c26

Please sign in to comment.