net-ping 1.4.1-x86-mingw32 → 1.5.3-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/test/test_net_ping_wmi.rb
CHANGED
@@ -1,84 +1,84 @@
|
|
1
|
-
#######################################################################
|
2
|
-
# test_net_ping_wmi.rb
|
3
|
-
#
|
4
|
-
# Test case for the Net::Ping::WMI class. These tests will only be
|
5
|
-
# run MS Windows. You should run this test via the 'test' or
|
6
|
-
# 'test:wmi' Rake task.
|
7
|
-
#######################################################################
|
8
|
-
require 'rubygems'
|
9
|
-
gem 'test-unit'
|
10
|
-
|
11
|
-
require 'test/unit'
|
12
|
-
require 'net/ping/wmi'
|
13
|
-
include Net
|
14
|
-
|
15
|
-
class TC_Ping_WMI < Test::Unit::TestCase
|
16
|
-
def self.startup
|
17
|
-
@@windows = Config::CONFIG['host_os'] =~ /mswin|win32|dos|cygwin|mingw/i
|
18
|
-
end
|
19
|
-
|
20
|
-
def setup
|
21
|
-
@host = "www.ruby-lang.org"
|
22
|
-
@wmi = Ping::WMI.new(@host) if @@windows
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_ping_basic
|
26
|
-
omit_unless(@@windows, 'skipped on Unix platforms')
|
27
|
-
assert_respond_to(@wmi, :ping)
|
28
|
-
assert_nothing_raised{ @wmi.ping }
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_ping_with_host
|
32
|
-
omit_unless(@@windows, 'skipped on Unix platforms')
|
33
|
-
assert_nothing_raised{ @wmi.ping(@host) }
|
34
|
-
end
|
35
|
-
|
36
|
-
def test_ping_with_options
|
37
|
-
omit_unless(@@windows, 'skipped on Unix platforms')
|
38
|
-
assert_nothing_raised{ @wmi.ping(@host, :NoFragmentation => true) }
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_pingecho_alias
|
42
|
-
omit_unless(@@windows, 'skipped on Unix platforms')
|
43
|
-
assert_respond_to(@wmi, :pingecho)
|
44
|
-
assert_nothing_raised{ @wmi.pingecho }
|
45
|
-
assert_nothing_raised{ @wmi.pingecho(@host) }
|
46
|
-
end
|
47
|
-
|
48
|
-
def test_ping_returns_struct
|
49
|
-
omit_unless(@@windows, 'skipped on Unix platforms')
|
50
|
-
assert_kind_of(Struct::PingStatus, @wmi.ping)
|
51
|
-
end
|
52
|
-
|
53
|
-
def test_ping_returns_boolean
|
54
|
-
omit_unless(@@windows, 'skipped on Unix platforms')
|
55
|
-
assert_boolean(@wmi.ping?)
|
56
|
-
assert_boolean(@wmi.ping?(@host))
|
57
|
-
end
|
58
|
-
|
59
|
-
def test_ping_expected_failure
|
60
|
-
omit_unless(@@windows, 'skipped on Unix platforms')
|
61
|
-
assert_false(Ping::WMI.new('bogus').ping?)
|
62
|
-
assert_false(Ping::WMI.new('http://www.asdfhjklasdfhlkj.com').ping?)
|
63
|
-
end
|
64
|
-
|
65
|
-
def test_exception
|
66
|
-
omit_unless(@@windows, 'skipped on Unix platforms')
|
67
|
-
assert_respond_to(@wmi, :exception)
|
68
|
-
assert_nothing_raised{ @wmi.ping }
|
69
|
-
assert_nil(@wmi.exception)
|
70
|
-
end
|
71
|
-
|
72
|
-
def test_warning
|
73
|
-
assert_respond_to(@wmi, :warning)
|
74
|
-
end
|
75
|
-
|
76
|
-
def teardown
|
77
|
-
@host = nil
|
78
|
-
@wmi = nil
|
79
|
-
end
|
80
|
-
|
81
|
-
def self.shutdown
|
82
|
-
@@windows = nil
|
83
|
-
end
|
84
|
-
end
|
1
|
+
#######################################################################
|
2
|
+
# test_net_ping_wmi.rb
|
3
|
+
#
|
4
|
+
# Test case for the Net::Ping::WMI class. These tests will only be
|
5
|
+
# run MS Windows. You should run this test via the 'test' or
|
6
|
+
# 'test:wmi' Rake task.
|
7
|
+
#######################################################################
|
8
|
+
require 'rubygems'
|
9
|
+
gem 'test-unit'
|
10
|
+
|
11
|
+
require 'test/unit'
|
12
|
+
require 'net/ping/wmi'
|
13
|
+
include Net
|
14
|
+
|
15
|
+
class TC_Ping_WMI < Test::Unit::TestCase
|
16
|
+
def self.startup
|
17
|
+
@@windows = Config::CONFIG['host_os'] =~ /mswin|win32|dos|cygwin|mingw/i
|
18
|
+
end
|
19
|
+
|
20
|
+
def setup
|
21
|
+
@host = "www.ruby-lang.org"
|
22
|
+
@wmi = Ping::WMI.new(@host) if @@windows
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_ping_basic
|
26
|
+
omit_unless(@@windows, 'skipped on Unix platforms')
|
27
|
+
assert_respond_to(@wmi, :ping)
|
28
|
+
assert_nothing_raised{ @wmi.ping }
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_ping_with_host
|
32
|
+
omit_unless(@@windows, 'skipped on Unix platforms')
|
33
|
+
assert_nothing_raised{ @wmi.ping(@host) }
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_ping_with_options
|
37
|
+
omit_unless(@@windows, 'skipped on Unix platforms')
|
38
|
+
assert_nothing_raised{ @wmi.ping(@host, :NoFragmentation => true) }
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_pingecho_alias
|
42
|
+
omit_unless(@@windows, 'skipped on Unix platforms')
|
43
|
+
assert_respond_to(@wmi, :pingecho)
|
44
|
+
assert_nothing_raised{ @wmi.pingecho }
|
45
|
+
assert_nothing_raised{ @wmi.pingecho(@host) }
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_ping_returns_struct
|
49
|
+
omit_unless(@@windows, 'skipped on Unix platforms')
|
50
|
+
assert_kind_of(Struct::PingStatus, @wmi.ping)
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_ping_returns_boolean
|
54
|
+
omit_unless(@@windows, 'skipped on Unix platforms')
|
55
|
+
assert_boolean(@wmi.ping?)
|
56
|
+
assert_boolean(@wmi.ping?(@host))
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_ping_expected_failure
|
60
|
+
omit_unless(@@windows, 'skipped on Unix platforms')
|
61
|
+
assert_false(Ping::WMI.new('bogus').ping?)
|
62
|
+
assert_false(Ping::WMI.new('http://www.asdfhjklasdfhlkj.com').ping?)
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_exception
|
66
|
+
omit_unless(@@windows, 'skipped on Unix platforms')
|
67
|
+
assert_respond_to(@wmi, :exception)
|
68
|
+
assert_nothing_raised{ @wmi.ping }
|
69
|
+
assert_nil(@wmi.exception)
|
70
|
+
end
|
71
|
+
|
72
|
+
def test_warning
|
73
|
+
assert_respond_to(@wmi, :warning)
|
74
|
+
end
|
75
|
+
|
76
|
+
def teardown
|
77
|
+
@host = nil
|
78
|
+
@wmi = nil
|
79
|
+
end
|
80
|
+
|
81
|
+
def self.shutdown
|
82
|
+
@@windows = nil
|
83
|
+
end
|
84
|
+
end
|
metadata
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
name: net-ping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
hash: 5
|
5
|
-
prerelease:
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 5
|
9
|
+
- 3
|
10
|
+
version: 1.5.3
|
11
11
|
platform: x86-mingw32
|
12
12
|
authors:
|
13
13
|
- Daniel J. Berger
|
@@ -15,13 +15,44 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2012-02-29 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
|
-
name:
|
21
|
+
name: net-ldap
|
23
22
|
prerelease: false
|
24
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 19
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 2
|
32
|
+
- 2
|
33
|
+
version: 0.2.2
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: ffi
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 23
|
45
|
+
segments:
|
46
|
+
- 1
|
47
|
+
- 0
|
48
|
+
- 0
|
49
|
+
version: 1.0.0
|
50
|
+
type: :runtime
|
51
|
+
version_requirements: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
name: test-unit
|
54
|
+
prerelease: false
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
25
56
|
none: false
|
26
57
|
requirements:
|
27
58
|
- - ">="
|
@@ -33,11 +64,11 @@ dependencies:
|
|
33
64
|
- 2
|
34
65
|
version: 2.1.2
|
35
66
|
type: :development
|
36
|
-
version_requirements: *
|
67
|
+
version_requirements: *id003
|
37
68
|
- !ruby/object:Gem::Dependency
|
38
69
|
name: fakeweb
|
39
70
|
prerelease: false
|
40
|
-
requirement: &
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
41
72
|
none: false
|
42
73
|
requirements:
|
43
74
|
- - ">="
|
@@ -49,27 +80,27 @@ dependencies:
|
|
49
80
|
- 0
|
50
81
|
version: 1.3.0
|
51
82
|
type: :development
|
52
|
-
version_requirements: *
|
83
|
+
version_requirements: *id004
|
53
84
|
- !ruby/object:Gem::Dependency
|
54
|
-
name:
|
85
|
+
name: fakeldap
|
55
86
|
prerelease: false
|
56
|
-
requirement: &
|
87
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
57
88
|
none: false
|
58
89
|
requirements:
|
59
|
-
- -
|
90
|
+
- - ~>
|
60
91
|
- !ruby/object:Gem::Version
|
61
|
-
hash:
|
92
|
+
hash: 29
|
62
93
|
segments:
|
63
|
-
- 1
|
64
94
|
- 0
|
65
|
-
-
|
66
|
-
|
67
|
-
|
68
|
-
|
95
|
+
- 0
|
96
|
+
- 1
|
97
|
+
version: 0.0.1
|
98
|
+
type: :development
|
99
|
+
version_requirements: *id005
|
69
100
|
- !ruby/object:Gem::Dependency
|
70
101
|
name: win32-security
|
71
102
|
prerelease: false
|
72
|
-
requirement: &
|
103
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
73
104
|
none: false
|
74
105
|
requirements:
|
75
106
|
- - ">="
|
@@ -81,11 +112,11 @@ dependencies:
|
|
81
112
|
- 8
|
82
113
|
version: 1.0.8
|
83
114
|
type: :development
|
84
|
-
version_requirements: *
|
115
|
+
version_requirements: *id006
|
85
116
|
- !ruby/object:Gem::Dependency
|
86
117
|
name: win32-open3
|
87
118
|
prerelease: false
|
88
|
-
requirement: &
|
119
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
89
120
|
none: false
|
90
121
|
requirements:
|
91
122
|
- - ">="
|
@@ -97,8 +128,8 @@ dependencies:
|
|
97
128
|
- 1
|
98
129
|
version: 0.3.1
|
99
130
|
type: :runtime
|
100
|
-
version_requirements: *
|
101
|
-
description: " The net-ping library provides a ping interface for Ruby. It includes\n separate TCP, HTTP, ICMP, UDP, WMI (for Windows) and external ping\n classes.\n"
|
131
|
+
version_requirements: *id007
|
132
|
+
description: " The net-ping library provides a ping interface for Ruby. It includes\n separate TCP, HTTP, LDAP, ICMP, UDP, WMI (for Windows) and external ping\n classes.\n"
|
102
133
|
email: djberg96@gmail.com
|
103
134
|
executables: []
|
104
135
|
|
@@ -113,11 +144,13 @@ files:
|
|
113
144
|
- doc/ping.txt
|
114
145
|
- examples/example_pingexternal.rb
|
115
146
|
- examples/example_pinghttp.rb
|
147
|
+
- examples/example_pingldap.rb
|
116
148
|
- examples/example_pingtcp.rb
|
117
149
|
- examples/example_pingudp.rb
|
118
150
|
- lib/net/ping/external.rb
|
119
151
|
- lib/net/ping/http.rb
|
120
152
|
- lib/net/ping/icmp.rb
|
153
|
+
- lib/net/ping/ldap.rb
|
121
154
|
- lib/net/ping/ping.rb
|
122
155
|
- lib/net/ping/tcp.rb
|
123
156
|
- lib/net/ping/udp.rb
|
@@ -131,10 +164,10 @@ files:
|
|
131
164
|
- test/test_net_ping_external.rb
|
132
165
|
- test/test_net_ping_http.rb
|
133
166
|
- test/test_net_ping_icmp.rb
|
167
|
+
- test/test_net_ping_ldap.rb
|
134
168
|
- test/test_net_ping_tcp.rb
|
135
169
|
- test/test_net_ping_udp.rb
|
136
170
|
- test/test_net_ping_wmi.rb
|
137
|
-
has_rdoc: true
|
138
171
|
homepage: http://www.rubyforge.org/projects/shards
|
139
172
|
licenses:
|
140
173
|
- Artistic 2.0
|
@@ -164,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
197
|
requirements: []
|
165
198
|
|
166
199
|
rubyforge_project: shards
|
167
|
-
rubygems_version: 1.
|
200
|
+
rubygems_version: 1.8.10
|
168
201
|
signing_key:
|
169
202
|
specification_version: 3
|
170
203
|
summary: A ping interface for Ruby.
|