mixpanel-ruby
mixpanel-ruby copied to clipboard
Fix import to use a block to configure the http post
For discussion, no tests written as yet - the branch is working for my purposes presently
Background
Import is broken. https://github.com/mixpanel/mixpanel-ruby/issues/106
The MixPanel import api requires the API SECRET to be passed in basic authentication
This PR adds a configuration block to the HTTP Post object, so basic_auth can be configured through a block
in host app config/initializers/mixpanel.rb
Mixpanel.config_http_request do |http_request|
http_request.basic_auth "#{ENV['MIXPANEL_API_SECRET']}", ''
end
Hi @jshow, thanks for opening this PR. We can't respond immediately but we'll get back to you after we investigate.
@andrewpurcell that's quite a long investigation you conduct, guys. Really long for a paid service.
@andrewpurcell any change to have a look at this?