mixpanel_client 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -26,6 +26,7 @@ or if you use a Gemfile
26
26
  event '["test-event"]'
27
27
  name 'hello'
28
28
  values '["uno", "dos"]'
29
+ timezone '-8'
29
30
  type 'general'
30
31
  unit 'hour'
31
32
  interval 24
@@ -40,8 +41,43 @@ or if you use a Gemfile
40
41
 
41
42
  puts data.inspect
42
43
 
44
+ ## Development
45
+ List of rake tasks.
46
+
47
+ rake -T
48
+
49
+ Run specs.
50
+
51
+ rake spec
52
+
53
+ Run external specs.
54
+
55
+ cp config/mixpanel.template.yml config/mixpanel.yml
56
+ vi config/mixpanel.yml
57
+ rake spec:externals
58
+
59
+ ## Pushing Gem
60
+ Update version
61
+
62
+ vi lib/mixpanel/version.rb
63
+
64
+ Commit and push local changes
65
+
66
+ git commit -am "Some message."
67
+ git push
68
+ git status
69
+
70
+ Create tag v2.0.2 and build and push mixpanel_client-2.0.2.gem to Rubygems
71
+
72
+ rake release
73
+
74
+
43
75
  ## Changelog
44
76
 
77
+ ### 2.0.2
78
+ * Added timezone to available options.
79
+ * All exceptions can be caught under Mixpanel::Error.
80
+
45
81
  ### 2.0.1
46
82
  * Added options used in segmentation resources.
47
83
 
@@ -67,6 +103,9 @@ or if you use a Gemfile
67
103
 
68
104
  ## Collaborators and Maintainers
69
105
  [Keolo Keagy](http://github.com/keolo) (Author)
106
+ [Jason Logsdon](https://github.com/jasonlogsdon)
107
+ [James R](https://github.com/Cev)
108
+ [Mike Ferrier](http://github.com/mferrier)
70
109
  [Mike Ferrier](http://github.com/mferrier)
71
110
  [Grzegorz Forysinski](http://github.com/railwaymen)
72
111
  [Nathan Chong](http://github.com/paramaw)
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
- require 'metric_fu'
4
3
 
5
4
  require 'bundler'
6
5
  Bundler::GemHelper.install_tasks
@@ -27,7 +26,7 @@ end
27
26
  task :spec
28
27
  task :default => :spec
29
28
 
30
- require 'rake/rdoctask'
29
+ require 'rdoc/task'
31
30
  Rake::RDocTask.new do |rdoc|
32
31
  version = File.exist?('VERSION') ? File.read('VERSION') : ''
33
32
  rdoc.rdoc_dir = 'rdoc'
@@ -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 = '2.0.2'
13
+ VERSION = '2.1.0'
14
14
  end
15
15
  end
@@ -0,0 +1,17 @@
1
+ require 'rubygems'
2
+ require 'lib/mixpanel_client'
3
+ require 'yaml'
4
+
5
+ config = YAML.load_file(File.dirname(__FILE__) + '/../config/mixpanel.yml')['mixpanel']
6
+
7
+ client = Mixpanel::Client.new(config)
8
+
9
+ data = client.request do
10
+ resource 'events/properties'
11
+ event '["test-event"]'
12
+ type 'general'
13
+ unit 'hour'
14
+ name 'test'
15
+ end
16
+
17
+ puts data.inspect
@@ -19,8 +19,10 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ['lib']
21
21
 
22
- s.add_runtime_dependency('json', '~> 1.5.1') if RUBY_VERSION < '1.9'
23
- s.add_development_dependency('rspec', '>=2.5.0')
24
- s.add_development_dependency('webmock', '>=1.6.2')
25
- s.add_development_dependency('metric_fu', '>=2.1.1')
22
+ s.add_runtime_dependency('json', '~> 1.6') if RUBY_VERSION < '1.9'
23
+ s.add_development_dependency('bundler', '>=2.5.0')
24
+ s.add_development_dependency('rake', '>=0.9.2.2')
25
+ s.add_development_dependency('rdoc', '>=3.11')
26
+ s.add_development_dependency('rspec', '>=2.5.0')
27
+ s.add_development_dependency('webmock', '>=1.6.2')
26
28
  end
@@ -4,7 +4,7 @@ WebMock.allow_net_connect!
4
4
 
5
5
  describe 'External calls to mixpanel' do
6
6
  before :all do
7
- config = YAML.load_file(File.dirname(__FILE__) + '/../../config/mixpanel.yml')
7
+ config = YAML.load_file(File.dirname(__FILE__) + '/../../config/mixpanel.yml')['mixpanel']
8
8
  config.should_not be_nil
9
9
  @client = Mixpanel::Client.new(config)
10
10
  end
@@ -4,7 +4,7 @@ WebMock.allow_net_connect!
4
4
 
5
5
  describe 'External calls to mixpanel' do
6
6
  before :all do
7
- config = YAML.load_file(File.dirname(__FILE__) + '/../../config/mixpanel.yml')
7
+ config = YAML.load_file(File.dirname(__FILE__) + '/../../config/mixpanel.yml')['mixpanel']
8
8
  config.should_not be_nil
9
9
  @client = Mixpanel::Client.new(config)
10
10
  end
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
+ - 1
8
9
  - 0
9
- - 2
10
- version: 2.0.2
10
+ version: 2.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Keolo Keagy
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-22 00:00:00 -08:00
19
- default_executable:
18
+ date: 2012-01-11 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: json
@@ -26,16 +25,15 @@ dependencies:
26
25
  requirements:
27
26
  - - ~>
28
27
  - !ruby/object:Gem::Version
29
- hash: 1
28
+ hash: 3
30
29
  segments:
31
30
  - 1
32
- - 5
33
- - 1
34
- version: 1.5.1
31
+ - 6
32
+ version: "1.6"
35
33
  type: :runtime
36
34
  version_requirements: *id001
37
35
  - !ruby/object:Gem::Dependency
38
- name: rspec
36
+ name: bundler
39
37
  prerelease: false
40
38
  requirement: &id002 !ruby/object:Gem::Requirement
41
39
  none: false
@@ -51,7 +49,7 @@ dependencies:
51
49
  type: :development
52
50
  version_requirements: *id002
53
51
  - !ruby/object:Gem::Dependency
54
- name: webmock
52
+ name: rake
55
53
  prerelease: false
56
54
  requirement: &id003 !ruby/object:Gem::Requirement
57
55
  none: false
@@ -60,28 +58,60 @@ dependencies:
60
58
  - !ruby/object:Gem::Version
61
59
  hash: 11
62
60
  segments:
63
- - 1
64
- - 6
61
+ - 0
62
+ - 9
65
63
  - 2
66
- version: 1.6.2
64
+ - 2
65
+ version: 0.9.2.2
67
66
  type: :development
68
67
  version_requirements: *id003
69
68
  - !ruby/object:Gem::Dependency
70
- name: metric_fu
69
+ name: rdoc
71
70
  prerelease: false
72
71
  requirement: &id004 !ruby/object:Gem::Requirement
73
72
  none: false
74
73
  requirements:
75
74
  - - ">="
76
75
  - !ruby/object:Gem::Version
77
- hash: 9
76
+ hash: 17
77
+ segments:
78
+ - 3
79
+ - 11
80
+ version: "3.11"
81
+ type: :development
82
+ version_requirements: *id004
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ prerelease: false
86
+ requirement: &id005 !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 27
78
92
  segments:
79
93
  - 2
94
+ - 5
95
+ - 0
96
+ version: 2.5.0
97
+ type: :development
98
+ version_requirements: *id005
99
+ - !ruby/object:Gem::Dependency
100
+ name: webmock
101
+ prerelease: false
102
+ requirement: &id006 !ruby/object:Gem::Requirement
103
+ none: false
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ hash: 11
108
+ segments:
80
109
  - 1
81
- - 1
82
- version: 2.1.1
110
+ - 6
111
+ - 2
112
+ version: 1.6.2
83
113
  type: :development
84
- version_requirements: *id004
114
+ version_requirements: *id006
85
115
  description: Simple ruby client interface to the Mixpanel API.
86
116
  email:
87
117
  - keolo@dreampointmedia.com
@@ -106,13 +136,13 @@ files:
106
136
  - lib/mixpanel/utils.rb
107
137
  - lib/mixpanel/version.rb
108
138
  - lib/mixpanel_client.rb
139
+ - manual_test/basic.rb
109
140
  - mixpanel_client.gemspec
110
141
  - spec/mixpanel_client/events_externalspec.rb
111
142
  - spec/mixpanel_client/mixpanel_client_spec.rb
112
143
  - spec/mixpanel_client/properties_externalspec.rb
113
144
  - spec/mixpanel_client/uri_spec.rb
114
145
  - spec/spec_helper.rb
115
- has_rdoc: true
116
146
  homepage: http://github.com/keolo/mixpanel_client
117
147
  licenses: []
118
148
 
@@ -142,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
172
  requirements: []
143
173
 
144
174
  rubyforge_project: mixpanel_client
145
- rubygems_version: 1.6.2
175
+ rubygems_version: 1.8.10
146
176
  signing_key:
147
177
  specification_version: 3
148
178
  summary: Ruby Mixpanel API Client Library