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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5d8c3bdd8f2372b43f953c56e7a5046a238c95a
4
- data.tar.gz: af80519cc7973ff4bf32babdd9cc91d9b6a62688
3
+ metadata.gz: bbd55ec9d86b05fac98cc5d85190dd784c6c30e2
4
+ data.tar.gz: 35d6319ea3712aede03c8f7415d0c1885de50fc3
5
5
  SHA512:
6
- metadata.gz: ec5a88a61325fce82859ea5411482633e64f84a45f5906959e74f66414337f44a9d9cc9940b6b8b7825b99fefd634f7898c77aae86385b5f58d617fefe238243
7
- data.tar.gz: 4079a086c03daf2be1a284e2455fc58d944c2f3edb4594bd33d44e5fac4b8c793b9b4736bd5c2b6ada70c7c952f4057a4961a8cd87a6fd6554588aebde82b9d3
6
+ metadata.gz: 4ff7483cdf338741bc815ad96959400dad82c4dc74756f91c71794d2723d7290cad1764a8781ac0b2737986dc7321de243be561ceee3d19670f7d0c003d84d43
7
+ data.tar.gz: 71d9f610f369adf63bf7590067edaa9975cb9cc77e8b4b43bece9b668942a9e12564934cd0e7c24aa4a8c7425049c9c52121bec2541a08aa9b241315f7e0f341
@@ -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
 
Binary file
@@ -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.3'
6
+ spec.version = '2.0.4'
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.author = 'Chris Chernesky'
9
9
  spec.email = 'chris.netping@tinderglow.com'
@@ -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
 
@@ -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.3
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-06 00:00:00.000000000 Z
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