module Mixpanel
Constants
- VERSION
Public Class Methods
config_http(&block)
click to toggle source
This method exists for backwards compatibility. The preferred way to customize or configure the HTTP library of a consumer is to override Consumer#request
.
Ruby's default SSL does not verify the server certificate. To verify a certificate, or install a proxy, pass a block to Mixpanel.config_http
that configures the Net::HTTP object. For example, if running in Ubuntu Linux, you can run
Mixpanel.config_http do |http| http.ca_path = '/etc/ssl/certs' http.ca_file = '/etc/ssl/certs/ca-certificates.crt' http.verify_mode = OpenSSL::SSL::VERIFY_PEER end
Mixpanel Consumer
and BufferedConsumer
will call your block to configure their connections
# File lib/mixpanel-ruby/consumer.rb, line 25 def self.config_http(&block) @@init_http = block end
Private Class Methods
with_http(http)
click to toggle source
# File lib/mixpanel-ruby/consumer.rb, line 250 def self.with_http(http) if @@init_http @@init_http.call(http) end end