rooler 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/rooler/liquid_inspector.rb +3 -1
- data/lib/rooler/version.rb +1 -1
- data/test/dummy/app/models/bar.rb +1 -1
- data/test/dummy/log/test.log +2511 -0
- data/test/models/rooler/template_test.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDBkZjdmNWEzMzYzZDJjNjdhOTFjNzVlOWMxZjk5NGJiMWYwOTdiMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTEzMzcyYmJlYjg3ZjlhN2VkYmZmYjk0ODQxMmY1YmQ2ZGExMjUyOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWM2Y2M0NjQ4OTZmM2JhZDZiZmE3ZjgxODRlMGQyMTY5OTcxYTViMmU3NTRm
|
10
|
+
ODkyNDRiZGY4N2JiZWM5M2YwNmIyOTBlYmM3NTQzMDMwOTBiODViOTg3ODc4
|
11
|
+
ZWVjYjM2ODQwNjljMWFlOWNmNTQxMmI1ZmEwMGVlYWUzMmQzMWE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTAyN2Q2NGMxNDhmNGQzZjIzNTI3OTVkNjg2NDg2MDcxYWIyZTRmMjUxYWM5
|
14
|
+
MDM4Y2UzY2U1NWY4OWU1NDMzMzg4ZTMwYjYwYzQ3ZTU1MDJmODFkYTMwY2Nh
|
15
|
+
ODUxYzA5NmEwODM1MzUyYzgwNDkxZjZlNzY3ZGI2ZTViN2YyNzU=
|
@@ -18,7 +18,9 @@ module Rooler
|
|
18
18
|
klass = klass_name.to_s.classify.constantize
|
19
19
|
add_nodes_to_tree(tree, liquid_methods(klass))
|
20
20
|
associations(klass).each do |association|
|
21
|
-
|
21
|
+
unless tree.parentage && tree.parentage.map(&:name).include?(association.name.to_s)
|
22
|
+
add_liquid_methods_as_nodes(tree[association.name.to_sym], association.class_name)
|
23
|
+
end
|
22
24
|
end
|
23
25
|
return tree
|
24
26
|
end
|
data/lib/rooler/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -47675,3 +47675,2514 @@ RoolerTest: test_resets_resetable_deliveries
|
|
47675
47675
|
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47676
47676
|
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47677
47677
|
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
47678
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
47679
|
+
----------------------------------------
|
47680
|
+
Rooler::DeliveryMailerTest: test_deliver
|
47681
|
+
----------------------------------------
|
47682
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47683
|
+
[1m[36mSQL (36.9ms)[0m [1mINSERT INTO "rooler_templates" ("body", "cc", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["body", "body is: {{rule.name}}"], ["cc", "{{rule.name}}@cc.com"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47684
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47685
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47686
|
+
[1m[35mSQL (1.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 421], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47687
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47688
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47689
|
+
[1m[36mRooler::Delivery Exists (11.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 379 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 379) LIMIT 1[0m
|
47690
|
+
[1m[35mSQL (1.6ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["deliverable_id", 379], ["deliverable_type", "Rooler::Rule"], ["rule_id", 379], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47691
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47692
|
+
[1m[35mRooler::Template Load (1.1ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 379]]
|
47693
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (18.8ms)
|
47694
|
+
|
47695
|
+
Sent mail to test_name@to.com (84.7ms)
|
47696
|
+
Date: Fri, 28 Mar 2014 17:27:39 +0100
|
47697
|
+
From: default@myapp.com
|
47698
|
+
To: test_name@to.com
|
47699
|
+
Cc: test_name@cc.com
|
47700
|
+
Message-ID: <5335a2fb73cd3_186683ff042034cd4779e9@Yonahs-MacBook-Pro.local.mail>
|
47701
|
+
Subject: subject is: test_name
|
47702
|
+
Mime-Version: 1.0
|
47703
|
+
Content-Type: text/html;
|
47704
|
+
charset=UTF-8
|
47705
|
+
Content-Transfer-Encoding: 7bit
|
47706
|
+
|
47707
|
+
body is: test_name
|
47708
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
47709
|
+
[1m[35m (0.2ms)[0m BEGIN
|
47710
|
+
---------------------------------------------------------------------------------------
|
47711
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
47712
|
+
---------------------------------------------------------------------------------------
|
47713
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47714
|
+
[1m[35mSQL (1.3ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47715
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47716
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47717
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47718
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47719
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47720
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 422], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47721
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47722
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
47723
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47724
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47725
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47726
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47727
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 423], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47728
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47729
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47730
|
+
[1m[35m (0.1ms)[0m BEGIN
|
47731
|
+
------------------------------------------------------------------------------
|
47732
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
47733
|
+
------------------------------------------------------------------------------
|
47734
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47735
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47736
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47737
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47738
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-3"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47739
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47740
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47741
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 424], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47742
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47743
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47744
|
+
[1m[36m (0.5ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 382]]
|
47745
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
47746
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47747
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 382 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 254) LIMIT 1
|
47748
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["deliverable_id", 254], ["deliverable_type", "Foo"], ["rule_id", 382], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47749
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47750
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:27:39.573393' WHERE "rooler_rules"."id" = 382[0m
|
47751
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47752
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47753
|
+
[1m[35m (0.5ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 382]]
|
47754
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (254))[0m
|
47755
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:27:39.577950' WHERE "rooler_rules"."id" = 382
|
47756
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47757
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
47758
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
47759
|
+
--------------------------------------------------------------------------------------------------------
|
47760
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
47761
|
+
--------------------------------------------------------------------------------------------------------
|
47762
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
47763
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47764
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47765
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47766
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47767
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47768
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47769
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47770
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47771
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47772
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 425], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47773
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47774
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
47775
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
47776
|
+
[1m[35m (0.1ms)[0m BEGIN
|
47777
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
47778
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
47779
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
47780
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47781
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47782
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47783
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47784
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-5"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47785
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47786
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47787
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 426], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47788
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47789
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47790
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-6"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47791
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47792
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47793
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 427], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47794
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47795
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 384]]
|
47796
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
47797
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47798
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 384 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 257) LIMIT 1[0m
|
47799
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["deliverable_id", 257], ["deliverable_type", "Foo"], ["rule_id", 384], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47800
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47801
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:27:39.646057' WHERE "rooler_rules"."id" = 384
|
47802
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
47803
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 385]]
|
47804
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47805
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 385 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 257) LIMIT 1
|
47806
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["deliverable_id", 257], ["deliverable_type", "Foo"], ["rule_id", 385], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47807
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47808
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:27:39.653331' WHERE "rooler_rules"."id" = 385[0m
|
47809
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47810
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47811
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47812
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 384]]
|
47813
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 384]]
|
47814
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (257))[0m
|
47815
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 385]]
|
47816
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
47817
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 385]]
|
47818
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 385]]
|
47819
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
47820
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
47821
|
+
----------------------------------------------------------------------------------------------------
|
47822
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
47823
|
+
----------------------------------------------------------------------------------------------------
|
47824
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47825
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47826
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47827
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47828
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47829
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47830
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47831
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 428], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47832
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47833
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 386]]
|
47834
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
47835
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
47836
|
+
[1m[35mRooler::Delivery Exists (0.5ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 386 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 259) LIMIT 1
|
47837
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["deliverable_id", 259], ["deliverable_type", "Foo"], ["rule_id", 386], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47838
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47839
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:27:39.688961' WHERE "rooler_rules"."id" = 386[0m
|
47840
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 386]]
|
47841
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (259))[0m
|
47842
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47843
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 386]]
|
47844
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (259))
|
47845
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:27:39.695937' WHERE "rooler_rules"."id" = 386[0m
|
47846
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47847
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47848
|
+
[1m[35mSQL (0.7ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 259 [["active", false], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47849
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47850
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47851
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 386]]
|
47852
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
47853
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (259)[0m [["rule_id", 386]]
|
47854
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47855
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 194]]
|
47856
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47857
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47858
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47859
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 259[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47860
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47861
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47862
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 386]]
|
47863
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
47864
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47865
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 386 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 259) LIMIT 1[0m
|
47866
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["deliverable_id", 259], ["deliverable_type", "Foo"], ["rule_id", 386], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47867
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47868
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:27:39.719343' WHERE "rooler_rules"."id" = 386
|
47869
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47870
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
47871
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47872
|
+
-------------------------------------------------------------------------------------------------------------------------
|
47873
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
47874
|
+
-------------------------------------------------------------------------------------------------------------------------
|
47875
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47876
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47877
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47878
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47879
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:18:39 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 429], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47880
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47881
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47882
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47883
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
47884
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47885
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:16:39 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 430], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47886
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47887
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47888
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47889
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47890
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47891
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 431], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47892
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47893
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47894
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47895
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47896
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47897
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 432], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47898
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47899
|
+
[1m[35mRooler::Rule Load (0.7ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
47900
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47901
|
+
[1m[35m (0.1ms)[0m BEGIN
|
47902
|
+
---------------------------------------------------------------------------------------
|
47903
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
47904
|
+
---------------------------------------------------------------------------------------
|
47905
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47906
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-12"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47907
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47908
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47909
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
47910
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47911
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47912
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47913
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47914
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
47915
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47916
|
+
[1m[35m (0.1ms)[0m BEGIN
|
47917
|
+
--------------------------------------------------------------------------
|
47918
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
47919
|
+
--------------------------------------------------------------------------
|
47920
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47921
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47922
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47923
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47924
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 435], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47925
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47926
|
+
[1m[36mRooler::Rule Load (0.8ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 435]]
|
47927
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
47928
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47929
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47930
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47931
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47932
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47933
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47934
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
47935
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
47936
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
47937
|
+
----------------------------------------------------------------------------------
|
47938
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
47939
|
+
----------------------------------------------------------------------------------
|
47940
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47941
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47942
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47943
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47944
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 436], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47945
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47946
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47947
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:27:39 UTC +00:00]]
|
47948
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47949
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 436]]
|
47950
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
47951
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47952
|
+
----------------------------------------
|
47953
|
+
Rooler::DeliveryMailerTest: test_deliver
|
47954
|
+
----------------------------------------
|
47955
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47956
|
+
[1m[36mSQL (38.9ms)[0m [1mINSERT INTO "rooler_templates" ("body", "cc", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["body", "body is: {{rule.name}}"], ["cc", "{{rule.name}}@cc.com"], ["created_at", Fri, 28 Mar 2014 16:29:16 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 16:29:16 UTC +00:00]]
|
47957
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47958
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47959
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:16 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 437], ["updated_at", Fri, 28 Mar 2014 16:29:16 UTC +00:00]]
|
47960
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47961
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
47962
|
+
[1m[36mRooler::Delivery Exists (1.8ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 393 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 393) LIMIT 1[0m
|
47963
|
+
[1m[35mSQL (1.3ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["deliverable_id", 393], ["deliverable_type", "Rooler::Rule"], ["rule_id", 393], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
47964
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47965
|
+
[1m[35mRooler::Template Load (1.2ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 393]]
|
47966
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (3.5ms)
|
47967
|
+
|
47968
|
+
Sent mail to test_name@to.com (83.1ms)
|
47969
|
+
Date: Fri, 28 Mar 2014 17:29:17 +0100
|
47970
|
+
From: default@myapp.com
|
47971
|
+
To: test_name@to.com
|
47972
|
+
Cc: test_name@cc.com
|
47973
|
+
Message-ID: <5335a35d47a91_983fd521c34cdc31888@Yonahs-MacBook-Pro.local.mail>
|
47974
|
+
Subject: subject is: test_name
|
47975
|
+
Mime-Version: 1.0
|
47976
|
+
Content-Type: text/html;
|
47977
|
+
charset=UTF-8
|
47978
|
+
Content-Transfer-Encoding: 7bit
|
47979
|
+
|
47980
|
+
body is: test_name
|
47981
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
47982
|
+
[1m[35m (0.2ms)[0m BEGIN
|
47983
|
+
---------------------------------------------------------------------------------------
|
47984
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
47985
|
+
---------------------------------------------------------------------------------------
|
47986
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
47987
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
47988
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47989
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47990
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
47991
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47992
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47993
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 438], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
47994
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47995
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
47996
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47997
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
47998
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47999
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48000
|
+
[1m[36mSQL (0.9ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 439], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48001
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48002
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
48003
|
+
[1m[35m (0.1ms)[0m BEGIN
|
48004
|
+
------------------------------------------------------------------------------
|
48005
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
48006
|
+
------------------------------------------------------------------------------
|
48007
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48008
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48009
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48010
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48011
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-3"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48012
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48013
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48014
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 440], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48015
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48016
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48017
|
+
[1m[36m (0.6ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 396]]
|
48018
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
48019
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48020
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 396 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 264) LIMIT 1
|
48021
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["deliverable_id", 264], ["deliverable_type", "Foo"], ["rule_id", 396], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48022
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48023
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:29:17.385541' WHERE "rooler_rules"."id" = 396[0m
|
48024
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48025
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48026
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 396]]
|
48027
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (264))[0m
|
48028
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:29:17.390709' WHERE "rooler_rules"."id" = 396
|
48029
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48030
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
48031
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
48032
|
+
--------------------------------------------------------------------------------------------------------
|
48033
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
48034
|
+
--------------------------------------------------------------------------------------------------------
|
48035
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48036
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48037
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48038
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48039
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48040
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48041
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48042
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48043
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48044
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48045
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 441], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48046
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48047
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
48048
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
48049
|
+
[1m[35m (0.2ms)[0m BEGIN
|
48050
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
48051
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
48052
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
48053
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48054
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48055
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48056
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48057
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-5"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48058
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48059
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48060
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 442], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48061
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48062
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48063
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-6"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48064
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48065
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48066
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 443], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48067
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48068
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 398]]
|
48069
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
48070
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48071
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 398 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 267) LIMIT 1[0m
|
48072
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["deliverable_id", 267], ["deliverable_type", "Foo"], ["rule_id", 398], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48073
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48074
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:29:17.445821' WHERE "rooler_rules"."id" = 398
|
48075
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
48076
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 399]]
|
48077
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48078
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 399 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 267) LIMIT 1
|
48079
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["deliverable_id", 267], ["deliverable_type", "Foo"], ["rule_id", 399], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48080
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48081
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:29:17.453266' WHERE "rooler_rules"."id" = 399[0m
|
48082
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48083
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48084
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
48085
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 398]]
|
48086
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 398]]
|
48087
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (267))[0m
|
48088
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 399]]
|
48089
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
48090
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 399]]
|
48091
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 399]]
|
48092
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
48093
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
48094
|
+
----------------------------------------------------------------------------------------------------
|
48095
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
48096
|
+
----------------------------------------------------------------------------------------------------
|
48097
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48098
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48099
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48100
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48101
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48102
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48103
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48104
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 444], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48105
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48106
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 400]]
|
48107
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
48108
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48109
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 400 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 269) LIMIT 1
|
48110
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["deliverable_id", 269], ["deliverable_type", "Foo"], ["rule_id", 400], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48111
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48112
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:29:17.488740' WHERE "rooler_rules"."id" = 400[0m
|
48113
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 400]]
|
48114
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (269))[0m
|
48115
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48116
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 400]]
|
48117
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (269))
|
48118
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:29:17.494983' WHERE "rooler_rules"."id" = 400[0m
|
48119
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48120
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48121
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 269 [["active", false], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48122
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48123
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48124
|
+
[1m[36m (0.4ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 400]]
|
48125
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
48126
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (269)[0m [["rule_id", 400]]
|
48127
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48128
|
+
[1m[36mSQL (0.4ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 200]]
|
48129
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48130
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48131
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48132
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 269[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48133
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48134
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48135
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 400]]
|
48136
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
48137
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48138
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 400 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 269) LIMIT 1[0m
|
48139
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["deliverable_id", 269], ["deliverable_type", "Foo"], ["rule_id", 400], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48140
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48141
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:29:17.524576' WHERE "rooler_rules"."id" = 400
|
48142
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48143
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
48144
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
48145
|
+
-------------------------------------------------------------------------------------------------------------------------
|
48146
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
48147
|
+
-------------------------------------------------------------------------------------------------------------------------
|
48148
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48149
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48150
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48151
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48152
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:20:17 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 445], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48153
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48154
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48155
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48156
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
48157
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48158
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:18:17 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 446], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48159
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48160
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48161
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48162
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48163
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48164
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 447], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48165
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48166
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48167
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48168
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48169
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48170
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 448], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48171
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48172
|
+
[1m[35mRooler::Rule Load (0.7ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
48173
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
48174
|
+
[1m[35m (0.1ms)[0m BEGIN
|
48175
|
+
---------------------------------------------------------------------------------------
|
48176
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
48177
|
+
---------------------------------------------------------------------------------------
|
48178
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48179
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-12"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48180
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48181
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48182
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
48183
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48184
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48185
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48186
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48187
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
48188
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
48189
|
+
[1m[35m (0.1ms)[0m BEGIN
|
48190
|
+
--------------------------------------------------------------------------
|
48191
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
48192
|
+
--------------------------------------------------------------------------
|
48193
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48194
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48195
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48196
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48197
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 451], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48198
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48199
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 451]]
|
48200
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
48201
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48202
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48203
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48204
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48205
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48206
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48207
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
48208
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
48209
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
48210
|
+
----------------------------------------------------------------------------------
|
48211
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
48212
|
+
----------------------------------------------------------------------------------
|
48213
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48214
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48215
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48216
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48217
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 452], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48218
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48219
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48220
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48221
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48222
|
+
[1m[36mRooler::Rule Load (0.8ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 452]]
|
48223
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
48224
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
48225
|
+
[1m[35m (0.2ms)[0m BEGIN
|
48226
|
+
----------------------------------------
|
48227
|
+
RoolerTest: test_delivers_pending_emails
|
48228
|
+
----------------------------------------
|
48229
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48230
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48231
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48232
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48233
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 453], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48234
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48235
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48236
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48237
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48238
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48239
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 454], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48240
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48241
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48242
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 407 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 408) LIMIT 1
|
48243
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["deliverable_id", 408], ["deliverable_type", "Rooler::Rule"], ["rule_id", 407], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48244
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48245
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
48246
|
+
[1m[35mRooler::Template Load (0.5ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 407]]
|
48247
|
+
[1m[36mRooler::Rule Load (0.8ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1[0m [["id", 408]]
|
48248
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
48249
|
+
|
48250
|
+
Sent mail to test@email.com (14.9ms)
|
48251
|
+
Date: Fri, 28 Mar 2014 17:29:17 +0100
|
48252
|
+
From: default@myapp.com
|
48253
|
+
To: test@email.com
|
48254
|
+
Message-ID: <5335a35dbb932_983fd521c34cdc319dc@Yonahs-MacBook-Pro.local.mail>
|
48255
|
+
Subject: subject-16
|
48256
|
+
Mime-Version: 1.0
|
48257
|
+
Content-Type: text/html;
|
48258
|
+
charset=UTF-8
|
48259
|
+
Content-Transfer-Encoding: 7bit
|
48260
|
+
|
48261
|
+
body-16
|
48262
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 16:29:17.781247' WHERE "rooler_deliveries"."id" = 202
|
48263
|
+
[1m[36mRooler::Delivery Load (0.9ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 202]]
|
48264
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
48265
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
48266
|
+
------------------------------------------
|
48267
|
+
RoolerTest: test_processes_scheduled_rules
|
48268
|
+
------------------------------------------
|
48269
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48270
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48271
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48272
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48273
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48274
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48275
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48276
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 455], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48277
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48278
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48279
|
+
[1m[35mRooler::Rule Load (0.4ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
48280
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 409]]
|
48281
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
48282
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48283
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 409 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 273) LIMIT 1
|
48284
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["deliverable_id", 273], ["deliverable_type", "Foo"], ["rule_id", 409], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48285
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
48286
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:29:17.861255' WHERE "rooler_rules"."id" = 409[0m
|
48287
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48288
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
48289
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 273]]
|
48290
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
48291
|
+
[1m[35m (0.2ms)[0m BEGIN
|
48292
|
+
--------------------------------------------
|
48293
|
+
RoolerTest: test_resets_resetable_deliveries
|
48294
|
+
--------------------------------------------
|
48295
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48296
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48297
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48298
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48299
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48300
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48301
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48302
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 456], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48303
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48304
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 410]]
|
48305
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
48306
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48307
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 410 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 274) LIMIT 1[0m
|
48308
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00], ["deliverable_id", 274], ["deliverable_type", "Foo"], ["rule_id", 410], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48309
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48310
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:29:17.888827' WHERE "rooler_rules"."id" = 410
|
48311
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48312
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 274 [["active", false], ["updated_at", Fri, 28 Mar 2014 16:29:17 UTC +00:00]]
|
48313
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48314
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48315
|
+
[1m[36mRooler::Rule Load (0.4ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
48316
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 410]]
|
48317
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
48318
|
+
[1m[35mRooler::Delivery Load (0.5ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (274) [["rule_id", 410]]
|
48319
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48320
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 204]]
|
48321
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48322
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48323
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
48324
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
48325
|
+
----------------------------------------
|
48326
|
+
Rooler::DeliveryMailerTest: test_deliver
|
48327
|
+
----------------------------------------
|
48328
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
48329
|
+
[1m[36mSQL (21.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "cc", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["body", "body is: {{rule.name}}"], ["cc", "{{rule.name}}@cc.com"], ["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48330
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48331
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48332
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 457], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48333
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48334
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48335
|
+
[1m[36mRooler::Delivery Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 411 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 411) LIMIT 1[0m
|
48336
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["deliverable_id", 411], ["deliverable_type", "Rooler::Rule"], ["rule_id", 411], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48337
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48338
|
+
[1m[35mRooler::Template Load (1.1ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 411]]
|
48339
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (4.2ms)
|
48340
|
+
|
48341
|
+
Sent mail to test_name@to.com (96.0ms)
|
48342
|
+
Date: Fri, 28 Mar 2014 17:31:04 +0100
|
48343
|
+
From: default@myapp.com
|
48344
|
+
To: test_name@to.com
|
48345
|
+
Cc: test_name@cc.com
|
48346
|
+
Message-ID: <5335a3c8c58df_1423fef88434ce0829fc@Yonahs-MacBook-Pro.local.mail>
|
48347
|
+
Subject: subject is: test_name
|
48348
|
+
Mime-Version: 1.0
|
48349
|
+
Content-Type: text/html;
|
48350
|
+
charset=UTF-8
|
48351
|
+
Content-Transfer-Encoding: 7bit
|
48352
|
+
|
48353
|
+
body is: test_name
|
48354
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
48355
|
+
[1m[35m (0.3ms)[0m BEGIN
|
48356
|
+
---------------------------------------------------------------------------------------
|
48357
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
48358
|
+
---------------------------------------------------------------------------------------
|
48359
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48360
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48361
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48362
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48363
|
+
[1m[36mSQL (1.2ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48364
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48365
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48366
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 458], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48367
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48368
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
48369
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48370
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48371
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48372
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48373
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 459], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48374
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48375
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
48376
|
+
[1m[35m (0.1ms)[0m BEGIN
|
48377
|
+
------------------------------------------------------------------------------
|
48378
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
48379
|
+
------------------------------------------------------------------------------
|
48380
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48381
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48382
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48383
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48384
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-3"], ["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48385
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48386
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48387
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 460], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48388
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48389
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48390
|
+
[1m[36m (0.7ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 414]]
|
48391
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
48392
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48393
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 414 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 276) LIMIT 1
|
48394
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["deliverable_id", 276], ["deliverable_type", "Foo"], ["rule_id", 414], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48395
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48396
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:04.902590' WHERE "rooler_rules"."id" = 414[0m
|
48397
|
+
[1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48398
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48399
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 414]]
|
48400
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (276))[0m
|
48401
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:04.909273' WHERE "rooler_rules"."id" = 414
|
48402
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48403
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
48404
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
48405
|
+
--------------------------------------------------------------------------------------------------------
|
48406
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
48407
|
+
--------------------------------------------------------------------------------------------------------
|
48408
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48409
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48410
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48411
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48412
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48413
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48414
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48415
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48416
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48417
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48418
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 461], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48419
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48420
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
48421
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
48422
|
+
[1m[35m (0.3ms)[0m BEGIN
|
48423
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
48424
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
48425
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
48426
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48427
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48428
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48429
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48430
|
+
[1m[36mSQL (0.9ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-5"], ["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48431
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48432
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48433
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 462], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48434
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48435
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48436
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-6"], ["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48437
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48438
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48439
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 463], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48440
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48441
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 416]]
|
48442
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
48443
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48444
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 416 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 279) LIMIT 1[0m
|
48445
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["deliverable_id", 279], ["deliverable_type", "Foo"], ["rule_id", 416], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48446
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48447
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:04.981176' WHERE "rooler_rules"."id" = 416
|
48448
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
48449
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 417]]
|
48450
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48451
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 417 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 279) LIMIT 1
|
48452
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["deliverable_id", 279], ["deliverable_type", "Foo"], ["rule_id", 417], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48453
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
48454
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:04.990216' WHERE "rooler_rules"."id" = 417[0m
|
48455
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48456
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:04 UTC +00:00]]
|
48457
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48458
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 416]]
|
48459
|
+
[1m[35m (0.5ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 416]]
|
48460
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (279))[0m
|
48461
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 417]]
|
48462
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
48463
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 417]]
|
48464
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 417]]
|
48465
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
48466
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
48467
|
+
----------------------------------------------------------------------------------------------------
|
48468
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
48469
|
+
----------------------------------------------------------------------------------------------------
|
48470
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48471
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48472
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48473
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48474
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48475
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48476
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48477
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 464], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48478
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48479
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 418]]
|
48480
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
48481
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48482
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 418 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 281) LIMIT 1
|
48483
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["deliverable_id", 281], ["deliverable_type", "Foo"], ["rule_id", 418], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48484
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48485
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:05.023153' WHERE "rooler_rules"."id" = 418[0m
|
48486
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 418]]
|
48487
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (281))[0m
|
48488
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48489
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 418]]
|
48490
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (281))
|
48491
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:05.028308' WHERE "rooler_rules"."id" = 418[0m
|
48492
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48493
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48494
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 281 [["active", false], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48495
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48496
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48497
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 418]]
|
48498
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
48499
|
+
[1m[36mRooler::Delivery Load (0.6ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (281)[0m [["rule_id", 418]]
|
48500
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48501
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 209]]
|
48502
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48503
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48504
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48505
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 281[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48506
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48507
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48508
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 418]]
|
48509
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
48510
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48511
|
+
[1m[36mRooler::Delivery Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 418 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 281) LIMIT 1[0m
|
48512
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["deliverable_id", 281], ["deliverable_type", "Foo"], ["rule_id", 418], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48513
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48514
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:05.059034' WHERE "rooler_rules"."id" = 418
|
48515
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48516
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
48517
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
48518
|
+
-------------------------------------------------------------------------------------------------------------------------
|
48519
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
48520
|
+
-------------------------------------------------------------------------------------------------------------------------
|
48521
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48522
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48523
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48524
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48525
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:22:05 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 465], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48526
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48527
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48528
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48529
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48530
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48531
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:20:05 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 466], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48532
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48533
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48534
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48535
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48536
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48537
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 467], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48538
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48539
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48540
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48541
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48542
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48543
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 468], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48544
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48545
|
+
[1m[35mRooler::Rule Load (0.7ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
48546
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
48547
|
+
[1m[35m (0.1ms)[0m BEGIN
|
48548
|
+
---------------------------------------------------------------------------------------
|
48549
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
48550
|
+
---------------------------------------------------------------------------------------
|
48551
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48552
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-12"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48553
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48554
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48555
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
48556
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48557
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48558
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48559
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
48560
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
48561
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
48562
|
+
[1m[35m (0.2ms)[0m BEGIN
|
48563
|
+
--------------------------------------------------------------------------
|
48564
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
48565
|
+
--------------------------------------------------------------------------
|
48566
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48567
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48568
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48569
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48570
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 471], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48571
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48572
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 471]]
|
48573
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
48574
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48575
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48576
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48577
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48578
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48579
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48580
|
+
[1m[36mFoo Load (0.5ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
48581
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
48582
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
48583
|
+
----------------------------------------------------------------------------------
|
48584
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
48585
|
+
----------------------------------------------------------------------------------
|
48586
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48587
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48588
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
48589
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48590
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 472], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48591
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48592
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48593
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48594
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48595
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
48596
|
+
[1m[35m (0.2ms)[0m BEGIN
|
48597
|
+
----------------------------------------
|
48598
|
+
RoolerTest: test_delivers_pending_emails
|
48599
|
+
----------------------------------------
|
48600
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48601
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48602
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48603
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48604
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 473], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48605
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48606
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48607
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48608
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48609
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48610
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 474], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48611
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48612
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48613
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 425 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 426) LIMIT 1
|
48614
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["deliverable_id", 426], ["deliverable_type", "Rooler::Rule"], ["rule_id", 425], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48615
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48616
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
48617
|
+
[1m[35mRooler::Template Load (0.7ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 425]]
|
48618
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1[0m [["id", 426]]
|
48619
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
48620
|
+
|
48621
|
+
Sent mail to test@email.com (16.8ms)
|
48622
|
+
Date: Fri, 28 Mar 2014 17:31:05 +0100
|
48623
|
+
From: default@myapp.com
|
48624
|
+
To: test@email.com
|
48625
|
+
Message-ID: <5335a3c94813a_1423fef88434ce083042@Yonahs-MacBook-Pro.local.mail>
|
48626
|
+
Subject: subject-16
|
48627
|
+
Mime-Version: 1.0
|
48628
|
+
Content-Type: text/html;
|
48629
|
+
charset=UTF-8
|
48630
|
+
Content-Transfer-Encoding: 7bit
|
48631
|
+
|
48632
|
+
body-16
|
48633
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 16:31:05.308741' WHERE "rooler_deliveries"."id" = 211
|
48634
|
+
[1m[36mRooler::Delivery Load (0.7ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 211]]
|
48635
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
48636
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
48637
|
+
------------------------------------------
|
48638
|
+
RoolerTest: test_processes_scheduled_rules
|
48639
|
+
------------------------------------------
|
48640
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48641
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48642
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48643
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48644
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48645
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48646
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48647
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 475], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48648
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48649
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48650
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
48651
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 427]]
|
48652
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
48653
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48654
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 427 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 285) LIMIT 1
|
48655
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["deliverable_id", 285], ["deliverable_type", "Foo"], ["rule_id", 427], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48656
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48657
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:05.333237' WHERE "rooler_rules"."id" = 427[0m
|
48658
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48659
|
+
[1m[36mRooler::Delivery Load (0.6ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
48660
|
+
[1m[35mFoo Load (0.7ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 285]]
|
48661
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
48662
|
+
[1m[35m (0.2ms)[0m BEGIN
|
48663
|
+
--------------------------------------------
|
48664
|
+
RoolerTest: test_resets_resetable_deliveries
|
48665
|
+
--------------------------------------------
|
48666
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48667
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48668
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48669
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48670
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48671
|
+
[1m[35m (58.9ms)[0m RELEASE SAVEPOINT active_record_1
|
48672
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48673
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 476], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48674
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48675
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 428]]
|
48676
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
48677
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48678
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 428 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 286) LIMIT 1[0m
|
48679
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00], ["deliverable_id", 286], ["deliverable_type", "Foo"], ["rule_id", 428], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48680
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48681
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:05.421263' WHERE "rooler_rules"."id" = 428
|
48682
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48683
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 286 [["active", false], ["updated_at", Fri, 28 Mar 2014 16:31:05 UTC +00:00]]
|
48684
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48685
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48686
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
48687
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 428]]
|
48688
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
48689
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (286) [["rule_id", 428]]
|
48690
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48691
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 213]]
|
48692
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48693
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48694
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
48695
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
48696
|
+
----------------------------------------
|
48697
|
+
Rooler::DeliveryMailerTest: test_deliver
|
48698
|
+
----------------------------------------
|
48699
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48700
|
+
[1m[36mSQL (78.4ms)[0m [1mINSERT INTO "rooler_templates" ("body", "cc", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["body", "body is: {{rule.name}}"], ["cc", "{{rule.name}}@cc.com"], ["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48701
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48702
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
48703
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 477], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48704
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48705
|
+
[1m[35m (0.4ms)[0m SAVEPOINT active_record_1
|
48706
|
+
[1m[36mRooler::Delivery Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 429 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 429) LIMIT 1[0m
|
48707
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["deliverable_id", 429], ["deliverable_type", "Rooler::Rule"], ["rule_id", 429], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48708
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48709
|
+
[1m[35mRooler::Template Load (1.2ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 429]]
|
48710
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (10.4ms)
|
48711
|
+
|
48712
|
+
Sent mail to test_name@to.com (77.4ms)
|
48713
|
+
Date: Fri, 28 Mar 2014 17:31:31 +0100
|
48714
|
+
From: default@myapp.com
|
48715
|
+
To: test_name@to.com
|
48716
|
+
Cc: test_name@cc.com
|
48717
|
+
Message-ID: <5335a3e3b3288_1643fe1cdc34cd854011@Yonahs-MacBook-Pro.local.mail>
|
48718
|
+
Subject: subject is: test_name
|
48719
|
+
Mime-Version: 1.0
|
48720
|
+
Content-Type: text/html;
|
48721
|
+
charset=UTF-8
|
48722
|
+
Content-Transfer-Encoding: 7bit
|
48723
|
+
|
48724
|
+
body is: test_name
|
48725
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
48726
|
+
[1m[35m (0.1ms)[0m BEGIN
|
48727
|
+
---------------------------------------------------------------------------------------
|
48728
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
48729
|
+
---------------------------------------------------------------------------------------
|
48730
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48731
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48732
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48733
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48734
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48735
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48736
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
48737
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 478], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48738
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48739
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
48740
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48741
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48742
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48743
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48744
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 479], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48745
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48746
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
48747
|
+
[1m[35m (0.1ms)[0m BEGIN
|
48748
|
+
------------------------------------------------------------------------------
|
48749
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
48750
|
+
------------------------------------------------------------------------------
|
48751
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48752
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48753
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48754
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48755
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-3"], ["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48756
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48757
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48758
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 480], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48759
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48760
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48761
|
+
[1m[36m (0.8ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 432]]
|
48762
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
48763
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48764
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 432 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 288) LIMIT 1
|
48765
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["deliverable_id", 288], ["deliverable_type", "Foo"], ["rule_id", 432], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48766
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48767
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:31.866416' WHERE "rooler_rules"."id" = 432[0m
|
48768
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48769
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48770
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 432]]
|
48771
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (288))[0m
|
48772
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:31.870753' WHERE "rooler_rules"."id" = 432
|
48773
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48774
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
48775
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
48776
|
+
--------------------------------------------------------------------------------------------------------
|
48777
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
48778
|
+
--------------------------------------------------------------------------------------------------------
|
48779
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48780
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48781
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48782
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48783
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48784
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48785
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48786
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48787
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48788
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48789
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 481], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48790
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48791
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
48792
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
48793
|
+
[1m[35m (0.2ms)[0m BEGIN
|
48794
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
48795
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
48796
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
48797
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48798
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48799
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48800
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48801
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-5"], ["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48802
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48803
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48804
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 482], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48805
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48806
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48807
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-6"], ["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48808
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48809
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48810
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 483], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48811
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48812
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 434]]
|
48813
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
48814
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48815
|
+
[1m[36mRooler::Delivery Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 434 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 291) LIMIT 1[0m
|
48816
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["deliverable_id", 291], ["deliverable_type", "Foo"], ["rule_id", 434], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48817
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48818
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:31.923491' WHERE "rooler_rules"."id" = 434
|
48819
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
48820
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 435]]
|
48821
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48822
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 435 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 291) LIMIT 1
|
48823
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["deliverable_id", 291], ["deliverable_type", "Foo"], ["rule_id", 435], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48824
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48825
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:31.930649' WHERE "rooler_rules"."id" = 435[0m
|
48826
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48827
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48828
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48829
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 434]]
|
48830
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 434]]
|
48831
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (291))[0m
|
48832
|
+
[1m[35mRooler::Rule Load (0.4ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 435]]
|
48833
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
48834
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 435]]
|
48835
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 435]]
|
48836
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
48837
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
48838
|
+
----------------------------------------------------------------------------------------------------
|
48839
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
48840
|
+
----------------------------------------------------------------------------------------------------
|
48841
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48842
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48843
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48844
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48845
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48846
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48847
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48848
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 484], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48849
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48850
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 436]]
|
48851
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
48852
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48853
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 436 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 293) LIMIT 1
|
48854
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["deliverable_id", 293], ["deliverable_type", "Foo"], ["rule_id", 436], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48855
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48856
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:31.960857' WHERE "rooler_rules"."id" = 436[0m
|
48857
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 436]]
|
48858
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (293))[0m
|
48859
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48860
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 436]]
|
48861
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (293))
|
48862
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:31.966421' WHERE "rooler_rules"."id" = 436[0m
|
48863
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48864
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48865
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 293 [["active", false], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48866
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48867
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
48868
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 436]]
|
48869
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
48870
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (293)[0m [["rule_id", 436]]
|
48871
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48872
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 218]]
|
48873
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48874
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48875
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48876
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 293[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48877
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48878
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48879
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 436]]
|
48880
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
48881
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48882
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 436 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 293) LIMIT 1[0m
|
48883
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["deliverable_id", 293], ["deliverable_type", "Foo"], ["rule_id", 436], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48884
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48885
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:31.990331' WHERE "rooler_rules"."id" = 436
|
48886
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
48887
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
48888
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
48889
|
+
-------------------------------------------------------------------------------------------------------------------------
|
48890
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
48891
|
+
-------------------------------------------------------------------------------------------------------------------------
|
48892
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48893
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48894
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48895
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48896
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:22:31 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 485], ["updated_at", Fri, 28 Mar 2014 16:31:31 UTC +00:00]]
|
48897
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48898
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48899
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48900
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48901
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48902
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:20:32 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 486], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48903
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48904
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48905
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48906
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48907
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48908
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 487], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48909
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48910
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48911
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48912
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48913
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48914
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 488], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48915
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48916
|
+
[1m[35mRooler::Rule Load (0.7ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
48917
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
48918
|
+
[1m[35m (0.1ms)[0m BEGIN
|
48919
|
+
---------------------------------------------------------------------------------------
|
48920
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
48921
|
+
---------------------------------------------------------------------------------------
|
48922
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48923
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-12"], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48924
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48925
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48926
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
48927
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48928
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48929
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48930
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48931
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
48932
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
48933
|
+
[1m[35m (0.1ms)[0m BEGIN
|
48934
|
+
--------------------------------------------------------------------------
|
48935
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
48936
|
+
--------------------------------------------------------------------------
|
48937
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48938
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48939
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48940
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48941
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 491], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48942
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48943
|
+
[1m[36mRooler::Rule Load (0.8ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 491]]
|
48944
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
48945
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48946
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48947
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48948
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48949
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48950
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48951
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
48952
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
48953
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
48954
|
+
----------------------------------------------------------------------------------
|
48955
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
48956
|
+
----------------------------------------------------------------------------------
|
48957
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
48958
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48959
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48960
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48961
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 492], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48962
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48963
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48964
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48965
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48966
|
+
[1m[36mRooler::Rule Load (0.9ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 492]]
|
48967
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
48968
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
48969
|
+
[1m[35m (0.2ms)[0m BEGIN
|
48970
|
+
----------------------------------------
|
48971
|
+
RoolerTest: test_delivers_pending_emails
|
48972
|
+
----------------------------------------
|
48973
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48974
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48975
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48976
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48977
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 493], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48978
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48979
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
48980
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48981
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48982
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
48983
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 494], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48984
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
48985
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
48986
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 443 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 444) LIMIT 1
|
48987
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["deliverable_id", 444], ["deliverable_type", "Rooler::Rule"], ["rule_id", 443], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
48988
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
48989
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
48990
|
+
[1m[35mRooler::Template Load (0.5ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 443]]
|
48991
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1[0m [["id", 444]]
|
48992
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
48993
|
+
|
48994
|
+
Sent mail to test@email.com (18.2ms)
|
48995
|
+
Date: Fri, 28 Mar 2014 17:31:32 +0100
|
48996
|
+
From: default@myapp.com
|
48997
|
+
To: test@email.com
|
48998
|
+
Message-ID: <5335a3e4a2e5c_1643fe1cdc34cd854140@Yonahs-MacBook-Pro.local.mail>
|
48999
|
+
Subject: subject-16
|
49000
|
+
Mime-Version: 1.0
|
49001
|
+
Content-Type: text/html;
|
49002
|
+
charset=UTF-8
|
49003
|
+
Content-Transfer-Encoding: 7bit
|
49004
|
+
|
49005
|
+
body-16
|
49006
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 16:31:32.683865' WHERE "rooler_deliveries"."id" = 220
|
49007
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 220]]
|
49008
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
49009
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
49010
|
+
------------------------------------------
|
49011
|
+
RoolerTest: test_processes_scheduled_rules
|
49012
|
+
------------------------------------------
|
49013
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49014
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
49015
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49016
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49017
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
49018
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49019
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49020
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 495], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
49021
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49022
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49023
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
49024
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 445]]
|
49025
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
49026
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49027
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 445 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 297) LIMIT 1
|
49028
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["deliverable_id", 297], ["deliverable_type", "Foo"], ["rule_id", 445], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
49029
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49030
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:32.710729' WHERE "rooler_rules"."id" = 445[0m
|
49031
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49032
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
49033
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 297]]
|
49034
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
49035
|
+
[1m[35m (0.1ms)[0m BEGIN
|
49036
|
+
--------------------------------------------
|
49037
|
+
RoolerTest: test_resets_resetable_deliveries
|
49038
|
+
--------------------------------------------
|
49039
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49040
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
49041
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49042
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49043
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
49044
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49045
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49046
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 496], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
49047
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49048
|
+
[1m[35m (0.5ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 446]]
|
49049
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
49050
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49051
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 446 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 298) LIMIT 1[0m
|
49052
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00], ["deliverable_id", 298], ["deliverable_type", "Foo"], ["rule_id", 446], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
49053
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49054
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:31:32.735424' WHERE "rooler_rules"."id" = 446
|
49055
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
49056
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 298 [["active", false], ["updated_at", Fri, 28 Mar 2014 16:31:32 UTC +00:00]]
|
49057
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49058
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49059
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
49060
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 446]]
|
49061
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
49062
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (298) [["rule_id", 446]]
|
49063
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49064
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 222]]
|
49065
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49066
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49067
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
49068
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
49069
|
+
----------------------------------------
|
49070
|
+
Rooler::DeliveryMailerTest: test_deliver
|
49071
|
+
----------------------------------------
|
49072
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49073
|
+
[1m[36mSQL (9.4ms)[0m [1mINSERT INTO "rooler_templates" ("body", "cc", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["body", "body is: {{rule.name}}"], ["cc", "{{rule.name}}@cc.com"], ["created_at", Fri, 28 Mar 2014 16:32:12 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 16:32:12 UTC +00:00]]
|
49074
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49075
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49076
|
+
[1m[35mSQL (1.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:12 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 497], ["updated_at", Fri, 28 Mar 2014 16:32:12 UTC +00:00]]
|
49077
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49078
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49079
|
+
[1m[36mRooler::Delivery Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 447 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 447) LIMIT 1[0m
|
49080
|
+
[1m[35mSQL (1.7ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:12 UTC +00:00], ["deliverable_id", 447], ["deliverable_type", "Rooler::Rule"], ["rule_id", 447], ["updated_at", Fri, 28 Mar 2014 16:32:12 UTC +00:00]]
|
49081
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49082
|
+
[1m[35mRooler::Template Load (1.9ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 447]]
|
49083
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (3.4ms)
|
49084
|
+
|
49085
|
+
Sent mail to test_name@to.com (67.5ms)
|
49086
|
+
Date: Fri, 28 Mar 2014 17:32:13 +0100
|
49087
|
+
From: default@myapp.com
|
49088
|
+
To: test_name@to.com
|
49089
|
+
Cc: test_name@cc.com
|
49090
|
+
Message-ID: <5335a40d1b835_1a93fc77d034ce02239@Yonahs-MacBook-Pro.local.mail>
|
49091
|
+
Subject: subject is: test_name
|
49092
|
+
Mime-Version: 1.0
|
49093
|
+
Content-Type: text/html;
|
49094
|
+
charset=UTF-8
|
49095
|
+
Content-Transfer-Encoding: 7bit
|
49096
|
+
|
49097
|
+
body is: test_name
|
49098
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
49099
|
+
[1m[35m (0.3ms)[0m BEGIN
|
49100
|
+
---------------------------------------------------------------------------------------
|
49101
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
49102
|
+
---------------------------------------------------------------------------------------
|
49103
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49104
|
+
[1m[35mSQL (1.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49105
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49106
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49107
|
+
[1m[36mSQL (0.9ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49108
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49109
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49110
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 498], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49111
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49112
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
49113
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49114
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49115
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49116
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49117
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 499], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49118
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49119
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
49120
|
+
[1m[35m (0.1ms)[0m BEGIN
|
49121
|
+
------------------------------------------------------------------------------
|
49122
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
49123
|
+
------------------------------------------------------------------------------
|
49124
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49125
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49126
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49127
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49128
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-3"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49129
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49130
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49131
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 500], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49132
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49133
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49134
|
+
[1m[36m (0.8ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 450]]
|
49135
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
49136
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49137
|
+
[1m[35mRooler::Delivery Exists (0.5ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 450 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 300) LIMIT 1
|
49138
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["deliverable_id", 300], ["deliverable_type", "Foo"], ["rule_id", 450], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49139
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49140
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:32:13.208556' WHERE "rooler_rules"."id" = 450[0m
|
49141
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49142
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49143
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 450]]
|
49144
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (300))[0m
|
49145
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:32:13.212778' WHERE "rooler_rules"."id" = 450
|
49146
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49147
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
49148
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
49149
|
+
--------------------------------------------------------------------------------------------------------
|
49150
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
49151
|
+
--------------------------------------------------------------------------------------------------------
|
49152
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49153
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49154
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49155
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49156
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49157
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49158
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49159
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49160
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49161
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
49162
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 501], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49163
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49164
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
49165
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
49166
|
+
[1m[35m (0.1ms)[0m BEGIN
|
49167
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
49168
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
49169
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
49170
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49171
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49172
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49173
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49174
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-5"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49175
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49176
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49177
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 502], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49178
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49179
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49180
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-6"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49181
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49182
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49183
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 503], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49184
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49185
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 452]]
|
49186
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
49187
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49188
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 452 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 303) LIMIT 1[0m
|
49189
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["deliverable_id", 303], ["deliverable_type", "Foo"], ["rule_id", 452], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49190
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49191
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:32:13.258970' WHERE "rooler_rules"."id" = 452
|
49192
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
49193
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 453]]
|
49194
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49195
|
+
[1m[35mRooler::Delivery Exists (0.5ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 453 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 303) LIMIT 1
|
49196
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["deliverable_id", 303], ["deliverable_type", "Foo"], ["rule_id", 453], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49197
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49198
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:32:13.269389' WHERE "rooler_rules"."id" = 453[0m
|
49199
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49200
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49201
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49202
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 452]]
|
49203
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 452]]
|
49204
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (303))[0m
|
49205
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 453]]
|
49206
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
49207
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 453]]
|
49208
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 453]]
|
49209
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
49210
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
49211
|
+
----------------------------------------------------------------------------------------------------
|
49212
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
49213
|
+
----------------------------------------------------------------------------------------------------
|
49214
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
49215
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49216
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49217
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49218
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49219
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49220
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49221
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 504], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49222
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49223
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 454]]
|
49224
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
49225
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49226
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 454 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 305) LIMIT 1
|
49227
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["deliverable_id", 305], ["deliverable_type", "Foo"], ["rule_id", 454], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49228
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49229
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:32:13.304845' WHERE "rooler_rules"."id" = 454[0m
|
49230
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 454]]
|
49231
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (305))[0m
|
49232
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49233
|
+
[1m[36m (0.4ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 454]]
|
49234
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (305))
|
49235
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:32:13.311673' WHERE "rooler_rules"."id" = 454[0m
|
49236
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49237
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49238
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 305 [["active", false], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49239
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49240
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49241
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 454]]
|
49242
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
49243
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (305)[0m [["rule_id", 454]]
|
49244
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49245
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 227]]
|
49246
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49247
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49248
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49249
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 305[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49250
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49251
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49252
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 454]]
|
49253
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
49254
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49255
|
+
[1m[36mRooler::Delivery Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 454 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 305) LIMIT 1[0m
|
49256
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["deliverable_id", 305], ["deliverable_type", "Foo"], ["rule_id", 454], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49257
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49258
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:32:13.339519' WHERE "rooler_rules"."id" = 454
|
49259
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49260
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
49261
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
49262
|
+
-------------------------------------------------------------------------------------------------------------------------
|
49263
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
49264
|
+
-------------------------------------------------------------------------------------------------------------------------
|
49265
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49266
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49267
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49268
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49269
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:23:13 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 505], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49270
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49271
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49272
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49273
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49274
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49275
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:21:13 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 506], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49276
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49277
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49278
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49279
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49280
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49281
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 507], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49282
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49283
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49284
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49285
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49286
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49287
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 508], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49288
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49289
|
+
[1m[35mRooler::Rule Load (0.6ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
49290
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
49291
|
+
[1m[35m (0.1ms)[0m BEGIN
|
49292
|
+
---------------------------------------------------------------------------------------
|
49293
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
49294
|
+
---------------------------------------------------------------------------------------
|
49295
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49296
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-12"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49297
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49298
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49299
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
49300
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49301
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49302
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49303
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49304
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
49305
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
49306
|
+
[1m[35m (0.3ms)[0m BEGIN
|
49307
|
+
--------------------------------------------------------------------------
|
49308
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
49309
|
+
--------------------------------------------------------------------------
|
49310
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49311
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49312
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49313
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49314
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 511], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49315
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49316
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 511]]
|
49317
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
49318
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49319
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49320
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49321
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49322
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49323
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49324
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
49325
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
49326
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
49327
|
+
----------------------------------------------------------------------------------
|
49328
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
49329
|
+
----------------------------------------------------------------------------------
|
49330
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49331
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49332
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49333
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49334
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 512], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49335
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49336
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49337
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49338
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49339
|
+
[1m[36mRooler::Rule Load (0.4ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 512]]
|
49340
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
49341
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
49342
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
49343
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
49344
|
+
----------------------------------------
|
49345
|
+
RoolerTest: test_delivers_pending_emails
|
49346
|
+
----------------------------------------
|
49347
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49348
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49349
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49350
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49351
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 513], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49352
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49353
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49354
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49355
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
49356
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49357
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 514], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49358
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49359
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49360
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 461 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 462) LIMIT 1[0m
|
49361
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["deliverable_id", 462], ["deliverable_type", "Rooler::Rule"], ["rule_id", 461], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49362
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49363
|
+
[1m[35mRooler::Delivery Load (0.3ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL
|
49364
|
+
[1m[36mRooler::Template Load (0.5ms)[0m [1mSELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1[0m [["id", 461]]
|
49365
|
+
[1m[35mRooler::Rule Load (0.7ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1 [["id", 462]]
|
49366
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.4ms)
|
49367
|
+
|
49368
|
+
Sent mail to test@email.com (19.0ms)
|
49369
|
+
Date: Fri, 28 Mar 2014 17:32:13 +0100
|
49370
|
+
From: default@myapp.com
|
49371
|
+
To: test@email.com
|
49372
|
+
Message-ID: <5335a40d9877c_1a93fc77d034ce022431@Yonahs-MacBook-Pro.local.mail>
|
49373
|
+
Subject: subject-16
|
49374
|
+
Mime-Version: 1.0
|
49375
|
+
Content-Type: text/html;
|
49376
|
+
charset=UTF-8
|
49377
|
+
Content-Transfer-Encoding: 7bit
|
49378
|
+
|
49379
|
+
body-16
|
49380
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 16:32:13.641816' WHERE "rooler_deliveries"."id" = 229[0m
|
49381
|
+
[1m[35mRooler::Delivery Load (0.6ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1 [["id", 229]]
|
49382
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
49383
|
+
[1m[35m (0.1ms)[0m BEGIN
|
49384
|
+
------------------------------------------
|
49385
|
+
RoolerTest: test_processes_scheduled_rules
|
49386
|
+
------------------------------------------
|
49387
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49388
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49389
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49390
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49391
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49392
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49393
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49394
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 515], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49395
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49396
|
+
[1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49397
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())[0m
|
49398
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 463]]
|
49399
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
49400
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49401
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 463 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 309) LIMIT 1[0m
|
49402
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["deliverable_id", 309], ["deliverable_type", "Foo"], ["rule_id", 463], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49403
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49404
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:32:13.671078' WHERE "rooler_rules"."id" = 463
|
49405
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49406
|
+
[1m[35mRooler::Delivery Load (0.3ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1
|
49407
|
+
[1m[36mFoo Load (0.5ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1[0m [["id", 309]]
|
49408
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
49409
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
49410
|
+
--------------------------------------------
|
49411
|
+
RoolerTest: test_resets_resetable_deliveries
|
49412
|
+
--------------------------------------------
|
49413
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49414
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49415
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49416
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49417
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49418
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49419
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49420
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 516], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49421
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49422
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 464]]
|
49423
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
49424
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49425
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 464 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 310) LIMIT 1
|
49426
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00], ["deliverable_id", 310], ["deliverable_type", "Foo"], ["rule_id", 464], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49427
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49428
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:32:13.694928' WHERE "rooler_rules"."id" = 464[0m
|
49429
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49430
|
+
[1m[36mSQL (0.6ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 310[0m [["active", false], ["updated_at", Fri, 28 Mar 2014 16:32:13 UTC +00:00]]
|
49431
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
49432
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49433
|
+
[1m[35mRooler::Rule Load (0.4ms)[0m SELECT "rooler_rules".* FROM "rooler_rules"
|
49434
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 464]]
|
49435
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
49436
|
+
[1m[36mRooler::Delivery Load (0.7ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (310)[0m [["rule_id", 464]]
|
49437
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49438
|
+
[1m[36mSQL (0.3ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 231]]
|
49439
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49440
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49441
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
49442
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
49443
|
+
----------------------------------------
|
49444
|
+
Rooler::DeliveryMailerTest: test_deliver
|
49445
|
+
----------------------------------------
|
49446
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49447
|
+
[1m[36mSQL (6.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "cc", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["body", "body is: {{rule.name}}"], ["cc", "{{rule.name}}@cc.com"], ["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49448
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49449
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49450
|
+
[1m[35mSQL (2.0ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 517], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49451
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49452
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49453
|
+
[1m[36mRooler::Delivery Exists (2.0ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 465 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 465) LIMIT 1[0m
|
49454
|
+
[1m[35mSQL (1.3ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["deliverable_id", 465], ["deliverable_type", "Rooler::Rule"], ["rule_id", 465], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49455
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49456
|
+
[1m[35mRooler::Template Load (1.1ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 465]]
|
49457
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (5.2ms)
|
49458
|
+
|
49459
|
+
Sent mail to test_name@to.com (72.2ms)
|
49460
|
+
Date: Fri, 28 Mar 2014 17:34:54 +0100
|
49461
|
+
From: default@myapp.com
|
49462
|
+
To: test_name@to.com
|
49463
|
+
Cc: test_name@cc.com
|
49464
|
+
Message-ID: <5335a4aed3dd7_2853ff744c34cd8989f4@Yonahs-MacBook-Pro.local.mail>
|
49465
|
+
Subject: subject is: test_name
|
49466
|
+
Mime-Version: 1.0
|
49467
|
+
Content-Type: text/html;
|
49468
|
+
charset=UTF-8
|
49469
|
+
Content-Transfer-Encoding: 7bit
|
49470
|
+
|
49471
|
+
body is: test_name
|
49472
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
49473
|
+
[1m[35m (0.2ms)[0m BEGIN
|
49474
|
+
---------------------------------------------------------------------------------------
|
49475
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
49476
|
+
---------------------------------------------------------------------------------------
|
49477
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49478
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49479
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49480
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49481
|
+
[1m[36mSQL (0.9ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49482
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49483
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49484
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 518], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49485
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49486
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
49487
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49488
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49489
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49490
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49491
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 519], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49492
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49493
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
49494
|
+
[1m[35m (0.1ms)[0m BEGIN
|
49495
|
+
------------------------------------------------------------------------------
|
49496
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
49497
|
+
------------------------------------------------------------------------------
|
49498
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49499
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49500
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49501
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49502
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-3"], ["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49503
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49504
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49505
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 520], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49506
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49507
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49508
|
+
[1m[36m (0.5ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 468]]
|
49509
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
49510
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49511
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 468 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 312) LIMIT 1
|
49512
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["deliverable_id", 312], ["deliverable_type", "Foo"], ["rule_id", 468], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49513
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49514
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:34:54.962469' WHERE "rooler_rules"."id" = 468[0m
|
49515
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49516
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49517
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 468]]
|
49518
|
+
[1m[36mFoo Load (0.5ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (312))[0m
|
49519
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:34:54.969427' WHERE "rooler_rules"."id" = 468
|
49520
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49521
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
49522
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
49523
|
+
--------------------------------------------------------------------------------------------------------
|
49524
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
49525
|
+
--------------------------------------------------------------------------------------------------------
|
49526
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49527
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49528
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49529
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49530
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49531
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49532
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49533
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49534
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49535
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49536
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 521], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49537
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49538
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
49539
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
49540
|
+
[1m[35m (0.1ms)[0m BEGIN
|
49541
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
49542
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
49543
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
49544
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49545
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49546
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49547
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49548
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-5"], ["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49549
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49550
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49551
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 522], ["updated_at", Fri, 28 Mar 2014 16:34:54 UTC +00:00]]
|
49552
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49553
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49554
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-6"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49555
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49556
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49557
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 523], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49558
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49559
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 470]]
|
49560
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
49561
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49562
|
+
[1m[36mRooler::Delivery Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 470 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 315) LIMIT 1[0m
|
49563
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["deliverable_id", 315], ["deliverable_type", "Foo"], ["rule_id", 470], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49564
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49565
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:34:55.017810' WHERE "rooler_rules"."id" = 470
|
49566
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
49567
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 471]]
|
49568
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49569
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 471 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 315) LIMIT 1
|
49570
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["deliverable_id", 315], ["deliverable_type", "Foo"], ["rule_id", 471], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49571
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49572
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:34:55.025751' WHERE "rooler_rules"."id" = 471[0m
|
49573
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49574
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49575
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49576
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 470]]
|
49577
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 470]]
|
49578
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (315))[0m
|
49579
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 471]]
|
49580
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
49581
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 471]]
|
49582
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 471]]
|
49583
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
49584
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
49585
|
+
----------------------------------------------------------------------------------------------------
|
49586
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
49587
|
+
----------------------------------------------------------------------------------------------------
|
49588
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49589
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49590
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49591
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49592
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49593
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49594
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49595
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 524], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49596
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49597
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 472]]
|
49598
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
49599
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49600
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 472 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 317) LIMIT 1
|
49601
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["deliverable_id", 317], ["deliverable_type", "Foo"], ["rule_id", 472], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49602
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49603
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:34:55.056291' WHERE "rooler_rules"."id" = 472[0m
|
49604
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 472]]
|
49605
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (317))[0m
|
49606
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49607
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 472]]
|
49608
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (317))
|
49609
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:34:55.061477' WHERE "rooler_rules"."id" = 472[0m
|
49610
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49611
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49612
|
+
[1m[35mSQL (0.7ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 317 [["active", false], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49613
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49614
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49615
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 472]]
|
49616
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
49617
|
+
[1m[36mRooler::Delivery Load (0.6ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (317)[0m [["rule_id", 472]]
|
49618
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49619
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 236]]
|
49620
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49621
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49622
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49623
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 317[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49624
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49625
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49626
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 472]]
|
49627
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
49628
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49629
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 472 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 317) LIMIT 1[0m
|
49630
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["deliverable_id", 317], ["deliverable_type", "Foo"], ["rule_id", 472], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49631
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49632
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:34:55.088719' WHERE "rooler_rules"."id" = 472
|
49633
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49634
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
49635
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
49636
|
+
-------------------------------------------------------------------------------------------------------------------------
|
49637
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
49638
|
+
-------------------------------------------------------------------------------------------------------------------------
|
49639
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49640
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49641
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49642
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49643
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:25:55 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 525], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49644
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49645
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49646
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49647
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49648
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49649
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:23:55 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 526], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49650
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49651
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49652
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49653
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49654
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49655
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 527], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49656
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49657
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49658
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49659
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49660
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49661
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 528], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49662
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49663
|
+
[1m[35mRooler::Rule Load (0.7ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
49664
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
49665
|
+
[1m[35m (0.2ms)[0m BEGIN
|
49666
|
+
---------------------------------------------------------------------------------------
|
49667
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
49668
|
+
---------------------------------------------------------------------------------------
|
49669
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49670
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-12"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49671
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49672
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49673
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
49674
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49675
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49676
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49677
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49678
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
49679
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
49680
|
+
[1m[35m (0.2ms)[0m BEGIN
|
49681
|
+
--------------------------------------------------------------------------
|
49682
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
49683
|
+
--------------------------------------------------------------------------
|
49684
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49685
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49686
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49687
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49688
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 531], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49689
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49690
|
+
[1m[36mRooler::Rule Load (1.1ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 531]]
|
49691
|
+
[1m[35mFoo Load (0.8ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
49692
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49693
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49694
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49695
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49696
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49697
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49698
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
49699
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
49700
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
49701
|
+
----------------------------------------------------------------------------------
|
49702
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
49703
|
+
----------------------------------------------------------------------------------
|
49704
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49705
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49706
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49707
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49708
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 532], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49709
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49710
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49711
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49712
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49713
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 532]]
|
49714
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
49715
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
49716
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
49717
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
49718
|
+
----------------------------------------
|
49719
|
+
RoolerTest: test_delivers_pending_emails
|
49720
|
+
----------------------------------------
|
49721
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49722
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49723
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49724
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49725
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 533], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49726
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49727
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49728
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49729
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49730
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49731
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 534], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49732
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49733
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49734
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 479 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 480) LIMIT 1[0m
|
49735
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["deliverable_id", 480], ["deliverable_type", "Rooler::Rule"], ["rule_id", 479], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49736
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49737
|
+
[1m[35mRooler::Delivery Load (0.3ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL
|
49738
|
+
[1m[36mRooler::Template Load (0.6ms)[0m [1mSELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1[0m [["id", 479]]
|
49739
|
+
[1m[35mRooler::Rule Load (0.7ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1 [["id", 480]]
|
49740
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
49741
|
+
|
49742
|
+
Sent mail to test@email.com (15.8ms)
|
49743
|
+
Date: Fri, 28 Mar 2014 17:34:55 +0100
|
49744
|
+
From: default@myapp.com
|
49745
|
+
To: test@email.com
|
49746
|
+
Message-ID: <5335a4af58b30_2853ff744c34cd8990be@Yonahs-MacBook-Pro.local.mail>
|
49747
|
+
Subject: subject-16
|
49748
|
+
Mime-Version: 1.0
|
49749
|
+
Content-Type: text/html;
|
49750
|
+
charset=UTF-8
|
49751
|
+
Content-Transfer-Encoding: 7bit
|
49752
|
+
|
49753
|
+
body-16
|
49754
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 16:34:55.377513' WHERE "rooler_deliveries"."id" = 238[0m
|
49755
|
+
[1m[35mRooler::Delivery Load (0.8ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1 [["id", 238]]
|
49756
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
49757
|
+
[1m[35m (0.2ms)[0m BEGIN
|
49758
|
+
------------------------------------------
|
49759
|
+
RoolerTest: test_processes_scheduled_rules
|
49760
|
+
------------------------------------------
|
49761
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49762
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49763
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49764
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49765
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49766
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49767
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49768
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 535], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49769
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49770
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49771
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())[0m
|
49772
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 481]]
|
49773
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
49774
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49775
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 481 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 321) LIMIT 1[0m
|
49776
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["deliverable_id", 321], ["deliverable_type", "Foo"], ["rule_id", 481], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49777
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49778
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:34:55.407595' WHERE "rooler_rules"."id" = 481
|
49779
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49780
|
+
[1m[35mRooler::Delivery Load (0.3ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1
|
49781
|
+
[1m[36mFoo Load (0.7ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1[0m [["id", 321]]
|
49782
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
49783
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
49784
|
+
--------------------------------------------
|
49785
|
+
RoolerTest: test_resets_resetable_deliveries
|
49786
|
+
--------------------------------------------
|
49787
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49788
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49789
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49790
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49791
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49792
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49793
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49794
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 536], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49795
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49796
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 482]]
|
49797
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
49798
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49799
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 482 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 322) LIMIT 1
|
49800
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00], ["deliverable_id", 322], ["deliverable_type", "Foo"], ["rule_id", 482], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49801
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49802
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 16:34:55.437783' WHERE "rooler_rules"."id" = 482[0m
|
49803
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49804
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 322[0m [["active", false], ["updated_at", Fri, 28 Mar 2014 16:34:55 UTC +00:00]]
|
49805
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49806
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49807
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules"
|
49808
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 482]]
|
49809
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
49810
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (322)[0m [["rule_id", 482]]
|
49811
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49812
|
+
[1m[36mSQL (0.3ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 240]]
|
49813
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49814
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49815
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
49816
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
49817
|
+
----------------------------------------
|
49818
|
+
Rooler::DeliveryMailerTest: test_deliver
|
49819
|
+
----------------------------------------
|
49820
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49821
|
+
[1m[36mSQL (8.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "cc", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["body", "body is: {{rule.name}}"], ["cc", "{{rule.name}}@cc.com"], ["created_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00]]
|
49822
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49823
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49824
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 537], ["updated_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00]]
|
49825
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49826
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
49827
|
+
[1m[36mRooler::Delivery Exists (2.0ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 483 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 483) LIMIT 1[0m
|
49828
|
+
[1m[35mSQL (1.6ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00], ["deliverable_id", 483], ["deliverable_type", "Rooler::Rule"], ["rule_id", 483], ["updated_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00]]
|
49829
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49830
|
+
[1m[35mRooler::Template Load (1.3ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 483]]
|
49831
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (3.5ms)
|
49832
|
+
|
49833
|
+
Sent mail to test_name@to.com (74.4ms)
|
49834
|
+
Date: Fri, 28 Mar 2014 18:00:15 +0100
|
49835
|
+
From: default@myapp.com
|
49836
|
+
To: test_name@to.com
|
49837
|
+
Cc: test_name@cc.com
|
49838
|
+
Message-ID: <5335aa9fe3d19_9af3fd3b1c34cd0906f1@Yonahs-MacBook-Pro.local.mail>
|
49839
|
+
Subject: subject is: test_name
|
49840
|
+
Mime-Version: 1.0
|
49841
|
+
Content-Type: text/html;
|
49842
|
+
charset=UTF-8
|
49843
|
+
Content-Transfer-Encoding: 7bit
|
49844
|
+
|
49845
|
+
body is: test_name
|
49846
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
49847
|
+
[1m[35m (0.2ms)[0m BEGIN
|
49848
|
+
---------------------------------------------------------------------------------------
|
49849
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
49850
|
+
---------------------------------------------------------------------------------------
|
49851
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49852
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00]]
|
49853
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49854
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49855
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00]]
|
49856
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49857
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49858
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 538], ["updated_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00]]
|
49859
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49860
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
49861
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49862
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00]]
|
49863
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49864
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49865
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 539], ["updated_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00]]
|
49866
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49867
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
49868
|
+
[1m[35m (0.1ms)[0m BEGIN
|
49869
|
+
------------------------------------------------------------------------------
|
49870
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
49871
|
+
------------------------------------------------------------------------------
|
49872
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49873
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00]]
|
49874
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49875
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49876
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-3"], ["created_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00]]
|
49877
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49878
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49879
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 540], ["updated_at", Fri, 28 Mar 2014 17:00:15 UTC +00:00]]
|
49880
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49881
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49882
|
+
[1m[36m (0.5ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 486]]
|
49883
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
49884
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49885
|
+
[1m[35mRooler::Delivery Exists (0.5ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 486 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 324) LIMIT 1
|
49886
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["deliverable_id", 324], ["deliverable_type", "Foo"], ["rule_id", 486], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49887
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49888
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 17:00:16.045744' WHERE "rooler_rules"."id" = 486[0m
|
49889
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49890
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49891
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 486]]
|
49892
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (324))[0m
|
49893
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 17:00:16.050864' WHERE "rooler_rules"."id" = 486
|
49894
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49895
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
49896
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
49897
|
+
--------------------------------------------------------------------------------------------------------
|
49898
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
49899
|
+
--------------------------------------------------------------------------------------------------------
|
49900
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49901
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49902
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49903
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49904
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49905
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49906
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49907
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49908
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49909
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49910
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 541], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49911
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49912
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
49913
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
49914
|
+
[1m[35m (0.1ms)[0m BEGIN
|
49915
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
49916
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
49917
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
49918
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49919
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49920
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49921
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49922
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-5"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49923
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49924
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49925
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 542], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49926
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49927
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49928
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-6"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49929
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49930
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49931
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 543], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49932
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49933
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 488]]
|
49934
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
49935
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49936
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 488 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 327) LIMIT 1[0m
|
49937
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["deliverable_id", 327], ["deliverable_type", "Foo"], ["rule_id", 488], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49938
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49939
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 17:00:16.093730' WHERE "rooler_rules"."id" = 488
|
49940
|
+
[1m[36mFoo Load (0.5ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
49941
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 489]]
|
49942
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
49943
|
+
[1m[35mRooler::Delivery Exists (0.5ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 489 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 327) LIMIT 1
|
49944
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["deliverable_id", 327], ["deliverable_type", "Foo"], ["rule_id", 489], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49945
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49946
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 17:00:16.104519' WHERE "rooler_rules"."id" = 489[0m
|
49947
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49948
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49949
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49950
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 488]]
|
49951
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 488]]
|
49952
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (327))[0m
|
49953
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 489]]
|
49954
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
49955
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 489]]
|
49956
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 489]]
|
49957
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
49958
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
49959
|
+
----------------------------------------------------------------------------------------------------
|
49960
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
49961
|
+
----------------------------------------------------------------------------------------------------
|
49962
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49963
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49964
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49965
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49966
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49967
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49968
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49969
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 544], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49970
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49971
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 490]]
|
49972
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
49973
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49974
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 490 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 329) LIMIT 1
|
49975
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["deliverable_id", 329], ["deliverable_type", "Foo"], ["rule_id", 490], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49976
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49977
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 17:00:16.139270' WHERE "rooler_rules"."id" = 490[0m
|
49978
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 490]]
|
49979
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (329))[0m
|
49980
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49981
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 490]]
|
49982
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (329))
|
49983
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 17:00:16.144661' WHERE "rooler_rules"."id" = 490[0m
|
49984
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49985
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
49986
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 329 [["active", false], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49987
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
49988
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
49989
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 490]]
|
49990
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
49991
|
+
[1m[36mRooler::Delivery Load (0.6ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (329)[0m [["rule_id", 490]]
|
49992
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49993
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 245]]
|
49994
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
49995
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
49996
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
49997
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 329[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
49998
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
49999
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
50000
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 490]]
|
50001
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
50002
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50003
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 490 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 329) LIMIT 1[0m
|
50004
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["deliverable_id", 329], ["deliverable_type", "Foo"], ["rule_id", 490], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50005
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50006
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 17:00:16.172882' WHERE "rooler_rules"."id" = 490
|
50007
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
50008
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
50009
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
50010
|
+
-------------------------------------------------------------------------------------------------------------------------
|
50011
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
50012
|
+
-------------------------------------------------------------------------------------------------------------------------
|
50013
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
50014
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50015
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50016
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
50017
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:51:16 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 545], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50018
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50019
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
50020
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50021
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50022
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
50023
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 16:49:16 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 546], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50024
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50025
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
50026
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50027
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
50028
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50029
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 547], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50030
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50031
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50032
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50033
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50034
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
50035
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 548], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50036
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50037
|
+
[1m[35mRooler::Rule Load (0.7ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
50038
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
50039
|
+
[1m[35m (0.2ms)[0m BEGIN
|
50040
|
+
---------------------------------------------------------------------------------------
|
50041
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
50042
|
+
---------------------------------------------------------------------------------------
|
50043
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50044
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-12"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50045
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50046
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50047
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
50048
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50049
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50050
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
50051
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50052
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
50053
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
50054
|
+
[1m[35m (0.1ms)[0m BEGIN
|
50055
|
+
--------------------------------------------------------------------------
|
50056
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
50057
|
+
--------------------------------------------------------------------------
|
50058
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50059
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50060
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50061
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50062
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 551], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50063
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50064
|
+
[1m[36mRooler::Rule Load (0.8ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 551]]
|
50065
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
50066
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
50067
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50068
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50069
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
50070
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50071
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50072
|
+
[1m[36mFoo Load (0.5ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
50073
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
50074
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
50075
|
+
----------------------------------------------------------------------------------
|
50076
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
50077
|
+
----------------------------------------------------------------------------------
|
50078
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50079
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50080
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50081
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50082
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 552], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50083
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50084
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50085
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50086
|
+
[1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
|
50087
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 552]]
|
50088
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
50089
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
50090
|
+
[1m[35m (0.2ms)[0m BEGIN
|
50091
|
+
----------------------------------------
|
50092
|
+
RoolerTest: test_delivers_pending_emails
|
50093
|
+
----------------------------------------
|
50094
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
50095
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50096
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50097
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50098
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 553], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50099
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50100
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50101
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50102
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50103
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50104
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 554], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50105
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50106
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50107
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 497 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 498) LIMIT 1
|
50108
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["deliverable_id", 498], ["deliverable_type", "Rooler::Rule"], ["rule_id", 497], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50109
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50110
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
50111
|
+
[1m[35mRooler::Template Load (0.5ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 497]]
|
50112
|
+
[1m[36mRooler::Rule Load (1.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1[0m [["id", 498]]
|
50113
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
50114
|
+
|
50115
|
+
Sent mail to test@email.com (14.1ms)
|
50116
|
+
Date: Fri, 28 Mar 2014 18:00:16 +0100
|
50117
|
+
From: default@myapp.com
|
50118
|
+
To: test@email.com
|
50119
|
+
Message-ID: <5335aaa075104_9af3fd3b1c34cd090794@Yonahs-MacBook-Pro.local.mail>
|
50120
|
+
Subject: subject-16
|
50121
|
+
Mime-Version: 1.0
|
50122
|
+
Content-Type: text/html;
|
50123
|
+
charset=UTF-8
|
50124
|
+
Content-Transfer-Encoding: 7bit
|
50125
|
+
|
50126
|
+
body-16
|
50127
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 17:00:16.492084' WHERE "rooler_deliveries"."id" = 247
|
50128
|
+
[1m[36mRooler::Delivery Load (0.8ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 247]]
|
50129
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
50130
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
50131
|
+
------------------------------------------
|
50132
|
+
RoolerTest: test_processes_scheduled_rules
|
50133
|
+
------------------------------------------
|
50134
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50135
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50136
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50137
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50138
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50139
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50140
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
50141
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 555], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50142
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
50143
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
50144
|
+
[1m[35mRooler::Rule Load (0.5ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
50145
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 499]]
|
50146
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
50147
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50148
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 499 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 333) LIMIT 1
|
50149
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["deliverable_id", 333], ["deliverable_type", "Foo"], ["rule_id", 499], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50150
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50151
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 17:00:16.522610' WHERE "rooler_rules"."id" = 499[0m
|
50152
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
50153
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
50154
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 333]]
|
50155
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
50156
|
+
[1m[35m (0.1ms)[0m BEGIN
|
50157
|
+
--------------------------------------------
|
50158
|
+
RoolerTest: test_resets_resetable_deliveries
|
50159
|
+
--------------------------------------------
|
50160
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50161
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50162
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50163
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50164
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50165
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
50166
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50167
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 556], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50168
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50169
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 500]]
|
50170
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
50171
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
50172
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 500 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 334) LIMIT 1[0m
|
50173
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00], ["deliverable_id", 334], ["deliverable_type", "Foo"], ["rule_id", 500], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50174
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50175
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 17:00:16.545752' WHERE "rooler_rules"."id" = 500
|
50176
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50177
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 334 [["active", false], ["updated_at", Fri, 28 Mar 2014 17:00:16 UTC +00:00]]
|
50178
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50179
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
50180
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
50181
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 500]]
|
50182
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
50183
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (334) [["rule_id", 500]]
|
50184
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
50185
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 249]]
|
50186
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
50187
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
50188
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|