librato-metrics 2.1.0 → 2.1.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.tar.gz.sig +0 -0
- data/CHANGELOG.md +3 -0
- data/README.md +7 -1
- data/lib/librato/metrics/processor.rb +1 -1
- data/lib/librato/metrics/queue.rb +1 -1
- data/lib/librato/metrics/version.rb +1 -1
- data/spec/unit/metrics/queue_spec.rb +13 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,6 +5,12 @@ Librato Metrics
|
|
5
5
|
|
6
6
|
A convenient Ruby wrapper for the Librato Metrics API.
|
7
7
|
|
8
|
+
---
|
9
|
+
|
10
|
+
**NOTE:** Starting with version 2.1.0 librato-metrics requires a Librato account that [supports tagged metrics](https://www.librato.com/docs/kb/faq/account_questions/tags_or_sources/). If your Librato account doesn't yet support tagged metrics please use the [1.6.1 version](https://rubygems.org/gems/librato-metrics/versions/1.6.1).
|
11
|
+
|
12
|
+
---
|
13
|
+
|
8
14
|
This gem provides granular control for scripting interactions with the Metrics core API. It is well suited for integrations, scripts, workers & background jobs. If you want to submit from a web app, take at look at [librato-rails](https://github.com/librato/librato-rails) and/or [librato-rack](https://github.com/librato/librato-rack).
|
9
15
|
|
10
16
|
## Installation
|
@@ -334,4 +340,4 @@ We also maintain a set of [examples of common uses](https://github.com/librato/l
|
|
334
340
|
|
335
341
|
## Copyright
|
336
342
|
|
337
|
-
Copyright (c) 2011-
|
343
|
+
Copyright (c) 2011-2017 [Librato Inc.](http://librato.com) See LICENSE for details.
|
@@ -301,6 +301,11 @@ module Librato
|
|
301
301
|
subject.add foo: {type: :gauge, value: 121212}
|
302
302
|
expect(subject.empty?).to be false
|
303
303
|
end
|
304
|
+
|
305
|
+
it "returns true when nothing merged" do
|
306
|
+
subject.merge!(Librato::Metrics::Aggregator.new)
|
307
|
+
expect(subject.empty?).to be true
|
308
|
+
end
|
304
309
|
end
|
305
310
|
|
306
311
|
describe "#gauges" do
|
@@ -313,6 +318,14 @@ module Librato
|
|
313
318
|
it "returns [] when no queued gauges" do
|
314
319
|
expect(subject.gauges).to be_empty
|
315
320
|
end
|
321
|
+
|
322
|
+
context "when there are no metrics" do
|
323
|
+
it "it does not persist and returns true" do
|
324
|
+
subject.merge!(Librato::Metrics::Aggregator.new)
|
325
|
+
subject.persister.return_value(false)
|
326
|
+
expect(subject.submit).to be true
|
327
|
+
end
|
328
|
+
end
|
316
329
|
end
|
317
330
|
|
318
331
|
describe "#last_submit_time" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librato-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
alpaTFAzbFM2bDlwNzBQY3BjbCtJY0U0dmVxWm1tS0MKc0dlcGdSY2xDNlVi
|
37
37
|
WmgreVEzYWxYVmdoTTJxc29uQXdJL3JUTm1GSk45a1FuNm5QOStmMVVmL3Fa
|
38
38
|
Rk5jam40TAo5Ymc9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
39
|
-
date: 2017-
|
39
|
+
date: 2017-03-20 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: faraday
|
metadata.gz.sig
CHANGED
Binary file
|