librato-metrics 1.3.1 → 1.3.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.
data.tar.gz.sig CHANGED
Binary file
data/.travis.yml CHANGED
@@ -4,11 +4,15 @@ rvm:
4
4
  - 1.9.2
5
5
  - 1.9.3
6
6
  - 2.0.0
7
- - 2.1.0
7
+ - 2.1.1
8
8
  - jruby-19mode
9
9
  # - rbx
10
10
  - ruby-head
11
11
 
12
12
  matrix:
13
13
  allow_failures:
14
- - rvm: ruby-head
14
+ - rvm: ruby-head
15
+
16
+ branches:
17
+ except:
18
+ - /^v[0-9]/
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## Changelog
2
2
 
3
+ ### Version 1.3.2
4
+ * Fix queue autosubmission to fire if needed after #merge! calls
5
+
3
6
  ### Version 1.3.1
4
7
  * Fix auto-chunking for large measurements sets with a global source
5
8
 
@@ -107,6 +107,7 @@ module Librato
107
107
  end
108
108
  end
109
109
  end
110
+ submit_check
110
111
  self
111
112
  end
112
113
 
@@ -1,5 +1,5 @@
1
1
  module Librato
2
2
  module Metrics
3
- VERSION = "1.3.1"
3
+ VERSION = "1.3.2"
4
4
  end
5
5
  end
@@ -5,11 +5,7 @@ module Librato
5
5
 
6
6
  describe Queue do
7
7
 
8
- let(:client) {
9
- client = Client.new
10
- client.persistence = :test
11
- client
12
- }
8
+ let(:client) { Client.new.tap{ |c| c.persistence = :test } }
13
9
 
14
10
  context "with an autosubmit count" do
15
11
  it "should submit when the max is reached" do
@@ -25,6 +21,19 @@ module Librato
25
21
  vol_queue.add :bar => 2
26
22
  vol_queue.persister.persisted.should be_nil # nothing sent
27
23
  end
24
+
25
+ it 'should submit when merging' do
26
+ queue = Queue.new(:client => client, :autosubmit_count => 5)
27
+ (1..3).each {|i| queue.add "metric_#{i}" => 1 }
28
+
29
+ to_merge = Queue.new(:client => client)
30
+ (1..5).each {|i| to_merge.add "metric_#{i}" => 1 }
31
+
32
+ queue.merge!(to_merge)
33
+
34
+ queue.persister.persisted[:gauges].length.should == 8
35
+ queue.queued.should be_empty
36
+ end
28
37
  end
29
38
 
30
39
  context "with an autosubmit interval" 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: 1.3.1
4
+ version: 1.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -251,7 +251,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
251
251
  version: '0'
252
252
  segments:
253
253
  - 0
254
- hash: -294425092678136572
254
+ hash: -3482606803820656168
255
255
  required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  none: false
257
257
  requirements:
metadata.gz.sig CHANGED
Binary file