fozzie 1.0.0 → 1.0.1
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.
- data/lib/fozzie/adapter/statsd.rb +10 -1
- data/lib/fozzie/version.rb +1 -1
- metadata +5 -5
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'socket'
|
2
|
+
require 'resolv'
|
2
3
|
|
3
4
|
module Fozzie
|
4
5
|
module Adapter
|
@@ -59,7 +60,7 @@ module Fozzie
|
|
59
60
|
def send_to_socket(message)
|
60
61
|
Fozzie.logger.debug {"Statsd: #{message}"} if Fozzie.logger
|
61
62
|
Timeout.timeout(Fozzie.c.timeout) {
|
62
|
-
res = socket.send(message, 0,
|
63
|
+
res = socket.send(message, 0, host_ip, host_port)
|
63
64
|
Fozzie.logger.debug {"Statsd sent: #{res}"} if Fozzie.logger
|
64
65
|
(res.to_i == message.length)
|
65
66
|
}
|
@@ -73,6 +74,14 @@ module Fozzie
|
|
73
74
|
@socket ||= ::UDPSocket.new
|
74
75
|
end
|
75
76
|
|
77
|
+
def host_ip
|
78
|
+
@host_ip ||= Resolv.getaddress(Fozzie.c.host)
|
79
|
+
end
|
80
|
+
|
81
|
+
def host_port
|
82
|
+
@host_port ||= Fozzie.c.port
|
83
|
+
end
|
84
|
+
|
76
85
|
def delimeter
|
77
86
|
DELIMETER
|
78
87
|
end
|
data/lib/fozzie/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fozzie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-05-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sys-uname
|
@@ -215,7 +215,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
215
|
version: '0'
|
216
216
|
segments:
|
217
217
|
- 0
|
218
|
-
hash:
|
218
|
+
hash: -232887715390431794
|
219
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
220
|
none: false
|
221
221
|
requirements:
|
@@ -224,10 +224,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
224
|
version: '0'
|
225
225
|
segments:
|
226
226
|
- 0
|
227
|
-
hash:
|
227
|
+
hash: -232887715390431794
|
228
228
|
requirements: []
|
229
229
|
rubyforge_project: fozzie
|
230
|
-
rubygems_version: 1.8.
|
230
|
+
rubygems_version: 1.8.25
|
231
231
|
signing_key:
|
232
232
|
specification_version: 3
|
233
233
|
summary: Ruby gem from Lonely Planet Online to register statistics. Currently supports
|