lookout-statsd 2.0.0 → 2.0.2
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 +4 -4
- data/lib/statsd.rb +5 -0
- data/spec/statsd_spec.rb +8 -3
- data/statsd.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2baad881d1608d20884a5a33b855672ae0847d30
|
4
|
+
data.tar.gz: 7f3f990fd0e4937862df3a2d5b061f5b6c01e09a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b4c0dbf5031e165463694bd94fb11ff6134f6a98648bd0d727764c6ac9f03717af29fdc635f81c77d834f0e48b1a46251898320209fd2c5661a0c6edbeaccb3
|
7
|
+
data.tar.gz: 775570d1c333c71c6500d1826d7194e7c28521d92a398d0fe7df7d55b7b3a9c42bcc554693582b025962111d04d31210741164fcd7ea2ed93b19278c6aede06d
|
data/lib/statsd.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'socket'
|
2
2
|
require 'resolv'
|
3
|
+
require 'forwardable'
|
3
4
|
|
4
5
|
module Statsd
|
5
6
|
# initialize singleton instance in an initializer
|
@@ -82,6 +83,10 @@ module Statsd
|
|
82
83
|
})
|
83
84
|
end
|
84
85
|
|
86
|
+
def send_data(*args)
|
87
|
+
@send_data.call(*args)
|
88
|
+
end
|
89
|
+
|
85
90
|
# Creates and yields a Batch that can be used to batch instrument reports into
|
86
91
|
# larger packets. Batches are sent either when the packet is "full" (defined
|
87
92
|
# by batch_size), or when the block completes, whichever is the sooner.
|
data/spec/statsd_spec.rb
CHANGED
@@ -18,10 +18,15 @@ describe Statsd do
|
|
18
18
|
Statsd.instance.should_not be nil
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
context 'if an instance has been created' do
|
22
|
+
before :each do
|
23
|
+
Statsd.create_instance
|
24
|
+
end
|
25
|
+
it 'should raise if called twice' do
|
26
|
+
expect { Statsd.create_instance }.to raise_error
|
27
|
+
end
|
24
28
|
end
|
29
|
+
|
25
30
|
end
|
26
31
|
|
27
32
|
describe '#instance' do
|
data/statsd.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lookout-statsd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- R. Tyler Croy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-05-
|
13
|
+
date: 2016-05-18 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: A simple ruby statsd client.
|
16
16
|
email:
|
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
51
|
version: 1.3.6
|
52
52
|
requirements: []
|
53
53
|
rubyforge_project:
|
54
|
-
rubygems_version: 2.
|
54
|
+
rubygems_version: 2.5.1
|
55
55
|
signing_key:
|
56
56
|
specification_version: 4
|
57
57
|
summary: Ruby statsd client.
|