net-ntp 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/net/ntp/ntp.rb +2 -2
- data/lib/net/ntp/version.rb +1 -1
- metadata +11 -7
data/lib/net/ntp/ntp.rb
CHANGED
@@ -63,7 +63,7 @@ module Net #:nodoc:
|
|
63
63
|
###
|
64
64
|
# Sends an NTP datagram to the specified NTP server and returns
|
65
65
|
# a hash based upon RFC1305 and RFC2030.
|
66
|
-
def self.get(host="pool.ntp.org", port="ntp")
|
66
|
+
def self.get(host="pool.ntp.org", port="ntp", timeout=TIMEOUT)
|
67
67
|
sock = UDPSocket.new
|
68
68
|
sock.connect(host, port)
|
69
69
|
|
@@ -78,7 +78,7 @@ module Net #:nodoc:
|
|
78
78
|
sock.flush
|
79
79
|
|
80
80
|
data = nil
|
81
|
-
Timeout::timeout(
|
81
|
+
Timeout::timeout(timeout) do |t|
|
82
82
|
data = sock.recvfrom(960)[0]
|
83
83
|
end
|
84
84
|
|
data/lib/net/ntp/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ntp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 11
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 2
|
8
|
+
- 1
|
7
9
|
- 0
|
8
|
-
|
9
|
-
version: 2.0.0
|
10
|
+
version: 2.1.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jerome Waibel
|
@@ -16,8 +17,7 @@ autorequire:
|
|
16
17
|
bindir: bin
|
17
18
|
cert_chain: []
|
18
19
|
|
19
|
-
date:
|
20
|
-
default_executable:
|
20
|
+
date: 2011-11-01 00:00:00 Z
|
21
21
|
dependencies: []
|
22
22
|
|
23
23
|
description: This project was a rubyfied version of perl's Net::NTP module, (C) 2004 by James G. Willmore. It provides a method to query an NTP server as specified in RFC1305 and RFC2030. Updated and re-released in 2010 by Zencoder.
|
@@ -37,7 +37,6 @@ files:
|
|
37
37
|
- LICENSE
|
38
38
|
- README.markdown
|
39
39
|
- Rakefile
|
40
|
-
has_rdoc: true
|
41
40
|
homepage: http://github.com/zencoder/net-ntp
|
42
41
|
licenses: []
|
43
42
|
|
@@ -47,25 +46,30 @@ rdoc_options: []
|
|
47
46
|
require_paths:
|
48
47
|
- lib
|
49
48
|
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
+
hash: 3
|
53
54
|
segments:
|
54
55
|
- 0
|
55
56
|
version: "0"
|
56
57
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
57
59
|
requirements:
|
58
60
|
- - ">="
|
59
61
|
- !ruby/object:Gem::Version
|
62
|
+
hash: 3
|
60
63
|
segments:
|
61
64
|
- 0
|
62
65
|
version: "0"
|
63
66
|
requirements: []
|
64
67
|
|
65
68
|
rubyforge_project:
|
66
|
-
rubygems_version: 1.
|
69
|
+
rubygems_version: 1.8.7
|
67
70
|
signing_key:
|
68
71
|
specification_version: 3
|
69
72
|
summary: NTP client for ruby.
|
70
73
|
test_files: []
|
71
74
|
|
75
|
+
has_rdoc:
|