uv-rays 2.4.2 → 2.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 547ecef5292f5185d99ec42129a28c32c9e0564e
4
- data.tar.gz: ebec5366c547f475b3f42aef0c2b12049807f15c
3
+ metadata.gz: 4ac99b3a330ca5bfc8fe016bc54964d44d08d99b
4
+ data.tar.gz: 627e6c91f709177583e5b6765818bdc5a26e421a
5
5
  SHA512:
6
- metadata.gz: edd2affdffbd950888290b6039d04c9c5280c99e0f7d7e5d7fb439de84d585159b8a5eb7eec0c5ea45e9c68e0641c5446cc873520fe19d8b920704506da96637
7
- data.tar.gz: 7e47792c7462818f3972d7e27010b7a1010b47112e7eeb2e4bcce0bb7d6ba67dd8152597728a318fcbf8006fd57ad9c2060a5d00acaaed1d0df6e1b672f861a7
6
+ metadata.gz: bbdece8b735398ad284e1fc0b276499182fe29385c4ddf88006c30556a3559ebad4a5891746878067c48f3662f45614c19f346a1c8a5358414b3b43185bd65bb
7
+ data.tar.gz: b52f64f717ee012a47e52b20a4d5936f06ded055fe6f1bc1d6deb70efa52023076d57ddfab6e261af1af89fa615bdc06e2f9ffa414ba8a866bb9868e8b7afa5f
@@ -1,4 +1,5 @@
1
- # frozen_string_literal: true, encoding: ASCII-8BIT
1
+ # encoding: ASCII-8BIT
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'handsoap'
4
5
 
@@ -1,4 +1,5 @@
1
- # frozen_string_literal: true, encoding: ASCII-8BIT
1
+ # encoding: ASCII-8BIT
2
+ # frozen_string_literal: true
2
3
 
3
4
  module UV
4
5
 
@@ -1,4 +1,5 @@
1
- # frozen_string_literal: true, encoding: ASCII-8BIT
1
+ # encoding: ASCII-8BIT
2
+ # frozen_string_literal: true
2
3
 
3
4
  # BufferedTokenizer takes a delimiter upon instantiation.
4
5
  # It allows input to be spoon-fed from some outside source which receives
@@ -1,4 +1,5 @@
1
- # frozen_string_literal: true, encoding: ASCII-8BIT
1
+ # encoding: ASCII-8BIT
2
+ # frozen_string_literal: true
2
3
 
3
4
  module UV
4
5
  module Http
@@ -1,4 +1,5 @@
1
- # frozen_string_literal: true, encoding: ASCII-8BIT
1
+ # encoding: ASCII-8BIT
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'uri'
4
5
  require 'cgi'
@@ -11,11 +11,10 @@ class UV::Ping
11
11
  def initialize(host, count: 1, interval: 1, timeout: 5)
12
12
  @host = host
13
13
  @count = count
14
- @interval = interval
15
14
  @timeout = timeout
16
15
  end
17
16
 
18
- attr_reader :host, :ip, :count, :interval, :timeout, :exception, :warning, :duration, :pingable
17
+ attr_reader :host, :ip, :count, :timeout, :exception, :warning, :duration, :pingable
19
18
 
20
19
  def ping
21
20
  @ip = if IPAddress.valid?(@host)
@@ -32,9 +31,9 @@ class UV::Ping
32
31
 
33
32
  ipaddr = IPAddr.new @ip
34
33
  if ipaddr.ipv4?
35
- ping4(@ip, @count, @interval, @timeout)
34
+ ping4(@ip, @count, @timeout)
36
35
  else
37
- ping6(@ip, @count, @interval, @timeout)
36
+ ping6(@ip, @count, @timeout)
38
37
  end
39
38
  end
40
39
 
@@ -55,13 +54,13 @@ class UV::Ping
55
54
  value
56
55
  end
57
56
 
58
- def ping4(host, count, interval, timeout)
57
+ def ping4(host, count, timeout)
59
58
  pargs = nil
60
59
  bool = false
61
60
 
62
61
  case ::RbConfig::CONFIG['host_os']
63
62
  when /linux/i
64
- pargs = ['-c', count.to_s, '-W', timeout.to_s, host, '-i', interval.to_s]
63
+ pargs = ['-c', count.to_s, '-W', timeout.to_s, host]
65
64
  when /aix/i
66
65
  pargs = ['-c', count.to_s, '-w', timeout.to_s, host]
67
66
  when /bsd|osx|mach|darwin/i
@@ -100,7 +99,7 @@ class UV::Ping
100
99
  @exception = err.chomp
101
100
  else
102
101
  info.each_line do |line|
103
- if line =~ /(timed out|could not find host|packet loss)/i
102
+ if line =~ /(timed out|could not find host|bad address|packet loss)/i
104
103
  @exception = line.chomp
105
104
  break
106
105
  end
@@ -113,13 +112,13 @@ class UV::Ping
113
112
  bool
114
113
  end
115
114
 
116
- def ping6(host, count, interval, timeout)
115
+ def ping6(host, count, timeout)
117
116
  pargs = nil
118
117
  bool = false
119
118
 
120
119
  case RbConfig::CONFIG['host_os']
121
120
  when /linux/i
122
- pargs =['-c', count.to_s, '-W', timeout.to_s, '-i', interval.to_s, host]
121
+ pargs =['-c', count.to_s, '-W', timeout.to_s, host]
123
122
  when /aix/i
124
123
  pargs =['-c', count.to_s, '-w', timeout.to_s, host]
125
124
  when /bsd|osx|mach|darwin/i
@@ -158,7 +157,7 @@ class UV::Ping
158
157
  @exception = err.chomp
159
158
  else
160
159
  info.each_line do |line|
161
- if line =~ /(timed out|could not find host|packet loss)/i
160
+ if line =~ /(timed out|could not find host|bad address|packet loss)/i
162
161
  @exception = line.chomp
163
162
  break
164
163
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UV
4
- VERSION = '2.4.2'
4
+ VERSION = '2.4.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uv-rays
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen von Takach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-28 00:00:00.000000000 Z
11
+ date: 2018-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libuv