news_feed 0.0.4 → 0.0.5
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.
- data/lib/app/model/news_feed_event.rb +4 -0
- data/lib/news_feed/acts_as_news_feedable.rb +4 -3
- data/lib/news_feed/news_feed_events.rb +7 -1
- data/lib/news_feed/version.rb +1 -1
- data/test/dummy/lib/news_feed/news_feed_events.rb +7 -1
- data/test/dummy/log/test.log +824 -0
- data/test/news_feed_test.rb +16 -0
- data/test/tmp/lib/news_feed/news_feed_events.rb +7 -1
- metadata +2 -2
@@ -30,10 +30,11 @@ module NewsFeed
|
|
30
30
|
if self.object_name.present?
|
31
31
|
object_title = self.object_name
|
32
32
|
end
|
33
|
+
|
33
34
|
text = generate_text(event_name, actor_name(actor, recipient), object_class,
|
34
|
-
object_title, recipient_name(actor, recipient))
|
35
|
+
object_title, recipient_name(actor, recipient), options)
|
35
36
|
|
36
|
-
|
37
|
+
event_options = {
|
37
38
|
text: text,
|
38
39
|
event_object_type: self.class.name,
|
39
40
|
event_object_id: self.id,
|
@@ -43,7 +44,7 @@ module NewsFeed
|
|
43
44
|
recipient_id: recipient.id,
|
44
45
|
recipient_type: recipient.class.name
|
45
46
|
}
|
46
|
-
NewsFeedEvent.create!(
|
47
|
+
NewsFeedEvent.create!(event_options)
|
47
48
|
end
|
48
49
|
end
|
49
50
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module NewsFeed
|
2
2
|
module NewsFeedEvents
|
3
|
-
def generate_text(event_name, actor_name, object_class, object_title, recipient_name = nil)
|
3
|
+
def generate_text(event_name, actor_name, object_class, object_title, recipient_name = nil, options = {})
|
4
4
|
# event_name is what the cases will check for
|
5
5
|
# actor_name is the user object that performs the action
|
6
6
|
# object_class is the class of the object of interest
|
@@ -19,6 +19,12 @@ module NewsFeed
|
|
19
19
|
when :Send
|
20
20
|
I18n.t('news_feeds.send_object', actor: actor_name.to_s, object_class: object_class,
|
21
21
|
object_name: object_title, recipient_name: recipient_name)
|
22
|
+
when :Custom
|
23
|
+
if options.nil?
|
24
|
+
raise "Custom Message must be specified"
|
25
|
+
else
|
26
|
+
options
|
27
|
+
end
|
22
28
|
else
|
23
29
|
raise "event_name is undefined"
|
24
30
|
end
|
data/lib/news_feed/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module NewsFeed
|
2
2
|
module NewsFeedEvents
|
3
|
-
def generate_text(event_name, actor_name, object_class, object_title, recipient_name = nil)
|
3
|
+
def generate_text(event_name, actor_name, object_class, object_title, recipient_name = nil, options = {})
|
4
4
|
# event_name is what the cases will check for
|
5
5
|
# actor_name is the user object that performs the action
|
6
6
|
# object_class is the class of the object of interest
|
@@ -19,6 +19,12 @@ module NewsFeed
|
|
19
19
|
when :Send
|
20
20
|
I18n.t('news_feeds.send_object', actor: actor_name.to_s, object_class: object_class,
|
21
21
|
object_name: object_title, recipient_name: recipient_name)
|
22
|
+
when :Custom
|
23
|
+
if options.nil?
|
24
|
+
raise "Custom Message must be specified"
|
25
|
+
else
|
26
|
+
options
|
27
|
+
end
|
22
28
|
else
|
23
29
|
raise "event_name is undefined"
|
24
30
|
end
|
data/test/dummy/log/test.log
CHANGED
@@ -1598,3 +1598,827 @@ Connecting to database specified by database.yml
|
|
1598
1598
|
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Thu, 09 Aug 2012 04:36:06 UTC +00:00], ["event_object_id", 10], ["event_object_type", "User"], ["event_type", :Update], ["recipient_id", 10], ["recipient_type", "User"], ["sender_id", 10], ["sender_type", 0], ["text", "You have updated a User: Bob Smith"], ["updated_at", Thu, 09 Aug 2012 04:36:06 UTC +00:00]]
|
1599
1599
|
[1m[35m (0.0ms)[0m commit transaction
|
1600
1600
|
[1m[36mNewsFeedEvent Load (0.1ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 10 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1601
|
+
Connecting to database specified by database.yml
|
1602
|
+
[1m[36m (1.5ms)[0m [1mselect sqlite_version(*)[0m
|
1603
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1604
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) [0m
|
1605
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "event_object_id" integer, "event_object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1606
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1607
|
+
[1m[35m (0.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
1608
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
1609
|
+
[1m[35m (0.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
1610
|
+
[1m[36m (0.0ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
1611
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
1612
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1613
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1614
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1615
|
+
[1m[35mSQL (6.9ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1616
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1617
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1618
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1619
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1620
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1621
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1622
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1623
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1624
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1625
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1626
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1627
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1628
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1629
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1630
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1631
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1632
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1633
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1634
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1635
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1636
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1637
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1638
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1639
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1640
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1641
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1642
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1643
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1644
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1645
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1646
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1647
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1648
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1649
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1650
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1651
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1652
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1653
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1654
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1655
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1656
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1657
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:20:32 UTC +00:00]]
|
1658
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1659
|
+
Connecting to database specified by database.yml
|
1660
|
+
[1m[36m (2.2ms)[0m [1mselect sqlite_version(*)[0m
|
1661
|
+
[1m[35m (0.6ms)[0m CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1662
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) [0m
|
1663
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "event_object_id" integer, "event_object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1664
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1665
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
1666
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
1667
|
+
[1m[35m (0.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
1668
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
1669
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
1670
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1671
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1672
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1673
|
+
[1m[35mSQL (4.5ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1674
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1675
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1676
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1677
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1678
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1679
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1680
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1681
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1682
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["event_object_id", 1], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 1], ["recipient_type", "User"], ["sender_id", 2], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1683
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1684
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 1 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1685
|
+
[1m[35mNewsFeedEvent Load (0.1ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
1686
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1687
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1688
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1689
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1690
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1691
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1692
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1693
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1694
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1695
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1696
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["event_object_id", 2], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 3], ["recipient_type", "User"], ["sender_id", 4], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1697
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1698
|
+
[1m[36mNewsFeedEvent Load (0.1ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 3 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1699
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1700
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1701
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1702
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1703
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1704
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1705
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1706
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1707
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1708
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1709
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1710
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1711
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1712
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1713
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1714
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 5[0m
|
1715
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1716
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1717
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1718
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1719
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1720
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1721
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1722
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1723
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1724
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1725
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1726
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1727
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1728
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1729
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1730
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1731
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1732
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1733
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1734
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00], ["event_object_id", 10], ["event_object_type", "User"], ["event_type", :Update], ["recipient_id", 10], ["recipient_type", "User"], ["sender_id", 10], ["sender_type", 0], ["text", "You have updated a User: Bob Smith"], ["updated_at", Fri, 10 Aug 2012 06:21:08 UTC +00:00]]
|
1735
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1736
|
+
[1m[36mNewsFeedEvent Load (0.1ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 10 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1737
|
+
Connecting to database specified by database.yml
|
1738
|
+
[1m[36m (1.7ms)[0m [1mselect sqlite_version(*)[0m
|
1739
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1740
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) [0m
|
1741
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "event_object_id" integer, "event_object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1742
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1743
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
1744
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
1745
|
+
[1m[35m (0.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
1746
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
1747
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
1748
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1749
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1750
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1751
|
+
[1m[35mSQL (5.8ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:56 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:56 UTC +00:00]]
|
1752
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1753
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1754
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:56 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:56 UTC +00:00]]
|
1755
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1756
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1757
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:56 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:56 UTC +00:00]]
|
1758
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1759
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1760
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["event_object_id", 1], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 1], ["recipient_type", "User"], ["sender_id", 2], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1761
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1762
|
+
[1m[36mNewsFeedEvent Load (0.3ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 1 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1763
|
+
[1m[35mNewsFeedEvent Load (0.1ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
1764
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1765
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1766
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1767
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1768
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1769
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1770
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1771
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1772
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1773
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1774
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["event_object_id", 2], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 3], ["recipient_type", "User"], ["sender_id", 4], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1775
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1776
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 3 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1777
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1778
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1779
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1780
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1781
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1782
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1783
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1784
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1785
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1786
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1787
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1788
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1789
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1790
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1791
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1792
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 5[0m
|
1793
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1794
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1795
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1796
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1797
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1798
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1799
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1800
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1801
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1802
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1803
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 7], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", "This is my custom message!"], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1804
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1805
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1806
|
+
[1m[36mSQL (0.9ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 8], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", {:text=>"This is my custom message!", :event_object_type=>"Message", :event_object_id=>4, :event_type=>:Custom, :sender_id=>8, :sender_type=>"User", :recipient_id=>7, :recipient_type=>"User"}], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1807
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1808
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 7 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1809
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1810
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1811
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1812
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1813
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1814
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1815
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1816
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1817
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1818
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1819
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00], ["event_object_id", 10], ["event_object_type", "User"], ["event_type", :Update], ["recipient_id", 10], ["recipient_type", "User"], ["sender_id", 10], ["sender_type", 0], ["text", "You have updated a User: Bob Smith"], ["updated_at", Fri, 10 Aug 2012 06:21:57 UTC +00:00]]
|
1820
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1821
|
+
[1m[35mNewsFeedEvent Load (0.2ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 10 ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
1822
|
+
Connecting to database specified by database.yml
|
1823
|
+
[1m[36m (2.8ms)[0m [1mselect sqlite_version(*)[0m
|
1824
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1825
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) [0m
|
1826
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "event_object_id" integer, "event_object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1827
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1828
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
1829
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
1830
|
+
[1m[35m (0.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
1831
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
1832
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
1833
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1834
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1835
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1836
|
+
[1m[35mSQL (5.8ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1837
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1838
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1839
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1840
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1841
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1842
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1843
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1844
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1845
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["event_object_id", 1], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 1], ["recipient_type", "User"], ["sender_id", 2], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1846
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1847
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 1 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1848
|
+
[1m[35mNewsFeedEvent Load (0.1ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
1849
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1850
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1851
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1852
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1853
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1854
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1855
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1856
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1857
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1858
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1859
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["event_object_id", 2], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 3], ["recipient_type", "User"], ["sender_id", 4], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1860
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1861
|
+
[1m[36mNewsFeedEvent Load (0.1ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 3 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1862
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1863
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1864
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1865
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1866
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1867
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1868
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1869
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1870
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1871
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1872
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1873
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1874
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1875
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1876
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1877
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 5[0m
|
1878
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1879
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1880
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1881
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1882
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1883
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1884
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1885
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1886
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1887
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1888
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 7], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", "This is my custom message!"], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1889
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1890
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1891
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 8], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", {:text=>"This is my custom message!", :event_object_type=>"Message", :event_object_id=>4, :event_type=>:Custom, :sender_id=>8, :sender_type=>"User", :recipient_id=>7, :recipient_type=>"User"}], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1892
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1893
|
+
[1m[36mNewsFeedEvent Load (0.1ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 7 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1894
|
+
[1m[35mNewsFeedEvent Load (0.1ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 8 ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
1895
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1896
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1897
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1898
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1899
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1900
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1901
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1902
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1903
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1904
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1905
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00], ["event_object_id", 10], ["event_object_type", "User"], ["event_type", :Update], ["recipient_id", 10], ["recipient_type", "User"], ["sender_id", 10], ["sender_type", 0], ["text", "You have updated a User: Bob Smith"], ["updated_at", Fri, 10 Aug 2012 06:23:47 UTC +00:00]]
|
1906
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1907
|
+
[1m[36mNewsFeedEvent Load (0.1ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 10 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1908
|
+
Connecting to database specified by database.yml
|
1909
|
+
[1m[36m (1.5ms)[0m [1mselect sqlite_version(*)[0m
|
1910
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1911
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) [0m
|
1912
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "event_object_id" integer, "event_object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1913
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1914
|
+
[1m[35m (0.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
1915
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
1916
|
+
[1m[35m (0.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
1917
|
+
[1m[36m (0.0ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
1918
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
1919
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
1920
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1921
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1922
|
+
[1m[35mSQL (5.0ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1923
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1924
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1925
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1926
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1927
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1928
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1929
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1930
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1931
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["event_object_id", 1], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 1], ["recipient_type", "User"], ["sender_id", 2], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1932
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1933
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 1 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1934
|
+
[1m[35mNewsFeedEvent Load (0.2ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
1935
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1936
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1937
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1938
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1939
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1940
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1941
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1942
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1943
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1944
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1945
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["event_object_id", 2], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 3], ["recipient_type", "User"], ["sender_id", 4], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1946
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1947
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 3 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1948
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1949
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1950
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1951
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1952
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1953
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1954
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1955
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1956
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1957
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1958
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1959
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1960
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1961
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1962
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1963
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 5[0m
|
1964
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1965
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1966
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1967
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1968
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1969
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1970
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1971
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1972
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1973
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1974
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 7], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", "This is my custom message!"], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1975
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1976
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1977
|
+
[1m[36mSQL (1.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 8], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", {:text=>"This is my custom message!", :event_object_type=>"Message", :event_object_id=>4, :event_type=>:Custom, :sender_id=>8, :sender_type=>"User", :recipient_id=>7, :recipient_type=>"User"}], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1978
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1979
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 7 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1980
|
+
[1m[35mNewsFeedEvent Load (0.2ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 8 ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
1981
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1982
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1983
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1984
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1985
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1986
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1987
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1988
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1989
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
1990
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1991
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00], ["event_object_id", 10], ["event_object_type", "User"], ["event_type", :Update], ["recipient_id", 10], ["recipient_type", "User"], ["sender_id", 10], ["sender_type", 0], ["text", "You have updated a User: Bob Smith"], ["updated_at", Fri, 10 Aug 2012 06:24:35 UTC +00:00]]
|
1992
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1993
|
+
[1m[36mNewsFeedEvent Load (0.3ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 10 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
1994
|
+
Connecting to database specified by database.yml
|
1995
|
+
[1m[36m (2.0ms)[0m [1mselect sqlite_version(*)[0m
|
1996
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1997
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) [0m
|
1998
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "event_object_id" integer, "event_object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1999
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
2000
|
+
[1m[35m (0.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
2001
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
2002
|
+
[1m[35m (0.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
2003
|
+
[1m[36m (0.0ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
2004
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
2005
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2006
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2007
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2008
|
+
[1m[35mSQL (3.4ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2009
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2010
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2011
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2012
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2013
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2014
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2015
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2016
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2017
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["event_object_id", 1], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 1], ["recipient_type", "User"], ["sender_id", 2], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2018
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2019
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 1 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2020
|
+
[1m[35mNewsFeedEvent Load (0.1ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
2021
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2022
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2023
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2024
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2025
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2026
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2027
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2028
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2029
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2030
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2031
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["event_object_id", 2], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 3], ["recipient_type", "User"], ["sender_id", 4], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2032
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2033
|
+
[1m[36mNewsFeedEvent Load (0.3ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 3 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2034
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2035
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2036
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2037
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2038
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2039
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2040
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2041
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2042
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2043
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2044
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2045
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2046
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2047
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2048
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2049
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 5[0m
|
2050
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2051
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2052
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2053
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2054
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2055
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2056
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2057
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2058
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2059
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2060
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 7], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", "This is my custom message!"], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2061
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2062
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2063
|
+
[1m[36mSQL (1.1ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 8], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", {:text=>"This is my custom message!", :event_object_type=>"Message", :event_object_id=>4, :event_type=>:Custom, :sender_id=>8, :sender_type=>"User", :recipient_id=>7, :recipient_type=>"User"}], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2064
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2065
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 7 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2066
|
+
[1m[35mNewsFeedEvent Load (0.3ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 8 ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
2067
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2068
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2069
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2070
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2071
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2072
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2073
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2074
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2075
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2076
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2077
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00], ["event_object_id", 10], ["event_object_type", "User"], ["event_type", :Update], ["recipient_id", 10], ["recipient_type", "User"], ["sender_id", 10], ["sender_type", 0], ["text", "You have updated a User: Bob Smith"], ["updated_at", Fri, 10 Aug 2012 06:25:32 UTC +00:00]]
|
2078
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2079
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 10 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2080
|
+
Connecting to database specified by database.yml
|
2081
|
+
[1m[36m (1.4ms)[0m [1mselect sqlite_version(*)[0m
|
2082
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
2083
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) [0m
|
2084
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "event_object_id" integer, "event_object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
2085
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
2086
|
+
[1m[35m (0.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
2087
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
2088
|
+
[1m[35m (0.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
2089
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
2090
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
2091
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
2092
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2093
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2094
|
+
[1m[35mSQL (4.4ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:22 UTC +00:00]]
|
2095
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2096
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2097
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:22 UTC +00:00]]
|
2098
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2099
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2100
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:22 UTC +00:00]]
|
2101
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2102
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2103
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["event_object_id", 1], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 1], ["recipient_type", "User"], ["sender_id", 2], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2104
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2105
|
+
[1m[36mNewsFeedEvent Load (0.3ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 1 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2106
|
+
[1m[35mNewsFeedEvent Load (0.1ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
2107
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2108
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2109
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2110
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2111
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2112
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2113
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2114
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2115
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2116
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2117
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["event_object_id", 2], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 3], ["recipient_type", "User"], ["sender_id", 4], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2118
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2119
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 3 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2120
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2121
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2122
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2123
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2124
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2125
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2126
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2127
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2128
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2129
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2130
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2131
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2132
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2133
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2134
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2135
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 5[0m
|
2136
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2137
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2138
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2139
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2140
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2141
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2142
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2143
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2144
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2145
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2146
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 7], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", "This is my custom message!"], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2147
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2148
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2149
|
+
[1m[36mSQL (1.1ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 8], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", {:text=>"This is my custom message!", :event_object_type=>"Message", :event_object_id=>4, :event_type=>:Custom, :sender_id=>8, :sender_type=>"User", :recipient_id=>7, :recipient_type=>"User"}], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2150
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2151
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 7 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2152
|
+
[1m[35mNewsFeedEvent Load (0.2ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 8 ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
2153
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2154
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2155
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2156
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2157
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2158
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2159
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2160
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2161
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2162
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2163
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00], ["event_object_id", 10], ["event_object_type", "User"], ["event_type", :Update], ["recipient_id", 10], ["recipient_type", "User"], ["sender_id", 10], ["sender_type", 0], ["text", "You have updated a User: Bob Smith"], ["updated_at", Fri, 10 Aug 2012 06:26:23 UTC +00:00]]
|
2164
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2165
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 10 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2166
|
+
Connecting to database specified by database.yml
|
2167
|
+
[1m[36m (1.5ms)[0m [1mselect sqlite_version(*)[0m
|
2168
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
2169
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) [0m
|
2170
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "event_object_id" integer, "event_object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
2171
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
2172
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
2173
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
2174
|
+
[1m[35m (0.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
2175
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
2176
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
2177
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
2178
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2179
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2180
|
+
[1m[35mSQL (3.9ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2181
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2182
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2183
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2184
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2185
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2186
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2187
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2188
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2189
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["event_object_id", 1], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 1], ["recipient_type", "User"], ["sender_id", 2], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2190
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2191
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 1 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2192
|
+
[1m[35mNewsFeedEvent Load (0.1ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
2193
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2194
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2195
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2196
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2197
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2198
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2199
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2200
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2201
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2202
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2203
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["event_object_id", 2], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 3], ["recipient_type", "User"], ["sender_id", 4], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2204
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2205
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 3 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2206
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2207
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2208
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2209
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2210
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2211
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2212
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2213
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2214
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2215
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2216
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2217
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2218
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2219
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2220
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2221
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 5[0m
|
2222
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2223
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2224
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2225
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2226
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2227
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2228
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2229
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2230
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2231
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2232
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 7], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", "This is my custom message!"], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2233
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2234
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2235
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 8], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", {:text=>"This is my custom message!", :event_object_type=>"Message", :event_object_id=>4, :event_type=>:Custom, :sender_id=>8, :sender_type=>"User", :recipient_id=>7, :recipient_type=>"User"}], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2236
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2237
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 7 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2238
|
+
[1m[35mNewsFeedEvent Load (0.2ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 8 ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
2239
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" [0m
|
2240
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2241
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2242
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2243
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2244
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2245
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2246
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2247
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2248
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2249
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2250
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00], ["event_object_id", 10], ["event_object_type", "User"], ["event_type", :Update], ["recipient_id", 10], ["recipient_type", "User"], ["sender_id", 10], ["sender_type", 0], ["text", "You have updated a User: Bob Smith"], ["updated_at", Fri, 10 Aug 2012 06:26:46 UTC +00:00]]
|
2251
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2252
|
+
[1m[35mNewsFeedEvent Load (0.2ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 10 ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
2253
|
+
Connecting to database specified by database.yml
|
2254
|
+
[1m[36m (1.7ms)[0m [1mselect sqlite_version(*)[0m
|
2255
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
2256
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) [0m
|
2257
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "event_object_id" integer, "event_object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
2258
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
2259
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
2260
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
2261
|
+
[1m[35m (0.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
2262
|
+
[1m[36m (0.0ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
2263
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
2264
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2265
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2266
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2267
|
+
[1m[35mSQL (4.0ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2268
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2269
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2270
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2271
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2272
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2273
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2274
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2275
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2276
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["event_object_id", 1], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 1], ["recipient_type", "User"], ["sender_id", 2], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2277
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2278
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 1 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2279
|
+
[1m[35mNewsFeedEvent Load (0.2ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
2280
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2281
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2282
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2283
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2284
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2285
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2286
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2287
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2288
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2289
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2290
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["event_object_id", 2], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 3], ["recipient_type", "User"], ["sender_id", 4], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2291
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2292
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 3 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2293
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2294
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2295
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2296
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2297
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2298
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2299
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2300
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2301
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2302
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2303
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2304
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2305
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2306
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2307
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2308
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 5[0m
|
2309
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2310
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2311
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2312
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2313
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2314
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2315
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2316
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2317
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2318
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2319
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 7], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", "This is my custom message!"], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2320
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2321
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2322
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 8], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", "This is my custom message!"], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2323
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2324
|
+
[1m[36mNewsFeedEvent Load (0.1ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 7 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2325
|
+
[1m[35mNewsFeedEvent Load (0.1ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 8 ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
2326
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2327
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2328
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2329
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2330
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2331
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2332
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2333
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2334
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2335
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2336
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00], ["event_object_id", 10], ["event_object_type", "User"], ["event_type", :Update], ["recipient_id", 10], ["recipient_type", "User"], ["sender_id", 10], ["sender_type", 0], ["text", "You have updated a User: Bob Smith"], ["updated_at", Fri, 10 Aug 2012 06:27:41 UTC +00:00]]
|
2337
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2338
|
+
[1m[36mNewsFeedEvent Load (0.1ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 10 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2339
|
+
Connecting to database specified by database.yml
|
2340
|
+
[1m[36m (1.4ms)[0m [1mselect sqlite_version(*)[0m
|
2341
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
2342
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) [0m
|
2343
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "event_object_id" integer, "event_object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
2344
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
2345
|
+
[1m[35m (0.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
2346
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
2347
|
+
[1m[35m (0.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
2348
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
2349
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
2350
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2351
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2352
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2353
|
+
[1m[35mSQL (4.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2354
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
2355
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2356
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2357
|
+
[1m[35m (0.1ms)[0m commit transaction
|
2358
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2359
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2360
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2361
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2362
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["event_object_id", 1], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 1], ["recipient_type", "User"], ["sender_id", 2], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2363
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2364
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 1 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2365
|
+
[1m[35mNewsFeedEvent Load (0.1ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
2366
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2367
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2368
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2369
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2370
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2371
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2372
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2373
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2374
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2375
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2376
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["event_object_id", 2], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 3], ["recipient_type", "User"], ["sender_id", 4], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2377
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2378
|
+
[1m[36mNewsFeedEvent Load (0.1ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 3 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2379
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2380
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2381
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2382
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2383
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2384
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2385
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2386
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2387
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2388
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2389
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Delete], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has deleted a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2390
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2391
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2392
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["event_object_id", 3], ["event_object_type", "Message"], ["event_type", :Create], ["recipient_id", 5], ["recipient_type", "User"], ["sender_id", 6], ["sender_type", 0], ["text", "Bob Smith has created a Message: Message Title"], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2393
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2394
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 5[0m
|
2395
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2396
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2397
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2398
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2399
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2400
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2401
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2402
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2403
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2404
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2405
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 7], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", "This is my custom message!"], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2406
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2407
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2408
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["event_object_id", 4], ["event_object_type", "Message"], ["event_type", :Custom], ["recipient_id", 8], ["recipient_type", "User"], ["sender_id", 8], ["sender_type", 0], ["text", "This is my custom message!"], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2409
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2410
|
+
[1m[36mNewsFeedEvent Load (0.2ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 7 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
2411
|
+
[1m[35mNewsFeedEvent Load (0.1ms)[0m SELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 8 ORDER BY "news_feed_events"."id" DESC LIMIT 1
|
2412
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2413
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2414
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2415
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2416
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2417
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2418
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2419
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "messages" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2420
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
2421
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2422
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "news_feed_events" ("created_at", "event_object_id", "event_object_type", "event_type", "recipient_id", "recipient_type", "sender_id", "sender_type", "text", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00], ["event_object_id", 10], ["event_object_type", "User"], ["event_type", :Update], ["recipient_id", 10], ["recipient_type", "User"], ["sender_id", 10], ["sender_type", 0], ["text", "You have updated a User: Bob Smith"], ["updated_at", Fri, 10 Aug 2012 06:32:22 UTC +00:00]]
|
2423
|
+
[1m[35m (0.0ms)[0m commit transaction
|
2424
|
+
[1m[36mNewsFeedEvent Load (0.1ms)[0m [1mSELECT "news_feed_events".* FROM "news_feed_events" WHERE "news_feed_events"."recipient_id" = 10 ORDER BY "news_feed_events"."id" DESC LIMIT 1[0m
|
data/test/news_feed_test.rb
CHANGED
@@ -14,6 +14,7 @@ class NewsFeedTest < Test::Unit::TestCase
|
|
14
14
|
news_feed_event = user_1.news_feed_events.last
|
15
15
|
assert_equal news_feed_event, NewsFeedEvent.last
|
16
16
|
assert_equal news_feed_event.text, 'Bob Smith has created a Message: Message Title'
|
17
|
+
assert_equal news_feed_event.event_type_object, 'CreateMessage'
|
17
18
|
end
|
18
19
|
|
19
20
|
def test_for_updating_and_sending_self_an_object
|
@@ -23,6 +24,7 @@ class NewsFeedTest < Test::Unit::TestCase
|
|
23
24
|
current_user.insertNewsFeed(:Update, current_user, current_user)
|
24
25
|
news_feed_event = current_user.news_feed_events.last
|
25
26
|
assert_equal news_feed_event.text, 'You have updated a User: Bob Smith'
|
27
|
+
assert_equal news_feed_event.event_type_object, 'UpdateUser'
|
26
28
|
end
|
27
29
|
|
28
30
|
def test_for_delete_an_object_sent_to_multiple_recipients
|
@@ -32,6 +34,7 @@ class NewsFeedTest < Test::Unit::TestCase
|
|
32
34
|
message.insertNewsFeed(:Delete, user_1, current_user)
|
33
35
|
news_feed_event = user_1.news_feed_events.last
|
34
36
|
assert_equal news_feed_event.text, 'Bob Smith has deleted a Message: Message Title'
|
37
|
+
assert_equal news_feed_event.event_type_object, 'DeleteMessage'
|
35
38
|
end
|
36
39
|
|
37
40
|
def test_for_multiple_news_feeds
|
@@ -50,7 +53,20 @@ class NewsFeedTest < Test::Unit::TestCase
|
|
50
53
|
message.insertNewsFeed(:Send, [user_1, current_user], current_user)
|
51
54
|
news_feed_event_1 = user_1.news_feed_events.last
|
52
55
|
assert_equal news_feed_event_1.text, 'Bob Smith has sent you a Message: Message Title'
|
56
|
+
assert_equal news_feed_event_1.event_type_object, 'SendMessage'
|
53
57
|
news_feed_event_2 = current_user.news_feed_events.last
|
54
58
|
assert_equal news_feed_event_2.text, 'You have sent Bob Smith a Message: Message Title'
|
55
59
|
end
|
60
|
+
|
61
|
+
def test_for_sending_an_object_to_multiple_recipients
|
62
|
+
user_1 = User.create
|
63
|
+
current_user = User.create
|
64
|
+
message = Message.create
|
65
|
+
message.insertNewsFeed(:Custom, [user_1, current_user], current_user, "This is my custom message!")
|
66
|
+
news_feed_event_1 = user_1.news_feed_events.last
|
67
|
+
assert_equal news_feed_event_1.text, 'This is my custom message!'
|
68
|
+
assert_equal news_feed_event_1.event_type_object, 'CustomMessage'
|
69
|
+
news_feed_event_2 = current_user.news_feed_events.last
|
70
|
+
assert_equal news_feed_event_2.text, 'This is my custom message!'
|
71
|
+
end
|
56
72
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module NewsFeed
|
2
2
|
module NewsFeedEvents
|
3
|
-
def generate_text(event_name, actor_name, object_class, object_title, recipient_name = nil)
|
3
|
+
def generate_text(event_name, actor_name, object_class, object_title, recipient_name = nil, options = {})
|
4
4
|
# event_name is what the cases will check for
|
5
5
|
# actor_name is the user object that performs the action
|
6
6
|
# object_class is the class of the object of interest
|
@@ -19,6 +19,12 @@ module NewsFeed
|
|
19
19
|
when :Send
|
20
20
|
I18n.t('news_feeds.send_object', actor: actor_name.to_s, object_class: object_class,
|
21
21
|
object_name: object_title, recipient_name: recipient_name)
|
22
|
+
when :Custom
|
23
|
+
if options.nil?
|
24
|
+
raise "Custom Message must be specified"
|
25
|
+
else
|
26
|
+
options
|
27
|
+
end
|
22
28
|
else
|
23
29
|
raise "event_name is undefined"
|
24
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: news_feed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|