net-ping 2.0.2 → 2.0.3
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.
- checksums.yaml +4 -4
- data/CHANGES +7 -0
- data/Gemfile.lock +12 -12
- data/lib/net/ping.rb +7 -0
- data/lib/net/ping/external.rb +4 -2
- data/lib/net/ping/http.rb +3 -0
- data/net-ping.gemspec +1 -1
- data/test/test_net_ping_tcp.rb +6 -6
- metadata +3 -4
- data/net-ping-2.0.1.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5d8c3bdd8f2372b43f953c56e7a5046a238c95a
|
4
|
+
data.tar.gz: af80519cc7973ff4bf32babdd9cc91d9b6a62688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec5a88a61325fce82859ea5411482633e64f84a45f5906959e74f66414337f44a9d9cc9940b6b8b7825b99fefd634f7898c77aae86385b5f58d617fefe238243
|
7
|
+
data.tar.gz: 4079a086c03daf2be1a284e2455fc58d944c2f3edb4594bd33d44e5fac4b8c793b9b4736bd5c2b6ada70c7c952f4057a4961a8cd87a6fd6554588aebde82b9d3
|
data/CHANGES
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
== 2.0.1 - 5-Aug-2015
|
2
|
+
* Fix broken gemspec. PR #9 by @shockwavenn
|
3
|
+
|
4
|
+
== 2.0.0 - 5-Aug-2015
|
5
|
+
* Add ability to ping ipv6 ip. PR #4 by @deuxclique
|
6
|
+
* Minor refactoring of the ping?/pingecho aliases, and fixed a timer glitch in Net::Ping::TCP. PR#7 by @epitron
|
7
|
+
|
1
8
|
== 1.7.7 - 22-Jan-2015
|
2
9
|
* Pull request #1 from Mike George. This fixes domains which have http in them.
|
3
10
|
|
data/Gemfile.lock
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
net-ping (2.0.
|
4
|
+
net-ping (2.0.2)
|
5
5
|
|
6
6
|
GEM
|
7
|
-
remote:
|
7
|
+
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
byebug (
|
9
|
+
byebug (10.0.0)
|
10
10
|
coderay (1.1.2)
|
11
11
|
fakeweb (1.3.0)
|
12
|
-
method_source (0.
|
13
|
-
power_assert (1.1.
|
14
|
-
pry (0.11.
|
12
|
+
method_source (0.9.0)
|
13
|
+
power_assert (1.1.1)
|
14
|
+
pry (0.11.3)
|
15
15
|
coderay (~> 1.1.0)
|
16
|
-
method_source (~> 0.
|
17
|
-
pry-byebug (3.
|
18
|
-
byebug (~>
|
16
|
+
method_source (~> 0.9.0)
|
17
|
+
pry-byebug (3.6.0)
|
18
|
+
byebug (~> 10.0)
|
19
19
|
pry (~> 0.10)
|
20
|
-
rake (12.
|
21
|
-
test-unit (3.2.
|
20
|
+
rake (12.3.0)
|
21
|
+
test-unit (3.2.7)
|
22
22
|
power_assert
|
23
23
|
|
24
24
|
PLATFORMS
|
@@ -32,4 +32,4 @@ DEPENDENCIES
|
|
32
32
|
test-unit
|
33
33
|
|
34
34
|
BUNDLED WITH
|
35
|
-
1.
|
35
|
+
1.16.1
|
data/lib/net/ping.rb
CHANGED
@@ -12,6 +12,13 @@ require_relative 'ping/http'
|
|
12
12
|
|
13
13
|
RbConfig = Config unless Object.const_defined?(:RbConfig)
|
14
14
|
|
15
|
+
begin
|
16
|
+
`busybox`
|
17
|
+
RbConfig::CONFIG['busybox'] = true
|
18
|
+
rescue Errno::ENOENT
|
19
|
+
RbConfig::CONFIG['busybox'] = false
|
20
|
+
end
|
21
|
+
|
15
22
|
if File::ALT_SEPARATOR
|
16
23
|
require_relative 'ping/wmi'
|
17
24
|
end
|
data/lib/net/ping/external.rb
CHANGED
@@ -31,7 +31,8 @@ module Net
|
|
31
31
|
|
32
32
|
case RbConfig::CONFIG['host_os']
|
33
33
|
when /linux/i
|
34
|
-
pcmd += ['-c', count.to_s, '-W', timeout.to_s, host
|
34
|
+
pcmd += ['-c', count.to_s, '-W', timeout.to_s, host]
|
35
|
+
pcmd += ['-i', interval.to_s] unless RbConfig::CONFIG['busybox']
|
35
36
|
when /aix/i
|
36
37
|
pcmd += ['-c', count.to_s, '-w', timeout.to_s, host]
|
37
38
|
when /bsd|osx|mach|darwin/i
|
@@ -111,7 +112,8 @@ module Net
|
|
111
112
|
|
112
113
|
case RbConfig::CONFIG['host_os']
|
113
114
|
when /linux/i
|
114
|
-
pcmd += ['-c', count.to_s, '-W', timeout.to_s, host
|
115
|
+
pcmd += ['-c', count.to_s, '-W', timeout.to_s, host]
|
116
|
+
pcmd += ['-i', interval.to_s] unless RbConfig::CONFIG['busybox']
|
115
117
|
when /aix/i
|
116
118
|
pcmd += ['-c', count.to_s, '-w', timeout.to_s, host]
|
117
119
|
when /bsd|osx|mach|darwin/i
|
data/lib/net/ping/http.rb
CHANGED
@@ -106,7 +106,10 @@ module Net
|
|
106
106
|
break
|
107
107
|
end
|
108
108
|
redirect = URI.parse(response['location'])
|
109
|
+
port = redirect.port
|
109
110
|
redirect = uri + redirect if redirect.relative?
|
111
|
+
|
112
|
+
start_time = Time.now
|
110
113
|
response = do_ping(redirect, port)
|
111
114
|
rlimit += 1
|
112
115
|
end
|
data/net-ping.gemspec
CHANGED
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Chernesky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -97,7 +97,6 @@ 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.1.gem
|
101
100
|
- net-ping.gemspec
|
102
101
|
- test/test_net_ping.rb
|
103
102
|
- test/test_net_ping_external.rb
|
@@ -126,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
125
|
version: '0'
|
127
126
|
requirements: []
|
128
127
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.5.2.2
|
130
129
|
signing_key:
|
131
130
|
specification_version: 4
|
132
131
|
summary: A ping interface for Ruby.
|
data/net-ping-2.0.1.gem
DELETED
Binary file
|