gricer 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +84 -0
- data/Rakefile +49 -0
- data/app/assets/images/gricer/fluid/breadcrumb.png +0 -0
- data/app/assets/javascripts/gricer.js.coffee +85 -0
- data/app/assets/javascripts/gricer_backend_jquery.js.coffee +352 -0
- data/app/assets/javascripts/jquery.flot.js +2599 -0
- data/app/assets/javascripts/jquery.flot.pie.js +750 -0
- data/app/assets/javascripts/jquery.flot.resize.js +60 -0
- data/app/assets/javascripts/jquery.flot.symbol.js +70 -0
- data/app/assets/javascripts/worldmap.js +146 -0
- data/app/assets/stylesheets/gricer/fluid-jquery-ui.css.scss +1298 -0
- data/app/assets/stylesheets/gricer/fluid.css.scss +240 -0
- data/app/assets/stylesheets/gricer/helpers/css3.css.scss +21 -0
- data/app/controllers/gricer/base_controller.rb +141 -0
- data/app/controllers/gricer/capture_controller.rb +42 -0
- data/app/controllers/gricer/dashboard_controller.rb +18 -0
- data/app/controllers/gricer/requests_controller.rb +42 -0
- data/app/controllers/gricer/sessions_controller.rb +24 -0
- data/app/helpers/gricer/base_helper.rb +22 -0
- data/app/models/gricer/agent.rb +789 -0
- data/app/models/gricer/request.rb +239 -0
- data/app/models/gricer/session.rb +433 -0
- data/app/views/gricer/capture/index.html.erb +1 -0
- data/app/views/gricer/dashboard/_menu.html.erb +10 -0
- data/app/views/gricer/dashboard/_overview.html.erb +33 -0
- data/app/views/gricer/dashboard/index.html.erb +19 -0
- data/config/routes.rb +51 -0
- data/lib/gricer.rb +36 -0
- data/lib/gricer/action_controller/base.rb +28 -0
- data/lib/gricer/action_controller/track.rb +132 -0
- data/lib/gricer/active_model/statistics.rb +167 -0
- data/lib/gricer/config.rb +125 -0
- data/lib/gricer/engine.rb +9 -0
- data/lib/gricer/localization.rb +3 -0
- data/lib/tasks/gricer_tasks.rake +92 -0
- data/spec/controllers/gricer/base_controller_spec.rb +207 -0
- data/spec/controllers/gricer/capture_controller_spec.rb +44 -0
- data/spec/controllers/gricer/dashboard_controller_spec.rb +44 -0
- data/spec/controllers/gricer/requests_controller_spec.rb +36 -0
- data/spec/controllers/gricer/sessions_controller_spec.rb +37 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/assets/stylesheets/dashboard.css +4 -0
- data/spec/dummy/app/assets/stylesheets/scaffold.css +56 -0
- data/spec/dummy/app/assets/stylesheets/sessions.css +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +23 -0
- data/spec/dummy/app/controllers/dashboard_controller.rb +19 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/helpers/dashboard_helper.rb +2 -0
- data/spec/dummy/app/views/dashboard/index.html.erb +236 -0
- data/spec/dummy/app/views/layouts/application.html.erb +16 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +48 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/cucumber.yml +9 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +27 -0
- data/spec/dummy/config/environments/production.rb +51 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +12 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +11 -0
- data/spec/dummy/db/schema.rb +241 -0
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/helpers/gricer/base_helper_spec.rb +28 -0
- data/spec/lib/gricer/action_controller/track_spec.rb +63 -0
- data/spec/models/gricer/agent_spec.rb +829 -0
- data/spec/models/gricer/request_spec.rb +145 -0
- data/spec/models/gricer/session_spec.rb +209 -0
- data/spec/routing/capture_routes_spec.rb +6 -0
- data/spec/routing/dashboard_routes_spec.rb +9 -0
- data/spec/routing/requests_routes_spec.rb +90 -0
- data/spec/routing/sessions_routes_spec.rb +115 -0
- data/spec/spec_helper.rb +23 -0
- metadata +185 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag :application %>
|
6
|
+
<%= javascript_include_tag :application %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
<%= gricer_track_tag %>
|
14
|
+
|
15
|
+
</body>
|
16
|
+
</html>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require
|
6
|
+
require "gricer"
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Settings in config/environments/* take precedence over those specified here.
|
11
|
+
# Application configuration should go into files in config/initializers
|
12
|
+
# -- all .rb files in that directory are automatically loaded.
|
13
|
+
|
14
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
15
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
16
|
+
|
17
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
18
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
19
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
20
|
+
|
21
|
+
# Activate observers that should always be running.
|
22
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
23
|
+
|
24
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
25
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
26
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
27
|
+
|
28
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
29
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
30
|
+
# config.i18n.default_locale = :de
|
31
|
+
|
32
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
33
|
+
config.encoding = "utf-8"
|
34
|
+
|
35
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
36
|
+
config.filter_parameters += [:password]
|
37
|
+
|
38
|
+
# Enable the asset pipeline
|
39
|
+
config.assets.enabled = true
|
40
|
+
|
41
|
+
config.generators do |g|
|
42
|
+
g.orm :active_record
|
43
|
+
g.template_engine :erb
|
44
|
+
g.test_framework :rspec, :fixture => false
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%
|
2
|
+
rerun = File.file?('tmp/rerun.txt') ? IO.read('tmp/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 --tags ~@skip"
|
5
|
+
%>
|
6
|
+
default: <%= std_opts %> features
|
7
|
+
wip: --tags @wip:3 --wip --tags ~@skip features
|
8
|
+
rerun: <%= rerun_opts %> --format rerun --out tmp/rerun.txt --strict --tags ~@wip --tags ~@skip
|
9
|
+
mate: --format html --strict --tags ~@wip --tags ~@skip
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
development:
|
7
|
+
adapter: sqlite3
|
8
|
+
database: db/development.sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
# Warning: The database defined as "test" will be erased and
|
13
|
+
# re-generated from your development database when you run "rake".
|
14
|
+
# Do not set this db to the same as development or production.
|
15
|
+
test:
|
16
|
+
adapter: sqlite3
|
17
|
+
database: db/test.sqlite3
|
18
|
+
pool: 5
|
19
|
+
timeout: 5000
|
20
|
+
|
21
|
+
production:
|
22
|
+
adapter: sqlite3
|
23
|
+
database: db/production.sqlite3
|
24
|
+
pool: 5
|
25
|
+
timeout: 5000
|
@@ -0,0 +1,27 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
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 web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
|
25
|
+
# Do not compress assets
|
26
|
+
config.assets.compress = false
|
27
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_assets = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
16
|
+
|
17
|
+
# Specifies the header that your server uses for sending files
|
18
|
+
# (comment out if your front-end server doesn't support this)
|
19
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
|
20
|
+
|
21
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
22
|
+
# config.force_ssl = true
|
23
|
+
|
24
|
+
# See everything in the log (default is :info)
|
25
|
+
# config.log_level = :debug
|
26
|
+
|
27
|
+
# Use a different logger for distributed setups
|
28
|
+
# config.logger = SyslogLogger.new
|
29
|
+
|
30
|
+
# Use a different cache store in production
|
31
|
+
# config.cache_store = :mem_cache_store
|
32
|
+
|
33
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
34
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
35
|
+
|
36
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
37
|
+
# config.assets.precompile += %w( search.js )
|
38
|
+
|
39
|
+
# Disable delivery errors, bad email addresses will be ignored
|
40
|
+
# config.action_mailer.raise_delivery_errors = false
|
41
|
+
|
42
|
+
# Enable threaded mode
|
43
|
+
# config.threadsafe!
|
44
|
+
|
45
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
46
|
+
# the I18n.default_locale when a translation can not be found)
|
47
|
+
config.i18n.fallbacks = true
|
48
|
+
|
49
|
+
# Send deprecation notices to registered listeners
|
50
|
+
config.active_support.deprecation = :notify
|
51
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
22
|
+
config.action_dispatch.show_exceptions = false
|
23
|
+
|
24
|
+
# Disable request forgery protection in test environment
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
26
|
+
|
27
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
+
# The :test delivery method accumulates sent emails in the
|
29
|
+
# ActionMailer::Base.deliveries array.
|
30
|
+
config.action_mailer.delivery_method = :test
|
31
|
+
|
32
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
33
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
34
|
+
# like if you have constraints or database-specific column types
|
35
|
+
# config.active_record.schema_format = :sql
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = 'bc2fa3737d37330b2155c3f63db69620f4ff2767ef75f355ae45f96a718a950b6dffa1200d180cd931472fb12d86e61305ba18b9df477b4bdd21cf20e69de9d5'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActionController::Base.wrap_parameters format: [:json]
|
8
|
+
|
9
|
+
# Disable root element in JSON by default.
|
10
|
+
if defined?(ActiveRecord)
|
11
|
+
ActiveRecord::Base.include_root_in_json = false
|
12
|
+
end
|
@@ -0,0 +1,241 @@
|
|
1
|
+
# This file is auto-generated from the current state of the database. Instead
|
2
|
+
# of editing this file, please use the migrations feature of Active Record to
|
3
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
4
|
+
#
|
5
|
+
# Note that this schema.rb definition is the authoritative source for your
|
6
|
+
# database schema. If you need to create the application database on another
|
7
|
+
# system, you should be using db:schema:load, not running all the migrations
|
8
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
9
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
10
|
+
#
|
11
|
+
# It's strongly recommended to check this file into your version control system.
|
12
|
+
|
13
|
+
ActiveRecord::Schema.define(:version => 20110629151515) do
|
14
|
+
|
15
|
+
create_table "agents", :force => true do |t|
|
16
|
+
t.integer "requests_count"
|
17
|
+
t.integer "sessions_count"
|
18
|
+
t.string "request_header"
|
19
|
+
t.integer "agent_class_id"
|
20
|
+
t.string "name"
|
21
|
+
t.string "full_version"
|
22
|
+
t.string "major_version"
|
23
|
+
t.string "engine_name"
|
24
|
+
t.string "engine_version"
|
25
|
+
t.string "os"
|
26
|
+
end
|
27
|
+
|
28
|
+
add_index "agents", ["agent_class_id"], :name => "index_agents_on_agent_class_id"
|
29
|
+
add_index "agents", ["engine_name"], :name => "index_agents_on_engine_name"
|
30
|
+
add_index "agents", ["engine_version"], :name => "index_agents_on_engine_version"
|
31
|
+
add_index "agents", ["full_version"], :name => "index_agents_on_full_version"
|
32
|
+
add_index "agents", ["major_version"], :name => "index_agents_on_major_version"
|
33
|
+
add_index "agents", ["name"], :name => "index_agents_on_name"
|
34
|
+
add_index "agents", ["os"], :name => "index_agents_on_os"
|
35
|
+
add_index "agents", ["request_header"], :name => "index_agents_on_request_header"
|
36
|
+
|
37
|
+
create_table "gricer_agents", :force => true do |t|
|
38
|
+
t.integer "requests_count"
|
39
|
+
t.integer "sessions_count"
|
40
|
+
t.string "request_header"
|
41
|
+
t.integer "agent_class_id"
|
42
|
+
t.string "name"
|
43
|
+
t.string "full_version"
|
44
|
+
t.string "major_version"
|
45
|
+
t.string "engine_name"
|
46
|
+
t.string "engine_version"
|
47
|
+
t.string "os"
|
48
|
+
end
|
49
|
+
|
50
|
+
add_index "gricer_agents", ["agent_class_id"], :name => "index_gricer_agents_on_agent_class_id"
|
51
|
+
add_index "gricer_agents", ["engine_name"], :name => "index_gricer_agents_on_engine_name"
|
52
|
+
add_index "gricer_agents", ["engine_version"], :name => "index_gricer_agents_on_engine_version"
|
53
|
+
add_index "gricer_agents", ["full_version"], :name => "index_gricer_agents_on_full_version"
|
54
|
+
add_index "gricer_agents", ["major_version"], :name => "index_gricer_agents_on_major_version"
|
55
|
+
add_index "gricer_agents", ["name"], :name => "index_gricer_agents_on_name"
|
56
|
+
add_index "gricer_agents", ["os"], :name => "index_gricer_agents_on_os"
|
57
|
+
add_index "gricer_agents", ["request_header"], :name => "index_gricer_agents_on_request_header"
|
58
|
+
|
59
|
+
create_table "gricer_requests", :force => true do |t|
|
60
|
+
t.integer "session_id"
|
61
|
+
t.integer "agent_id"
|
62
|
+
t.string "host"
|
63
|
+
t.string "path"
|
64
|
+
t.string "method"
|
65
|
+
t.string "protocol"
|
66
|
+
t.string "controller"
|
67
|
+
t.string "action"
|
68
|
+
t.string "format"
|
69
|
+
t.string "param_id"
|
70
|
+
t.integer "user_id"
|
71
|
+
t.integer "status_code"
|
72
|
+
t.string "content_type"
|
73
|
+
t.integer "body_size"
|
74
|
+
t.integer "system_time"
|
75
|
+
t.integer "user_time"
|
76
|
+
t.integer "total_time"
|
77
|
+
t.integer "real_time"
|
78
|
+
t.boolean "javascript"
|
79
|
+
t.integer "window_width"
|
80
|
+
t.integer "window_height"
|
81
|
+
t.string "referer_protocol"
|
82
|
+
t.string "referer_host"
|
83
|
+
t.string "referer_path"
|
84
|
+
t.string "referer_params"
|
85
|
+
t.string "search_engine"
|
86
|
+
t.string "search_query"
|
87
|
+
t.boolean "is_first_in_session"
|
88
|
+
t.string "locale_major", :limit => 2
|
89
|
+
t.string "locale_minor", :limit => 2
|
90
|
+
t.datetime "created_at"
|
91
|
+
t.datetime "updated_at"
|
92
|
+
end
|
93
|
+
|
94
|
+
add_index "gricer_requests", ["agent_id"], :name => "index_gricer_requests_on_agent_id"
|
95
|
+
add_index "gricer_requests", ["javascript"], :name => "index_gricer_requests_on_javascript"
|
96
|
+
add_index "gricer_requests", ["path"], :name => "index_gricer_requests_on_path"
|
97
|
+
add_index "gricer_requests", ["referer_host"], :name => "index_gricer_requests_on_referer_host"
|
98
|
+
add_index "gricer_requests", ["search_engine"], :name => "index_gricer_requests_on_search_engine"
|
99
|
+
add_index "gricer_requests", ["search_query"], :name => "index_gricer_requests_on_search_query"
|
100
|
+
add_index "gricer_requests", ["session_id"], :name => "index_gricer_requests_on_session_id"
|
101
|
+
add_index "gricer_requests", ["window_height"], :name => "index_gricer_requests_on_window_height"
|
102
|
+
add_index "gricer_requests", ["window_width"], :name => "index_gricer_requests_on_window_width"
|
103
|
+
|
104
|
+
create_table "gricer_schema_migrations", :id => false, :force => true do |t|
|
105
|
+
t.string "version", :null => false
|
106
|
+
end
|
107
|
+
|
108
|
+
add_index "gricer_schema_migrations", ["version"], :name => "gricer_unique_schema_migrations", :unique => true
|
109
|
+
|
110
|
+
create_table "gricer_sessions", :force => true do |t|
|
111
|
+
t.integer "previous_session_id"
|
112
|
+
t.integer "agent_id"
|
113
|
+
t.integer "requests_count"
|
114
|
+
t.string "ip_address_hash"
|
115
|
+
t.string "domain"
|
116
|
+
t.string "country", :limit => 2
|
117
|
+
t.string "region"
|
118
|
+
t.string "city"
|
119
|
+
t.string "postal_code"
|
120
|
+
t.float "longitude"
|
121
|
+
t.float "latitude"
|
122
|
+
t.boolean "javascript", :default => false
|
123
|
+
t.boolean "java"
|
124
|
+
t.string "flash_version"
|
125
|
+
t.string "flash_major_version"
|
126
|
+
t.string "silverlight_version"
|
127
|
+
t.string "silverlight_major_version"
|
128
|
+
t.integer "screen_width"
|
129
|
+
t.integer "screen_height"
|
130
|
+
t.string "screen_size"
|
131
|
+
t.integer "screen_depth"
|
132
|
+
t.string "requested_locale_major", :limit => 2
|
133
|
+
t.string "requested_locale_minor", :limit => 2
|
134
|
+
t.datetime "created_at"
|
135
|
+
t.datetime "updated_at"
|
136
|
+
end
|
137
|
+
|
138
|
+
add_index "gricer_sessions", ["agent_id"], :name => "index_gricer_sessions_on_agent_id"
|
139
|
+
add_index "gricer_sessions", ["city"], :name => "index_gricer_sessions_on_city"
|
140
|
+
add_index "gricer_sessions", ["country"], :name => "index_gricer_sessions_on_country"
|
141
|
+
add_index "gricer_sessions", ["flash_major_version"], :name => "index_gricer_sessions_on_flash_major_version"
|
142
|
+
add_index "gricer_sessions", ["flash_version"], :name => "index_gricer_sessions_on_flash_version"
|
143
|
+
add_index "gricer_sessions", ["ip_address_hash"], :name => "index_gricer_sessions_on_ip_address_hash"
|
144
|
+
add_index "gricer_sessions", ["java"], :name => "index_gricer_sessions_on_java"
|
145
|
+
add_index "gricer_sessions", ["javascript"], :name => "index_gricer_sessions_on_javascript"
|
146
|
+
add_index "gricer_sessions", ["screen_depth"], :name => "index_gricer_sessions_on_screen_depth"
|
147
|
+
add_index "gricer_sessions", ["screen_height"], :name => "index_gricer_sessions_on_screen_height"
|
148
|
+
add_index "gricer_sessions", ["screen_size"], :name => "index_gricer_sessions_on_screen_size"
|
149
|
+
add_index "gricer_sessions", ["screen_width"], :name => "index_gricer_sessions_on_screen_width"
|
150
|
+
add_index "gricer_sessions", ["silverlight_major_version"], :name => "index_gricer_sessions_on_silverlight_major_version"
|
151
|
+
add_index "gricer_sessions", ["silverlight_version"], :name => "index_gricer_sessions_on_silverlight_version"
|
152
|
+
|
153
|
+
create_table "requests", :force => true do |t|
|
154
|
+
t.integer "session_id"
|
155
|
+
t.integer "agent_id"
|
156
|
+
t.string "host"
|
157
|
+
t.string "path"
|
158
|
+
t.string "method"
|
159
|
+
t.string "protocol"
|
160
|
+
t.string "controller"
|
161
|
+
t.string "action"
|
162
|
+
t.string "format"
|
163
|
+
t.string "param_id"
|
164
|
+
t.integer "user_id"
|
165
|
+
t.integer "status_code"
|
166
|
+
t.string "content_type"
|
167
|
+
t.integer "body_size"
|
168
|
+
t.integer "system_time"
|
169
|
+
t.integer "user_time"
|
170
|
+
t.integer "total_time"
|
171
|
+
t.integer "real_time"
|
172
|
+
t.boolean "javascript"
|
173
|
+
t.integer "window_width"
|
174
|
+
t.integer "window_height"
|
175
|
+
t.string "referer_protocol"
|
176
|
+
t.string "referer_host"
|
177
|
+
t.string "referer_path"
|
178
|
+
t.string "referer_params"
|
179
|
+
t.string "search_engine"
|
180
|
+
t.string "search_query"
|
181
|
+
t.boolean "is_first_in_session"
|
182
|
+
t.string "locale_major", :limit => 2
|
183
|
+
t.string "locale_minor", :limit => 2
|
184
|
+
t.datetime "created_at"
|
185
|
+
t.datetime "updated_at"
|
186
|
+
end
|
187
|
+
|
188
|
+
add_index "requests", ["agent_id"], :name => "index_requests_on_agent_id"
|
189
|
+
add_index "requests", ["javascript"], :name => "index_requests_on_javascript"
|
190
|
+
add_index "requests", ["path"], :name => "index_requests_on_path"
|
191
|
+
add_index "requests", ["referer_host"], :name => "index_requests_on_referer_host"
|
192
|
+
add_index "requests", ["search_engine"], :name => "index_requests_on_search_engine"
|
193
|
+
add_index "requests", ["search_query"], :name => "index_requests_on_search_query"
|
194
|
+
add_index "requests", ["session_id"], :name => "index_requests_on_session_id"
|
195
|
+
add_index "requests", ["window_height"], :name => "index_requests_on_window_height"
|
196
|
+
add_index "requests", ["window_width"], :name => "index_requests_on_window_width"
|
197
|
+
|
198
|
+
create_table "sessions", :force => true do |t|
|
199
|
+
t.integer "previous_session_id"
|
200
|
+
t.integer "agent_id"
|
201
|
+
t.integer "requests_count"
|
202
|
+
t.string "ip_address_hash"
|
203
|
+
t.string "domain"
|
204
|
+
t.string "country", :limit => 2
|
205
|
+
t.string "region"
|
206
|
+
t.string "city"
|
207
|
+
t.string "postal_code"
|
208
|
+
t.float "longitude"
|
209
|
+
t.float "latitude"
|
210
|
+
t.boolean "javascript", :default => false
|
211
|
+
t.boolean "java"
|
212
|
+
t.string "flash_version"
|
213
|
+
t.string "flash_major_version"
|
214
|
+
t.string "silverlight_version"
|
215
|
+
t.string "silverlight_major_version"
|
216
|
+
t.integer "screen_width"
|
217
|
+
t.integer "screen_height"
|
218
|
+
t.string "screen_size"
|
219
|
+
t.integer "screen_depth"
|
220
|
+
t.string "requested_locale_major", :limit => 2
|
221
|
+
t.string "requested_locale_minor", :limit => 2
|
222
|
+
t.datetime "created_at"
|
223
|
+
t.datetime "updated_at"
|
224
|
+
end
|
225
|
+
|
226
|
+
add_index "sessions", ["agent_id"], :name => "index_sessions_on_agent_id"
|
227
|
+
add_index "sessions", ["city"], :name => "index_sessions_on_city"
|
228
|
+
add_index "sessions", ["country"], :name => "index_sessions_on_country"
|
229
|
+
add_index "sessions", ["flash_major_version"], :name => "index_sessions_on_flash_major_version"
|
230
|
+
add_index "sessions", ["flash_version"], :name => "index_sessions_on_flash_version"
|
231
|
+
add_index "sessions", ["ip_address_hash"], :name => "index_sessions_on_ip_address_hash"
|
232
|
+
add_index "sessions", ["java"], :name => "index_sessions_on_java"
|
233
|
+
add_index "sessions", ["javascript"], :name => "index_sessions_on_javascript"
|
234
|
+
add_index "sessions", ["screen_depth"], :name => "index_sessions_on_screen_depth"
|
235
|
+
add_index "sessions", ["screen_height"], :name => "index_sessions_on_screen_height"
|
236
|
+
add_index "sessions", ["screen_size"], :name => "index_sessions_on_screen_size"
|
237
|
+
add_index "sessions", ["screen_width"], :name => "index_sessions_on_screen_width"
|
238
|
+
add_index "sessions", ["silverlight_major_version"], :name => "index_sessions_on_silverlight_major_version"
|
239
|
+
add_index "sessions", ["silverlight_version"], :name => "index_sessions_on_silverlight_version"
|
240
|
+
|
241
|
+
end
|