[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] net-ping 1.2.0

Daniel Berger

12/8/2006 9:54:00 PM

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...
http://www.rubyforge.org/proje...

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

1 Answer

Jos Backus

12/9/2006 12:30:00 AM

0

On Sat, Dec 09, 2006 at 06:55:06AM +0900, Daniel Berger 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!

--
Jos Backus
jos at catnook.com