Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

RDoc => MarkDown

  • Loading branch information...
commit 14b0c988b24359ba4d95a96168597589df6ab63e 1 parent ae63104
@weppos authored
Showing with 83 additions and 86 deletions.
  1. +83 −86 README.rdoc → README.md
View
169 README.rdoc → README.md
@@ -49,157 +49,154 @@ Install the newer version via RubyGems.
Minor and bugfix releases normally won't break backwards-compatibility. You can read the CHANGELOG.rdoc file to learn about the changes in each release.
-Read the {Upgrading}[http://www.ruby-whois.org/manual/upgrading.html] documentation page for detailed information about incompatible changes and further instructions.
+Read the [Upgrading](http://www.ruby-whois.org/manual/upgrading.html) documentation page for detailed information about incompatible changes and further instructions.
-== Getting Started
+## Getting Started
-Note. This section covers only the essentials for getting started with the Whois library. The {documentation}[http://www.ruby-whois.org/documentation.html] provides a more accurate explanation including tutorials, more examples and technical details about the client/server/record/parser architecture.
+Note. This section covers only the essentials for getting started with the Whois library. The [documentation](http://www.ruby-whois.org/documentation.html) provides a more accurate explanation including tutorials, more examples and technical details about the client/server/record/parser architecture.
-=== Querying the Server
+### Querying the Server
Whois provides the ability to get WHOIS information for TLD, domain names, IPv4 and IPv6 addresses. The client is smart enough to guess the best WHOIS server according to given query, send the request and return the response.
Check out the following examples:
- # Domain WHOIS
- w = Whois::Client.new
- w.query("google.com")
- # => #<Whois::Record>
+ # Domain WHOIS
+ w = Whois::Client.new
+ w.query("google.com")
+ # => #<Whois::Record>
- # TLD WHOIS
- w = Whois::Client.new
- w.query(".com")
- # => #<Whois::Record>
+ # TLD WHOIS
+ w = Whois::Client.new
+ w.query(".com")
+ # => #<Whois::Record>
- # IPv4 WHOIS
- w = Whois::Client.new
- w.query("74.125.67.100")
- # => #<Whois::Record>
+ # IPv4 WHOIS
+ w = Whois::Client.new
+ w.query("74.125.67.100")
+ # => #<Whois::Record>
- # IPv6 WHOIS
- w = Whois::Client.new
- w.query("2001:db8::1428:57ab")
- # => #<Whois::Record>
+ # IPv6 WHOIS
+ w = Whois::Client.new
+ w.query("2001:db8::1428:57ab")
+ # => #<Whois::Record>
The query method is stateless. For this reason, you can safely re-use the same client instance for multiple queries.
- w = Whois::Client.new
- w.query("google.com")
- w.query(".com")
- w.query("74.125.67.100")
- w.query("2001:db8::1428:57ab")
- w.query("google.it")
-
-If you just need a WHOIS response and you don't care about a full control of the WHOIS Client, <tt>Whois</tt> comes with a simple method called whois. This is the simplest way to send a WHOIS request.
-
- Whois.whois("google.com")
- # => #<Whois::Record>
-
-Did I mention you can even use blocks?
-
- Whois::Client.new do |w|
+ w = Whois::Client.new
w.query("google.com")
w.query(".com")
w.query("74.125.67.100")
w.query("2001:db8::1428:57ab")
w.query("google.it")
- end
+If you just need a WHOIS response and you don't care about a full control of the WHOIS client, the {Whois} module provides an all-in-one method called {Whois.whois}. This is the simplest way to send a WHOIS request.
+
+ Whois.whois("google.com")
+ # => #<Whois::Record>
+
+Did I mention you can even use blocks?
+
+ Whois::Client.new do |w|
+ w.query("google.com")
+ w.query(".com")
+ w.query("74.125.67.100")
+ w.query("2001:db8::1428:57ab")
+ w.query("google.it")
+ end
-=== Consuming the Record
+### Consuming the Record
-Any WHOIS query returns a <tt>Whois::Record</tt>. This object looks like a String, but it's way more powerful.
+Any WHOIS query returns a {Whois::Record}. This object looks like a String, but it's way more powerful.
-<tt>Whois::Record</tt> encapsulates a WHOIS record and provides the ability to parse the WHOIS response programmatically, by using an object oriented syntax.
+{Whois::Record} encapsulates a WHOIS record and provides the ability to parse the WHOIS response programmatically, by using an object oriented syntax.
- r = Whois.whois("google.it")
- # => #<Whois::Record>
+ r = Whois.whois("google.it")
+ # => #<Whois::Record>
- r.available?
- # => false
- r.registered?
- # => true
+ r.available?
+ # => false
+ r.registered?
+ # => true
- r.created_on
- # => Fri Dec 10 00:00:00 +0100 1999
+ r.created_on
+ # => Fri Dec 10 00:00:00 +0100 1999
- t = r.technical_contact
- # => #<Whois::Record::Contact>
- t.id
- # => "TS7016-ITNIC"
- t.name
- # => "Technical Services"
+ t = r.technical_contact
+ # => #<Whois::Record::Contact>
+ t.id
+ # => "TS7016-ITNIC"
+ t.name
+ # => "Technical Services"
- r.nameservers.each do |nameserver|
- puts nameserver
- end
+ r.nameservers.each do |nameserver|
+ puts nameserver
+ end
-This feature is made possible by the <tt>Whois</tt> record parsers. Unfortunately, due to the lack of a global standard, each WHOIS server requires a specific parser. For this reason, the library doesn't support all existing WHOIS servers.
+This feature is made possible by the _Whois_ record parsers. Unfortunately, due to the lack of a global standard, each WHOIS server requires a specific parser. For this reason, the library doesn't support all existing WHOIS servers.
If you create a new parser, please consider releasing it to the public so that it can be included in a next version.
-=== Timeout
+### Timeout
-By default, each query run though the client has a timeout value of 5 seconds. If the execution exceeds timeout limit, the client raises a <tt>Timeout::Error</tt> exception.
+By default, each query run though the client has a timeout value of 5 seconds. If the execution exceeds timeout limit, the client raises a {Timeout::Error} exception.
-Off course, you can customize the timeout value setting a different value. If timeout is <tt>nil</tt>, the client will until the response is sent back from the server or the process is killed. Don't disable the timeout unless you really know you are doing!
+Off course, you can customize the timeout value setting a different value. If timeout is `nil`, the client will until the response is sent back from the server or the process is killed. Don't disable the timeout unless you really know you are doing!
- w = Whois::Client.new(:timeout => 10)
- w.timeout # => 10
- w.timeout = 5
- w.timeout # => 5
+ w = Whois::Client.new(:timeout => 10)
+ w.timeout # => 10
+ w.timeout = 5
+ w.timeout # => 5
- w.query("google.com")
+ w.query("google.com")
-== Acknowledgments
+## Acknowledgments
First of all, I would like to express my most sincere thanks to Cyril Mougel, the author of the first Ruby Whois GEM that has been available since 2007. Cyril has been kind enough to yield me the privilege of using the RubyForge Whois project and the Whois package name to publish this library. To express all my gratitude, the release 0.5.0 and all sub sequential versions of the new Whois up to 0.9.x are 100% compatible with Cyril's Whois.
-Whois is largely inspired by other notable Whois projects, most of all the Debian Whois library written and maintained by Marco D'Itri. Other good ideas and design decisions come from the PERL Net::DRI package.
+Whois is largely inspired by other notable Whois projects, most of all the Debian Whois library written and maintained by Marco D'Itri. Other good ideas and design decisions come from the PERL `Net::DRI` package.
I would lie if I say I'm completely unaware of the other Ruby Whois projects. Before starting this Ruby Whois library I deeply investigated the available resources and, despite none of them was a good candidate for a refactoring, some of them expose a really cool API.
They didn't directly influence this library or any design decision, but they have been a really interesting code-reading.
-The parser architecture has been inspired by the PHPWhois[http://phpwhois.sourceforge.net/] project. The authors puts lot of effort to create whois-specific parsers normalizing the different responses in a single tree-based structure. So far, this is the only one opensource project that offers such this feature in all the programming language ecosystem.
+The parser architecture has been inspired by the [PHPWhois](http://phpwhois.sourceforge.net/) project. The authors puts lot of effort to create whois-specific parsers normalizing the different responses in a single tree-based structure. So far, this is the only one open source project that offers such this feature in all the programming language ecosystem.
Despite I spent weeks reading source code from the available whois libraries, Ruby Whois has been built from scratch trying to focus on long-term maintainability and flexibility and cannot be considered a Ruby port of any of other existing Whois libraries.
-== Author
+## Author
-Author:: {Simone Carletti}[http://www.simonecarletti.com/] <weppos@weppos.net>
+Author: [Simone Carletti](http://www.simonecarletti.com/) <weppos@weppos.net>
-== Thanks to
+## Thanks to
-Everyone {in this list}[http://github.com/weppos/whois/contributors].
+Everyone [in this list](http://github.com/weppos/whois/contributors).
-== FeedBack and Bug reports
+## FeedBack and Bug reports
-If you use this library and find yourself missing any functionality I have missed, please {let me know}[mailto:weppos@weppos.net].
+If you use this library and find yourself missing any functionality I have missed, please [let me know](mailto:weppos@weppos.net).
-Bug reports and Feature suggestions {are welcomed}[http://github.com/weppos/whois/issues].
+Bug reports and Feature suggestions [are welcomed](http://github.com/weppos/whois/issues).
-== More
+## More
-* {Homepage}[http://www.ruby-whois.org/]
-* {Repository}[http://github.com/weppos/whois]
-* {API Documentation}[http://www.ruby-whois.org/api/] (RDoc)
-* {Discussion Group}[http://groups.google.com/group/ruby-whois]
+* [Homepage](http://www.ruby-whois.org/)
+* [Repository](http://github.com/weppos/whois)
+* [Documentation](http://www.ruby-whois.org/documentation.html) - The official documentation, see also the [API Documentation](/api).
+* [Discussion Group](http://groups.google.com/group/ruby-whois)
-== Changelog
+## Changelog
See the CHANGELOG.rdoc file for details.
-== License
-
-Copyright (c) 2009-2011 Simone Carletti.
-
-Whois is free software released under the MIT license.
+## License
+_Whois_ is copyright (c) 2009-2011 Simone Carletti.
+This is Free Software distributed under the MIT license.
Please sign in to comment.
Something went wrong with that request. Please try again.