marks 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/db/migrate/20121116121923_create_marks_marks.rb +2 -2
- data/lib/marks/markable.rb +1 -1
- data/lib/marks/marker.rb +2 -2
- data/lib/marks/version.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +3 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +121 -0
- data/test/dummy/log/test.log +101 -0
- metadata +4 -4
@@ -3,9 +3,9 @@ class CreateMarksMarks < ActiveRecord::Migration
|
|
3
3
|
create_table :marks_marks do |t|
|
4
4
|
t.references :marker, polymorphic: true
|
5
5
|
t.references :markable, polymorphic: true
|
6
|
-
t.string :
|
6
|
+
t.string :mark_type
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :marks_marks, [:
|
9
|
+
add_index :marks_marks, [:mark_type, :markable_type, :markable_id]
|
10
10
|
end
|
11
11
|
end
|
data/lib/marks/markable.rb
CHANGED
@@ -11,7 +11,7 @@ module Marks
|
|
11
11
|
classified_mark = mark.to_s.classify
|
12
12
|
raise ArgumentError unless types.map { |t| t.to_s.classify }.include?(classified_mark)
|
13
13
|
klass = class_name.to_s.classify.constantize
|
14
|
-
klass.joins(:outgoing_marks).where('marks_marks.
|
14
|
+
klass.joins(:outgoing_marks).where('marks_marks.mark_type = ? AND markable_type = ? AND markable_id = ?', mark.to_s.classify, self.class.base_class.to_s, self)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/lib/marks/marker.rb
CHANGED
@@ -11,7 +11,7 @@ module Marks
|
|
11
11
|
classified_mark = mark.to_s.classify
|
12
12
|
raise ArgumentError unless types.map { |t| t.to_s.classify }.include?(classified_mark)
|
13
13
|
Marks::Mark.create do |c|
|
14
|
-
c.
|
14
|
+
c.mark_type = classified_mark
|
15
15
|
c.marker = self
|
16
16
|
c.markable = markable
|
17
17
|
end
|
@@ -20,7 +20,7 @@ module Marks
|
|
20
20
|
define_method :'marks?' do |markable, mark|
|
21
21
|
classified_mark = mark.to_s.classify
|
22
22
|
raise ArgumentError unless types.map { |t| t.to_s.classify }.include?(classified_mark)
|
23
|
-
outgoing_marks.where(
|
23
|
+
outgoing_marks.where(mark_type: classified_mark, markable_type: markable.class.table_name.classify, markable_id: markable).any?
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
data/lib/marks/version.rb
CHANGED
Binary file
|
data/test/dummy/db/schema.rb
CHANGED
@@ -18,11 +18,13 @@ ActiveRecord::Schema.define(:version => 20121116121923) do
|
|
18
18
|
t.string "marker_type"
|
19
19
|
t.integer "markable_id"
|
20
20
|
t.string "markable_type"
|
21
|
-
t.string "
|
21
|
+
t.string "mark_type"
|
22
22
|
t.datetime "created_at", :null => false
|
23
23
|
t.datetime "updated_at", :null => false
|
24
24
|
end
|
25
25
|
|
26
|
+
add_index "marks_marks", ["mark_type", "markable_type", "markable_id"], :name => "index_marks_marks_on_mark_type_and_markable_type_and_markable_id"
|
27
|
+
|
26
28
|
create_table "replies", :force => true do |t|
|
27
29
|
t.datetime "created_at", :null => false
|
28
30
|
t.datetime "updated_at", :null => false
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -177,3 +177,124 @@ Connecting to database specified by database.yml
|
|
177
177
|
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20121116121913')[0m
|
178
178
|
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20121116121922')
|
179
179
|
[1m[36m (1.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
180
|
+
Connecting to database specified by database.yml
|
181
|
+
[1m[36m (3.5ms)[0m [1mselect sqlite_version(*)[0m
|
182
|
+
[1m[35m (1.3ms)[0m CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
183
|
+
[1m[36m (3.3ms)[0m [1mCREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
184
|
+
[1m[35m (4.5ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
185
|
+
[1m[36m (2.6ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
186
|
+
[1m[35m (4.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
187
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
188
|
+
[1m[35m (14.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20121116121923')
|
189
|
+
[1m[36m (1.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20121116121913')[0m
|
190
|
+
[1m[35m (6.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20121116121922')
|
191
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
192
|
+
Connecting to database specified by database.yml
|
193
|
+
[1m[36m (2.1ms)[0m [1mselect sqlite_version(*)[0m
|
194
|
+
[1m[35m (2.1ms)[0m DROP TABLE "marks_marks"
|
195
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
196
|
+
[1m[35m (1.2ms)[0m DROP TABLE "replies"
|
197
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
198
|
+
[1m[35m (12.2ms)[0m DROP TABLE "users"
|
199
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
200
|
+
[1m[35m (2.1ms)[0m SELECT version FROM "schema_migrations"
|
201
|
+
[1m[36m (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
202
|
+
Connecting to database specified by database.yml
|
203
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
204
|
+
[1m[35m (0.4ms)[0m select sqlite_version(*)
|
205
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
206
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
207
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
208
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
209
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
210
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
211
|
+
[1m[36m (2.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20121116121923')[0m
|
212
|
+
[1m[35m (1.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20121116121913')
|
213
|
+
[1m[36m (1.4ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20121116121922')[0m
|
214
|
+
Connecting to database specified by database.yml
|
215
|
+
[1m[36m (1.9ms)[0m [1mselect sqlite_version(*)[0m
|
216
|
+
[1m[35m (5.4ms)[0m CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
217
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
218
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
219
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
220
|
+
[1m[35m (1.5ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
221
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
222
|
+
[1m[35m (1.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20121116121923')
|
223
|
+
[1m[36m (1.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20121116121913')[0m
|
224
|
+
[1m[35m (6.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20121116121922')
|
225
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
226
|
+
Connecting to database specified by database.yml
|
227
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
228
|
+
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
229
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
230
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
231
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
232
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
233
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
234
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
235
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20121116121923')[0m
|
236
|
+
[1m[35m (1.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20121116121913')
|
237
|
+
[1m[36m (1.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20121116121922')[0m
|
238
|
+
Connecting to database specified by database.yml
|
239
|
+
Connecting to database specified by database.yml
|
240
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
241
|
+
Migrating to CreateUsers (20121116121913)
|
242
|
+
Migrating to CreateReplies (20121116121922)
|
243
|
+
Migrating to CreateMarksMarks (20121116121923)
|
244
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
245
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
246
|
+
Connecting to database specified by database.yml
|
247
|
+
[1m[36m (1.9ms)[0m [1mselect sqlite_version(*)[0m
|
248
|
+
[1m[35m (1.7ms)[0m DROP TABLE "marks_marks"
|
249
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
250
|
+
[1m[35m (0.9ms)[0m DROP TABLE "replies"
|
251
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
252
|
+
[1m[35m (0.8ms)[0m DROP TABLE "users"
|
253
|
+
[1m[36m (1.6ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
254
|
+
[1m[35m (0.3ms)[0m SELECT version FROM "schema_migrations"
|
255
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
256
|
+
Connecting to database specified by database.yml
|
257
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
258
|
+
[1m[35m (0.4ms)[0m select sqlite_version(*)
|
259
|
+
[1m[36m (1.0ms)[0m [1mDROP TABLE "marks_marks"[0m
|
260
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
261
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "replies"[0m
|
262
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
263
|
+
[1m[36m (0.8ms)[0m [1mDROP TABLE "users"[0m
|
264
|
+
[1m[35m (1.6ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
265
|
+
[1m[36m (0.4ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
266
|
+
Connecting to database specified by database.yml
|
267
|
+
[1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
|
268
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
269
|
+
[1m[36m (1.0ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
270
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
271
|
+
Migrating to CreateUsers (20121116121913)
|
272
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
273
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
274
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20121116121913')[0m
|
275
|
+
[1m[35m (1.0ms)[0m commit transaction
|
276
|
+
Migrating to CreateReplies (20121116121922)
|
277
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
278
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
279
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20121116121922')[0m
|
280
|
+
[1m[35m (1.8ms)[0m commit transaction
|
281
|
+
Migrating to CreateMarksMarks (20121116121923)
|
282
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
283
|
+
[1m[35m (3.6ms)[0m CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "mark_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
284
|
+
[1m[36m (0.2ms)[0m [1mCREATE INDEX "index_marks_marks_on_mark_type_and_markable_type_and_markable_id" ON "marks_marks" ("mark_type", "markable_type", "markable_id")[0m
|
285
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20121116121923')
|
286
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
287
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
288
|
+
Connecting to database specified by database.yml
|
289
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
290
|
+
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
291
|
+
[1m[36m (1.7ms)[0m [1mCREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "mark_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
292
|
+
[1m[35m (1.7ms)[0m CREATE INDEX "index_marks_marks_on_mark_type_and_markable_type_and_markable_id" ON "marks_marks" ("mark_type", "markable_type", "markable_id")
|
293
|
+
[1m[36m (7.5ms)[0m [1mCREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
294
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
295
|
+
[1m[36m (21.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
296
|
+
[1m[35m (10.5ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
297
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
298
|
+
[1m[35m (8.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20121116121923')
|
299
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20121116121913')[0m
|
300
|
+
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20121116121922')
|
data/test/dummy/log/test.log
CHANGED
@@ -1100,3 +1100,104 @@ Connecting to database specified by database.yml
|
|
1100
1100
|
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1101
1101
|
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
|
1102
1102
|
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
1103
|
+
Connecting to database specified by database.yml
|
1104
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1105
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1106
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1107
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1108
|
+
Connecting to database specified by database.yml
|
1109
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
1110
|
+
[1m[35m (2.9ms)[0m SAVEPOINT active_record_1
|
1111
|
+
[1m[36mSQL (9.1ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 19 Nov 2012 12:54:16 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:54:16 UTC +00:00]]
|
1112
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1113
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1114
|
+
[1m[35mSQL (18.6ms)[0m INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00]]
|
1115
|
+
[1m[36m (4.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1116
|
+
[1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
|
1117
|
+
SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
|
1118
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
1119
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1120
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1121
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00]]
|
1122
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1123
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1124
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00]]
|
1125
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1126
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1[0m
|
1127
|
+
SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
|
1128
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
1129
|
+
Connecting to database specified by database.yml
|
1130
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
1131
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1132
|
+
[1m[36mSQL (8.3ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00]]
|
1133
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1134
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1135
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00]]
|
1136
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1137
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
|
1138
|
+
SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
|
1139
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
1140
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1141
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1142
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00]]
|
1143
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1144
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1145
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00]]
|
1146
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1147
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1[0m
|
1148
|
+
SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
|
1149
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
1150
|
+
Connecting to database specified by database.yml
|
1151
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
1152
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1153
|
+
[1m[36mSQL (6.4ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00]]
|
1154
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1155
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1156
|
+
[1m[35mSQL (19.6ms)[0m INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00]]
|
1157
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1158
|
+
[1m[35m (14.3ms)[0m SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
|
1159
|
+
SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
|
1160
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
1161
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1162
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1163
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00]]
|
1164
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1165
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1166
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00]]
|
1167
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1168
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1[0m
|
1169
|
+
SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
|
1170
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
1171
|
+
Connecting to database specified by database.yml
|
1172
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
1173
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1174
|
+
[1m[36mSQL (5.7ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
|
1175
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1176
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1177
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
|
1178
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1179
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
|
1180
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1181
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "marks_marks" ("created_at", "mark_type", "markable_id", "markable_type", "marker_id", "marker_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
|
1182
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1183
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1184
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "marks_marks" ("created_at", "mark_type", "markable_id", "markable_type", "marker_id", "marker_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
|
1185
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1186
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1187
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "marks_marks" ("created_at", "mark_type", "markable_id", "markable_type", "marker_id", "marker_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
|
1188
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1189
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
|
1190
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
1191
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1192
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1193
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
|
1194
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1195
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1196
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
|
1197
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1198
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1[0m
|
1199
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1200
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "marks_marks" ("created_at", "mark_type", "markable_id", "markable_type", "marker_id", "marker_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
|
1201
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1202
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1[0m
|
1203
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
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-11-
|
12
|
+
date: 2012-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -115,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
115
|
version: '0'
|
116
116
|
segments:
|
117
117
|
- 0
|
118
|
-
hash:
|
118
|
+
hash: -356722490955600964
|
119
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
120
|
none: false
|
121
121
|
requirements:
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: '0'
|
125
125
|
segments:
|
126
126
|
- 0
|
127
|
-
hash:
|
127
|
+
hash: -356722490955600964
|
128
128
|
requirements: []
|
129
129
|
rubyforge_project:
|
130
130
|
rubygems_version: 1.8.23
|