Module: Mixpanel
- Defined in:
- lib/mixpanel-ruby/error.rb,
lib/mixpanel-ruby/events.rb,
lib/mixpanel-ruby/groups.rb,
lib/mixpanel-ruby/people.rb,
lib/mixpanel-ruby/tracker.rb,
lib/mixpanel-ruby/version.rb,
lib/mixpanel-ruby/consumer.rb
Defined Under Namespace
Classes: BufferedConsumer, ConnectionError, Consumer, ErrorHandler, Events, Groups, MixpanelError, People, ServerError, Tracker
Constant Summary collapse
- VERSION =
'2.3.0'- @@init_http =
nil
Class Method Summary collapse
-
.config_http(&block) ⇒ Object
This method exists for backwards compatibility.
Class Method Details
.config_http(&block) ⇒ Object
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
25 26 27 |
# File 'lib/mixpanel-ruby/consumer.rb', line 25 def self.config_http(&block) @@init_http = block end |