Net-ping 1.2.0

Hi all,

I’m happy to announce the release of net-ping 1.2.0. This release has
some major, but backwards compatible, changes.

What’s New?

First and foremost there’s now a Ping::ICMP class. Many thanks go to
Jos B. for providing the initial implementation of this method.

Second, you can now specify the host in either the constructor or
within the ping method. So, both of these are valid:

list_of_hosts.each do |host|
tcp = Net::Ping::TCP.new(host)
unless tcp.ping?
# Do something
end
end

tcp = Net::Ping::TCP.new
list_of_hosts.each do |host|
unless tcp.ping?(host)
# Do something
end
end

Other changes include:

  • Class names are now scoped like Ping::TCP, instead of PingTCP. Not
    to panic. I included class name aliases for now so your code will stay
    backwards compatible (for now).

  • The Net::Ping::HTTP class saw some improvements. Namely, it now
    honors the timeout value, and optionally follows redirects.

  • Added a pingecho alias to all the classes.

  • The ability to be more selective in your requires in order to reduce
    your memory footprint. So, “require ‘net/ping’” will require all
    subclasses, while “require ‘net/ping/tcp’” would only require the
    Net::Ping::TCP subclass.

(Each subclass is now in its own file, btw).

Where is it?

You can find it on the RAA or RubyForge:

http://raa.ruby-lang.org/project/net-ping/
http://www.rubyforge.org/projects/shards

MS Windows Users

You will need to install the win32-open3 package (for which there is
now a gem). Select the “mswin32” option if you want the binary, or
“ruby” if you want to build from source.

Enjoy!

  • Dan

On Sat, Dec 09, 2006 at 06:55:06AM +0900, Daniel B. wrote:

Hi all,

I’m happy to announce the release of net-ping 1.2.0. This release has
some major, but backwards compatible, changes.

Thanks Daniel!