mixpanel-ruby 2.0.0 → 2.0.1

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: 84920bc74cc457ded903c7d7ca1175b1b72a4bd1
4
- data.tar.gz: d860d1aabfa9cbd03c5b946f2c1ed58d927ff271
3
+ metadata.gz: 286b3bfe7565a25de53140a93d879b403331b87d
4
+ data.tar.gz: b6eed03923e1eee12b21075e5afe48ac4c81807a
5
5
  SHA512:
6
- metadata.gz: fd13c103e5cc9b3f6bd447feb365f8457c3c8b71c1ed0ebdbd019040f15a7f0d1d063b85aa1bfaea57f7c768f6d42711c8aecbf750e7fefe3e3ea1635fe0e099
7
- data.tar.gz: bb93ec5c1594bf5eabae0a8a92252d4049856b5b7bc21cd6443adbe9fcdd7b613e7d855b8c5377f3c93515a4cd69401d68c9586e845b5f3c0faffa043eb5c19d
6
+ metadata.gz: 765115c755470429ef8a93609b2e42578a1cfb762df1474d1e98b0eb3188c869235b2d7e7a4e1569a1aa098fc1211478285434b9e689d3186caa512c5f7b83ad
7
+ data.tar.gz: 4844747e4c68ecaca350d4c720118716014306e803eb5f414bd4a3ed11e701ea474bd7e321bc539e9ea2134186e69fe968263322ac57ff9bb99e3c99cce0be08
@@ -49,6 +49,9 @@ In particular, for Rails apps, the following projects are currently actively mai
49
49
 
50
50
  == Changes
51
51
 
52
+ == 2.0.1
53
+ * Add Deprecated version of Mixpanel::BufferedConsumer#send
54
+
52
55
  == 2.0.0
53
56
  * Raise mixpanel server and connection errors in Mixpanel::Consumer.
54
57
  * All public methods in Mixpanel::Event, Mixpanel::People, and subsequently Mixpanel::Tracker
@@ -216,6 +216,12 @@ module Mixpanel
216
216
  end
217
217
  end
218
218
 
219
+ # This method was deprecated in release 2.0.0, please use send! instead
220
+ def send(type, message)
221
+ warn '[DEPRECATION] send has been deprecated as of release 2.0.0, please use send! instead'
222
+ send!(type, message)
223
+ end
224
+
219
225
  # Pushes all remaining messages in the buffer to Mixpanel.
220
226
  # You should call #flush before your application exits or
221
227
  # messages may not be sent.
@@ -1,3 +1,3 @@
1
1
  module Mixpanel
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
@@ -39,6 +39,13 @@ describe Mixpanel::Consumer do
39
39
  stub_request(:any, 'https://api.mixpanel.com/track').to_return({:status => 401, :body => "nutcakes"})
40
40
  expect { subject.send!(:event, {'data' => 'TEST EVENT MESSAGE'}.to_json) }.to raise_exception('Could not write to Mixpanel, server responded with 401 returning: \'nutcakes\'')
41
41
  end
42
+
43
+ it 'should still respond to send' do
44
+ stub_request(:any, 'https://api.mixpanel.com/track').to_return({:body => '{"status": 1, "error": null}'})
45
+ subject.send(:event, {'data' => 'TEST EVENT MESSAGE'}.to_json)
46
+ expect(WebMock).to have_requested(:post, 'https://api.mixpanel.com/track').
47
+ with(:body => {'data' => 'IlRFU1QgRVZFTlQgTUVTU0FHRSI=', 'verbose' => '1' })
48
+ end
42
49
  end
43
50
 
44
51
  context 'raw consumer' do
@@ -85,6 +92,12 @@ describe Mixpanel::BufferedConsumer do
85
92
  with(:body => {'data' => 'WyJURVNUIEVWRU5UIDEiXQ==', 'verbose' => '1' })
86
93
  end
87
94
 
95
+ it 'should still respond to send' do
96
+ stub_request(:any, 'https://api.mixpanel.com/track').to_return({:body => '{"status": 1, "error": null}'})
97
+ subject.send(:event, {'data' => 'TEST EVENT 1'}.to_json)
98
+ expect(WebMock).to have_not_requested(:post, 'https://api.mixpanel.com/track')
99
+ end
100
+
88
101
  it 'should send one message when max_length events are tracked' do
89
102
  stub_request(:any, 'https://api.mixpanel.com/track').to_return({:body => '{"status": 1, "error": null}'})
90
103
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixpanel-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mixpanel