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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92ce0970f6a065421cf5620447554a5bdebe84fc803a4c440123528179b419ca
4
- data.tar.gz: 11a1d24d5f9c62a7abb24dfd3b18d8da37d90c7144e0a488c8a02c0ea6d8f5c1
3
+ metadata.gz: bbb53df4325b74af8acdd3e5471fb0c8ea0bd80c97dadf96718c592b206a77c9
4
+ data.tar.gz: cc4d42fb1bd3c5bd2f678dc0c702cd0a49790d515cce26d1f5ec877187dbab2c
5
5
  SHA512:
6
- metadata.gz: f98b5c85552df0ed4976379f2ad6a480693c1194994f0128600a8953b561834784c4a9dca3f373d443ff67dd9e56a24865b176b59b8f9b6ee43d5988a2ecd418
7
- data.tar.gz: eed74d9307fd594115302f09e4aec535fcf5b17ee1e7cd0878737c917073f46bc252df9dcc22667009a50c0d57395f22424e363b6ef9b2e4e2f0448e649ff2fa
6
+ metadata.gz: eb57662167dd1745abccaa36c59ae7ddc59fbd31126aa1178d9f8df258e995c3e401452fea4d4891400674ad62209a0c6f10a21ef46420d78fa6d9a117de2c08
7
+ data.tar.gz: 81bc079f3fad916e5ea915ecf2fd3ff33858e44508dc6842556c8d30a684f2c9abe76eed2b69183aa7a5265a6dcc05f1e337c59f3ec7b75423b02cc095befaa8
data/changelog.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.1.0
4
+
5
+ - Merged #63: Allow URI overrides
6
+ - Fixed #40: Added minimum supported Ruby version
7
+
3
8
  ## 5.0.0
4
9
 
5
10
  - Removed parallel option in favor of having no runtime dependencies (fixes #58)
data/development.md CHANGED
@@ -10,4 +10,4 @@
10
10
  - Verify specs pass
11
11
  - Run manual tests `lib/mixpanel/manual_test/basic.rb`
12
12
  - Run `rake build` to build the gem into the pkg directory
13
- - Run `rake release[remote]` to build and release to rubygems
13
+ - Run `rake release` to build and release to rubygems
@@ -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 = config[:api_secret]
38
- @timeout = config[:timeout] || nil
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
@@ -10,6 +10,6 @@ module Mixpanel
10
10
  # Return metrics from Mixpanel Data API
11
11
  class Client
12
12
  # Mixpanel::Client library version
13
- VERSION = '5.0.0'.freeze
13
+ VERSION = '5.1.0'.freeze
14
14
  end
15
15
  end
@@ -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 # Default is 60 seconds, increase if you get frequent Net::ReadTimeout errors.
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.0.0
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: '0'
184
+ version: 2.4.0
185
185
  required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  requirements:
187
187
  - - ">="