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,11 @@
|
|
1
|
+
<%- set_title 'Intersite Report' -%>
|
2
|
+
<%= Seer::init_visualization.html_safe -%>
|
3
|
+
|
4
|
+
<%= render 'criteria' -%>
|
5
|
+
|
6
|
+
<br style="clear: both;" />
|
7
|
+
|
8
|
+
<%- if @report.ready? -%>
|
9
|
+
<%= render 'intersite_referrals' -%>
|
10
|
+
<%= render 'intersite_destinations' -%>
|
11
|
+
<%- end -%>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%- set_title 'Traffic Summary Report' -%>
|
2
|
+
<%= Seer::init_visualization.html_safe -%>
|
3
|
+
|
4
|
+
<%= render 'criteria' -%>
|
5
|
+
|
6
|
+
<br style="clear: both;" />
|
7
|
+
|
8
|
+
<%- if @report.ready? -%>
|
9
|
+
<%= render 'traffic_summary' -%>
|
10
|
+
<%= render 'visits_by_kind' -%>
|
11
|
+
<div class="page_break" /><p>(Continued on next page)</p></div>
|
12
|
+
<%= render 'referring_keywords' -%>
|
13
|
+
<%= render 'referring_sites' -%>
|
14
|
+
<div class="page_break" /><p>(Continued on next page)</p></div>
|
15
|
+
<%= render 'recent_visits' -%>
|
16
|
+
<%- end -%>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%-
|
1
|
+
<%- set_title 'Session Details' -%>
|
2
2
|
|
3
3
|
<fieldset class="form_container">
|
4
4
|
<%= legend_tag "Session Details" -%>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
</fieldset>
|
18
18
|
<fieldset>
|
19
19
|
<label>Date:</label><br />
|
20
|
-
<div class="faux_field"><%=h @trackable_session.created_at.to_s(:
|
20
|
+
<div class="faux_field"><%=h @trackable_session.created_at.to_s(:short_date_time) %></div>
|
21
21
|
</fieldset>
|
22
22
|
</div>
|
23
23
|
<div class="three_column">
|
@@ -73,7 +73,7 @@
|
|
73
73
|
</fieldset>
|
74
74
|
<fieldset>
|
75
75
|
<label>Last Visit:</label><br />
|
76
|
-
<div class="faux_field"><%=h @trackable_session.last_visit_date ? @trackable_session.last_visit_date : "Never" %></div>
|
76
|
+
<div class="faux_field"><%=h @trackable_session.last_visit_date ? @trackable_session.last_visit_date.to_s(:short_date_time) : "Never" %></div>
|
77
77
|
</fieldset>
|
78
78
|
</div>
|
79
79
|
<div class="three_column">
|
@@ -90,9 +90,10 @@
|
|
90
90
|
|
91
91
|
<fieldset class="form_container">
|
92
92
|
<%= legend_tag "User Actions" -%>
|
93
|
+
<br />
|
93
94
|
<table class="standard">
|
94
95
|
<thead>
|
95
|
-
<th>Time</th>
|
96
|
+
<th style="width: 100px;">Time</th>
|
96
97
|
<th>URL</th>
|
97
98
|
<th>Action</th>
|
98
99
|
</thead>
|
@@ -1,20 +1,53 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<title><%= yield(:title) -%></title>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
6
|
+
<meta name="description" content="<%= yield(:meta_description) -%>" />
|
7
|
+
<meta name="keywords" content="<%= yield(:meta_keywords) -%>" />
|
8
|
+
<link rel="canonical" href="<%= request.url -%>" />
|
9
|
+
<link rel="shortcut icon" href="/favicon.ico" />
|
10
|
+
<link href="/stylesheets/core.css" media="all" rel="stylesheet" type="text/css" />
|
11
|
+
<link href="/stylesheets/application.css" media="all" rel="stylesheet" type="text/css" />
|
12
|
+
<link href="/stylesheets/mitamirri.css" media="all" rel="stylesheet" type="text/css" />
|
13
|
+
<link href="/stylesheets/mitamirri_print.css" media="print" rel="stylesheet" type="text/css" />
|
14
|
+
<!--[if IE]>
|
15
|
+
<%= stylesheet_link_tag 'core_ie', :media => :all -%>
|
16
|
+
<![endif]-->
|
17
|
+
<%= javascript_include_tag :defaults %>
|
18
|
+
<%= csrf_meta_tag %>
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<div id="container">
|
22
|
+
<div id="header">
|
23
|
+
<div id="branding"></div>
|
24
|
+
<div id="navigation">
|
25
|
+
<%= breadcrumbs -%>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<div id="page_header">
|
29
|
+
<h1><%= yield(:page_title) -%></h1>
|
30
|
+
</div>
|
31
|
+
<div id="content_area">
|
32
|
+
<div id="washout" style="display:none;"></div>
|
3
33
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
</
|
34
|
+
<%- flash.each do |name, msg| -%>
|
35
|
+
<%- if name == :notice -%>
|
36
|
+
<%= content_tag :div, msg, :id => "flash_#{name}", :class => "flash_#{name}", :style => "display:none;" -%>
|
37
|
+
<script type="text/javascript">
|
38
|
+
$('washout').toggle();
|
39
|
+
$('flash_notice').toggle();
|
40
|
+
<%= visual_effect(:fade, 'flash_notice', :duration => 1.0, :delay => 1.0).html_safe -%>
|
41
|
+
<%= visual_effect(:fade, 'washout', :duration => 1.0, :delay => 1.0).html_safe -%>
|
42
|
+
</script>
|
43
|
+
<%- else -%>
|
44
|
+
<%= content_tag :div, msg, :id => "flash_#{name}", :class => "flash_#{name}" -%>
|
45
|
+
<%- end -%>
|
46
|
+
<%- end -%>
|
47
|
+
<%= yield -%>
|
48
|
+
<br style="clear: both;" />
|
49
|
+
</div>
|
50
|
+
<div id="footer"><p>© <%= Time.zone.now.year -%> SEO Logic. All rights reserved.</p></div>
|
51
|
+
</div>
|
52
|
+
</body>
|
20
53
|
</html>
|
data/config.ru
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require "action_controller/railtie"
|
4
|
+
require "action_mailer/railtie"
|
5
|
+
require "active_resource/railtie"
|
6
|
+
|
7
|
+
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
8
|
+
|
9
|
+
module Mitamirri
|
10
|
+
class Application < Rails::Application
|
11
|
+
config.encoding = "utf-8"
|
12
|
+
end
|
13
|
+
end
|
data/config/boot.rb
CHANGED
@@ -1,110 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
def booted?
|
16
|
-
defined? Rails::Initializer
|
17
|
-
end
|
18
|
-
|
19
|
-
def pick_boot
|
20
|
-
(vendor_rails? ? VendorBoot : GemBoot).new
|
21
|
-
end
|
22
|
-
|
23
|
-
def vendor_rails?
|
24
|
-
File.exist?("#{RAILS_ROOT}/vendor/rails")
|
25
|
-
end
|
26
|
-
|
27
|
-
def preinitialize
|
28
|
-
load(preinitializer_path) if File.exist?(preinitializer_path)
|
29
|
-
end
|
30
|
-
|
31
|
-
def preinitializer_path
|
32
|
-
"#{RAILS_ROOT}/config/preinitializer.rb"
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
class Boot
|
37
|
-
def run
|
38
|
-
load_initializer
|
39
|
-
Rails::Initializer.run(:set_load_path)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
class VendorBoot < Boot
|
44
|
-
def load_initializer
|
45
|
-
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
46
|
-
Rails::Initializer.run(:install_gem_spec_stubs)
|
47
|
-
Rails::GemDependency.add_frozen_gem_path
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
class GemBoot < Boot
|
52
|
-
def load_initializer
|
53
|
-
self.class.load_rubygems
|
54
|
-
load_rails_gem
|
55
|
-
require 'initializer'
|
56
|
-
end
|
57
|
-
|
58
|
-
def load_rails_gem
|
59
|
-
if version = self.class.gem_version
|
60
|
-
gem 'rails', version
|
61
|
-
else
|
62
|
-
gem 'rails'
|
63
|
-
end
|
64
|
-
rescue Gem::LoadError => load_error
|
65
|
-
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
|
66
|
-
exit 1
|
67
|
-
end
|
68
|
-
|
69
|
-
class << self
|
70
|
-
def rubygems_version
|
71
|
-
Gem::RubyGemsVersion rescue nil
|
72
|
-
end
|
73
|
-
|
74
|
-
def gem_version
|
75
|
-
if defined? RAILS_GEM_VERSION
|
76
|
-
RAILS_GEM_VERSION
|
77
|
-
elsif ENV.include?('RAILS_GEM_VERSION')
|
78
|
-
ENV['RAILS_GEM_VERSION']
|
79
|
-
else
|
80
|
-
parse_gem_version(read_environment_rb)
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
def load_rubygems
|
85
|
-
min_version = '1.3.2'
|
86
|
-
require 'rubygems'
|
87
|
-
unless rubygems_version >= min_version
|
88
|
-
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
89
|
-
exit 1
|
90
|
-
end
|
91
|
-
|
92
|
-
rescue LoadError
|
93
|
-
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
94
|
-
exit 1
|
95
|
-
end
|
96
|
-
|
97
|
-
def parse_gem_version(text)
|
98
|
-
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
99
|
-
end
|
100
|
-
|
101
|
-
private
|
102
|
-
def read_environment_rb
|
103
|
-
File.read("#{RAILS_ROOT}/config/environment.rb")
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
# All that for this:
|
110
|
-
Rails.boot!
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
# Set up gems listed in the Gemfile.
|
4
|
+
gemfile = File.expand_path('../../Gemfile', __FILE__)
|
5
|
+
begin
|
6
|
+
ENV['BUNDLE_GEMFILE'] = gemfile
|
7
|
+
require 'bundler'
|
8
|
+
Bundler.setup
|
9
|
+
rescue Bundler::GemNotFound => e
|
10
|
+
STDERR.puts e.message
|
11
|
+
STDERR.puts "Try running `bundle install`."
|
12
|
+
exit!
|
13
|
+
end if File.exist?(gemfile)
|
data/config/cucumber.yml
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
<%
|
2
|
+
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
|
3
|
+
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
|
4
|
+
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip"
|
5
|
+
int_opts = "#{std_opts} -o tmp/feature_results.txt"
|
6
|
+
%>
|
7
|
+
default: <%= std_opts %> features
|
8
|
+
wip: --tags @wip:3 --wip features
|
9
|
+
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
|
10
|
+
integration: <%= int_opts %> features
|
data/config/deploy.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# Deploy this gem to the gem server.
|
2
|
+
#
|
3
|
+
# Usage for a gem already on the gem server:
|
4
|
+
#
|
5
|
+
# cap deploy
|
6
|
+
#
|
7
|
+
# For a new gem:
|
8
|
+
#
|
9
|
+
# cap deploy:new
|
10
|
+
|
11
|
+
# Global Variables =================================================================================
|
12
|
+
default_run_options[:pty] = true
|
13
|
+
role :app, 'jose.seologic.com'
|
14
|
+
set :deploy_to, '/home/containers/rails/system/mitamirri'
|
15
|
+
set :repository, 'git@mir.unfuddle.com:mir/mitamirri.git'
|
16
|
+
set :scm, :git
|
17
|
+
set :use_sudo, false
|
18
|
+
set :user, 'cnewton'
|
19
|
+
|
20
|
+
namespace :deploy do
|
21
|
+
desc "Clone a new gem's repository on the gem server."
|
22
|
+
task :new do
|
23
|
+
run "git clone -q #{repository} #{deploy_to}"
|
24
|
+
end
|
25
|
+
|
26
|
+
task :install do
|
27
|
+
run "cd #{deploy_to}; rm -f Gemfile.lock; sudo bundle; sudo rake install"
|
28
|
+
end
|
29
|
+
|
30
|
+
# disable default behavior
|
31
|
+
task :restart do
|
32
|
+
end
|
33
|
+
|
34
|
+
task :update do
|
35
|
+
run "cd #{deploy_to}; git pull origin master"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
after 'deploy', 'deploy:install'
|
40
|
+
after 'deploy:new', 'deploy:install'
|
data/config/environment.rb
CHANGED
@@ -1,24 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# Load the rails application
|
2
|
+
require File.expand_path('../application', __FILE__)
|
2
3
|
|
3
|
-
#
|
4
|
-
|
5
|
-
|
6
|
-
# Bootstrap the Rails environment, frameworks, and default configuration
|
7
|
-
require File.join(File.dirname(__FILE__), 'boot')
|
8
|
-
|
9
|
-
Rails::Initializer.run do |config|
|
10
|
-
config.frameworks -= [:active_record]
|
11
|
-
config.gem 'mitamirri'
|
12
|
-
config.gem 'mongo_mapper'
|
13
|
-
config.time_zone = 'Central Time (US & Canada)'
|
14
|
-
config.action_controller.session = {
|
15
|
-
:session_key => '_seologic_session',
|
16
|
-
:secret => 'be43561c9a1980a7230fd9530aed9f4d1a29f780cd80afc9091180d01d17980308d583f59d3c8d6832c26d92d1c6d5ebc21b9d5565d1e04136b198882d01f303'
|
17
|
-
}
|
18
|
-
# config.action_controller.session_store = :active_record_store
|
19
|
-
end
|
20
|
-
|
21
|
-
if RAILS_ENV == 'test'
|
22
|
-
require 'spec/spec_helper'
|
23
|
-
# require 'spec/blueprints'
|
24
|
-
end
|
4
|
+
# Initialize the rails application
|
5
|
+
Mitamirri::Application.initialize!
|
@@ -1,17 +1,28 @@
|
|
1
|
-
|
1
|
+
Mitamirri::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
2
3
|
|
3
|
-
# In the development environment your application's code is reloaded on
|
4
|
-
# every request. This slows down response time but is perfect for development
|
5
|
-
# since you don't have to restart the webserver when you make code changes.
|
6
|
-
config.cache_classes = false
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the webserver when you make code changes.
|
7
|
+
config.cache_classes = false
|
7
8
|
|
8
|
-
# Log error messages when you accidentally call methods on nil.
|
9
|
-
config.whiny_nils = true
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
10
11
|
|
11
|
-
# Show full error reports and disable caching
|
12
|
-
config.
|
13
|
-
config.action_view.debug_rjs
|
14
|
-
config.action_controller.perform_caching
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_view.debug_rjs = true
|
15
|
+
config.action_controller.perform_caching = false
|
15
16
|
|
16
|
-
# Don't care if the mailer can't send
|
17
|
-
config.action_mailer.raise_delivery_errors = false
|
17
|
+
# Don't care if the mailer can't send
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
19
|
+
|
20
|
+
# Print deprecation notices to the Rails logger
|
21
|
+
config.active_support.deprecation = :log
|
22
|
+
|
23
|
+
# Only use best-standards-support built into browsers
|
24
|
+
config.action_dispatch.best_standards_support = :builtin
|
25
|
+
|
26
|
+
# Custom settings
|
27
|
+
config.feature_results_path = "#{Rails.root}/tmp/feature_results.txt"
|
28
|
+
end
|
@@ -1,28 +1,49 @@
|
|
1
|
-
|
1
|
+
Mitamirri::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
2
3
|
|
3
|
-
# The production environment is meant for finished, "live" apps.
|
4
|
-
# Code is not reloaded between requests
|
5
|
-
config.cache_classes = true
|
4
|
+
# The production environment is meant for finished, "live" apps.
|
5
|
+
# Code is not reloaded between requests
|
6
|
+
config.cache_classes = true
|
6
7
|
|
7
|
-
# Full error reports are disabled and caching is turned on
|
8
|
-
config.
|
9
|
-
config.action_controller.perform_caching
|
10
|
-
config.action_view.cache_template_loading = true
|
8
|
+
# Full error reports are disabled and caching is turned on
|
9
|
+
config.consider_all_requests_local = false
|
10
|
+
config.action_controller.perform_caching = true
|
11
11
|
|
12
|
-
#
|
13
|
-
|
12
|
+
# Specifies the header that your server uses for sending files
|
13
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
14
|
|
15
|
-
#
|
16
|
-
# config.
|
15
|
+
# For nginx:
|
16
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
17
|
|
18
|
-
#
|
19
|
-
#
|
18
|
+
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
+
# just comment this out and Rails will serve the files
|
20
20
|
|
21
|
-
#
|
22
|
-
# config.
|
21
|
+
# See everything in the log (default is :info)
|
22
|
+
# config.log_level = :debug
|
23
23
|
|
24
|
-
#
|
25
|
-
# config.
|
24
|
+
# Use a different logger for distributed setups
|
25
|
+
# config.logger = SyslogLogger.new
|
26
26
|
|
27
|
-
#
|
28
|
-
# config.
|
27
|
+
# Use a different cache store in production
|
28
|
+
# config.cache_store = :mem_cache_store
|
29
|
+
|
30
|
+
# Disable Rails's static asset server
|
31
|
+
# In production, Apache or nginx will already do this
|
32
|
+
config.serve_static_assets = false
|
33
|
+
|
34
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
+
|
37
|
+
# Disable delivery errors, bad email addresses will be ignored
|
38
|
+
# config.action_mailer.raise_delivery_errors = false
|
39
|
+
|
40
|
+
# Enable threaded mode
|
41
|
+
# config.threadsafe!
|
42
|
+
|
43
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
44
|
+
# the I18n.default_locale when a translation can not be found)
|
45
|
+
config.i18n.fallbacks = true
|
46
|
+
|
47
|
+
# Send deprecation notices to registered listeners
|
48
|
+
config.active_support.deprecation = :notify
|
49
|
+
end
|