change_manager 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/change_manager/change.rb +15 -5
- data/app/services/change_manager/manager.rb +7 -2
- data/lib/change_manager/version.rb +1 -1
- data/spec/testapp/log/test.log +173 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4ca1041a7bb2a56d9bceadd454a18b83e0d0fd4
|
4
|
+
data.tar.gz: 4dc9837a22a92693261502741f0bf76833714d9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bea8aab90f80a84d067382bd8060fa8374954538b573130746f834ae20755bcd3c904bcbd0b81e6a56a2be6daaea154b9d59604adef11128e5979f35961c901
|
7
|
+
data.tar.gz: eda5f73b570a79bb90da2bf9d6abc3da6283dab1cc4544106a8b00ee47941c69f7dfe599e9b10e5ccdb3b3cc38b3e843fb019423063d2b7dbb79c850253f9826
|
@@ -13,7 +13,8 @@ module ChangeManager
|
|
13
13
|
change_type: change_type,
|
14
14
|
context: context,
|
15
15
|
target: target,
|
16
|
-
cancelled: cancelled
|
16
|
+
cancelled: cancelled,
|
17
|
+
notified: false
|
17
18
|
})
|
18
19
|
foo.id
|
19
20
|
end
|
@@ -23,17 +24,26 @@ module ChangeManager
|
|
23
24
|
self.save
|
24
25
|
end
|
25
26
|
|
27
|
+
def notify
|
28
|
+
self.notified = true
|
29
|
+
self.save
|
30
|
+
end
|
31
|
+
|
26
32
|
def cancelled?
|
27
33
|
self.cancelled
|
28
34
|
end
|
29
35
|
|
36
|
+
def notified?
|
37
|
+
self.notified
|
38
|
+
end
|
39
|
+
|
30
40
|
def inverse_of?(possible_inverse_change)
|
31
|
-
is_inverse = false
|
32
41
|
@change_types ||= YAML.load_file(File.join(ChangeManager::Engine.root, 'config/change_types.yaml'))
|
33
|
-
if self.
|
34
|
-
|
42
|
+
if self.context == possible_inverse_change.context
|
43
|
+
self.change_type == @change_types[possible_inverse_change.change_type]['inverse']
|
44
|
+
else
|
45
|
+
false
|
35
46
|
end
|
36
|
-
return is_inverse
|
37
47
|
end
|
38
48
|
end
|
39
49
|
end
|
@@ -49,8 +49,13 @@ module ChangeManager
|
|
49
49
|
|
50
50
|
def self.notify_users(changes)
|
51
51
|
mailer = ChangeManager::NotificationMailer
|
52
|
-
mailer.send_email(mailer.construct_email(changes))
|
52
|
+
if mailer.send_email(mailer.construct_email(changes))
|
53
|
+
changes.each do |change|
|
54
|
+
change.notify
|
55
|
+
end
|
56
|
+
return true
|
57
|
+
end
|
58
|
+
false
|
53
59
|
end
|
54
|
-
|
55
60
|
end
|
56
61
|
end
|
data/spec/testapp/log/test.log
CHANGED
@@ -499,3 +499,176 @@ The Scholar@UC team
|
|
499
499
|
[1m[35mSQL (0.1ms)[0m UPDATE "change_manager_changes" SET "cancelled" = ?, "updated_at" = ? WHERE "change_manager_changes"."id" = 4 [["cancelled", true], ["updated_at", Wed, 18 May 2016 16:09:24 UTC +00:00]]
|
500
500
|
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
501
501
|
[1m[35m (0.7ms)[0m rollback transaction
|
502
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
503
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
504
|
+
[1m[36mSQL (53.9ms)[0m [1mINSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["cancelled", false], ["change_type", "removed_as_delegate"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "test"], ["target", "testemail@gmail.com"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
505
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
506
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
507
|
+
[1m[35m (0.1ms)[0m begin transaction
|
508
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
509
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["cancelled", false], ["change_type", "added_as_editor"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
510
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
511
|
+
[1m[35mChangeManager::Change Load (0.1ms)[0m SELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1 [["id", 1]]
|
512
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
513
|
+
[1m[35mSQL (28.5ms)[0m INSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["cancelled", false], ["change_type", "added_as_delegate"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
514
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
515
|
+
[1m[35mChangeManager::Change Load (0.1ms)[0m SELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1 [["id", 2]]
|
516
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
517
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["cancelled", false], ["change_type", "added_to_group"], ["context", "work_id2"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target2"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
518
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
519
|
+
[1m[35mChangeManager::Change Load (0.1ms)[0m SELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1 [["id", 3]]
|
520
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
521
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["cancelled", false], ["change_type", "added_to_group"], ["context", "work_id2"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner1"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
522
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
523
|
+
[1m[35mChangeManager::Change Load (0.1ms)[0m SELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1 [["id", 4]]
|
524
|
+
[1m[36mChangeManager::Change Load (0.2ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."owner" = 'owner' AND "change_manager_changes"."target" = 'target' AND "change_manager_changes"."cancelled" = 'f'[0m
|
525
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
526
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
527
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
528
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["cancelled", false], ["change_type", "added_to_group"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
529
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
530
|
+
[1m[36mChangeManager::Change Load (0.1ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1[0m [["id", 1]]
|
531
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
532
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["cancelled", false], ["change_type", "added_to_group"], ["context", "work_id4"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
533
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
534
|
+
[1m[36mChangeManager::Change Load (0.1ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1[0m [["id", 2]]
|
535
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
536
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["cancelled", false], ["change_type", "added_as_delegate"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
537
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
538
|
+
[1m[36mChangeManager::Change Load (0.1ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1[0m [["id", 3]]
|
539
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
540
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["cancelled", false], ["change_type", "removed_as_delegate"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
541
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
542
|
+
[1m[36mChangeManager::Change Load (0.0ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1[0m [["id", 4]]
|
543
|
+
[1m[35mChangeManager::Change Load (0.1ms)[0m SELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."owner" = 'owner' AND "change_manager_changes"."target" = 'target' AND "change_manager_changes"."cancelled" = 'f'
|
544
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
545
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "change_manager_changes" SET "cancelled" = ?, "updated_at" = ? WHERE "change_manager_changes"."id" = 3 [["cancelled", true], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
546
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
547
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
548
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "change_manager_changes" SET "cancelled" = ?, "updated_at" = ? WHERE "change_manager_changes"."id" = 4[0m [["cancelled", true], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
549
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
550
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
551
|
+
[1m[35m (0.0ms)[0m begin transaction
|
552
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
553
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["cancelled", false], ["change_type", "added_to_group"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
554
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
555
|
+
[1m[35mChangeManager::Change Load (0.0ms)[0m SELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1 [["id", 1]]
|
556
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
557
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["cancelled", false], ["change_type", "added_to_group"], ["context", "work_id4"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
558
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
559
|
+
[1m[35mChangeManager::Change Load (0.0ms)[0m SELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1 [["id", 2]]
|
560
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
561
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["cancelled", false], ["change_type", "added_as_delegate"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
562
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
563
|
+
[1m[35mChangeManager::Change Load (0.0ms)[0m SELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1 [["id", 3]]
|
564
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
565
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["cancelled", false], ["change_type", "removed_as_delegate"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
566
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
567
|
+
[1m[35mChangeManager::Change Load (0.0ms)[0m SELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1 [["id", 4]]
|
568
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
569
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["cancelled", false], ["change_type", "added_as_delegate"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
570
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
571
|
+
[1m[35mChangeManager::Change Load (0.0ms)[0m SELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1 [["id", 5]]
|
572
|
+
[1m[36mChangeManager::Change Load (0.1ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."owner" = 'owner' AND "change_manager_changes"."target" = 'target' AND "change_manager_changes"."cancelled" = 'f'[0m
|
573
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
574
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "change_manager_changes" SET "cancelled" = ?, "updated_at" = ? WHERE "change_manager_changes"."id" = 3[0m [["cancelled", true], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
575
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
576
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
577
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "change_manager_changes" SET "cancelled" = ?, "updated_at" = ? WHERE "change_manager_changes"."id" = 4 [["cancelled", true], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
578
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
579
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
580
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
581
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
582
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["cancelled", false], ["change_type", "added_as_editor"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
583
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
584
|
+
[1m[36mChangeManager::Change Load (0.0ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1[0m [["id", 1]]
|
585
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
586
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["cancelled", false], ["change_type", "added_to_group"], ["context", "work_id4"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
587
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
588
|
+
[1m[36mChangeManager::Change Load (0.0ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1[0m [["id", 2]]
|
589
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
590
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "notified", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["cancelled", false], ["change_type", "added_as_delegate"], ["context", "work_id1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["notified", nil], ["owner", "owner"], ["target", "target"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
591
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
592
|
+
[1m[36mChangeManager::Change Load (0.0ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1[0m [["id", 3]]
|
593
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
594
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "change_manager_changes" SET "cancelled" = ?, "updated_at" = ? WHERE "change_manager_changes"."id" = 2[0m [["cancelled", true], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
595
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
596
|
+
[1m[36mChangeManager::Change Load (0.1ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."owner" = 'owner' AND "change_manager_changes"."target" = 'target' AND "change_manager_changes"."cancelled" = 'f'[0m
|
597
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
598
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
599
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
600
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["cancelled", true], ["change_type", "added_as_delegate"], ["context", "1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["owner", "email@test.com"], ["target", "spec@test.com"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
601
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
602
|
+
[1m[36mChangeManager::Change Load (0.0ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1[0m [["id", 1]]
|
603
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
604
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
605
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
606
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["cancelled", false], ["change_type", "added_as_delegate"], ["context", "1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["owner", "email@test.com"], ["target", "spec@test.com"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
607
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
608
|
+
[1m[36mChangeManager::Change Load (0.0ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1[0m [["id", 1]]
|
609
|
+
[1m[35mChangeManager::Change Load (0.0ms)[0m SELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."id" = ? LIMIT 1 [["id", 1]]
|
610
|
+
[1m[36mChangeManager::Change Load (0.1ms)[0m [1mSELECT "change_manager_changes".* FROM "change_manager_changes" WHERE "change_manager_changes"."owner" = 'email@test.com' AND "change_manager_changes"."target" = 'spec@test.com' AND "change_manager_changes"."cancelled" = 'f'[0m
|
611
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
612
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "change_manager_changes" SET "cancelled" = ?, "updated_at" = ? WHERE "change_manager_changes"."id" = 1[0m [["cancelled", true], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
613
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
614
|
+
Rendered /Users/kyle/workspace/change_manager/app/views/change_manager/notification_mailer/construct_email.html.erb (1.9ms)
|
615
|
+
|
616
|
+
Sent mail to spec@test.com (33.1ms)
|
617
|
+
Date: Fri, 20 May 2016 16:30:42 -0400
|
618
|
+
From: email@test.com
|
619
|
+
To: spec@test.com
|
620
|
+
Message-ID: <573f73f2b8506_32913fedd5863be023087@kyles-mbp.lang.uc.edu.mail>
|
621
|
+
Subject: Updates from Scholar@UC
|
622
|
+
Mime-Version: 1.0
|
623
|
+
Content-Type: text/html;
|
624
|
+
charset=UTF-8
|
625
|
+
Content-Transfer-Encoding: 7bit
|
626
|
+
|
627
|
+
<!-- mailer template here -->
|
628
|
+
<div>
|
629
|
+
Dear Scholar@UC User,
|
630
|
+
</div>
|
631
|
+
<br>
|
632
|
+
This email is to inform you that the following changes have been made to your account:
|
633
|
+
<br><br>
|
634
|
+
<table><th><td>Change Owner</td><td>Change Context</td><td>Change</td><td>Time</td></th><tr><td>email@test.com</td><td>1</td><td>added_as_delegate</td><td>2016-05-20 20:30:42 UTC</td></tr></table>
|
635
|
+
|
636
|
+
Changes can include:
|
637
|
+
<br>
|
638
|
+
<ul>
|
639
|
+
<li>Being added/removed as another contributor's delegate</li>
|
640
|
+
<li>Being added/removed as an editor of a work</li>
|
641
|
+
<li>Being added/removed to a group</li>
|
642
|
+
</ul>
|
643
|
+
|
644
|
+
|
645
|
+
Thanks,
|
646
|
+
The Scholar@UC team
|
647
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
648
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "change_manager_changes" SET "notified" = ?, "updated_at" = ? WHERE "change_manager_changes"."id" = 1 [["notified", nil], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
649
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
650
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
651
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
652
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
653
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
654
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
655
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
656
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
657
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["cancelled", false], ["change_type", "added_as_delegate"], ["context", "1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["owner", "email@test.com"], ["target", "spec@test.com"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
658
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
659
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
660
|
+
[1m[35m (0.1ms)[0m begin transaction
|
661
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
662
|
+
[1m[35m (0.1ms)[0m begin transaction
|
663
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
664
|
+
[1m[35m (0.1ms)[0m begin transaction
|
665
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
666
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "change_manager_changes" ("cancelled", "change_type", "context", "created_at", "owner", "target", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["cancelled", true], ["change_type", "added_as_delegate"], ["context", "1"], ["created_at", Fri, 20 May 2016 20:30:42 UTC +00:00], ["owner", "email@test.com"], ["target", "spec@test.com"], ["updated_at", Fri, 20 May 2016 20:30:42 UTC +00:00]]
|
667
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
668
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
669
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
670
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
671
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
672
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
673
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
674
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: change_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Lawhorn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|