marks 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/marks/marker.rb +1 -1
- data/lib/marks/version.rb +1 -1
- data/test/dummy/log/test.log +61 -0
- metadata +4 -4
data/lib/marks/marker.rb
CHANGED
@@ -26,7 +26,7 @@ module Marks
|
|
26
26
|
define_method :'unmarks' do |markable, mark|
|
27
27
|
classified_mark = mark.to_s.classify
|
28
28
|
raise ArgumentError unless types.map { |t| t.to_s.classify }.include?(classified_mark)
|
29
|
-
outgoing_marks.where(mark_type: classified_mark, markable_type: markable.class.table_name.classify, markable_id: markable).
|
29
|
+
outgoing_marks.where(mark_type: classified_mark, markable_type: markable.class.table_name.classify, markable_id: markable).destroy_all
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
data/lib/marks/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -1393,3 +1393,64 @@ Connecting to database specified by database.yml
|
|
1393
1393
|
[1m[36mUser Load (0.2ms)[0m [1mSELECT "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)[0m
|
1394
1394
|
[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"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
|
1395
1395
|
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
1396
|
+
Connecting to database specified by database.yml
|
1397
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1398
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1399
|
+
[1m[36mSQL (19.8ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1400
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1401
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1402
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1403
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1404
|
+
[1m[35m (0.5ms)[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)
|
1405
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
1406
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "marks_marks" ("created_at", "mark_type", "markable_id", "markable_type", "marker_id", "marker_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1407
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1408
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1409
|
+
[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", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1410
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1411
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1412
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "marks_marks" ("created_at", "mark_type", "markable_id", "markable_type", "marker_id", "marker_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1413
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1414
|
+
[1m[35mUser Load (0.1ms)[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)
|
1415
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
1416
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1417
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1418
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1419
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1420
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1421
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1422
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1423
|
+
[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
|
1424
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1425
|
+
[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", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1426
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1427
|
+
[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
|
1428
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1429
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1430
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1431
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1432
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1433
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1434
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1435
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1436
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1437
|
+
[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", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1438
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1439
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1440
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "marks_marks" ("created_at", "mark_type", "markable_id", "markable_type", "marker_id", "marker_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1441
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1442
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1443
|
+
[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", Fri, 18 Jan 2013 09:46:02 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Fri, 18 Jan 2013 09:46:02 UTC +00:00]]
|
1444
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1445
|
+
[1m[36mMarks::Mark Load (0.2ms)[0m [1mSELECT "marks_marks".* 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
|
1446
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1447
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "marks_marks" WHERE "marks_marks"."id" = ?[0m [["id", 1]]
|
1448
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1449
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1450
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "marks_marks" WHERE "marks_marks"."id" = ? [["id", 2]]
|
1451
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1452
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1453
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "marks_marks" WHERE "marks_marks"."id" = ?[0m [["id", 3]]
|
1454
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1455
|
+
[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
|
1456
|
+
[1m[35m (0.5ms)[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.4
|
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: 2013-01-
|
12
|
+
date: 2013-01-18 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: -3972426840610909345
|
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: -3972426840610909345
|
128
128
|
requirements: []
|
129
129
|
rubyforge_project:
|
130
130
|
rubygems_version: 1.8.23
|