net-ping 1.7.5-universal-mingw32 → 1.7.6-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +6 -0
- data/Rakefile +5 -1
- data/lib/net/ping.rb +6 -6
- data/lib/net/ping/ping.rb +1 -1
- data/lib/net/ping/tcp.rb +14 -8
- data/net-ping.gemspec +2 -2
- data/test/test_net_ping.rb +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7df0afd38d955fcbb3ef3cf956b6ec18cb2110cd
|
4
|
+
data.tar.gz: 697dc0c6610691001c4803e370c0e34ef485b9af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d2da808ee32c4d7cfa9126b1403c2d5756c1d20eaa21a9076599af5d4297d28b3045c17f3997c71bb859f794ee2cb410b6cc82d621d918acaa195a42fc9399f
|
7
|
+
data.tar.gz: 476833a09b47a9b182bfe719d5ec5623231cd16825b3ea91e66b78f6c522fe010cc391dac4182cb4c0bde99f0829c548968faeac4c20bf695c849912198c6f9e
|
data/CHANGES
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
== 1.7.6 - 13-Dec-2014
|
2
|
+
* Changed TCP handling yet again, as it was returning false positives. Thanks
|
3
|
+
go to Marcos Piccinini for the spot.
|
4
|
+
* Now uses relative_require internally.
|
5
|
+
* Minor tweaks to the gemspec and Rakefile for JRuby.
|
6
|
+
|
1
7
|
== 1.7.5 - 2-Nov-2014
|
2
8
|
* Added packet count and intervals for external pings. Thanks go to Jack Hayter
|
3
9
|
for the patch.
|
data/Rakefile
CHANGED
@@ -20,7 +20,11 @@ namespace 'gem' do
|
|
20
20
|
desc 'Install the net-ping gem'
|
21
21
|
task :install => [:create] do
|
22
22
|
gem_file = Dir["*.gem"].first
|
23
|
-
|
23
|
+
if RUBY_PLATFORM == 'java'
|
24
|
+
sh "jruby -S gem install -l #{gem_file}"
|
25
|
+
else
|
26
|
+
sh "gem install -l #{gem_file}"
|
27
|
+
end
|
24
28
|
end
|
25
29
|
end
|
26
30
|
|
data/lib/net/ping.rb
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
#
|
5
5
|
require 'rbconfig'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
require_relative 'ping/tcp'
|
8
|
+
require_relative 'ping/udp'
|
9
|
+
require_relative 'ping/icmp'
|
10
|
+
require_relative 'ping/external'
|
11
|
+
require_relative 'ping/http'
|
12
12
|
|
13
13
|
RbConfig = Config unless Object.const_defined?(:RbConfig)
|
14
14
|
|
15
15
|
if File::ALT_SEPARATOR
|
16
|
-
|
16
|
+
require_relative 'ping/wmi'
|
17
17
|
end
|
data/lib/net/ping/ping.rb
CHANGED
data/lib/net/ping/tcp.rb
CHANGED
@@ -68,17 +68,23 @@ module Net
|
|
68
68
|
|
69
69
|
resp = IO.select(nil, [sock], nil, timeout)
|
70
70
|
|
71
|
-
if
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
71
|
+
if resp.nil? # Assume ECONNREFUSED if nil
|
72
|
+
if @@service_check
|
73
|
+
bool = true
|
74
|
+
else
|
75
|
+
bool = false
|
76
|
+
@exception = Errno::ECONNREFUSED
|
77
|
+
end
|
76
78
|
else
|
77
79
|
sockopt = sock.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR)
|
78
80
|
|
79
|
-
|
80
|
-
|
81
|
-
|
81
|
+
if sockopt.int != 0
|
82
|
+
if @@service_check && sockopt.int == Errno::ECONNREFUSED::Errno
|
83
|
+
bool = true
|
84
|
+
else
|
85
|
+
bool = false
|
86
|
+
@exception = SystemCallError.new(sockopt.int)
|
87
|
+
end
|
82
88
|
else
|
83
89
|
bool = true
|
84
90
|
end
|
data/net-ping.gemspec
CHANGED
@@ -3,7 +3,7 @@ require 'rbconfig'
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = 'net-ping'
|
6
|
-
spec.version = '1.7.
|
6
|
+
spec.version = '1.7.6'
|
7
7
|
spec.license = 'Artistic 2.0'
|
8
8
|
spec.author = 'Daniel J. Berger'
|
9
9
|
spec.email = 'djberg96@gmail.com'
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
if File::ALT_SEPARATOR
|
25
25
|
require 'rbconfig'
|
26
|
-
arch = RbConfig::CONFIG['build_os']
|
26
|
+
arch = RbConfig::CONFIG['build_os'] || 'mingw32' # JRuby
|
27
27
|
spec.platform = Gem::Platform.new(['universal', arch])
|
28
28
|
spec.platform.version = nil
|
29
29
|
|
data/test/test_net_ping.rb
CHANGED
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.6
|
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-
|
11
|
+
date: 2014-12-13 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
69
|
description: |2
|
@@ -114,17 +114,17 @@ require_paths:
|
|
114
114
|
- lib
|
115
115
|
required_ruby_version: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- -
|
117
|
+
- - ">="
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: 1.9.3
|
120
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
126
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.4.
|
127
|
+
rubygems_version: 2.4.5
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: A ping interface for Ruby.
|