net-ping 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9ddc576d5378243648c90de748b4c0c9114642d
4
- data.tar.gz: 92f7b54ac2ba20c14600d8c8c411698e1452b859
3
+ metadata.gz: b5d8c3bdd8f2372b43f953c56e7a5046a238c95a
4
+ data.tar.gz: af80519cc7973ff4bf32babdd9cc91d9b6a62688
5
5
  SHA512:
6
- metadata.gz: 916179b9dcef791923c9d93d1af8ee642687a655843522f0ac972aa2fa0aec10f91806f06be0eb25090d2dd9bf92c9a6fca37cda08dd2e5dd2bfa4165750d506
7
- data.tar.gz: 6b98685b066ddeb79cdd6f835077f36543d5411a8ab72f93c4aab3b152004636ebc8d16248cddffafc67202b98db1f7b09acdda045cf8e7e288747b3402596b7
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
 
@@ -1,24 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- net-ping (2.0.0)
4
+ net-ping (2.0.2)
5
5
 
6
6
  GEM
7
- remote: http://rubygems.org/
7
+ remote: https://rubygems.org/
8
8
  specs:
9
- byebug (9.1.0)
9
+ byebug (10.0.0)
10
10
  coderay (1.1.2)
11
11
  fakeweb (1.3.0)
12
- method_source (0.8.2)
13
- power_assert (1.1.0)
14
- pry (0.11.0)
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.8.1)
17
- pry-byebug (3.5.0)
18
- byebug (~> 9.1)
16
+ method_source (~> 0.9.0)
17
+ pry-byebug (3.6.0)
18
+ byebug (~> 10.0)
19
19
  pry (~> 0.10)
20
- rake (12.1.0)
21
- test-unit (3.2.6)
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.15.3
35
+ 1.16.1
@@ -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
@@ -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, '-i', interval.to_s]
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, '-i', interval.to_s]
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
@@ -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
@@ -3,7 +3,7 @@ require 'rbconfig'
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'net-ping'
6
- spec.version = '2.0.2'
6
+ spec.version = '2.0.3'
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.author = 'Chris Chernesky'
9
9
  spec.email = 'chris.netping@tinderglow.com'
@@ -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.2
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: 2017-10-17 00:00:00.000000000 Z
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.6.11
128
+ rubygems_version: 2.5.2.2
130
129
  signing_key:
131
130
  specification_version: 4
132
131
  summary: A ping interface for Ruby.
Binary file