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 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).delete_all
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
@@ -1,3 +1,3 @@
1
1
  module Marks
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -1393,3 +1393,64 @@ Connecting to database specified by database.yml
1393
1393
  User Load (0.2ms) 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)
1394
1394
   (0.1ms) 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
   (0.4ms) rollback transaction
1396
+ Connecting to database specified by database.yml
1397
+  (0.3ms) begin transaction
1398
+  (0.0ms) SAVEPOINT active_record_1
1399
+ SQL (19.8ms) 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]]
1400
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1401
+  (0.0ms) SAVEPOINT active_record_1
1402
+ SQL (1.2ms) 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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1404
+  (0.5ms) 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
+  (0.3ms) SAVEPOINT active_record_1
1406
+ SQL (0.8ms) 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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1408
+  (0.0ms) SAVEPOINT active_record_1
1409
+ SQL (0.2ms) 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]]
1410
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1411
+  (0.0ms) SAVEPOINT active_record_1
1412
+ SQL (0.1ms) 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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1414
+ User Load (0.1ms) 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
+  (1.0ms) rollback transaction
1416
+  (0.0ms) begin transaction
1417
+  (0.0ms) SAVEPOINT active_record_1
1418
+ SQL (0.3ms) 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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1420
+  (0.0ms) SAVEPOINT active_record_1
1421
+ SQL (0.2ms) 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]]
1422
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1423
+  (0.2ms) 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
1424
+  (0.1ms) SAVEPOINT active_record_1
1425
+ SQL (0.3ms) 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]]
1426
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1427
+  (0.1ms) 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
1428
+  (0.5ms) rollback transaction
1429
+  (0.0ms) begin transaction
1430
+  (0.0ms) SAVEPOINT active_record_1
1431
+ SQL (0.5ms) 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]]
1432
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1433
+  (0.0ms) SAVEPOINT active_record_1
1434
+ SQL (0.4ms) 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
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1436
+  (0.0ms) SAVEPOINT active_record_1
1437
+ SQL (0.3ms) 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]]
1438
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1439
+  (0.0ms) SAVEPOINT active_record_1
1440
+ SQL (0.3ms) 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
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1442
+  (0.0ms) SAVEPOINT active_record_1
1443
+ SQL (0.2ms) 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]]
1444
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1445
+ Marks::Mark Load (0.2ms) SELECT "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
1446
+  (0.1ms) SAVEPOINT active_record_1
1447
+ SQL (0.1ms) DELETE FROM "marks_marks" WHERE "marks_marks"."id" = ? [["id", 1]]
1448
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1449
+  (0.0ms) SAVEPOINT active_record_1
1450
+ SQL (0.1ms) DELETE FROM "marks_marks" WHERE "marks_marks"."id" = ? [["id", 2]]
1451
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1452
+  (0.0ms) SAVEPOINT active_record_1
1453
+ SQL (0.1ms) DELETE FROM "marks_marks" WHERE "marks_marks"."id" = ? [["id", 3]]
1454
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1455
+  (0.1ms) 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
1456
+  (0.5ms) 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.3
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-17 00:00:00.000000000 Z
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: 692714029956290424
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: 692714029956290424
127
+ hash: -3972426840610909345
128
128
  requirements: []
129
129
  rubyforge_project:
130
130
  rubygems_version: 1.8.23