net-ping 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/net/ping/icmp.rb +2 -2
- data/net-ping-2.0.3.gem +0 -0
- data/net-ping.gemspec +1 -1
- data/test/test_net_ping_icmp.rb +2 -2
- data/test/test_net_ping_tcp.rb +6 -6
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbd55ec9d86b05fac98cc5d85190dd784c6c30e2
|
4
|
+
data.tar.gz: 35d6319ea3712aede03c8f7415d0c1885de50fc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ff7483cdf338741bc815ad96959400dad82c4dc74756f91c71794d2723d7290cad1764a8781ac0b2737986dc7321de243be561ceee3d19670f7d0c003d84d43
|
7
|
+
data.tar.gz: 71d9f610f369adf63bf7590067edaa9975cb9cc77e8b4b43bece9b668942a9e12564934cd0e7c24aa4a8c7425049c9c52121bec2541a08aa9b241315f7e0f341
|
data/lib/net/ping/icmp.rb
CHANGED
@@ -35,12 +35,12 @@ module Net
|
|
35
35
|
unless Process.euid == 0 \
|
36
36
|
|| current_process.permitted?(:net_raw) \
|
37
37
|
&& current_process.enabled?(:net_raw)
|
38
|
-
raise StandardError 'requires root privileges or setcap net_raw'
|
38
|
+
raise StandardError, 'requires root privileges or setcap net_raw'
|
39
39
|
end
|
40
40
|
rescue LoadError
|
41
41
|
# Without cap2, raise error if we are not root
|
42
42
|
unless Process.euid == 0
|
43
|
-
raise StandardError 'requires root privileges or setcap net_raw'
|
43
|
+
raise StandardError, 'requires root privileges or setcap net_raw'
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
data/net-ping-2.0.3.gem
ADDED
Binary file
|
data/net-ping.gemspec
CHANGED
data/test/test_net_ping_icmp.rb
CHANGED
@@ -24,12 +24,12 @@ else
|
|
24
24
|
unless Process.euid == 0 \
|
25
25
|
|| current_process.permitted?(:net_raw) \
|
26
26
|
&& current_process.enabled?(:net_raw)
|
27
|
-
raise StandardError 'requires root privileges or setcap net_raw'
|
27
|
+
raise StandardError, 'requires root privileges or setcap net_raw'
|
28
28
|
end
|
29
29
|
rescue LoadError
|
30
30
|
# Without cap2; raise error unless we are root
|
31
31
|
unless Process.euid == 0
|
32
|
-
raise StandardError 'requires root privileges or setcap net_raw'
|
32
|
+
raise StandardError, 'requires root privileges or setcap net_raw'
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
data/test/test_net_ping_tcp.rb
CHANGED
@@ -43,24 +43,24 @@ class TC_PingTCP < Test::Unit::TestCase
|
|
43
43
|
Ping::TCP.service_check = true
|
44
44
|
assert_true(@tcp.ping?, msg)
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
def test_service_check
|
48
48
|
assert_respond_to(Ping::TCP, :service_check)
|
49
|
-
assert_respond_to(Ping::TCP, :service_check=)
|
49
|
+
assert_respond_to(Ping::TCP, :service_check=)
|
50
50
|
end
|
51
|
-
|
51
|
+
|
52
52
|
# These will be removed eventually
|
53
53
|
def test_service_check_aliases
|
54
54
|
assert_respond_to(Ping::TCP, :econnrefused)
|
55
55
|
assert_respond_to(Ping::TCP, :econnrefused=)
|
56
56
|
assert_respond_to(Ping::TCP, :ecr)
|
57
|
-
assert_respond_to(Ping::TCP, :ecr=)
|
57
|
+
assert_respond_to(Ping::TCP, :ecr=)
|
58
58
|
end
|
59
|
-
|
59
|
+
|
60
60
|
def test_service_check_expected_errors
|
61
61
|
assert_raises(ArgumentError){ Ping::TCP.service_check = "blah" }
|
62
62
|
end
|
63
|
-
|
63
|
+
|
64
64
|
# If the ping failed, the duration will be nil
|
65
65
|
def test_duration
|
66
66
|
assert_nothing_raised{ @tcp.ping }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Chernesky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- lib/net/ping/tcp.rb
|
98
98
|
- lib/net/ping/udp.rb
|
99
99
|
- lib/net/ping/wmi.rb
|
100
|
+
- net-ping-2.0.3.gem
|
100
101
|
- net-ping.gemspec
|
101
102
|
- test/test_net_ping.rb
|
102
103
|
- test/test_net_ping_external.rb
|