net-ping 1.7.2-universal-mingw32 → 1.7.3-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,119 +1,119 @@
1
- ########################################################################
2
- # test_net_ping_udp.rb
3
- #
4
- # Test case for the Net::Ping::UDP class. This should be run via the
5
- # 'test' or 'test:udp' Rake tasks.
6
- #
7
- # If someone could provide me a host where a udp ping actually
8
- # works (with a service check), I would appreciate it. :)
9
- ########################################################################
10
- require 'test-unit'
11
- require 'net/ping/udp'
12
-
13
- class TC_Net_Ping_UDP < Test::Unit::TestCase
14
- def setup
15
- Net::Ping::UDP.service_check = false
16
- @host = '127.0.0.1'
17
- @udp = Net::Ping::UDP.new(@host)
18
- end
19
-
20
- test "ping basic functionality" do
21
- assert_respond_to(@udp, :ping)
22
- assert_nothing_raised{ @udp.ping }
23
- end
24
-
25
- test "ping accepts a host as an argument" do
26
- assert_nothing_raised{ @udp.ping(@host) }
27
- end
28
-
29
- test "ping? is an alias for ping" do
30
- assert_respond_to(@udp, :ping?)
31
- assert_alias_method(@udp, :ping?, :ping)
32
- end
33
-
34
- test "pingecho is an alias for ping" do
35
- assert_respond_to(@udp, :pingecho)
36
- assert_alias_method(@udp, :pingecho, :ping)
37
- end
38
-
39
- test "a successful udp ping returns true" do
40
- assert_true(@udp.ping?)
41
- end
42
-
43
- test "bind basic functionality" do
44
- assert_respond_to(@udp, :bind)
45
- assert_nothing_raised{ @udp.bind('127.0.0.1', 80) }
46
- end
47
-
48
- test "duration basic functionality" do
49
- assert_nothing_raised{ @udp.ping }
50
- assert_respond_to(@udp, :duration)
51
- assert_kind_of(Float, @udp.duration)
52
- end
53
-
54
- test "host basic functionality" do
55
- assert_respond_to(@udp, :host)
56
- assert_respond_to(@udp, :host=)
57
- assert_equal('127.0.0.1', @udp.host)
58
- end
59
-
60
- test "port basic functionality" do
61
- assert_respond_to(@udp, :port)
62
- assert_respond_to(@udp, :port=)
63
- assert_equal(7, @udp.port)
64
- end
65
-
66
- test "timeout basic functionality" do
67
- assert_respond_to(@udp, :timeout)
68
- assert_respond_to(@udp, :timeout=)
69
- end
70
-
71
- test "timeout default value is five" do
72
- assert_equal(5, @udp.timeout)
73
- end
74
-
75
- test "exception basic functionality" do
76
- assert_respond_to(@udp, :exception)
77
- end
78
-
79
- test "the exception attribute returns nil if the ping is successful" do
80
- assert_true(@udp.ping?)
81
- assert_nil(@udp.exception)
82
- end
83
-
84
- test "the exception attribute is not nil if the ping is unsuccessful" do
85
- assert_false(@udp.ping?('www.ruby-lang.org'))
86
- assert_not_nil(@udp.exception)
87
- end
88
-
89
- test "warning basic functionality" do
90
- assert_respond_to(@udp, :warning)
91
- end
92
-
93
- test "the warning attribute returns nil if the ping is successful" do
94
- assert_true(@udp.ping?)
95
- assert_nil(@udp.warning)
96
- end
97
-
98
- test "service_check basic functionality" do
99
- assert_respond_to(Net::Ping::UDP, :service_check)
100
- assert_respond_to(Net::Ping::UDP, :service_check=)
101
- end
102
-
103
- test "service_check attribute has been set to false" do
104
- assert_false(Net::Ping::UDP.service_check)
105
- end
106
-
107
- test "service_check getter method does not accept arguments" do
108
- assert_raise(ArgumentError){ Net::Ping::UDP.service_check(1) }
109
- end
110
-
111
- test "service_check setter method only accepts boolean arguments" do
112
- assert_raise(ArgumentError){ Net::Ping::UDP.service_check = 1 }
113
- end
114
-
115
- def teardown
116
- @host = nil
117
- @udp = nil
118
- end
119
- end
1
+ ########################################################################
2
+ # test_net_ping_udp.rb
3
+ #
4
+ # Test case for the Net::Ping::UDP class. This should be run via the
5
+ # 'test' or 'test:udp' Rake tasks.
6
+ #
7
+ # If someone could provide me a host where a udp ping actually
8
+ # works (with a service check), I would appreciate it. :)
9
+ ########################################################################
10
+ require 'test-unit'
11
+ require 'net/ping/udp'
12
+
13
+ class TC_Net_Ping_UDP < Test::Unit::TestCase
14
+ def setup
15
+ Net::Ping::UDP.service_check = false
16
+ @host = '127.0.0.1'
17
+ @udp = Net::Ping::UDP.new(@host)
18
+ end
19
+
20
+ test "ping basic functionality" do
21
+ assert_respond_to(@udp, :ping)
22
+ assert_nothing_raised{ @udp.ping }
23
+ end
24
+
25
+ test "ping accepts a host as an argument" do
26
+ assert_nothing_raised{ @udp.ping(@host) }
27
+ end
28
+
29
+ test "ping? is an alias for ping" do
30
+ assert_respond_to(@udp, :ping?)
31
+ assert_alias_method(@udp, :ping?, :ping)
32
+ end
33
+
34
+ test "pingecho is an alias for ping" do
35
+ assert_respond_to(@udp, :pingecho)
36
+ assert_alias_method(@udp, :pingecho, :ping)
37
+ end
38
+
39
+ test "a successful udp ping returns true" do
40
+ assert_true(@udp.ping?)
41
+ end
42
+
43
+ test "bind basic functionality" do
44
+ assert_respond_to(@udp, :bind)
45
+ assert_nothing_raised{ @udp.bind('127.0.0.1', 80) }
46
+ end
47
+
48
+ test "duration basic functionality" do
49
+ assert_nothing_raised{ @udp.ping }
50
+ assert_respond_to(@udp, :duration)
51
+ assert_kind_of(Float, @udp.duration)
52
+ end
53
+
54
+ test "host basic functionality" do
55
+ assert_respond_to(@udp, :host)
56
+ assert_respond_to(@udp, :host=)
57
+ assert_equal('127.0.0.1', @udp.host)
58
+ end
59
+
60
+ test "port basic functionality" do
61
+ assert_respond_to(@udp, :port)
62
+ assert_respond_to(@udp, :port=)
63
+ assert_equal(7, @udp.port)
64
+ end
65
+
66
+ test "timeout basic functionality" do
67
+ assert_respond_to(@udp, :timeout)
68
+ assert_respond_to(@udp, :timeout=)
69
+ end
70
+
71
+ test "timeout default value is five" do
72
+ assert_equal(5, @udp.timeout)
73
+ end
74
+
75
+ test "exception basic functionality" do
76
+ assert_respond_to(@udp, :exception)
77
+ end
78
+
79
+ test "the exception attribute returns nil if the ping is successful" do
80
+ assert_true(@udp.ping?)
81
+ assert_nil(@udp.exception)
82
+ end
83
+
84
+ test "the exception attribute is not nil if the ping is unsuccessful" do
85
+ assert_false(@udp.ping?('www.ruby-lang.org'))
86
+ assert_not_nil(@udp.exception)
87
+ end
88
+
89
+ test "warning basic functionality" do
90
+ assert_respond_to(@udp, :warning)
91
+ end
92
+
93
+ test "the warning attribute returns nil if the ping is successful" do
94
+ assert_true(@udp.ping?)
95
+ assert_nil(@udp.warning)
96
+ end
97
+
98
+ test "service_check basic functionality" do
99
+ assert_respond_to(Net::Ping::UDP, :service_check)
100
+ assert_respond_to(Net::Ping::UDP, :service_check=)
101
+ end
102
+
103
+ test "service_check attribute has been set to false" do
104
+ assert_false(Net::Ping::UDP.service_check)
105
+ end
106
+
107
+ test "service_check getter method does not accept arguments" do
108
+ assert_raise(ArgumentError){ Net::Ping::UDP.service_check(1) }
109
+ end
110
+
111
+ test "service_check setter method only accepts boolean arguments" do
112
+ assert_raise(ArgumentError){ Net::Ping::UDP.service_check = 1 }
113
+ end
114
+
115
+ def teardown
116
+ @host = nil
117
+ @udp = nil
118
+ end
119
+ end
@@ -1,81 +1,81 @@
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 'test-unit'
9
- require 'net/ping/wmi'
10
- include Net
11
-
12
- class TC_Ping_WMI < Test::Unit::TestCase
13
- def self.startup
14
- @@windows = File::ALT_SEPARATOR
15
- end
16
-
17
- def setup
18
- @host = "www.ruby-lang.org"
19
- @wmi = Ping::WMI.new(@host) if @@windows
20
- end
21
-
22
- def test_ping_basic
23
- omit_unless(@@windows, 'skipped on Unix platforms')
24
- assert_respond_to(@wmi, :ping)
25
- assert_nothing_raised{ @wmi.ping }
26
- end
27
-
28
- def test_ping_with_host
29
- omit_unless(@@windows, 'skipped on Unix platforms')
30
- assert_nothing_raised{ @wmi.ping(@host) }
31
- end
32
-
33
- def test_ping_with_options
34
- omit_unless(@@windows, 'skipped on Unix platforms')
35
- assert_nothing_raised{ @wmi.ping(@host, :NoFragmentation => true) }
36
- end
37
-
38
- def test_pingecho_alias
39
- omit_unless(@@windows, 'skipped on Unix platforms')
40
- assert_respond_to(@wmi, :pingecho)
41
- assert_nothing_raised{ @wmi.pingecho }
42
- assert_nothing_raised{ @wmi.pingecho(@host) }
43
- end
44
-
45
- def test_ping_returns_struct
46
- omit_unless(@@windows, 'skipped on Unix platforms')
47
- assert_kind_of(Struct::PingStatus, @wmi.ping)
48
- end
49
-
50
- def test_ping_returns_boolean
51
- omit_unless(@@windows, 'skipped on Unix platforms')
52
- assert_boolean(@wmi.ping?)
53
- assert_boolean(@wmi.ping?(@host))
54
- end
55
-
56
- def test_ping_expected_failure
57
- omit_unless(@@windows, 'skipped on Unix platforms')
58
- assert_false(Ping::WMI.new('bogus').ping?)
59
- assert_false(Ping::WMI.new('http://www.asdfhjklasdfhlkj.com').ping?)
60
- end
61
-
62
- def test_exception
63
- omit_unless(@@windows, 'skipped on Unix platforms')
64
- assert_respond_to(@wmi, :exception)
65
- assert_nothing_raised{ @wmi.ping }
66
- assert_nil(@wmi.exception)
67
- end
68
-
69
- def test_warning
70
- assert_respond_to(@wmi, :warning)
71
- end
72
-
73
- def teardown
74
- @host = nil
75
- @wmi = nil
76
- end
77
-
78
- def self.shutdown
79
- @@windows = nil
80
- end
81
- 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 'test-unit'
9
+ require 'net/ping/wmi'
10
+ include Net
11
+
12
+ class TC_Ping_WMI < Test::Unit::TestCase
13
+ def self.startup
14
+ @@windows = File::ALT_SEPARATOR
15
+ end
16
+
17
+ def setup
18
+ @host = "www.ruby-lang.org"
19
+ @wmi = Ping::WMI.new(@host) if @@windows
20
+ end
21
+
22
+ def test_ping_basic
23
+ omit_unless(@@windows, 'skipped on Unix platforms')
24
+ assert_respond_to(@wmi, :ping)
25
+ assert_nothing_raised{ @wmi.ping }
26
+ end
27
+
28
+ def test_ping_with_host
29
+ omit_unless(@@windows, 'skipped on Unix platforms')
30
+ assert_nothing_raised{ @wmi.ping(@host) }
31
+ end
32
+
33
+ def test_ping_with_options
34
+ omit_unless(@@windows, 'skipped on Unix platforms')
35
+ assert_nothing_raised{ @wmi.ping(@host, :NoFragmentation => true) }
36
+ end
37
+
38
+ def test_pingecho_alias
39
+ omit_unless(@@windows, 'skipped on Unix platforms')
40
+ assert_respond_to(@wmi, :pingecho)
41
+ assert_nothing_raised{ @wmi.pingecho }
42
+ assert_nothing_raised{ @wmi.pingecho(@host) }
43
+ end
44
+
45
+ def test_ping_returns_struct
46
+ omit_unless(@@windows, 'skipped on Unix platforms')
47
+ assert_kind_of(Struct::PingStatus, @wmi.ping)
48
+ end
49
+
50
+ def test_ping_returns_boolean
51
+ omit_unless(@@windows, 'skipped on Unix platforms')
52
+ assert_boolean(@wmi.ping?)
53
+ assert_boolean(@wmi.ping?(@host))
54
+ end
55
+
56
+ def test_ping_expected_failure
57
+ omit_unless(@@windows, 'skipped on Unix platforms')
58
+ assert_false(Ping::WMI.new('bogus').ping?)
59
+ assert_false(Ping::WMI.new('http://www.asdfhjklasdfhlkj.com').ping?)
60
+ end
61
+
62
+ def test_exception
63
+ omit_unless(@@windows, 'skipped on Unix platforms')
64
+ assert_respond_to(@wmi, :exception)
65
+ assert_nothing_raised{ @wmi.ping }
66
+ assert_nil(@wmi.exception)
67
+ end
68
+
69
+ def test_warning
70
+ assert_respond_to(@wmi, :warning)
71
+ end
72
+
73
+ def teardown
74
+ @host = nil
75
+ @wmi = nil
76
+ end
77
+
78
+ def self.shutdown
79
+ @@windows = nil
80
+ end
81
+ end
metadata CHANGED
@@ -1,75 +1,73 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ping
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.7.3
5
5
  platform: universal-mingw32
6
6
  authors:
7
7
  - Daniel J. Berger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-21 00:00:00.000000000 Z
11
+ date: 2014-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: fakeweb
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: win32-security
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.2.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.2.0
69
- description: |2
70
- The net-ping library provides a ping interface for Ruby. It includes
71
- separate TCP, HTTP, LDAP, ICMP, UDP, WMI (for Windows) and external ping
72
- classes.
69
+ description: ! " The net-ping library provides a ping interface for Ruby. It includes\n
70
+ \ separate TCP, HTTP, LDAP, ICMP, UDP, WMI (for Windows) and external ping\n classes.\n"
73
71
  email: djberg96@gmail.com
74
72
  executables: []
75
73
  extensions: []
@@ -114,16 +112,16 @@ require_paths:
114
112
  - lib
115
113
  required_ruby_version: !ruby/object:Gem::Requirement
116
114
  requirements:
117
- - - '>='
115
+ - - ! '>='
118
116
  - !ruby/object:Gem::Version
119
- version: 1.9.1
117
+ version: 1.9.3
120
118
  required_rubygems_version: !ruby/object:Gem::Requirement
121
119
  requirements:
122
- - - '>='
120
+ - - ! '>='
123
121
  - !ruby/object:Gem::Version
124
122
  version: '0'
125
123
  requirements: []
126
- rubyforge_project: shards
124
+ rubyforge_project:
127
125
  rubygems_version: 2.0.3
128
126
  signing_key:
129
127
  specification_version: 4