net-ping 1.4.1-x86-mingw32 → 1.5.3-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +258 -232
- data/MANIFEST +25 -23
- data/README +52 -46
- data/Rakefile +100 -89
- data/doc/ping.txt +274 -249
- data/examples/example_pingexternal.rb +16 -16
- data/examples/example_pinghttp.rb +22 -22
- data/examples/example_pingldap.rb +22 -0
- data/examples/example_pingtcp.rb +16 -16
- data/examples/example_pingudp.rb +12 -12
- data/lib/net/ping.rb +18 -15
- data/lib/net/ping/external.rb +122 -126
- data/lib/net/ping/http.rb +149 -120
- data/lib/net/ping/icmp.rb +180 -168
- data/lib/net/ping/ldap.rb +107 -0
- data/lib/net/ping/ping.rb +89 -88
- data/lib/net/ping/tcp.rb +83 -83
- data/lib/net/ping/udp.rb +119 -119
- data/lib/net/ping/wmi.rb +118 -118
- data/net-ping.gemspec +43 -38
- data/test/test_net_ping.rb +37 -37
- data/test/test_net_ping_external.rb +128 -121
- data/test/test_net_ping_http.rb +182 -176
- data/test/test_net_ping_icmp.rb +120 -116
- data/test/test_net_ping_ldap.rb +200 -0
- data/test/test_net_ping_tcp.rb +108 -108
- data/test/test_net_ping_udp.rb +122 -122
- data/test/test_net_ping_wmi.rb +84 -84
- metadata +59 -26
data/CHANGES
CHANGED
@@ -1,232 +1,258 @@
|
|
1
|
-
== 1.
|
2
|
-
*
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
*
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
* Added the
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
*
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
*
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
*
|
35
|
-
|
36
|
-
|
37
|
-
== 1.
|
38
|
-
*
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
* The Net::Ping::HTTP class
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
*
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
*
|
60
|
-
*
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
*
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
*
|
75
|
-
|
76
|
-
|
77
|
-
*
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
*
|
87
|
-
the
|
88
|
-
*
|
89
|
-
|
90
|
-
|
91
|
-
*
|
92
|
-
|
93
|
-
*
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
*
|
102
|
-
|
103
|
-
*
|
104
|
-
|
105
|
-
|
106
|
-
* Added the Ping::
|
107
|
-
|
108
|
-
|
109
|
-
* The Ping::
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
*
|
120
|
-
|
121
|
-
|
122
|
-
*
|
123
|
-
*
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
*
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
or
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
*
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
*
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
*
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
*
|
155
|
-
|
156
|
-
|
157
|
-
*
|
158
|
-
the
|
159
|
-
|
160
|
-
*
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
*
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
*
|
169
|
-
|
170
|
-
*
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
*
|
175
|
-
|
176
|
-
|
177
|
-
*
|
178
|
-
|
179
|
-
*
|
180
|
-
*
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
*
|
187
|
-
*
|
188
|
-
|
189
|
-
== 0.
|
190
|
-
*
|
191
|
-
|
192
|
-
|
193
|
-
*
|
194
|
-
|
195
|
-
|
196
|
-
*
|
197
|
-
|
198
|
-
|
199
|
-
*
|
200
|
-
*
|
201
|
-
|
202
|
-
|
203
|
-
*
|
204
|
-
|
205
|
-
|
206
|
-
*
|
207
|
-
|
208
|
-
*
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
*
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
*
|
217
|
-
|
218
|
-
* Added
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
*
|
223
|
-
*
|
224
|
-
*
|
225
|
-
*
|
226
|
-
*
|
227
|
-
|
228
|
-
== 0.
|
229
|
-
*
|
230
|
-
|
231
|
-
== 0.
|
232
|
-
*
|
1
|
+
== 1.5.3 - 29-Feb-2012
|
2
|
+
* Removed the Windows::Console dependency and replaced it with FFI since there
|
3
|
+
were only two functions needed. This had the nice side effect of making it
|
4
|
+
work with JRuby, too.
|
5
|
+
* Minor cleanup on some multi-variable assignment.
|
6
|
+
* Fixed require statements and one test for 1.9.
|
7
|
+
|
8
|
+
== 1.5.2 - 4-Nov-2011
|
9
|
+
* The Net::Ping::HTTP class now defaults to using HEAD instead of GET
|
10
|
+
for its ping test. You can alter this via the get_request accessor.
|
11
|
+
Thanks got to Balazs Kutil for the patch.
|
12
|
+
* Added the ssl_verify_mode accessor to the Net::Ping::HTTP class, which
|
13
|
+
defaults to VERIFY_NONE. This fixes possible warnings resulting from
|
14
|
+
missing SSL certificates when using https. Thanks go to Balazs Kutil
|
15
|
+
for the patch.
|
16
|
+
|
17
|
+
== 1.5.1 - 15-Sep-2011
|
18
|
+
* Use RbConfig on Ruby 1.9 and later. Thanks go to Torsten Schönebaum
|
19
|
+
for the patch.
|
20
|
+
|
21
|
+
== 1.5.0 - 3-May-2011
|
22
|
+
* Added the Net::Ping::LDAP class which allows you to perform LDAP pings.
|
23
|
+
Thanks go to Paul Gallagher for adding this.
|
24
|
+
* The duration instance variable is now reset to nil on a failed ping. Again,
|
25
|
+
thanks go to Paul Gallagher.
|
26
|
+
|
27
|
+
== 1.4.1 - 17-Mar-2011
|
28
|
+
* Incorporated changes from Lukas Zapletal that alters the icmp tests to use
|
29
|
+
your localhost instead of going outside the network.
|
30
|
+
* The http tests were similarly modified courtesy of fakeweb, which is now a
|
31
|
+
development dependency. Again, change from Lukas Zapletal.
|
32
|
+
* The icmp tests were reworked for Windows Vista and later. This required the
|
33
|
+
addition of the win32-security library as a development dependency.
|
34
|
+
* The Net::Ping::WMI class is no longer skipped on require or in tests since
|
35
|
+
JRuby now supports win32ole.
|
36
|
+
|
37
|
+
== 1.4.0 - 14-Feb-2011
|
38
|
+
* Added the redirect_limit accessor for the Net::Ping::HTTP class. This caps
|
39
|
+
the number of redirects that are allowed before a ping is considered a
|
40
|
+
failure. The default is 5.
|
41
|
+
* Changed the way in which redirects are detected. Previously I was checking
|
42
|
+
against the response class, but decided this was unreliable. I now check the
|
43
|
+
response code itself. Any code in the 300 range is considered a redirect.
|
44
|
+
* The default port for the Net::Ping::HTTP class is no longer explicitly set
|
45
|
+
to 80, but instead uses the result of the URI.parse(uri).port method by
|
46
|
+
default. Note that you can still override the port if you explicitly provide
|
47
|
+
one in the constructor.
|
48
|
+
* The Net::Ping::HTTP class now handles https URI's properly. Note that you may
|
49
|
+
get a warning about peer certificates.
|
50
|
+
|
51
|
+
== 1.3.7 - 14-Oct-2010
|
52
|
+
* Wrapped the ICMP ping in a while loop that breaks on success to prevent
|
53
|
+
the ping from failing too early. Thanks go to Benny Holmgren for the
|
54
|
+
spot and the patch.
|
55
|
+
|
56
|
+
== 1.3.6 - 4-Sep-2010
|
57
|
+
* Fixed variable naming issue in Net::Ping::External. Thanks go to taw
|
58
|
+
for the spot.
|
59
|
+
* Added a default Rake task.
|
60
|
+
* Refactored the tests for Net::Ping::External to take advantage of the
|
61
|
+
features of test-unit 2.x.
|
62
|
+
|
63
|
+
== 1.3.5 - 3-Sep-2010
|
64
|
+
* Allow for custom user agent in Net::Ping::HTTP. Thanks go to Michael
|
65
|
+
Reinsch for the patch.
|
66
|
+
|
67
|
+
== 1.3.4 - 25-Jun-2010
|
68
|
+
* Fixed a dumb platform bug. Thanks go to Jason Frey for the spot.
|
69
|
+
|
70
|
+
== 1.3.3 - 21-Jun-2010
|
71
|
+
* Bug fixes for JRuby on MS Windows. The code now explicitly checks for JRuby
|
72
|
+
in a few places to ensure it doesn't try to load unsupported libraries
|
73
|
+
on MS Windows. Thanks go to Rob Schultz for the spot and some patches.
|
74
|
+
* The Net::Ping::HTTP class will no longer fail because a root URI
|
75
|
+
is missing a trailing slash. If the URI#path is empty, it now defaults
|
76
|
+
to the root path.
|
77
|
+
* The Rakefile tasks and naming were refactored.
|
78
|
+
* Some tests were refactored to take advantage of test-unit 2.x features,
|
79
|
+
as well as make them better and more descriptive in general.
|
80
|
+
|
81
|
+
== 1.3.2 - 21-Sep-2009
|
82
|
+
* Doing a 'require "net/ping"' was not automatically loading the
|
83
|
+
Net::Ping::WMI class on MS Windows. This has been fixed. Thanks go to
|
84
|
+
Joseph M. for the spot.
|
85
|
+
* Removed all $LOAD_PATH mangling for both the library and tests.
|
86
|
+
* Fixed a bug in the Net::Ping::HTTP class where a failed redirect did
|
87
|
+
not set the @exception and @warning instance variables properly.
|
88
|
+
* The PingStatus struct returned by Net::Ping::WMI is now frozen.
|
89
|
+
* The test-unit library was switched from a runtime dependency to a
|
90
|
+
development dependency.
|
91
|
+
* Added the :gem Rake task that builds a gem.
|
92
|
+
* Updated the :gem_install task to use the :gem task as a prerequisite.
|
93
|
+
* Updated the dependencies for MS Windows.
|
94
|
+
* The Rake test tasks are now more Rakish, e.g. test:tcp instead of test_tcp.
|
95
|
+
* Renamed example file names to avoid any potential confusion with actual
|
96
|
+
test files.
|
97
|
+
|
98
|
+
== 1.3.1 - 22-Jul-2009
|
99
|
+
* Removed class aliases, e.g. use Ping::External, not PingExternal.
|
100
|
+
* Minor code change to eliminate a warning that popped up in 1.9.x.
|
101
|
+
* The win32-open3 library is removed as a dependency for Ruby 1.9.x.
|
102
|
+
* Changed license to Artistic 2.0.
|
103
|
+
* Some gemspec and README updates.
|
104
|
+
|
105
|
+
== 1.3.0 - 19-May-2009
|
106
|
+
* Added the Ping::WMI class for MS Windows. This class encapsulates the
|
107
|
+
Win32_PingStatus WMI class. Unlike other ping methods, this one returns
|
108
|
+
a struct that contains various bits of information.
|
109
|
+
* The Net::Ping::External class now ensures that handles opened by the open3
|
110
|
+
call are closed. Thanks go to Nick S. Kanakakorn for the spot and a
|
111
|
+
preliminary patch.
|
112
|
+
* The Net::Ping::ICMP class now explicitly closes the socket if the call to
|
113
|
+
the Socket.pack_sockaddr_in method fails.
|
114
|
+
* Some documentation updates.
|
115
|
+
|
116
|
+
== 1.2.3 - 13-Jan-2008
|
117
|
+
* Fixed a bug in the checksum private method where it would die on odd data
|
118
|
+
sizes. Thanks go to Jake Douglas for the spot.
|
119
|
+
* A Socket.get_sockaddr_in call in the Ping::ICMP class is no longer included
|
120
|
+
as part of the overall ping time. Thanks go again to Jake Douglas for
|
121
|
+
the spot.
|
122
|
+
* Added data_size tests to the Ping::ICMP test suite.
|
123
|
+
* Renamed and updated the test files. The test-unit 2.x gem is now a
|
124
|
+
prerequisite as a result.
|
125
|
+
|
126
|
+
== 1.2.2 - 22-Jan-2008
|
127
|
+
* Bug fix for Ping::External where it was not honoring the timeout value.
|
128
|
+
Thanks go to Chris Morris for the spot and the patch.
|
129
|
+
* Bug fix for Ping::External where non-English output could cause false
|
130
|
+
positives on MS Windows Vista or later. This library now requires the
|
131
|
+
windows-pr library on MS Windows systems as a result.
|
132
|
+
* Added the Ping::UDP.service_check and Ping::UDP.service_check= class
|
133
|
+
methods. This method controls whether or not Errno::ECONNREFUSED or
|
134
|
+
Errno::ECONNRESET are considered successful pings or not.
|
135
|
+
* The Ping::HTTP class no longer uses the resolv-replace library on MS Windows
|
136
|
+
because it was (ironically) causing timeouts.
|
137
|
+
* Changed the Ping::TCP.econnrefused method to Ping::TCP.service_check. I
|
138
|
+
changed it because I now use a similar method in Ping::UDP, but that handles
|
139
|
+
more than Errno::ECONNREFUSED. An alias is provided to provide backwards
|
140
|
+
compatibility, but it is considered deprecated and will be removed in the
|
141
|
+
1.3.0 release.
|
142
|
+
* Removed the install.rb file. The Rakefile now handles installation.
|
143
|
+
|
144
|
+
== 1.2.1 - 6-Apr-2007
|
145
|
+
* For the Ping::External class, if a ping attempt results in 100% packet loss
|
146
|
+
it is now considered a failed ping, regardless of whether or not an error
|
147
|
+
was sent to stdout.
|
148
|
+
* Fixed the Ping::External class for OS X.
|
149
|
+
* Added a Rakefile. Installation and testing should now be run via Rake tasks.
|
150
|
+
* Minor fix for the Ping::ICMP class where I had accidentally dup'd some
|
151
|
+
aliases. This was harmless, but did cause warnings with -w.
|
152
|
+
|
153
|
+
== 1.2.0 - 5-Dec-2006
|
154
|
+
* Internal reorganization - each class now lives in its own file.
|
155
|
+
* Added the Ping::ICMP class. Thanks go to Jos Backus for contributing a
|
156
|
+
large part of the code.
|
157
|
+
* The host argument is now optional in the constructor. You can now specify
|
158
|
+
it in the ping method instead. Note that it must be specified in one place
|
159
|
+
or the other.
|
160
|
+
* Each PingXXX class is now Ping::XXX instead. However, class name aliases
|
161
|
+
have been setup for backwards compatibility for now.
|
162
|
+
* The constructor for each Ping types now yields self.
|
163
|
+
* Added the pingecho alias for the ping method for each Ping type.
|
164
|
+
* Added the Ping::HTTP#follow_redirect accessor.
|
165
|
+
* The Ping::HTTP#ping method now honors the timeout value.
|
166
|
+
* The Ping::HTTP class now follows redirects automatically, though this is
|
167
|
+
configurable with the follow_redirect accessor.
|
168
|
+
* The Ping::TCP.ecr and Ping::TCP.ecr= methods are now true class method
|
169
|
+
aliases (they were just wrappers previously).
|
170
|
+
* The Ping::UDP class now enforces a 64 character limit on data that can be
|
171
|
+
sent on a udp ping.
|
172
|
+
* Updated the gemspec. Specifically, MS Windows now has a dependency on
|
173
|
+
the win32-open3 package.
|
174
|
+
* Added inline rdoc.
|
175
|
+
|
176
|
+
== 1.1.1 - 15-Jun-2006
|
177
|
+
* Fixed a bug in PingTCP (bad variable name). Thanks go to Anoop Chandran
|
178
|
+
for the spot.
|
179
|
+
* Minor variable name refactoring.
|
180
|
+
* Minor test updates.
|
181
|
+
|
182
|
+
== 1.1.0 - 17-Jul-2005
|
183
|
+
* Fixed a bug in the PingHTTP#ping method where I was accidentally passing
|
184
|
+
the timeout value instead of the port number as the third argument to
|
185
|
+
Net::HTTP.get_response.
|
186
|
+
* The PingHTTP.new method now has a default port of 80.
|
187
|
+
* Minor doc update for PingHTTP.new.
|
188
|
+
|
189
|
+
== 1.0.1 - 22-Jun-2005
|
190
|
+
* Bug fix for the install.rb file. The gem is unaffected.
|
191
|
+
|
192
|
+
== 1.0.0 - 14-Jun-2005
|
193
|
+
* Renamed project from net-pingsimple to just net-ping.
|
194
|
+
* Added a PingHTTP subclass.
|
195
|
+
* Moved project to RubyForge.
|
196
|
+
* Added a gemspec.
|
197
|
+
|
198
|
+
== 0.3.1 - 9-Apr-2005
|
199
|
+
* Updated PingExternal to use win32/open3 on Win32 platforms.
|
200
|
+
* Minor error handling change for the PingSimple.econnrefused= method. It now
|
201
|
+
raises an ArgumentError if any values other than true or false are passed.
|
202
|
+
* PingSimple#warning and PingSimple#exception are now read-only methods.
|
203
|
+
* The warning and exception attributes are now reset to nil between each call
|
204
|
+
to ping.
|
205
|
+
* The data and data= methods are now unique to the PingUDP class.
|
206
|
+
* The time and time= methods have been changed to timeout and timeout=,
|
207
|
+
respectively.
|
208
|
+
* Removed the pingsimple.rd and pingsimple.html files. The pingsimple.txt file
|
209
|
+
has been reorganized and is now rdoc friendly.
|
210
|
+
* Added a few sample programs under the 'examples' directory.
|
211
|
+
* Some minor test updates and changes.
|
212
|
+
* Removed the INSTALL file. That information is now in the README file.
|
213
|
+
* Now requires Ruby 1.8.0 or later.
|
214
|
+
|
215
|
+
== 0.3.0 - 12-Feb-2004
|
216
|
+
* Fixed ping string for PingExternal class based on platform. The old
|
217
|
+
string was really only good for Linux and *BSD.
|
218
|
+
* Added Win32 support (requires win32_popen package).
|
219
|
+
* Added warranty info.
|
220
|
+
|
221
|
+
== 0.2.3 - 12-Aug-2003
|
222
|
+
* Fixed a bug in PingExternal that could consume file descriptors if used in a loop
|
223
|
+
* Added some initialization to avoid -w warnings
|
224
|
+
* Removed VERSION() class method. Use the constant instead
|
225
|
+
* Modified test suite slightly
|
226
|
+
* Moved rd2 docs to doc directory
|
227
|
+
|
228
|
+
== 0.2.2 - 3-Apr-2003
|
229
|
+
* Fixed handling of stdout in PingExternal
|
230
|
+
|
231
|
+
== 0.2.1 - 27-Mar-2003
|
232
|
+
* Fixed major bug with PingExternal class with regards to down hosts
|
233
|
+
* Exceptions and warnings from PingExternal are now chomp'd
|
234
|
+
* Modified test suite
|
235
|
+
* Doc updates
|
236
|
+
|
237
|
+
== 0.2.0 - 14-Feb-2003
|
238
|
+
* The default behavior of PingTCP with regards to ECONNREFUSED is now
|
239
|
+
configurable
|
240
|
+
* Added a VERSION constant and method (to the base class)
|
241
|
+
* Added a test suite (for those with testunit installed)
|
242
|
+
* Doc changes, rearrangement and general cleanup
|
243
|
+
* Manifest is now MANIFEST
|
244
|
+
* Added an INSTALL file
|
245
|
+
|
246
|
+
== 0.1.0 - 9-Dec-2002
|
247
|
+
* Added ping? alias for ping method
|
248
|
+
* Warnings now handled separately
|
249
|
+
* Corrected a mis-named variable in Ping::External
|
250
|
+
* Fixed the install.rb file
|
251
|
+
* Updated and added docs
|
252
|
+
* Renamed tarball to net-pingsimple to reflect RAA naming convention
|
253
|
+
|
254
|
+
== 0.0.1a
|
255
|
+
* Did this release ever happen?
|
256
|
+
|
257
|
+
== 0.0.1
|
258
|
+
* Initial release.
|