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

@linrock

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.

@weppos
Owner

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

@weppos weppos merged commit 6cc9486 into weppos:master
@weppos weppos was assigned
@weppos
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. @linrock
This page is out of date. Refresh to see the latest.
View
2  bin/ruby-whois
@@ -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
View
2  lib/whois.rb
@@ -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)
View
8 lib/whois/client.rb
@@ -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
View
2  utils/bm_shell_vs_pure.rb
@@ -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
View
2  utils/fixupd.rb
@@ -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.