zevarito / mixpanel

Simple lib to track events in Mixpanel service. It can be used in any rack based framework.
MIT License
273 stars 84 forks source link

Change out Base64 encoder + JSON building #84

Closed ian closed 11 years ago

ian commented 11 years ago

I was finding that the call to MP was always erroring when trying to hit http://api.mixpanel.com/engage. After peeking at the response in verbose mode, this is what I was getting:

{
  status: 0,
  error: "data, invalid base64 encoding"
}

I found a reference on their end on how they do Base64 and JSON generation here: https://mixpanel.com/docs/integration-libraries/ruby

This is that implementation swapped in for the previous way.

zevarito commented 11 years ago

@ihunter you right about that method should be the one to use, but can you prove it with a test? also build is failing. Thanks!

ian commented 11 years ago

Hrm, sorry. Ran the specs locally and all passed for me.

Will add tests for the 64 encoding.

soorajb commented 11 years ago

I think this issue comes in Ruby 1.9.2.

zevarito commented 11 years ago

Hi folks, I'll close this issue for now.