i_wonder 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. data/MIT-LICENSE +24 -0
  2. data/README.rdoc +147 -0
  3. data/Rakefile +39 -0
  4. data/app/assets/javascripts/i_wonder/application.js +9 -0
  5. data/app/assets/javascripts/i_wonder/dashboard.js +2 -0
  6. data/app/assets/javascripts/i_wonder/events.js +2 -0
  7. data/app/assets/javascripts/i_wonder/metrics.js +19 -0
  8. data/app/assets/javascripts/i_wonder/reports.js +4 -0
  9. data/app/assets/stylesheets/i_wonder/_shared.css.scss +28 -0
  10. data/app/assets/stylesheets/i_wonder/application.css.scss +90 -0
  11. data/app/assets/stylesheets/i_wonder/dashboard.css.scss +6 -0
  12. data/app/assets/stylesheets/i_wonder/events.css.scss +10 -0
  13. data/app/assets/stylesheets/i_wonder/metrics.css.scss +11 -0
  14. data/app/assets/stylesheets/i_wonder/reports.css.scss +19 -0
  15. data/app/controllers/i_wonder/application_controller.rb +4 -0
  16. data/app/controllers/i_wonder/dashboard_controller.rb +9 -0
  17. data/app/controllers/i_wonder/events_controller.rb +14 -0
  18. data/app/controllers/i_wonder/metrics_controller.rb +49 -0
  19. data/app/controllers/i_wonder/reports_controller.rb +53 -0
  20. data/app/helpers/i_wonder/application_helper.rb +4 -0
  21. data/app/helpers/i_wonder/dashboard_helper.rb +4 -0
  22. data/app/helpers/i_wonder/events_helper.rb +4 -0
  23. data/app/helpers/i_wonder/metrics_helper.rb +4 -0
  24. data/app/helpers/i_wonder/reports_helper.rb +4 -0
  25. data/app/models/i_wonder/event.rb +61 -0
  26. data/app/models/i_wonder/metric.rb +223 -0
  27. data/app/models/i_wonder/report.rb +85 -0
  28. data/app/models/i_wonder/report_membership.rb +6 -0
  29. data/app/models/i_wonder/snapshot.rb +32 -0
  30. data/app/views/i_wonder/dashboard/landing.html.erb +5 -0
  31. data/app/views/i_wonder/events/index.html.erb +15 -0
  32. data/app/views/i_wonder/events/show.html.erb +5 -0
  33. data/app/views/i_wonder/metrics/_form.html.erb +66 -0
  34. data/app/views/i_wonder/metrics/_options_for_custom.html.erb +36 -0
  35. data/app/views/i_wonder/metrics/_options_for_event_counter.html.erb +6 -0
  36. data/app/views/i_wonder/metrics/_options_for_model_counter.html.erb +35 -0
  37. data/app/views/i_wonder/metrics/edit.html.erb +7 -0
  38. data/app/views/i_wonder/metrics/index.html.erb +25 -0
  39. data/app/views/i_wonder/metrics/new.html.erb +7 -0
  40. data/app/views/i_wonder/metrics/show.html.erb +28 -0
  41. data/app/views/i_wonder/reports/_form.html.erb +46 -0
  42. data/app/views/i_wonder/reports/_line_report.html.erb +38 -0
  43. data/app/views/i_wonder/reports/edit.html.erb +7 -0
  44. data/app/views/i_wonder/reports/index.html.erb +20 -0
  45. data/app/views/i_wonder/reports/new.html.erb +7 -0
  46. data/app/views/i_wonder/reports/show.html.erb +16 -0
  47. data/app/views/layouts/i_wonder.html.erb +28 -0
  48. data/config/routes.rb +9 -0
  49. data/db/migrate/20111022230720_i_wonder_migrations.rb +84 -0
  50. data/lib/i_wonder/configuration.rb +31 -0
  51. data/lib/i_wonder/core_ext.rb +5 -0
  52. data/lib/i_wonder/engine.rb +23 -0
  53. data/lib/i_wonder/logging/middleware.rb +114 -0
  54. data/lib/i_wonder/logging/mixins/action_controller_mixins.rb +31 -0
  55. data/lib/i_wonder/logging/mixins/active_record_mixins.rb +24 -0
  56. data/lib/i_wonder/version.rb +3 -0
  57. data/lib/i_wonder.rb +18 -0
  58. data/lib/tasks/i_wonder_tasks.rake +8 -0
  59. data/test/dummy/Rakefile +7 -0
  60. data/test/dummy/app/assets/javascripts/application.js +9 -0
  61. data/test/dummy/app/assets/javascripts/highcharts.js +170 -0
  62. data/test/dummy/app/assets/stylesheets/application.css.scss +78 -0
  63. data/test/dummy/app/controllers/application_controller.rb +12 -0
  64. data/test/dummy/app/controllers/test_controller.rb +32 -0
  65. data/test/dummy/app/helpers/application_helper.rb +2 -0
  66. data/test/dummy/app/models/account.rb +3 -0
  67. data/test/dummy/app/views/layouts/application.html.erb +23 -0
  68. data/test/dummy/app/views/test/landing.html.erb +3 -0
  69. data/test/dummy/config/application.rb +45 -0
  70. data/test/dummy/config/boot.rb +10 -0
  71. data/test/dummy/config/database.yml +11 -0
  72. data/test/dummy/config/environment.rb +5 -0
  73. data/test/dummy/config/environments/development.rb +30 -0
  74. data/test/dummy/config/environments/production.rb +60 -0
  75. data/test/dummy/config/environments/test.rb +39 -0
  76. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  77. data/test/dummy/config/initializers/inflections.rb +10 -0
  78. data/test/dummy/config/initializers/mime_types.rb +5 -0
  79. data/test/dummy/config/initializers/secret_token.rb +7 -0
  80. data/test/dummy/config/initializers/session_store.rb +8 -0
  81. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  82. data/test/dummy/config/locales/en.yml +5 -0
  83. data/test/dummy/config/routes.rb +11 -0
  84. data/test/dummy/config.ru +4 -0
  85. data/test/dummy/db/migrate/20111023024745_create_delayed_jobs.rb +21 -0
  86. data/test/dummy/db/migrate/20111023231947_create_accounts.rb +9 -0
  87. data/test/dummy/db/schema.rb +91 -0
  88. data/test/dummy/log/development.log +48142 -0
  89. data/test/dummy/log/test.log +28374 -0
  90. data/test/dummy/public/404.html +26 -0
  91. data/test/dummy/public/422.html +26 -0
  92. data/test/dummy/public/500.html +26 -0
  93. data/test/dummy/public/favicon.ico +0 -0
  94. data/test/dummy/script/delayed_job +5 -0
  95. data/test/dummy/script/rails +6 -0
  96. data/test/dummy/tmp/cache/assets/C41/5B0/sprockets%2F095415e1141a435237aa9464752d21fd +0 -0
  97. data/test/dummy/tmp/cache/assets/C5B/140/sprockets%2F5605473920cc85586d2a795b1e2a7990 +0 -0
  98. data/test/dummy/tmp/cache/assets/C78/210/sprockets%2F26c220614bd9237d671ec621f0428f19 +0 -0
  99. data/test/dummy/tmp/cache/assets/C79/390/sprockets%2F7b9a6409d013f75c40390a26006885ae +0 -0
  100. data/test/dummy/tmp/cache/assets/C81/600/sprockets%2F30b4f9798169b0d0157b48c09ea23472 +0 -0
  101. data/test/dummy/tmp/cache/assets/C94/140/sprockets%2F69a79619df29670102b726d3e7547c6f +0 -0
  102. data/test/dummy/tmp/cache/assets/CA6/380/sprockets%2Fe8e1b47410e6440341afc3903896bc23 +0 -0
  103. data/test/dummy/tmp/cache/assets/CBF/EB0/sprockets%2F279e977af0f392b36126a520569ec7d7 +0 -0
  104. data/test/dummy/tmp/cache/assets/CE5/650/sprockets%2F8ab512c9b33ac90e699b73469d71f061 +0 -0
  105. data/test/dummy/tmp/cache/assets/CE9/220/sprockets%2Fdf40ed258e785336580ff8d3f17504a2 +0 -0
  106. data/test/dummy/tmp/cache/assets/CFE/130/sprockets%2Fa510c5643a4c0c59b74c1746df2c007e +0 -0
  107. data/test/dummy/tmp/cache/assets/D20/120/sprockets%2F73fcb7f2f97642793feb2c3d871c1482 +0 -0
  108. data/test/dummy/tmp/cache/assets/D2B/280/sprockets%2F921f114bc5b7aa015994bdda8421ae15 +0 -0
  109. data/test/dummy/tmp/cache/assets/D2F/9D0/sprockets%2F50ce229bd4200bed47618724bcab6c73 +0 -0
  110. data/test/dummy/tmp/cache/assets/D30/9C0/sprockets%2F3c0162b1955a8f419b14bfc9c21f1bc5 +0 -0
  111. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  112. data/test/dummy/tmp/cache/assets/D38/3B0/sprockets%2Fe28cd7db24b3e4719e539371a331cb3c +0 -0
  113. data/test/dummy/tmp/cache/assets/D3C/510/sprockets%2F59ddac34690f13d66d518c042e5af2a7 +0 -0
  114. data/test/dummy/tmp/cache/assets/D41/880/sprockets%2Fb9fe431461f3a6a728e7c8b57e6201eb +0 -0
  115. data/test/dummy/tmp/cache/assets/D52/330/sprockets%2F575f448badfc9cc6d2618370956d4bf7 +0 -0
  116. data/test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +0 -0
  117. data/test/dummy/tmp/cache/assets/D58/7E0/sprockets%2Fc3fefb1d72d7614af02a38ac7071c040 +0 -0
  118. data/test/dummy/tmp/cache/assets/D68/240/sprockets%2Fdeadb83d125366600d6a6a69d3f4a19c +0 -0
  119. data/test/dummy/tmp/cache/assets/D6F/B90/sprockets%2F81dd44ced51e0fe8f2615068bb619a5d +0 -0
  120. data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
  121. data/test/dummy/tmp/cache/assets/D8E/250/sprockets%2Fefe57e932e1d26c3b6af42a5311f0a1c +0 -0
  122. data/test/dummy/tmp/cache/assets/D97/740/sprockets%2F9b6d08ad548c1934113d1bcbd8bdc0e9 +0 -0
  123. data/test/dummy/tmp/cache/assets/D9E/120/sprockets%2Fae9efac5ef9a736d5772b07a06723c1a +0 -0
  124. data/test/dummy/tmp/cache/assets/DA3/CD0/sprockets%2Ff4833fc8289edf9e6497c7fe9c19d8d9 +0 -0
  125. data/test/dummy/tmp/cache/assets/DA7/BA0/sprockets%2F463a9dd811f2418d96fa72cfe05fb8cd +0 -0
  126. data/test/dummy/tmp/cache/assets/DAD/040/sprockets%2Fc59fd78ac2642a5f3c1b6ef899d50cf3 +0 -0
  127. data/test/dummy/tmp/cache/assets/DB2/850/sprockets%2F8aca540c22973c1123f4c7b0ebca5ada +0 -0
  128. data/test/dummy/tmp/cache/assets/DBA/4A0/sprockets%2Fffc3120e0bea9134ca5ce8ec74aa2173 +0 -0
  129. data/test/dummy/tmp/cache/assets/DBA/C20/sprockets%2Fa5bfa522bf4221a5bb62ed4feb5093e3 +0 -0
  130. data/test/dummy/tmp/cache/assets/DC7/3C0/sprockets%2F6c54b5103be38cc9ae0ef05c75a92bdf +0 -0
  131. data/test/dummy/tmp/cache/assets/DC8/270/sprockets%2F3ff28a9f19a1be0c377fea3d02e066db +0 -0
  132. data/test/dummy/tmp/cache/assets/DD1/B10/sprockets%2F85b9bce1c5bc3fb86a83d8c8c34e05e0 +0 -0
  133. data/test/dummy/tmp/cache/assets/DDF/BA0/sprockets%2F187ad995e2ff3588c339fdbecceba119 +0 -0
  134. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  135. data/test/dummy/tmp/cache/assets/E8D/B70/sprockets%2Fd62ab1e993c1edcadba5317fe8c7dffb +0 -0
  136. data/test/dummy/tmp/pids/server.pid +1 -0
  137. data/test/factories/metric_factory.rb +13 -0
  138. data/test/factories/report_factory.rb +13 -0
  139. data/test/factories/snapshot_factory.rb +11 -0
  140. data/test/functional/test_controller_test.rb +23 -0
  141. data/test/i_wonder_test.rb +7 -0
  142. data/test/integration/i_wonder/dashboard_controller_test.rb +11 -0
  143. data/test/integration/i_wonder/events_controller_test.rb +14 -0
  144. data/test/integration/i_wonder/metrics_controller_test.rb +18 -0
  145. data/test/integration/i_wonder/reports_controller_test.rb +11 -0
  146. data/test/integration/middleware_test.rb +88 -0
  147. data/test/integration/navigation_test.rb +10 -0
  148. data/test/support/extra_assertions.rb +15 -0
  149. data/test/test_helper.rb +16 -0
  150. data/test/unit/configuration_test.rb +13 -0
  151. data/test/unit/helpers/i_wonder/dashboard_helper_test.rb +6 -0
  152. data/test/unit/helpers/i_wonder/events_helper_test.rb +6 -0
  153. data/test/unit/helpers/i_wonder/metrics_helper_test.rb +6 -0
  154. data/test/unit/helpers/i_wonder/reports_helper_test.rb +6 -0
  155. data/test/unit/i_wonder/event_test.rb +56 -0
  156. data/test/unit/i_wonder/metric_collection_test.rb +124 -0
  157. data/test/unit/i_wonder/metric_creation_test.rb +105 -0
  158. data/test/unit/i_wonder/report_test.rb +33 -0
  159. data/test/unit/i_wonder/snapshot_test.rb +9 -0
  160. metadata +405 -0
@@ -0,0 +1,60 @@
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
+ # Don't fallback to assets pipeline if a precompiled asset is missed
18
+ config.assets.compile = false
19
+
20
+ # Generate digests for assets URLs
21
+ config.assets.digest = true
22
+
23
+ # Defaults to Rails.root.join("public/assets")
24
+ # config.assets.manifest = YOUR_PATH
25
+
26
+ # Specifies the header that your server uses for sending files
27
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
+
30
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
+ # config.force_ssl = true
32
+
33
+ # See everything in the log (default is :info)
34
+ # config.log_level = :debug
35
+
36
+ # Use a different logger for distributed setups
37
+ # config.logger = SyslogLogger.new
38
+
39
+ # Use a different cache store in production
40
+ # config.cache_store = :mem_cache_store
41
+
42
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
43
+ # config.action_controller.asset_host = "http://assets.example.com"
44
+
45
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
46
+ # config.assets.precompile += %w( search.js )
47
+
48
+ # Disable delivery errors, bad email addresses will be ignored
49
+ # config.action_mailer.raise_delivery_errors = false
50
+
51
+ # Enable threaded mode
52
+ # config.threadsafe!
53
+
54
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
55
+ # the I18n.default_locale when a translation can not be found)
56
+ config.i18n.fallbacks = true
57
+
58
+ # Send deprecation notices to registered listeners
59
+ config.active_support.deprecation = :notify
60
+ 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,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -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 = '8f4cbaa2b5177e95c5ec90b258ddd53b6c7efdcb4fa0a5bb098f5fd9d034b82ad56889231e2c2cdba5dc821042bdc4f9919cb94f1522b49f4e1a0a08d6b2d166'
@@ -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,14 @@
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
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,11 @@
1
+ Rails.application.routes.draw do
2
+ match "test_without_report" => "test#test_without_report"
3
+ match "test_with_report" => "test#test_with_report"
4
+ match "test_without_login" => "test#test_without_login"
5
+
6
+ match "test_redirect" => "test#test_redirect"
7
+
8
+ mount IWonder::Engine => "/i_wonder"
9
+
10
+ root :to => "test#landing"
11
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -0,0 +1,21 @@
1
+ class CreateDelayedJobs < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :delayed_jobs, :force => true do |table|
4
+ table.integer :priority, :default => 0 # Allows some jobs to jump to the front of the queue
5
+ table.integer :attempts, :default => 0 # Provides for retries, but still fail eventually.
6
+ table.text :handler # YAML-encoded string of the object that will do work
7
+ table.text :last_error # reason for last failure (See Note below)
8
+ table.datetime :run_at # When to run. Could be Time.zone.now for immediately, or sometime in the future.
9
+ table.datetime :locked_at # Set when a client is working on this object
10
+ table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
11
+ table.string :locked_by # Who is working on this object (if locked)
12
+ table.timestamps
13
+ end
14
+
15
+ add_index :delayed_jobs, [:priority, :run_at], :name => 'delayed_jobs_priority'
16
+ end
17
+
18
+ def self.down
19
+ drop_table :delayed_jobs
20
+ end
21
+ end
@@ -0,0 +1,9 @@
1
+ class CreateAccounts < ActiveRecord::Migration
2
+ def change
3
+ create_table :accounts do |t|
4
+ t.boolean :active
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,91 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20111023231947) do
15
+
16
+ create_table "accounts", :force => true do |t|
17
+ t.boolean "active"
18
+ t.datetime "created_at"
19
+ t.datetime "updated_at"
20
+ end
21
+
22
+ create_table "delayed_jobs", :force => true do |t|
23
+ t.integer "priority", :default => 0
24
+ t.integer "attempts", :default => 0
25
+ t.text "handler"
26
+ t.text "last_error"
27
+ t.datetime "run_at"
28
+ t.datetime "locked_at"
29
+ t.datetime "failed_at"
30
+ t.string "locked_by"
31
+ t.datetime "created_at"
32
+ t.datetime "updated_at"
33
+ end
34
+
35
+ add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
36
+
37
+ create_table "i_wonder_events", :force => true do |t|
38
+ t.string "event_type"
39
+ t.integer "account_id"
40
+ t.integer "user_id"
41
+ t.string "session_id"
42
+ t.string "controller"
43
+ t.string "action"
44
+ t.string "remote_ip"
45
+ t.string "user_agent"
46
+ t.string "referrer"
47
+ t.text "extra_details"
48
+ t.datetime "created_at"
49
+ t.datetime "updated_at"
50
+ end
51
+
52
+ add_index "i_wonder_events", ["account_id"], :name => "index_i_wonder_events_on_account_id"
53
+ add_index "i_wonder_events", ["event_type"], :name => "index_i_wonder_events_on_event_type"
54
+ add_index "i_wonder_events", ["session_id"], :name => "index_i_wonder_events_on_session_id"
55
+ add_index "i_wonder_events", ["user_id"], :name => "index_i_wonder_events_on_user_id"
56
+
57
+ create_table "i_wonder_metrics", :force => true do |t|
58
+ t.string "name"
59
+ t.text "options"
60
+ t.text "collection_method"
61
+ t.boolean "archived"
62
+ t.integer "frequency"
63
+ t.datetime "earliest_measurement"
64
+ t.datetime "last_measurement"
65
+ end
66
+
67
+ create_table "i_wonder_report_memberships", :force => true do |t|
68
+ t.integer "report_id"
69
+ t.integer "metric_id"
70
+ end
71
+
72
+ add_index "i_wonder_report_memberships", ["metric_id"], :name => "index_i_wonder_report_memberships_on_metric_id"
73
+ add_index "i_wonder_report_memberships", ["report_id"], :name => "index_i_wonder_report_memberships_on_report_id"
74
+
75
+ create_table "i_wonder_reports", :force => true do |t|
76
+ t.string "name"
77
+ t.text "description"
78
+ t.string "report_type"
79
+ t.datetime "created_at"
80
+ t.datetime "updated_at"
81
+ end
82
+
83
+ create_table "i_wonder_snapshots", :force => true do |t|
84
+ t.integer "metric_id"
85
+ t.integer "count"
86
+ t.text "complex_data"
87
+ t.datetime "created_at"
88
+ t.datetime "updated_at"
89
+ end
90
+
91
+ end