seymour 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +3 -0
  3. data/Rakefile +25 -4
  4. data/app/assets/javascripts/seymour/application.js +9 -0
  5. data/app/assets/stylesheets/seymour/application.css +7 -0
  6. data/app/controllers/seymour/application_controller.rb +4 -0
  7. data/app/helpers/seymour/application_helper.rb +4 -0
  8. data/app/views/layouts/seymour/application.html.erb +14 -0
  9. data/config/routes.rb +2 -0
  10. data/lib/seymour/activity_feed.rb +29 -0
  11. data/lib/seymour/acts_as_activity.rb +16 -0
  12. data/lib/seymour/distributable.rb +59 -0
  13. data/lib/seymour/engine.rb +5 -0
  14. data/lib/seymour/redis.rb +1 -1
  15. data/lib/seymour/version.rb +1 -1
  16. data/lib/seymour.rb +3 -0
  17. data/lib/tasks/seymour_tasks.rake +4 -0
  18. data/spec/dummy/Rakefile +7 -0
  19. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  20. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  21. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  22. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  23. data/spec/dummy/app/mailers/.gitkeep +0 -0
  24. data/spec/dummy/app/models/.gitkeep +0 -0
  25. data/spec/dummy/app/models/activities/comment_activity.rb +4 -0
  26. data/spec/dummy/app/models/activities/ignored_activity.rb +2 -0
  27. data/spec/dummy/app/models/activities/test_activity.rb +12 -0
  28. data/spec/dummy/app/models/activity.rb +5 -0
  29. data/spec/dummy/app/models/comment.rb +2 -0
  30. data/spec/dummy/app/models/event.rb +5 -0
  31. data/spec/dummy/app/models/user.rb +2 -0
  32. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  33. data/spec/dummy/config/application.rb +53 -0
  34. data/spec/dummy/config/boot.rb +10 -0
  35. data/spec/dummy/config/database.yml +25 -0
  36. data/spec/dummy/config/environment.rb +5 -0
  37. data/spec/dummy/config/environments/development.rb +30 -0
  38. data/spec/dummy/config/environments/production.rb +60 -0
  39. data/spec/dummy/config/environments/test.rb +39 -0
  40. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  41. data/spec/dummy/config/initializers/inflections.rb +10 -0
  42. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  43. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  44. data/spec/dummy/config/initializers/session_store.rb +8 -0
  45. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  46. data/spec/dummy/config/locales/en.yml +5 -0
  47. data/spec/dummy/config/routes.rb +4 -0
  48. data/spec/dummy/config.ru +4 -0
  49. data/spec/dummy/db/migrate/20111014120230_create_activities.rb +11 -0
  50. data/spec/dummy/db/migrate/20111014120251_create_users.rb +9 -0
  51. data/spec/dummy/db/migrate/20111014120336_create_events.rb +12 -0
  52. data/spec/dummy/db/migrate/20111015001158_create_comments.rb +12 -0
  53. data/spec/dummy/db/schema.rb +48 -0
  54. data/spec/dummy/lib/assets/.gitkeep +0 -0
  55. data/spec/dummy/lib/seymour/event_feed.rb +2 -0
  56. data/spec/dummy/lib/seymour/player_feed.rb +2 -0
  57. data/spec/dummy/lib/seymour/user_feed.rb +2 -0
  58. data/spec/dummy/log/.gitkeep +0 -0
  59. data/spec/dummy/log/test.log +129 -0
  60. data/spec/dummy/public/404.html +26 -0
  61. data/spec/dummy/public/422.html +26 -0
  62. data/spec/dummy/public/500.html +26 -0
  63. data/spec/dummy/public/favicon.ico +0 -0
  64. data/spec/dummy/script/rails +6 -0
  65. data/spec/factories.rb +2 -0
  66. data/spec/seymour/activity_feed_spec.rb +35 -1
  67. data/spec/seymour/acts_as_activity_spec.rb +61 -0
  68. data/spec/seymour/redis_spec.rb +14 -0
  69. data/spec/seymour_spec.rb +0 -8
  70. data/spec/spec_helper.rb +10 -11
  71. data/spec/support/test_redis.rb +17 -0
  72. metadata +230 -15
  73. data/.gitignore +0 -4
  74. data/.rspec +0 -1
  75. data/Gemfile +0 -4
  76. data/seymour.gemspec +0 -29
@@ -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,4 @@
1
+ Rails.application.routes.draw do
2
+
3
+ mount Seymour::Engine => "/seymour"
4
+ 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,11 @@
1
+ class CreateActivities < ActiveRecord::Migration
2
+ def change
3
+ create_table :activities do |t|
4
+ t.integer :subject_id
5
+ t.string :subject_type
6
+ t.integer :actor_id
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ class CreateEvents < ActiveRecord::Migration
2
+ def change
3
+ create_table :events do |t|
4
+ t.string :name
5
+ t.datetime :starts_at
6
+ t.datetime :ends_at
7
+ t.text :address
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ class CreateComments < ActiveRecord::Migration
2
+ def change
3
+ create_table :comments do |t|
4
+ t.integer :commentable_id
5
+ t.string :commentable_type
6
+ t.integer :author_id
7
+ t.text :body
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,48 @@
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 => 20111015001158) do
15
+
16
+ create_table "activities", :force => true do |t|
17
+ t.integer "auditable_id"
18
+ t.string "auditable_type"
19
+ t.integer "actor_id"
20
+ t.datetime "created_at"
21
+ t.datetime "updated_at"
22
+ end
23
+
24
+ create_table "comments", :force => true do |t|
25
+ t.integer "commentable_id"
26
+ t.string "commentable_type"
27
+ t.integer "author_id"
28
+ t.text "body"
29
+ t.datetime "created_at"
30
+ t.datetime "updated_at"
31
+ end
32
+
33
+ create_table "events", :force => true do |t|
34
+ t.string "name"
35
+ t.datetime "starts_at"
36
+ t.datetime "ends_at"
37
+ t.text "address"
38
+ t.datetime "created_at"
39
+ t.datetime "updated_at"
40
+ end
41
+
42
+ create_table "users", :force => true do |t|
43
+ t.string "name"
44
+ t.datetime "created_at"
45
+ t.datetime "updated_at"
46
+ end
47
+
48
+ end
File without changes
@@ -0,0 +1,2 @@
1
+ class EventFeed < Seymour::ActivityFeed
2
+ end
@@ -0,0 +1,2 @@
1
+ class PlayerFeed < Seymour::ActivityFeed
2
+ end
@@ -0,0 +1,2 @@
1
+ class UserFeed < Seymour::ActivityFeed
2
+ end
File without changes
@@ -0,0 +1,129 @@
1
+ SQL (59.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:20:45 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:20:45 UTC +00:00]]
2
+ SQL (11.2ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:23:22 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:23:22 UTC +00:00]]
3
+ SQL (11.1ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:23:39 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:23:39 UTC +00:00]]
4
+ SQL (11.0ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:25:04 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:25:04 UTC +00:00]]
5
+ SQL (11.7ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:33:18 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:33:18 UTC +00:00]]
6
+ SQL (11.4ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:33:49 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:33:49 UTC +00:00]]
7
+ SQL (10.8ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:34:03 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:34:03 UTC +00:00]]
8
+ SQL (11.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:34:32 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:34:32 UTC +00:00]]
9
+ SQL (11.1ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:34:40 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:34:40 UTC +00:00]]
10
+ SQL (12.2ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:36:27 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:36:27 UTC +00:00]]
11
+ SQL (12.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:37:45 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:37:45 UTC +00:00]]
12
+ SQL (11.9ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:37:57 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:37:57 UTC +00:00]]
13
+ SQL (11.4ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 13:39:23 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 13:39:23 UTC +00:00]]
14
+ SQL (28.7ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 14:01:56 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 14:01:56 UTC +00:00]]
15
+ SQL (11.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 14:02:25 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 14:02:25 UTC +00:00]]
16
+ SQL (11.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Fri, 14 Oct 2011 14:05:36 UTC +00:00], ["updated_at", Fri, 14 Oct 2011 14:05:36 UTC +00:00]]
17
+ SQL (21.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", nil], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sat, 15 Oct 2011 03:50:25 UTC +00:00], ["updated_at", Sat, 15 Oct 2011 03:50:25 UTC +00:00]]
18
+ SQL (73.1ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 19:19:15 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 19:19:15 UTC +00:00]]
19
+ SQL (12.1ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 1], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 19:19:15 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 19:19:15 UTC +00:00]]
20
+ SQL (12.2ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 19:19:51 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 19:19:51 UTC +00:00]]
21
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 2], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 19:19:51 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 19:19:51 UTC +00:00]]
22
+ SQL (13.0ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 19:20:26 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 19:20:26 UTC +00:00]]
23
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 3], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 19:20:27 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 19:20:27 UTC +00:00]]
24
+ SQL (13.0ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 19:22:22 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 19:22:22 UTC +00:00]]
25
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 4], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 19:22:22 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 19:22:22 UTC +00:00]]
26
+ SQL (12.7ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 19:23:38 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 19:23:38 UTC +00:00]]
27
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 5], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 19:23:39 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 19:23:39 UTC +00:00]]
28
+ SQL (13.1ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 19:23:56 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 19:23:56 UTC +00:00]]
29
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 6], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 19:23:56 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 19:23:56 UTC +00:00]]
30
+ SQL (12.2ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 19:27:55 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 19:27:55 UTC +00:00]]
31
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 7], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 19:27:55 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 19:27:55 UTC +00:00]]
32
+ SQL (13.0ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 19:28:35 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 19:28:35 UTC +00:00]]
33
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 8], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 19:28:35 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 19:28:35 UTC +00:00]]
34
+ SQL (13.6ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 19:29:07 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 19:29:07 UTC +00:00]]
35
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 9], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 19:29:07 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 19:29:07 UTC +00:00]]
36
+ SQL (30.7ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 20:04:40 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 20:04:40 UTC +00:00]]
37
+ SQL (0.7ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 10], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 20:04:41 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 20:04:41 UTC +00:00]]
38
+ SQL (48.0ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 20:24:05 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 20:24:05 UTC +00:00]]
39
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 11], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 20:24:05 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 20:24:05 UTC +00:00]]
40
+ SQL (29.1ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 20:44:57 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 20:44:57 UTC +00:00]]
41
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 12], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 20:44:57 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 20:44:57 UTC +00:00]]
42
+ SQL (12.2ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 20:54:57 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 20:54:57 UTC +00:00]]
43
+ SQL (0.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 13], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 20:54:57 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 20:54:57 UTC +00:00]]
44
+ SQL (11.9ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 20:55:24 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 20:55:24 UTC +00:00]]
45
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 14], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 20:55:24 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 20:55:24 UTC +00:00]]
46
+ SQL (11.6ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 20:57:12 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 20:57:12 UTC +00:00]]
47
+ SQL (0.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 15], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 20:57:12 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 20:57:12 UTC +00:00]]
48
+ SQL (11.6ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 20:57:41 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 20:57:41 UTC +00:00]]
49
+ SQL (0.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 16], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 20:57:41 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 20:57:41 UTC +00:00]]
50
+ SQL (12.1ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 20:57:53 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 20:57:53 UTC +00:00]]
51
+ SQL (0.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 17], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 20:57:53 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 20:57:53 UTC +00:00]]
52
+ SQL (12.1ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 20:58:10 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 20:58:10 UTC +00:00]]
53
+ SQL (0.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 18], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 20:58:10 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 20:58:10 UTC +00:00]]
54
+ SQL (11.9ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 20:59:48 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 20:59:48 UTC +00:00]]
55
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 19], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 20:59:48 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 20:59:48 UTC +00:00]]
56
+ SQL (15.0ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:00:29 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:00:29 UTC +00:00]]
57
+ SQL (0.8ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 20], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:00:29 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:00:29 UTC +00:00]]
58
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:00:29 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:00:29 UTC +00:00]]
59
+ SQL (0.4ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 21], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:00:29 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:00:29 UTC +00:00]]
60
+ SQL (12.2ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:01:45 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:01:45 UTC +00:00]]
61
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 22], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:01:45 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:01:45 UTC +00:00]]
62
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:01:45 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:01:45 UTC +00:00]]
63
+ SQL (0.4ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 23], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:01:45 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:01:45 UTC +00:00]]
64
+ SQL (12.0ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:02:04 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:02:04 UTC +00:00]]
65
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 24], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:02:04 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:02:04 UTC +00:00]]
66
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:02:04 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:02:04 UTC +00:00]]
67
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 25], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:02:04 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:02:04 UTC +00:00]]
68
+ SQL (12.0ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:02:25 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:02:25 UTC +00:00]]
69
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 26], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:02:25 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:02:25 UTC +00:00]]
70
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:02:25 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:02:25 UTC +00:00]]
71
+ SQL (0.4ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 27], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:02:25 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:02:25 UTC +00:00]]
72
+ SQL (12.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:19:01 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:19:01 UTC +00:00]]
73
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 28], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:19:01 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:19:01 UTC +00:00]]
74
+ SQL (11.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:20:18 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:20:18 UTC +00:00]]
75
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 29], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:20:18 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:20:18 UTC +00:00]]
76
+ SQL (12.5ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:20:39 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:20:39 UTC +00:00]]
77
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 30], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:20:39 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:20:39 UTC +00:00]]
78
+ SQL (12.1ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:22:24 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:22:24 UTC +00:00]]
79
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 31], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:22:24 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:22:24 UTC +00:00]]
80
+ SQL (12.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:22:53 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:22:53 UTC +00:00]]
81
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 32], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:22:53 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:22:53 UTC +00:00]]
82
+ SQL (11.6ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:23:45 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:23:45 UTC +00:00]]
83
+ SQL (0.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 33], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:23:45 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:23:45 UTC +00:00]]
84
+ SQL (12.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00]]
85
+ SQL (0.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 34], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00]]
86
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00]]
87
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 35], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00]]
88
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00]]
89
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 36], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:23:57 UTC +00:00]]
90
+ SQL (12.5ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00]]
91
+ SQL (0.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 37], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00]]
92
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00]]
93
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 38], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00]]
94
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00]]
95
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 39], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:24:23 UTC +00:00]]
96
+ SQL (12.2ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00]]
97
+ SQL (0.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 40], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00]]
98
+ Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."test_activity_id" = 57
99
+ SQLite3::SQLException: no such column: events.test_activity_id: SELECT "events".* FROM "events" WHERE "events"."test_activity_id" = 57
100
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00]]
101
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 41], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00]]
102
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00]]
103
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 42], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:25:05 UTC +00:00]]
104
+ SQL (11.7ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00]]
105
+ SQL (0.5ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 43], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00]]
106
+ Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."test_activity_id" = 60
107
+ SQLite3::SQLException: no such column: events.test_activity_id: SELECT "events".* FROM "events" WHERE "events"."test_activity_id" = 60
108
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00]]
109
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 44], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00]]
110
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00]]
111
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 45], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:25:41 UTC +00:00]]
112
+ SQL (12.6ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00]]
113
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 46], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00]]
114
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00]]
115
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 47], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00]]
116
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00]]
117
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 48], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:25:50 UTC +00:00]]
118
+ SQL (12.6ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00]]
119
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 49], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00]]
120
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00]]
121
+ SQL (0.4ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 50], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00]]
122
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00]]
123
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 51], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:27:26 UTC +00:00]]
124
+ SQL (12.2ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00]]
125
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 52], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00]]
126
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00]]
127
+ SQL (0.3ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 53], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00]]
128
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00], ["name", nil], ["updated_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00]]
129
+ SQL (0.6ms) INSERT INTO "activities" ("actor_id", "auditable_id", "auditable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["actor_id", 54], ["auditable_id", nil], ["auditable_type", nil], ["created_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00], ["updated_at", Sun, 16 Oct 2011 21:29:03 UTC +00:00]]
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
+ </div>
25
+ </body>
26
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
data/spec/factories.rb ADDED
@@ -0,0 +1,2 @@
1
+ Factory.define :user do
2
+ end
@@ -5,6 +5,26 @@ describe Seymour::ActivityFeed do
5
5
  let(:owner) { mock("User", :id => 123) }
6
6
  let(:feed) { Seymour::ActivityFeed.new(owner) }
7
7
 
8
+ describe "class methods" do
9
+ describe "feed_classes" do
10
+ it "should provide a list of feed sub classes" do
11
+ Seymour::ActivityFeed.feed_classes.should include(EventFeed)
12
+ end
13
+ end
14
+
15
+ describe "distribute" do
16
+ it "should push given activity to activities destination feeds" do
17
+ event_feed = EventFeed.new(mock_model("Event"))
18
+ activity = mock_model("Activity")
19
+
20
+ activity.should_receive(:feeds).and_return([event_feed])
21
+ event_feed.should_receive(:push).with(activity)
22
+
23
+ Seymour::ActivityFeed.distribute(activity)
24
+ end
25
+ end
26
+ end
27
+
8
28
  describe "activity_ids" do
9
29
  it "should return an empty list initially" do
10
30
  feed.activity_ids.should == []
@@ -16,8 +36,22 @@ describe Seymour::ActivityFeed do
16
36
  feed.push mock("Activity", :id => 456)
17
37
  feed.activity_ids.should == [456]
18
38
  end
39
+
19
40
  end
20
-
41
+
42
+ describe "remove" do
43
+ it "removes id from list" do
44
+ activity_1 = mock("Activity", :id => 456)
45
+ activity_2 = mock("Activity", :id => 789)
46
+ feed.push activity_1
47
+ feed.push activity_2
48
+
49
+ feed.remove activity_1
50
+
51
+ feed.activity_ids.should == [activity_2.id]
52
+ end
53
+ end
54
+
21
55
  describe "owner" do
22
56
  it "should return given owner" do
23
57
  feed.owner.should == owner
@@ -0,0 +1,61 @@
1
+ require 'spec_helper'
2
+
3
+ describe Seymour::ActsAsActivity do
4
+
5
+ describe "TestActivity in dummy app" do
6
+ let(:user) { User.create! }
7
+ let(:activity) { TestActivity.create!(:actor => user) }
8
+
9
+ describe "distribute" do
10
+ it "should push activity to audiences" do
11
+ feed = mock(UserFeed)
12
+ TestActivity.stub!(:feeds_for).and_return([feed])
13
+ feed.should_receive(:push).with(activity)
14
+ activity.distribute
15
+ end
16
+ end
17
+
18
+ describe "feeds" do
19
+ before(:each) do
20
+ activity.stub!(:authors).and_return([])
21
+ activity.stub!(:events).and_return([])
22
+ end
23
+
24
+ it "should create event feed for each event" do
25
+ event = mock_model(Event)
26
+ activity.should_receive(:events).and_return [event]
27
+ event_feed = mock(EventFeed)
28
+ EventFeed.should_receive(:new).with(event).and_return(event_feed)
29
+ activity.feeds.should include(event_feed)
30
+ end
31
+
32
+ it "should create user feed for each author" do
33
+ user_1 = mock_model(User)
34
+ user_2 = mock_model(User)
35
+ activity.should_receive(:authors).and_return [user_1, user_2]
36
+ user_feed_1 = mock(UserFeed)
37
+ user_feed_2 = mock(UserFeed)
38
+ UserFeed.should_receive(:new).ordered.with(user_1).and_return(user_feed_1)
39
+ UserFeed.should_receive(:new).ordered.with(user_2).and_return(user_feed_2)
40
+
41
+ feeds = activity.feeds
42
+ feeds.should include(user_feed_1)
43
+ feeds.should include(user_feed_2)
44
+ end
45
+ end
46
+
47
+ describe "class methods" do
48
+ describe "audience" do
49
+ it "should add events and authors audience names" do
50
+ TestActivity.audience_names.should include(:events)
51
+ TestActivity.audience_names.should include(:authors)
52
+ end
53
+
54
+ it "should set up feed class names" do
55
+ TestActivity.feed_class_names.should include("UserFeed")
56
+ TestActivity.feed_class_names.should include("EventFeed")
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Seymour::Redis" do
4
+
5
+ describe "redis" do
6
+ it "can set a namespace through a url-like string" do
7
+ Seymour.redis.should be_a(Redis::Namespace)
8
+ :seymour.should == Seymour.redis.namespace
9
+ Seymour.redis = 'localhost:9736/namespace'
10
+ 'namespace'.should == Seymour.redis.namespace
11
+ end
12
+ end
13
+
14
+ end
data/spec/seymour_spec.rb CHANGED
@@ -2,12 +2,4 @@ require 'spec_helper'
2
2
 
3
3
  describe Seymour do
4
4
 
5
- describe "redis" do
6
- it "can set a namespace through a url-like string" do
7
- Seymour.redis.should be_a(Redis::Namespace)
8
- :seymour.should == Seymour.redis.namespace
9
- Seymour.redis = 'localhost:9736/namespace'
10
- 'namespace'.should == Seymour.redis.namespace
11
- end
12
- end
13
5
  end
data/spec/spec_helper.rb CHANGED
@@ -1,20 +1,19 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require 'rspec/rails'
6
+ require "rails/test_help"
7
+
1
8
  dir = File.dirname(File.expand_path(__FILE__))
2
9
  $LOAD_PATH.unshift dir + '/../lib'
10
+ $LOAD_PATH.unshift dir + '/support'
3
11
 
4
12
  require 'seymour'
13
+ require 'test_redis'
5
14
 
6
15
  RSpec.configure do |config|
7
16
  config.mock_with :rspec
8
17
  end
9
18
 
10
- at_exit do
11
- pid = `ps -A -o pid,command | grep [r]edis-spec`.split(" ")[0]
12
- puts "Killing test redis server..."
13
- `rm -f #{dir}/dump.rdb`
14
- Process.kill("KILL", pid.to_i)
15
- exit $!.status
16
- end
17
-
18
- puts "Starting redis for testing at localhost:9736..."
19
- `redis-server #{dir}/redis-spec.conf`
20
- Seymour.redis = 'localhost:9736'
19
+ TestRedis::Server.start!(dir)