[ANN] net-ping 1.2.0

D

Daniel Berger

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 Backus 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top