analytics-ruby 2.0.10 → 2.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e430890915d90c82052105e582431ba62067cbfa
4
- data.tar.gz: b3782718a7fbec2d90f72e784ad1264071515da1
3
+ metadata.gz: 89903da9c69bfb8793fae1cc2d3f71a5c5460595
4
+ data.tar.gz: 6a32ed10572a2562d68126bdc49ef867fbaeaac7
5
5
  SHA512:
6
- metadata.gz: 737d33e0e8f8d0cd73efb388707be29f37fa9caa54ee5197bfc7d6e13432ae63732eb2b4a5deadf7bbf488556c55a17d912d4497f12dfd7572c5294c12712e4c
7
- data.tar.gz: 8389f2bf8bcdd48a3f157adba8b15bf84374353d4e202c99f33d6ccd8c0bb1f30f56cec3af4f42518346277909b54185f4dfb6a89234fe9f61aafb620f3f0f43
6
+ metadata.gz: 8bf7c755ae6365ad1b69fad8a35cd111f61389de094b8d0f3b16a4758816f0f1b2c53518ba26b6071a39bbed9ebb9c8a72478496efc6921534af26ffb208c3ad
7
+ data.tar.gz: 88473d554d87d57b45a206971c66246b6193a3634ef06d913c81a54c08da1c1a1cd94fa81816001475ae1b6bc6fa09d602b3fb002921b10507a9cf317da119d5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- analytics-ruby (2.0.9)
4
+ analytics-ruby (2.0.10)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/History.md CHANGED
@@ -1,3 +1,7 @@
1
+ 2.0.11 / 2014-09-22
2
+ ==================
3
+
4
+ * fix: don't clear batch if request failed
1
5
 
2
6
  2.0.10 / 2014-09-22
3
7
  ==================
@@ -11,7 +15,7 @@
11
15
 
12
16
  2.0.8 / 2014-09-11
13
17
  ==================
14
- * fix: add 3 ms to timestamp
18
+ * fix: add 3 ms to timestamp
15
19
 
16
20
  2.0.7 / 2014-08-27
17
21
  ==================
@@ -1,5 +1,5 @@
1
1
  module Segment
2
2
  class Analytics
3
- VERSION = '2.0.10'
3
+ VERSION = '2.0.11'
4
4
  end
5
5
  end
@@ -43,9 +43,12 @@ module Segment
43
43
  end
44
44
 
45
45
  res = Request.new.post @write_key, @batch
46
- @on_error.call res.status, res.error unless res.status == 200
47
46
 
48
- @lock.synchronize { @batch.clear }
47
+ if res.status == 200
48
+ @lock.synchronize { @batch.clear }
49
+ else
50
+ @on_error.call res.status, res.error unless res.status == 200
51
+ end
49
52
  end
50
53
  end
51
54
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: analytics-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Segment.io
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-23 00:00:00.000000000 Z
11
+ date: 2014-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake