mitamirri 0.13.8 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Capfile +4 -0
- data/Gemfile +29 -0
- data/README.rdoc +6 -55
- data/Rakefile +34 -21
- data/VERSION +1 -1
- data/app/controllers/admin/tracking/reports_controller.rb +78 -0
- data/app/controllers/admin/tracking/trackable_sessions_controller.rb +7 -0
- data/app/controllers/application_controller.rb +1 -8
- data/app/controllers/trackable_actions_controller.rb +0 -2
- data/app/helpers/application_helper.rb +21 -0
- data/app/helpers/layout_helper.rb +18 -0
- data/app/models/content_report.rb +35 -0
- data/app/models/content_stat.rb +4 -0
- data/app/models/destination.rb +4 -0
- data/app/models/intersite_traffic_report.rb +47 -0
- data/app/models/keyword_stat.rb +4 -0
- data/app/models/lead.rb +3 -0
- data/app/models/lead_stat.rb +5 -0
- data/app/models/leads_report.rb +32 -0
- data/app/models/location_stat.rb +37 -0
- data/app/models/referrer_stat.rb +4 -0
- data/app/models/report.rb +83 -0
- data/app/models/stat_base.rb +11 -0
- data/app/models/trackable_action.rb +114 -91
- data/app/models/trackable_base.rb +12 -0
- data/app/models/trackable_location.rb +7 -13
- data/app/models/trackable_session.rb +255 -171
- data/app/models/trackable_stat.rb +45 -27
- data/app/models/traffic_explorer_report.rb +92 -0
- data/app/models/traffic_summary_report.rb +142 -0
- data/app/models/user_agent_stat.rb +4 -0
- data/app/models/visit.rb +6 -0
- data/app/models/visit_stat.rb +5 -0
- data/app/models/visitor.rb +4 -0
- data/app/models/visitor_profile_report.rb +23 -0
- data/app/views/admin/tracking/reports/_content.html.erb +28 -0
- data/app/views/admin/tracking/reports/_conversion_rate.html.erb +30 -0
- data/app/views/admin/tracking/reports/_criteria.html.erb +33 -0
- data/app/views/admin/tracking/reports/_entrance_pages.html.erb +29 -0
- data/app/views/admin/tracking/reports/_exit_pages.html.erb +28 -0
- data/app/views/admin/tracking/reports/_explorer_criteria.html.erb +22 -0
- data/app/views/admin/tracking/reports/_explorer_summary.html.erb +22 -0
- data/app/views/admin/tracking/reports/_intersite_destinations.html.erb +28 -0
- data/app/views/admin/tracking/reports/_intersite_referrals.html.erb +30 -0
- data/app/views/admin/tracking/reports/_leads.html.erb +30 -0
- data/app/views/admin/tracking/reports/_locations.html.erb +47 -0
- data/app/views/admin/tracking/reports/_recent_visits.html.erb +33 -0
- data/app/views/admin/tracking/reports/_referring_keywords.html.erb +28 -0
- data/app/views/admin/tracking/reports/_referring_sites.html.erb +28 -0
- data/app/views/admin/tracking/reports/_traffic_summary.html.erb +26 -0
- data/app/views/admin/tracking/reports/_user_agents.html.erb +28 -0
- data/app/views/{trackable_sessions/_visits_graph.html.erb → admin/tracking/reports/_visits_by_kind.html.erb} +3 -3
- data/app/views/admin/tracking/reports/content.html.erb +12 -0
- data/app/views/admin/tracking/reports/explorer.html.erb +13 -0
- data/app/views/admin/tracking/reports/index.html.erb +16 -0
- data/app/views/admin/tracking/reports/intersite.html.erb +11 -0
- data/app/views/admin/tracking/reports/leads.html.erb +11 -0
- data/app/views/admin/tracking/reports/summary.html.erb +16 -0
- data/app/views/admin/tracking/reports/visitor_profile.html.erb +11 -0
- data/app/views/{trackable_sessions → admin/tracking/trackable_sessions}/show.html.erb +5 -4
- data/app/views/layouts/application.html.erb +51 -18
- data/config.ru +4 -0
- data/config/application.rb +13 -0
- data/config/boot.rb +13 -110
- data/config/cucumber.yml +10 -0
- data/config/deploy.rb +40 -0
- data/config/environment.rb +4 -23
- data/config/environments/development.rb +24 -13
- data/config/environments/production.rb +41 -20
- data/config/environments/test.rb +28 -24
- data/config/initializers/formats.rb +19 -0
- data/config/initializers/metric_fu.rb +9 -0
- data/config/initializers/secret_token.rb +7 -0
- data/config/initializers/session_store.rb +3 -10
- data/config/locales/en.yml +1 -1
- data/config/mongoid.yml +19 -0
- data/config/routes.rb +16 -10
- data/features/access_reports.feature +26 -0
- data/features/step_definitions/reports_steps.rb +9 -0
- data/features/step_definitions/web_steps.rb +219 -0
- data/features/support/env.rb +32 -0
- data/features/support/hooks.rb +1 -0
- data/features/support/paths.rb +33 -0
- data/features/traffic_summary_report.feature +43 -0
- data/init.rb +0 -7
- data/lib/mitamirri.rb +9 -12
- data/lib/mitamirri/engine.rb +7 -0
- data/lib/mitamirri/helper.rb +13 -29
- data/lib/mitamirri/railtie.rb +10 -0
- data/lib/tasks/cucumber.rake +60 -0
- data/lib/tasks/rcov.rake +44 -0
- data/mitamirri.gemspec +228 -100
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/{config/database.yml → public/favicon.ico} +0 -0
- data/public/images/icons/add.png +0 -0
- data/public/images/icons/collapsed.gif +0 -0
- data/public/images/icons/delete.png +0 -0
- data/public/images/icons/drag.png +0 -0
- data/public/images/icons/edit.png +0 -0
- data/public/images/icons/expanded.gif +0 -0
- data/public/images/icons/help_icon.png +0 -0
- data/public/images/icons/link_icon.png +0 -0
- data/public/images/icons/move.png +0 -0
- data/public/images/icons/move_white.png +0 -0
- data/public/images/icons/note.png +0 -0
- data/public/images/icons/note_white.png +0 -0
- data/public/images/icons/notification_icon_sprite.png +0 -0
- data/public/images/icons/spinner.gif +0 -0
- data/public/images/icons/view.png +0 -0
- data/public/images/icons/warning.png +0 -0
- data/public/images/icons/warning_2.png +0 -0
- data/public/images/icons/warning_box.png +0 -0
- data/public/images/icons/warning_icon.png +0 -0
- data/public/images/icons/warning_white.png +0 -0
- data/public/images/layout/arrow_asc.png +0 -0
- data/public/images/layout/arrow_desc.png +0 -0
- data/public/images/layout/back.png +0 -0
- data/public/images/layout/black_bar.png +0 -0
- data/public/images/layout/branding.png +0 -0
- data/public/images/layout/breadcrumb_bg.png +0 -0
- data/public/images/layout/button_bg.png +0 -0
- data/public/images/layout/content_left_bg.png +0 -0
- data/public/images/layout/content_right_bg.png +0 -0
- data/public/images/layout/footer_bg.png +0 -0
- data/public/images/layout/h1_bg.png +0 -0
- data/public/images/layout/h2_bg.png +0 -0
- data/public/images/layout/h2_bg_for_table.png +0 -0
- data/public/images/layout/header_bg_grey.png +0 -0
- data/public/images/layout/header_bg_purple.png +0 -0
- data/public/images/layout/legend_bg.png +0 -0
- data/public/images/layout/menu_box_bg.png +0 -0
- data/public/images/layout/shadow_border.png +0 -0
- data/public/images/layout/shadow_border_2.png +0 -0
- data/public/images/layout/shadow_border_3.png +0 -0
- data/public/images/layout/shadow_border_4.png +0 -0
- data/public/images/layout/tab.png +0 -0
- data/public/images/layout/tab_active.png +0 -0
- data/public/images/layout/table_header.png +0 -0
- data/public/images/layout/text_field_bg.jpg +0 -0
- data/public/images/layout/text_field_error_bg.png +0 -0
- data/public/images/layout/th_bg.png +0 -0
- data/public/images/layout/th_bg_selected.png +0 -0
- data/public/images/menu_icons/content_report.png +0 -0
- data/public/images/menu_icons/content_report_on.png +0 -0
- data/public/images/menu_icons/funnel.png +0 -0
- data/public/images/menu_icons/funnel_on.png +0 -0
- data/public/images/menu_icons/intersite_traffic.png +0 -0
- data/public/images/menu_icons/intersite_traffic_on.png +0 -0
- data/public/images/menu_icons/leads.png +0 -0
- data/public/images/menu_icons/leads_on.png +0 -0
- data/public/images/menu_icons/traffic_explorer.png +0 -0
- data/public/images/menu_icons/traffic_explorer_on.png +0 -0
- data/public/images/menu_icons/traffic_summary.png +0 -0
- data/public/images/menu_icons/traffic_summary_on.png +0 -0
- data/public/images/menu_icons/visitor_profile.png +0 -0
- data/public/images/menu_icons/visitor_profile_on.png +0 -0
- data/public/index.html +8 -0
- data/public/javascripts/application.js +2 -0
- data/public/javascripts/controls.js +965 -0
- data/public/javascripts/dragdrop.js +974 -0
- data/public/javascripts/effects.js +1123 -0
- data/public/javascripts/prototype.js +6001 -0
- data/public/javascripts/rails.js +175 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/.gitkeep +0 -0
- data/public/stylesheets/application.css +876 -0
- data/public/stylesheets/core.css +1146 -0
- data/public/stylesheets/core_ie.css +52 -0
- data/public/stylesheets/csshover3.htc +14 -0
- data/public/stylesheets/mitamirri.css +37 -724
- data/public/stylesheets/mitamirri_print.css +3 -0
- data/script/cucumber +10 -0
- data/script/rails +6 -0
- data/spec/blueprints.rb +13 -0
- data/spec/helpers/application_helper_spec.rb +23 -35
- data/spec/{lib → models}/content_report_spec.rb +12 -8
- data/spec/{lib → models}/intersite_traffic_report_spec.rb +6 -9
- data/spec/{lib → models}/leads_report_spec.rb +11 -12
- data/spec/models/location_stat_spec.rb +18 -0
- data/spec/models/trackable_action_spec.rb +46 -14
- data/spec/models/trackable_base_spec.rb +27 -0
- data/spec/models/trackable_session_spec.rb +181 -57
- data/spec/{lib/session_report_spec.rb → models/traffic_explorer_report_spec.rb} +8 -25
- data/spec/spec_helper.rb +8 -28
- data/{lib/mitamirri/tasks.rb → tasks/mitamirri.rake} +6 -7
- data/vendor/plugins/.gitkeep +0 -0
- metadata +316 -77
- data/.gitignore +0 -26
- data/app/controllers/trackable_sessions_controller.rb +0 -100
- data/app/views/trackable_sessions/_keywords_graph.html.erb +0 -24
- data/app/views/trackable_sessions/_print_buttons.html.erb +0 -3
- data/app/views/trackable_sessions/_sessions.html.erb +0 -26
- data/app/views/trackable_sessions/_top_referrers.html.erb +0 -24
- data/app/views/trackable_sessions/_traffic_summary_all.html.erb +0 -64
- data/app/views/trackable_sessions/_traffic_summary_by_kind.html.erb +0 -48
- data/app/views/trackable_sessions/content.html.erb +0 -119
- data/app/views/trackable_sessions/explorer.html.erb +0 -67
- data/app/views/trackable_sessions/export.xls.erb +0 -5
- data/app/views/trackable_sessions/index.html.erb +0 -47
- data/app/views/trackable_sessions/intersite.html.erb +0 -97
- data/app/views/trackable_sessions/leads.html.erb +0 -98
- data/app/views/trackable_sessions/visitor_profile.html.erb +0 -114
- data/config/initializers/backtrace_silencers.rb +0 -7
- data/config/initializers/database.rb +0 -1
- data/config/initializers/inflections.rb +0 -10
- data/config/initializers/mime_types.rb +0 -5
- data/config/initializers/new_rails_defaults.rb +0 -21
- data/db/development.sqlite3 +0 -0
- data/db/migrate/20100810173533_create_trackable_sessions.rb +0 -23
- data/db/migrate/20100810173605_create_trackable_actions.rb +0 -20
- data/db/test.sqlite3 +0 -1
- data/lib/mitamirri/content_report.rb +0 -75
- data/lib/mitamirri/intersite_traffic_report.rb +0 -122
- data/lib/mitamirri/leads_report.rb +0 -90
- data/lib/mitamirri/session_report.rb +0 -219
- data/lib/mitamirri/stat_report.rb +0 -216
- data/lib/mitamirri/visitor_profile_report.rb +0 -127
- data/script/about +0 -4
- data/script/console +0 -3
- data/script/dbconsole +0 -3
- data/script/destroy +0 -3
- data/script/generate +0 -3
- data/script/performance/benchmarker +0 -3
- data/script/performance/profiler +0 -3
- data/script/plugin +0 -3
- data/script/runner +0 -3
- data/script/server +0 -3
- data/spec/controllers/trackable_actions_controller_spec.rb +0 -5
- data/spec/controllers/trackable_sessions_controller_spec.rb +0 -5
- data/spec/custom_matchers.rb +0 -23
- data/spec/lib/stat_report_spec.rb +0 -106
- data/spec/rcov.opts +0 -4
- data/spec/schema.rb +0 -34
- data/spec/spec.opts +0 -4
@@ -0,0 +1 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../spec/blueprints')
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module NavigationHelpers
|
2
|
+
# Maps a name to a path. Used by the
|
3
|
+
#
|
4
|
+
# When /^I go to (.+)$/ do |page_name|
|
5
|
+
#
|
6
|
+
# step definition in web_steps.rb
|
7
|
+
#
|
8
|
+
def path_to(page_name)
|
9
|
+
case page_name
|
10
|
+
|
11
|
+
when /the home\s?page/
|
12
|
+
'/'
|
13
|
+
|
14
|
+
# Add more mappings here.
|
15
|
+
# Here is an example that pulls values out of the Regexp:
|
16
|
+
#
|
17
|
+
# when /^(.*)'s profile page$/i
|
18
|
+
# user_profile_path(User.find_by_login($1))
|
19
|
+
|
20
|
+
else
|
21
|
+
begin
|
22
|
+
page_name =~ /the (.*) page/
|
23
|
+
path_components = $1.split(/\s+/)
|
24
|
+
self.send(path_components.push('path').join('_').to_sym)
|
25
|
+
rescue Object => e
|
26
|
+
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
|
27
|
+
"Now, go and add a mapping in #{__FILE__}"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
World(NavigationHelpers)
|
@@ -0,0 +1,43 @@
|
|
1
|
+
Feature: Access Traffic Summary Report
|
2
|
+
In order to get an overview of site performance
|
3
|
+
As an admin
|
4
|
+
I want to access the admin_tracking_summary page
|
5
|
+
|
6
|
+
Scenario: Report Configuration for a single site
|
7
|
+
Given I have stats for a site
|
8
|
+
When I go to the admin_tracking_summary page
|
9
|
+
Then I should see "Traffic Summary Report"
|
10
|
+
And I should see "Report Criteria"
|
11
|
+
And I should see "Time Period"
|
12
|
+
|
13
|
+
Scenario: Report Configuration for multiple sites
|
14
|
+
Given I have stats for multiple sites
|
15
|
+
When I go to the admin_tracking_summary page
|
16
|
+
Then I should see "Traffic Summary Report"
|
17
|
+
And I should see "Report Criteria"
|
18
|
+
And I should see "Time Period"
|
19
|
+
And I should see "Site"
|
20
|
+
|
21
|
+
Scenario: Report generated
|
22
|
+
Given I have stats for a site
|
23
|
+
When I go to the admin_tracking_summary page
|
24
|
+
When I press "Generate Report"
|
25
|
+
Then I should see "Traffic Summary"
|
26
|
+
And I should see "Visits by Kind"
|
27
|
+
And I should see "Top Referring Keywords"
|
28
|
+
And I should see "Top Referring Sites"
|
29
|
+
And I should see "Recent Visits"
|
30
|
+
|
31
|
+
Scenario: Traffic Summary populated for a single site
|
32
|
+
Given I have stats for a site
|
33
|
+
When I go to the admin_tracking_summary page
|
34
|
+
When I press "Generate Report"
|
35
|
+
Then I should see "Total Visits"
|
36
|
+
|
37
|
+
Scenario: Traffic Summary populated for multiple sites
|
38
|
+
Given I have stats for multiple sites
|
39
|
+
When I go to the admin_tracking_summary page
|
40
|
+
When I press "Generate Report"
|
41
|
+
Then I should see "Total Visits"
|
42
|
+
And I should see "Total Intersite Clickthroughs"
|
43
|
+
|
data/init.rb
CHANGED
@@ -1,8 +1 @@
|
|
1
1
|
require 'mitamirri'
|
2
|
-
|
3
|
-
ActiveSupport::Dependencies.load_once_paths.delete lib_path
|
4
|
-
ActionView::Base.send :include, Mitamirri::Helper
|
5
|
-
|
6
|
-
if RAILS_ENV == 'development'
|
7
|
-
ActiveSupport::Dependencies.load_once_paths.reject!{|x| x =~ /^#{Regexp.escape(File.dirname(__FILE__))}/}
|
8
|
-
end
|
data/lib/mitamirri.rb
CHANGED
@@ -1,15 +1,12 @@
|
|
1
1
|
module Mitamirri
|
2
|
-
|
3
|
-
require '
|
2
|
+
|
3
|
+
require 'mongoid'
|
4
|
+
require 'mitamirri/engine' if defined?(Rails)
|
5
|
+
require 'mitamirri/railtie' if defined?(Rails)
|
6
|
+
require 'mitamirri/helper'
|
4
7
|
|
5
|
-
|
6
|
-
|
7
|
-
@pdf_output_enabled ||= false
|
8
|
-
begin
|
9
|
-
@pdf_output_enabled = Rails.configuration.middleware.include?('PDFKit::Middleware')
|
10
|
-
rescue
|
11
|
-
end
|
12
|
-
@pdf_output_enabled
|
8
|
+
def self.setup
|
9
|
+
yield self
|
13
10
|
end
|
14
|
-
|
15
|
-
end
|
11
|
+
|
12
|
+
end
|
data/lib/mitamirri/helper.rb
CHANGED
@@ -1,29 +1,13 @@
|
|
1
1
|
module Mitamirri
|
2
|
-
unloadable
|
3
2
|
|
4
3
|
module Helper
|
5
|
-
|
6
|
-
|
7
|
-
# DRY way to return a legend tag that renders correctly in all browsers
|
8
|
-
def legend_tag(text, args={})
|
9
|
-
args[:id] ||= text.downcase.gsub(/ /,'_')
|
10
|
-
if args[:help]
|
11
|
-
_html = %{<div id="#{args[:id]}" class="faux_legend">#{text}<span class="help_icon" onclick="$('#{args[:id]}_help').toggle();">?</span></div>\r}
|
12
|
-
_html << %{<div id="#{args[:id]}_help" class="popup_help" style="display: none;">#{args[:help]}<br /></div>\r}
|
13
|
-
else
|
14
|
-
_html = %{<div id="#{args[:id]}" class="faux_legend">#{text}</div>\r}
|
15
|
-
end
|
16
|
-
_html.gsub!(/ id=""/,'')
|
17
|
-
_html.gsub!(/ class=""/,'')
|
18
|
-
_html
|
19
|
-
end
|
20
|
-
|
4
|
+
|
21
5
|
def page_break
|
22
|
-
%{<div class="page_break" /><p>(Continued on next page)</p></div>}
|
6
|
+
%{<div class="page_break" /><p>(Continued on next page)</p></div>}.html_safe
|
23
7
|
end
|
24
|
-
|
8
|
+
|
25
9
|
def track_action(kind, args={})
|
26
|
-
|
10
|
+
|
27
11
|
action_label = args[:label]
|
28
12
|
action_label ||= kind == 'view' ? 'Page View' : 'Click'
|
29
13
|
destination = args[:destination]
|
@@ -67,16 +51,16 @@ module Mitamirri
|
|
67
51
|
)
|
68
52
|
""
|
69
53
|
elsif kind == 'clickthrough'
|
70
|
-
track_event_code(kind, 'mousedown', elem_id, action_label, referrer, remote_ip, site, url, session_id, destination)
|
54
|
+
track_event_code(kind, 'mousedown', elem_id, action_label, referrer, remote_ip, site, url, session_id, destination).html_safe
|
71
55
|
elsif kind == 'click'
|
72
|
-
track_event_code(kind, 'mousedown', elem_id, action_label, referrer, remote_ip, site, url, session_id)
|
56
|
+
track_event_code(kind, 'mousedown', elem_id, action_label, referrer, remote_ip, site, url, session_id).html_safe
|
73
57
|
elsif kind == 'mouseover'
|
74
|
-
track_event_code(kind, 'mouseover', elem_id, action_label, referrer, remote_ip, site, url, session_id)
|
58
|
+
track_event_code(kind, 'mouseover', elem_id, action_label, referrer, remote_ip, site, url, session_id).html_safe
|
75
59
|
elsif kind == 'scroll'
|
76
|
-
track_window_event_code(kind, 'Scrolled Page', referrer, remote_ip, site, url, session_id)
|
60
|
+
track_window_event_code(kind, action_label || 'Scrolled Page', referrer, remote_ip, site, url, session_id).html_safe
|
77
61
|
end
|
78
62
|
end
|
79
|
-
|
63
|
+
|
80
64
|
def track_event_code(kind, event, elem_id, action_label, referrer, remote_ip, site, url, session_id, destination = nil)
|
81
65
|
%{<script type="text/javascript">
|
82
66
|
Event.observe(window, 'load', function() {
|
@@ -86,7 +70,7 @@ module Mitamirri
|
|
86
70
|
new Ajax.Updater('tracking', '/trackable_actions/', {asynchronous:true, evalScripts:true, parameters:'action=create&kind=#{kind}&label=#{action_label}&referrer=#{referrer}&remote_ip=#{remote_ip}&site=#{site}&url=#{url}&session_id=#{session_id}&destination=#{destination}'})
|
87
71
|
Event.stopObserving('#{elem_id}', '#{event}', track_#{event}_#{elem_id}_event);
|
88
72
|
}
|
89
|
-
</script>}
|
73
|
+
</script>}.html_safe
|
90
74
|
end
|
91
75
|
|
92
76
|
def track_window_event_code(kind, action_label, referrer, remote_ip, site, url, session_id)
|
@@ -98,9 +82,9 @@ module Mitamirri
|
|
98
82
|
new Ajax.Updater('tracking', '/trackable_actions/', {asynchronous:true, evalScripts:true, parameters:'action=create&kind=#{kind}&label=#{action_label}&referrer=#{referrer}&remote_ip=#{remote_ip}&site=#{site}&url=#{url}&session_id=#{session_id}'});
|
99
83
|
Event.stopObserving(window, '#{kind}', track_window_action);
|
100
84
|
}
|
101
|
-
</script>}
|
85
|
+
</script>}.html_safe
|
102
86
|
end
|
103
|
-
|
87
|
+
|
104
88
|
end
|
105
89
|
|
106
|
-
end
|
90
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
2
|
+
# It is recommended to regenerate this file in the future when you upgrade to a
|
3
|
+
# newer version of cucumber-rails. Consider adding your own code to a new file
|
4
|
+
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
5
|
+
# files.
|
6
|
+
|
7
|
+
|
8
|
+
unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
|
9
|
+
|
10
|
+
vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
|
11
|
+
$LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
|
12
|
+
|
13
|
+
begin
|
14
|
+
require 'cucumber/rake/task'
|
15
|
+
|
16
|
+
namespace :cucumber do
|
17
|
+
Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
|
18
|
+
t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
|
19
|
+
t.fork = true # You may get faster startup if you set this to false
|
20
|
+
t.profile = 'default'
|
21
|
+
end
|
22
|
+
|
23
|
+
Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
|
24
|
+
t.binary = vendored_cucumber_bin
|
25
|
+
t.fork = true # You may get faster startup if you set this to false
|
26
|
+
t.profile = 'wip'
|
27
|
+
end
|
28
|
+
|
29
|
+
Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t|
|
30
|
+
t.binary = vendored_cucumber_bin
|
31
|
+
t.fork = true # You may get faster startup if you set this to false
|
32
|
+
t.profile = 'rerun'
|
33
|
+
end
|
34
|
+
|
35
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
36
|
+
t.cucumber_opts = "--format pretty"
|
37
|
+
t.rcov = true
|
38
|
+
end
|
39
|
+
|
40
|
+
task :features => 'db:test:prepare'
|
41
|
+
|
42
|
+
desc 'Run all features'
|
43
|
+
task :all => [:ok, :wip]
|
44
|
+
end
|
45
|
+
desc 'Alias for cucumber:ok'
|
46
|
+
task :cucumber => 'cucumber:ok'
|
47
|
+
|
48
|
+
task :default => :cucumber
|
49
|
+
|
50
|
+
task :features => :cucumber do
|
51
|
+
STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
|
52
|
+
end
|
53
|
+
rescue LoadError
|
54
|
+
desc 'cucumber rake task not available (cucumber not installed)'
|
55
|
+
task :cucumber do
|
56
|
+
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
data/lib/tasks/rcov.rake
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# Forked to get it working with Rails 3 and RSpec 2
|
2
|
+
#
|
3
|
+
# From http://github.com/jaymcgavren
|
4
|
+
#
|
5
|
+
# Save this as rcov.rake in lib/tasks and use rcov:all =>
|
6
|
+
# to get accurate spec/feature coverage data
|
7
|
+
#
|
8
|
+
# Use rcov:rspec or rcov:cucumber
|
9
|
+
# to get non-aggregated coverage reports for rspec or cucumber separately
|
10
|
+
|
11
|
+
require 'cucumber/rake/task'
|
12
|
+
require "rspec/core/rake_task"
|
13
|
+
|
14
|
+
namespace :rcov do
|
15
|
+
Cucumber::Rake::Task.new(:cucumber_run) do |t|
|
16
|
+
t.rcov = true
|
17
|
+
t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,features\/ --aggregate coverage.data}
|
18
|
+
t.rcov_opts << %[-o "coverage"]
|
19
|
+
end
|
20
|
+
|
21
|
+
RSpec::Core::RakeTask.new(:rspec_run) do |t|
|
22
|
+
t.pattern = 'spec/**/*_spec.rb'
|
23
|
+
t.rcov = true
|
24
|
+
t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/}
|
25
|
+
end
|
26
|
+
|
27
|
+
desc "Run both specs and features to generate aggregated coverage"
|
28
|
+
task :all do |t|
|
29
|
+
rm "coverage.data" if File.exist?("coverage.data")
|
30
|
+
Rake::Task["rcov:cucumber_run"].invoke
|
31
|
+
Rake::Task["rcov:rspec_run"].invoke
|
32
|
+
end
|
33
|
+
|
34
|
+
desc "Run only rspecs"
|
35
|
+
task :rspec do |t|
|
36
|
+
rm "coverage.data" if File.exist?("coverage.data")
|
37
|
+
Rake::Task["rcov:rspec_run"].invoke
|
38
|
+
end
|
39
|
+
|
40
|
+
desc "Run only cucumber"
|
41
|
+
task :cucumber do |t|
|
42
|
+
Rake::Task["rcov:cucumber_run"].invoke
|
43
|
+
end
|
44
|
+
end
|
data/mitamirri.gemspec
CHANGED
@@ -1,125 +1,253 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mitamirri}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "2.0.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date = %q{2011-07-
|
13
|
-
s.description = %q{
|
14
|
-
s.email = %q{
|
11
|
+
s.authors = [%q{Bantik}]
|
12
|
+
s.date = %q{2011-07-27}
|
13
|
+
s.description = %q{Mitamirri is a Rails engine designed to be a drop-in substitute for (or companion to) Google Analytics that enables standard analytics tracking in addition to tracking of custom client-side events.}
|
14
|
+
s.email = %q{rod@seologic.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.rdoc"
|
17
17
|
]
|
18
18
|
s.files = [
|
19
19
|
".document",
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
20
|
+
"Capfile",
|
21
|
+
"Gemfile",
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"app/controllers/admin/tracking/reports_controller.rb",
|
26
|
+
"app/controllers/admin/tracking/trackable_sessions_controller.rb",
|
27
|
+
"app/controllers/application_controller.rb",
|
28
|
+
"app/controllers/trackable_actions_controller.rb",
|
29
|
+
"app/helpers/application_helper.rb",
|
30
|
+
"app/helpers/layout_helper.rb",
|
31
|
+
"app/models/content_report.rb",
|
32
|
+
"app/models/content_stat.rb",
|
33
|
+
"app/models/destination.rb",
|
34
|
+
"app/models/intersite_traffic_report.rb",
|
35
|
+
"app/models/keyword_stat.rb",
|
36
|
+
"app/models/lead.rb",
|
37
|
+
"app/models/lead_stat.rb",
|
38
|
+
"app/models/leads_report.rb",
|
39
|
+
"app/models/location_stat.rb",
|
40
|
+
"app/models/referrer_stat.rb",
|
41
|
+
"app/models/report.rb",
|
42
|
+
"app/models/stat_base.rb",
|
43
|
+
"app/models/trackable_action.rb",
|
44
|
+
"app/models/trackable_base.rb",
|
45
|
+
"app/models/trackable_location.rb",
|
46
|
+
"app/models/trackable_session.rb",
|
47
|
+
"app/models/trackable_stat.rb",
|
48
|
+
"app/models/traffic_explorer_report.rb",
|
49
|
+
"app/models/traffic_summary_report.rb",
|
50
|
+
"app/models/user_agent_stat.rb",
|
51
|
+
"app/models/visit.rb",
|
52
|
+
"app/models/visit_stat.rb",
|
53
|
+
"app/models/visitor.rb",
|
54
|
+
"app/models/visitor_profile_report.rb",
|
55
|
+
"app/views/admin/tracking/reports/_content.html.erb",
|
56
|
+
"app/views/admin/tracking/reports/_conversion_rate.html.erb",
|
57
|
+
"app/views/admin/tracking/reports/_criteria.html.erb",
|
58
|
+
"app/views/admin/tracking/reports/_entrance_pages.html.erb",
|
59
|
+
"app/views/admin/tracking/reports/_exit_pages.html.erb",
|
60
|
+
"app/views/admin/tracking/reports/_explorer_criteria.html.erb",
|
61
|
+
"app/views/admin/tracking/reports/_explorer_summary.html.erb",
|
62
|
+
"app/views/admin/tracking/reports/_intersite_destinations.html.erb",
|
63
|
+
"app/views/admin/tracking/reports/_intersite_referrals.html.erb",
|
64
|
+
"app/views/admin/tracking/reports/_leads.html.erb",
|
65
|
+
"app/views/admin/tracking/reports/_locations.html.erb",
|
66
|
+
"app/views/admin/tracking/reports/_recent_visits.html.erb",
|
67
|
+
"app/views/admin/tracking/reports/_referring_keywords.html.erb",
|
68
|
+
"app/views/admin/tracking/reports/_referring_sites.html.erb",
|
69
|
+
"app/views/admin/tracking/reports/_traffic_summary.html.erb",
|
70
|
+
"app/views/admin/tracking/reports/_user_agents.html.erb",
|
71
|
+
"app/views/admin/tracking/reports/_visits_by_kind.html.erb",
|
72
|
+
"app/views/admin/tracking/reports/content.html.erb",
|
73
|
+
"app/views/admin/tracking/reports/explorer.html.erb",
|
74
|
+
"app/views/admin/tracking/reports/index.html.erb",
|
75
|
+
"app/views/admin/tracking/reports/intersite.html.erb",
|
76
|
+
"app/views/admin/tracking/reports/leads.html.erb",
|
77
|
+
"app/views/admin/tracking/reports/summary.html.erb",
|
78
|
+
"app/views/admin/tracking/reports/visitor_profile.html.erb",
|
79
|
+
"app/views/admin/tracking/trackable_sessions/show.html.erb",
|
80
|
+
"app/views/layouts/application.html.erb",
|
81
|
+
"config.ru",
|
82
|
+
"config/application.rb",
|
83
|
+
"config/boot.rb",
|
84
|
+
"config/cucumber.yml",
|
85
|
+
"config/deploy.rb",
|
86
|
+
"config/environment.rb",
|
87
|
+
"config/environments/development.rb",
|
88
|
+
"config/environments/production.rb",
|
89
|
+
"config/environments/test.rb",
|
90
|
+
"config/initializers/formats.rb",
|
91
|
+
"config/initializers/metric_fu.rb",
|
92
|
+
"config/initializers/secret_token.rb",
|
93
|
+
"config/initializers/session_store.rb",
|
94
|
+
"config/locales/en.yml",
|
95
|
+
"config/mongoid.yml",
|
96
|
+
"config/routes.rb",
|
97
|
+
"features/access_reports.feature",
|
98
|
+
"features/step_definitions/reports_steps.rb",
|
99
|
+
"features/step_definitions/web_steps.rb",
|
100
|
+
"features/support/env.rb",
|
101
|
+
"features/support/hooks.rb",
|
102
|
+
"features/support/paths.rb",
|
103
|
+
"features/traffic_summary_report.feature",
|
104
|
+
"init.rb",
|
105
|
+
"lib/mitamirri.rb",
|
106
|
+
"lib/mitamirri/engine.rb",
|
107
|
+
"lib/mitamirri/helper.rb",
|
108
|
+
"lib/mitamirri/railtie.rb",
|
109
|
+
"lib/tasks/cucumber.rake",
|
110
|
+
"lib/tasks/rcov.rake",
|
111
|
+
"mitamirri.gemspec",
|
112
|
+
"public/404.html",
|
113
|
+
"public/422.html",
|
114
|
+
"public/500.html",
|
115
|
+
"public/favicon.ico",
|
116
|
+
"public/images/icons/add.png",
|
117
|
+
"public/images/icons/collapsed.gif",
|
118
|
+
"public/images/icons/delete.png",
|
119
|
+
"public/images/icons/drag.png",
|
120
|
+
"public/images/icons/edit.png",
|
121
|
+
"public/images/icons/expanded.gif",
|
122
|
+
"public/images/icons/help_icon.png",
|
123
|
+
"public/images/icons/link_icon.png",
|
124
|
+
"public/images/icons/move.png",
|
125
|
+
"public/images/icons/move_white.png",
|
126
|
+
"public/images/icons/note.png",
|
127
|
+
"public/images/icons/note_white.png",
|
128
|
+
"public/images/icons/notification_icon_sprite.png",
|
129
|
+
"public/images/icons/spinner.gif",
|
130
|
+
"public/images/icons/view.png",
|
131
|
+
"public/images/icons/warning.png",
|
132
|
+
"public/images/icons/warning_2.png",
|
133
|
+
"public/images/icons/warning_box.png",
|
134
|
+
"public/images/icons/warning_icon.png",
|
135
|
+
"public/images/icons/warning_white.png",
|
136
|
+
"public/images/layout/arrow_asc.png",
|
137
|
+
"public/images/layout/arrow_desc.png",
|
138
|
+
"public/images/layout/back.png",
|
139
|
+
"public/images/layout/black_bar.png",
|
140
|
+
"public/images/layout/branding.png",
|
141
|
+
"public/images/layout/breadcrumb_bg.png",
|
142
|
+
"public/images/layout/button_bg.png",
|
143
|
+
"public/images/layout/content_left_bg.png",
|
144
|
+
"public/images/layout/content_right_bg.png",
|
145
|
+
"public/images/layout/footer_bg.png",
|
146
|
+
"public/images/layout/h1_bg.png",
|
147
|
+
"public/images/layout/h2_bg.png",
|
148
|
+
"public/images/layout/h2_bg_for_table.png",
|
149
|
+
"public/images/layout/header_bg_grey.png",
|
150
|
+
"public/images/layout/header_bg_purple.png",
|
151
|
+
"public/images/layout/legend_bg.png",
|
152
|
+
"public/images/layout/menu_box_bg.png",
|
153
|
+
"public/images/layout/shadow_border.png",
|
154
|
+
"public/images/layout/shadow_border_2.png",
|
155
|
+
"public/images/layout/shadow_border_3.png",
|
156
|
+
"public/images/layout/shadow_border_4.png",
|
157
|
+
"public/images/layout/tab.png",
|
158
|
+
"public/images/layout/tab_active.png",
|
159
|
+
"public/images/layout/table_header.png",
|
160
|
+
"public/images/layout/text_field_bg.jpg",
|
161
|
+
"public/images/layout/text_field_error_bg.png",
|
162
|
+
"public/images/layout/th_bg.png",
|
163
|
+
"public/images/layout/th_bg_selected.png",
|
164
|
+
"public/images/menu_icons/content_report.png",
|
165
|
+
"public/images/menu_icons/content_report_on.png",
|
166
|
+
"public/images/menu_icons/funnel.png",
|
167
|
+
"public/images/menu_icons/funnel_on.png",
|
168
|
+
"public/images/menu_icons/intersite_traffic.png",
|
169
|
+
"public/images/menu_icons/intersite_traffic_on.png",
|
170
|
+
"public/images/menu_icons/leads.png",
|
171
|
+
"public/images/menu_icons/leads_on.png",
|
172
|
+
"public/images/menu_icons/traffic_explorer.png",
|
173
|
+
"public/images/menu_icons/traffic_explorer_on.png",
|
174
|
+
"public/images/menu_icons/traffic_summary.png",
|
175
|
+
"public/images/menu_icons/traffic_summary_on.png",
|
176
|
+
"public/images/menu_icons/visitor_profile.png",
|
177
|
+
"public/images/menu_icons/visitor_profile_on.png",
|
178
|
+
"public/index.html",
|
179
|
+
"public/javascripts/application.js",
|
180
|
+
"public/javascripts/controls.js",
|
181
|
+
"public/javascripts/dragdrop.js",
|
182
|
+
"public/javascripts/effects.js",
|
183
|
+
"public/javascripts/prototype.js",
|
184
|
+
"public/javascripts/rails.js",
|
185
|
+
"public/robots.txt",
|
186
|
+
"public/stylesheets/.gitkeep",
|
187
|
+
"public/stylesheets/application.css",
|
188
|
+
"public/stylesheets/core.css",
|
189
|
+
"public/stylesheets/core_ie.css",
|
190
|
+
"public/stylesheets/csshover3.htc",
|
191
|
+
"public/stylesheets/mitamirri.css",
|
192
|
+
"public/stylesheets/mitamirri_print.css",
|
193
|
+
"script/cucumber",
|
194
|
+
"script/rails",
|
195
|
+
"spec/blueprints.rb",
|
196
|
+
"spec/helpers/application_helper_spec.rb",
|
197
|
+
"spec/models/content_report_spec.rb",
|
198
|
+
"spec/models/intersite_traffic_report_spec.rb",
|
199
|
+
"spec/models/leads_report_spec.rb",
|
200
|
+
"spec/models/location_stat_spec.rb",
|
201
|
+
"spec/models/trackable_action_spec.rb",
|
202
|
+
"spec/models/trackable_base_spec.rb",
|
203
|
+
"spec/models/trackable_session_spec.rb",
|
204
|
+
"spec/models/traffic_explorer_report_spec.rb",
|
205
|
+
"spec/spec_helper.rb",
|
206
|
+
"tasks/mitamirri.rake",
|
207
|
+
"vendor/plugins/.gitkeep"
|
108
208
|
]
|
109
|
-
s.homepage = %q{http://github.com/
|
110
|
-
s.
|
111
|
-
s.
|
112
|
-
s.
|
113
|
-
s.summary = %q{View and action tracking for Rails 2.x.}
|
209
|
+
s.homepage = %q{http://github.com/ivanoblomov/mitamirri}
|
210
|
+
s.require_paths = [%q{lib}]
|
211
|
+
s.rubygems_version = %q{1.8.5}
|
212
|
+
s.summary = %q{Analytics for Rails 3 applications.}
|
114
213
|
|
115
214
|
if s.respond_to? :specification_version then
|
116
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
117
215
|
s.specification_version = 3
|
118
216
|
|
119
217
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
218
|
+
s.add_runtime_dependency(%q<bantik-user-agent>, [">= 0"])
|
219
|
+
s.add_runtime_dependency(%q<bson_ext>, [">= 0"])
|
220
|
+
s.add_runtime_dependency(%q<geokit>, [">= 0"])
|
221
|
+
s.add_runtime_dependency(%q<mongoid>, [">= 0"])
|
222
|
+
s.add_runtime_dependency(%q<rails>, [">= 3.0.1"])
|
223
|
+
s.add_runtime_dependency(%q<pdfkit>, [">= 0"])
|
224
|
+
s.add_runtime_dependency(%q<scaffold_logic>, [">= 0"])
|
225
|
+
s.add_runtime_dependency(%q<seer>, [">= 0"])
|
226
|
+
s.add_runtime_dependency(%q<SystemTimer>, [">= 0"])
|
227
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
120
228
|
else
|
229
|
+
s.add_dependency(%q<bantik-user-agent>, [">= 0"])
|
230
|
+
s.add_dependency(%q<bson_ext>, [">= 0"])
|
231
|
+
s.add_dependency(%q<geokit>, [">= 0"])
|
232
|
+
s.add_dependency(%q<mongoid>, [">= 0"])
|
233
|
+
s.add_dependency(%q<rails>, [">= 3.0.1"])
|
234
|
+
s.add_dependency(%q<pdfkit>, [">= 0"])
|
235
|
+
s.add_dependency(%q<scaffold_logic>, [">= 0"])
|
236
|
+
s.add_dependency(%q<seer>, [">= 0"])
|
237
|
+
s.add_dependency(%q<SystemTimer>, [">= 0"])
|
238
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
121
239
|
end
|
122
240
|
else
|
241
|
+
s.add_dependency(%q<bantik-user-agent>, [">= 0"])
|
242
|
+
s.add_dependency(%q<bson_ext>, [">= 0"])
|
243
|
+
s.add_dependency(%q<geokit>, [">= 0"])
|
244
|
+
s.add_dependency(%q<mongoid>, [">= 0"])
|
245
|
+
s.add_dependency(%q<rails>, [">= 3.0.1"])
|
246
|
+
s.add_dependency(%q<pdfkit>, [">= 0"])
|
247
|
+
s.add_dependency(%q<scaffold_logic>, [">= 0"])
|
248
|
+
s.add_dependency(%q<seer>, [">= 0"])
|
249
|
+
s.add_dependency(%q<SystemTimer>, [">= 0"])
|
250
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
123
251
|
end
|
124
252
|
end
|
125
253
|
|