reparty 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
data/History.md
CHANGED
@@ -4,6 +4,9 @@
|
|
4
4
|
<td><img src="<%= "http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(person["$properties"]["$email"].downcase)}?s=20&d=mm" %>" /></td>
|
5
5
|
<td align="left">
|
6
6
|
<%= person["$properties"]["$first_name"] %> <%= person["$properties"]["$last_name"] %> (<%= mail_to person["$properties"]["$email"] %>)
|
7
|
+
<% if report.fields.size > 0 %>
|
8
|
+
(<%= report.fields.map{ |field| "#{field} = #{person["$properties"][field]}" }.join(', ') %>)
|
9
|
+
<% end %>
|
7
10
|
</td>
|
8
11
|
</tr>
|
9
12
|
<% end %>
|
@@ -3,7 +3,7 @@ require 'mixpanel_client'
|
|
3
3
|
module Reparty
|
4
4
|
class Report
|
5
5
|
class Mixpanel < Report
|
6
|
-
attr_reader :api_key, :api_secret, :report
|
6
|
+
attr_reader :api_key, :api_secret, :report, :fields
|
7
7
|
|
8
8
|
def initialize(*args, &block)
|
9
9
|
super(args.shift, args.shift)
|
@@ -12,9 +12,12 @@ module Reparty
|
|
12
12
|
@api_secret = args.shift
|
13
13
|
|
14
14
|
@report = args.shift
|
15
|
+
@fields = []
|
15
16
|
case @report
|
16
17
|
when :funnel
|
17
18
|
@funnel_id = args.shift
|
19
|
+
when :engage
|
20
|
+
@fields = args.shift if args.present?
|
18
21
|
end
|
19
22
|
|
20
23
|
@color = "#7548a2"
|
data/lib/reparty/version.rb
CHANGED
@@ -39,11 +39,12 @@ describe Reparty::Report::Mixpanel, vcr: { cassette_name: "mixpanel", match_requ
|
|
39
39
|
describe "engagement report" do
|
40
40
|
subject do
|
41
41
|
Reparty.config do |config|
|
42
|
-
config.add_weekly_report Reparty::Report::Mixpanel, "Mixpanel Funnel", mixpanel_key, mixpanel_secret, :engage
|
42
|
+
config.add_weekly_report Reparty::Report::Mixpanel, "Mixpanel Funnel", mixpanel_key, mixpanel_secret, :engage, ["crm", "pro"]
|
43
43
|
end
|
44
44
|
Reparty.weekly_reports.last
|
45
45
|
end
|
46
46
|
|
47
|
+
its(:fields) { should == ["crm", "pro"] }
|
47
48
|
its("engage_data.size") { should == 54 }
|
48
49
|
end
|
49
50
|
end
|
@@ -42,7 +42,7 @@ describe "reparty:email" do
|
|
42
42
|
].each{|u| User.create!(u) }
|
43
43
|
|
44
44
|
Reparty.config do |config|
|
45
|
-
config.add_report Reparty::Report::Mixpanel, "Mixpanel Engagement", ENV["MIXPANEL_KEY"], ENV["MIXPANEL_SECRET"], :engage
|
45
|
+
config.add_report Reparty::Report::Mixpanel, "Mixpanel Engagement", ENV["MIXPANEL_KEY"], ENV["MIXPANEL_SECRET"], :engage, ["crm", "pro"]
|
46
46
|
config.add_report Reparty::Report::Mixpanel, "Mixpanel Funnel", ENV["MIXPANEL_KEY"], ENV["MIXPANEL_SECRET"], :funnel, ENV["MIXPANEL_FUNNEL"]
|
47
47
|
config.add_report Reparty::Report::ActiveRecord, "New User Signups", :user
|
48
48
|
config.add_report Reparty::Report::Sendgrid, "Sendgrid Emails", ENV["SENDGRID_USER"], ENV["SENDGRID_PASSWORD"]
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: reparty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Tim Dorr
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -312,7 +312,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
312
312
|
- !ruby/object:Gem::Version
|
313
313
|
segments:
|
314
314
|
- 0
|
315
|
-
hash:
|
315
|
+
hash: 24105855279133463
|
316
316
|
version: '0'
|
317
317
|
none: false
|
318
318
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -321,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
321
|
- !ruby/object:Gem::Version
|
322
322
|
segments:
|
323
323
|
- 0
|
324
|
-
hash:
|
324
|
+
hash: 24105855279133463
|
325
325
|
version: '0'
|
326
326
|
none: false
|
327
327
|
requirements: []
|