mixpanel 4.0.7 → 4.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -68,7 +68,11 @@ module Mixpanel
68
68
  end
69
69
 
70
70
  def parse_response(response)
71
- response.body.to_i == 1
71
+ if response.respond_to?(:body)
72
+ response.body.to_i == 1
73
+ else
74
+ response.to_i == 1
75
+ end
72
76
  end
73
77
 
74
78
  def send_async(url, data)
@@ -2,7 +2,7 @@ files = ['README.md', 'LICENSE', 'Rakefile', 'mixpanel.gemspec', '{spec,lib}/**/
2
2
 
3
3
  spec = Gem::Specification.new do |s|
4
4
  s.name = "mixpanel"
5
- s.version = "4.0.7"
5
+ s.version = "4.0.8"
6
6
  s.rubyforge_project = "mixpanel"
7
7
  s.description = "Simple lib to track events in Mixpanel service. It can be used in any rack based framework."
8
8
  s.author = "Alvaro Gil"
@@ -29,6 +29,10 @@ describe Mixpanel::Tracker do
29
29
  it "should track events with properties" do
30
30
  @mixpanel.track('Sign up', { :likeable => true }, { :api_key => 'asdf' }).should == true
31
31
  end
32
+
33
+ it "should track simple events with async" do
34
+ @mixpanel.track("Sign up", {}, :async => true).should == true
35
+ end
32
36
  end
33
37
 
34
38
  context "Tracking pixel" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixpanel
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.7
4
+ version: 4.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-06 00:00:00.000000000 Z
12
+ date: 2013-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json