mixpanel_client 5.0.0 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.md +5 -0
- data/development.md +1 -1
- data/lib/mixpanel/client.rb +8 -5
- data/lib/mixpanel/version.rb +1 -1
- data/mixpanel_client.gemspec +3 -0
- data/readme.md +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbb53df4325b74af8acdd3e5471fb0c8ea0bd80c97dadf96718c592b206a77c9
|
4
|
+
data.tar.gz: cc4d42fb1bd3c5bd2f678dc0c702cd0a49790d515cce26d1f5ec877187dbab2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb57662167dd1745abccaa36c59ae7ddc59fbd31126aa1178d9f8df258e995c3e401452fea4d4891400674ad62209a0c6f10a21ef46420d78fa6d9a117de2c08
|
7
|
+
data.tar.gz: 81bc079f3fad916e5ea915ecf2fd3ff33858e44508dc6842556c8d30a684f2c9abe76eed2b69183aa7a5265a6dcc05f1e337c59f3ec7b75423b02cc095befaa8
|
data/changelog.md
CHANGED
data/development.md
CHANGED
data/lib/mixpanel/client.rb
CHANGED
@@ -18,11 +18,11 @@ module Mixpanel
|
|
18
18
|
|
19
19
|
def self.base_uri_for_resource(resource)
|
20
20
|
if resource == 'export'
|
21
|
-
DATA_URI
|
21
|
+
@@data_uri ? @@data_uri : DATA_URI
|
22
22
|
elsif resource == 'import'
|
23
|
-
IMPORT_URI
|
23
|
+
@@import_uri ? @@import_uri : IMPORT_URI
|
24
24
|
else
|
25
|
-
BASE_URI
|
25
|
+
@@base_uri ? @@base_uri : BASE_URI
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -34,8 +34,11 @@ module Mixpanel
|
|
34
34
|
#
|
35
35
|
# @param [Hash] config consisting of an 'api_secret' and additonal options
|
36
36
|
def initialize(config)
|
37
|
-
@api_secret
|
38
|
-
@timeout
|
37
|
+
@api_secret = config[:api_secret]
|
38
|
+
@timeout = config[:timeout] || nil
|
39
|
+
@@base_uri = config[:base_uri] || nil
|
40
|
+
@@data_uri = config[:data_uri] || nil
|
41
|
+
@@import_uri = config[:import_uri] || nil
|
39
42
|
|
40
43
|
raise ConfigurationError, 'api_secret is required' if @api_secret.nil?
|
41
44
|
end
|
data/lib/mixpanel/version.rb
CHANGED
data/mixpanel_client.gemspec
CHANGED
@@ -19,6 +19,9 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
20
20
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
21
|
s.require_paths = ['lib']
|
22
|
+
|
23
|
+
s.required_ruby_version = ">= 2.4.0"
|
24
|
+
|
22
25
|
s.add_development_dependency('bundler', '~>2.4')
|
23
26
|
s.add_development_dependency('rake', '~>13.0')
|
24
27
|
s.add_development_dependency('rdoc', '~>6.5')
|
data/readme.md
CHANGED
@@ -22,7 +22,12 @@ or if you use a Gemfile
|
|
22
22
|
|
23
23
|
client = Mixpanel::Client.new(
|
24
24
|
api_secret: 'changeme'
|
25
|
-
timeout: 240
|
25
|
+
timeout: 240, # Default is 60 seconds, increase to reduce timeout errors.
|
26
|
+
|
27
|
+
# Optional URI overrides (e.g. https://developer.mixpanel.com/reference/overview)
|
28
|
+
base_uri: 'api-eu.mixpanel.com',
|
29
|
+
data_uri: 'example-data.com',
|
30
|
+
import_uri: 'example-import.com
|
26
31
|
)
|
27
32
|
|
28
33
|
data = client.request(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixpanel_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keolo Keagy
|
@@ -181,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
181
|
requirements:
|
182
182
|
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version:
|
184
|
+
version: 2.4.0
|
185
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
187
|
- - ">="
|