rooler 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/app/models/rooler/liquid_inspector.rb +8 -8
- data/app/models/rooler/template.rb +2 -1
- data/lib/rooler/version.rb +1 -1
- data/test/dummy/log/test.log +1893 -0
- data/test/models/rooler/template_test.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NjhlYjZmN2MzZjUxM2YwMjYxODFlNDY0ZTI3ODVjZGY2YmE5MWM1Yg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NWFmMjY2ZWVlMWVhYTAyNGJhYWNmN2FlNWRjZjg2MWEwMTVhMGI2Mw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
YmUzYjVmNTVjN2ZkZmJiYzZmZjg3MThhNWFjMTAwMjhmZjAzZjk3ODk0MzEy
|
|
10
|
+
M2Y0NDZkYjQzOGUwNjgzYWU2YWQ5OWQxMjZkY2Y4ODFmMGU4YjM2YjVmYzAw
|
|
11
|
+
MjBkZDhiNzc5ZmRmMjI3OWE5M2IwNzcyOGI3MThjZmNhYjgwZGY=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NzFmZTIwYzllODM0NTM1OTAzNjgyZjM1NjRmNDUzYTM0MjlmYTZiMzBlZDE4
|
|
14
|
+
ZjY0M2QzYzhhNjA4NDEwMDcyZTFjZGI3ODE2NjQ3OTUyNmFiNTg2MjlmZDRh
|
|
15
|
+
MjFlYjczZWVmNzYyNWI4ZDdkODlmMWI4YzVjMTQ2M2NkOTdmNjk=
|
|
@@ -2,32 +2,32 @@ module Rooler
|
|
|
2
2
|
class LiquidInspector
|
|
3
3
|
|
|
4
4
|
def initialize(klass)
|
|
5
|
-
@klass = klass
|
|
6
5
|
@klass_name = klass.to_s.downcase
|
|
7
6
|
end
|
|
8
7
|
|
|
9
8
|
def tree
|
|
10
|
-
|
|
9
|
+
tree = ::Tree::TreeNode.new(@klass_name)
|
|
10
|
+
add_liquid_methods_as_nodes(tree, @klass_name)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
private
|
|
14
14
|
|
|
15
|
-
# Recursive method.
|
|
16
|
-
# are also associations, it calls itself on that node.
|
|
15
|
+
# Recursive method. Creates nodes any liquid methods belonging to that class. If any of those nodes
|
|
16
|
+
# are also associations, it calls itself on that node. Note the different (intential use of association.name and class_name)
|
|
17
17
|
def add_liquid_methods_as_nodes(tree, klass_name)
|
|
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
|
-
unless tree.parentage && tree.parentage.map
|
|
22
|
-
add_liquid_methods_as_nodes(tree[association.name.to_sym], association.class_name)
|
|
21
|
+
unless tree.parentage && tree.parentage.map {|p| p.name.to_s.classify}.include?(association.name.to_s.classify)
|
|
22
|
+
add_liquid_methods_as_nodes(tree[association.name.to_sym], association.class_name)
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
return tree
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
#iterate over nodes and add them to the tree. the << operator does not accept an array :(
|
|
29
|
-
def add_nodes_to_tree(tree,
|
|
30
|
-
|
|
29
|
+
def add_nodes_to_tree(tree, nodes_names)
|
|
30
|
+
nodes_names.each {|node| tree << ::Tree::TreeNode.new(node)}
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
#get associations haveing the same name as any liquid methods
|
data/lib/rooler/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
|
@@ -50186,3 +50186,1896 @@ RoolerTest: test_resets_resetable_deliveries
|
|
|
50186
50186
|
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50187
50187
|
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50188
50188
|
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
|
50189
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
50190
|
+
----------------------------------------
|
|
50191
|
+
Rooler::DeliveryMailerTest: test_deliver
|
|
50192
|
+
----------------------------------------
|
|
50193
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50194
|
+
[1m[36mSQL (65.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 19:39:47 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 19:39:47 UTC +00:00]]
|
|
50195
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50196
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50197
|
+
[1m[35mSQL (1.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 19:39:47 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 557], ["updated_at", Fri, 28 Mar 2014 19:39:47 UTC +00:00]]
|
|
50198
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50199
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50200
|
+
[1m[36mRooler::Delivery Exists (83.7ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 501 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 501) LIMIT 1[0m
|
|
50201
|
+
[1m[35mSQL (1.1ms)[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 19:39:47 UTC +00:00], ["deliverable_id", 501], ["deliverable_type", "Rooler::Rule"], ["rule_id", 501], ["updated_at", Fri, 28 Mar 2014 19:39:47 UTC +00:00]]
|
|
50202
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50203
|
+
[1m[35mRooler::Template Load (1.6ms)[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", 501]]
|
|
50204
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (12.5ms)
|
|
50205
|
+
|
|
50206
|
+
Sent mail to test_name@to.com (109.3ms)
|
|
50207
|
+
Date: Fri, 28 Mar 2014 20:39:47 +0100
|
|
50208
|
+
From: default@myapp.com
|
|
50209
|
+
To: test_name@to.com
|
|
50210
|
+
Cc: test_name@cc.com
|
|
50211
|
+
Message-ID: <5335d003ea929_36133fce0d434cdc2325@Yonahs-MacBook-Pro.local.mail>
|
|
50212
|
+
Subject: subject is: test_name
|
|
50213
|
+
Mime-Version: 1.0
|
|
50214
|
+
Content-Type: text/html;
|
|
50215
|
+
charset=UTF-8
|
|
50216
|
+
Content-Transfer-Encoding: 7bit
|
|
50217
|
+
|
|
50218
|
+
body is: test_name
|
|
50219
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
|
50220
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
50221
|
+
---------------------------------------------------------------------------------------
|
|
50222
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
|
50223
|
+
---------------------------------------------------------------------------------------
|
|
50224
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50225
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50226
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50227
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50228
|
+
[1m[36mSQL (1.0ms)[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 19:39:48 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50229
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50230
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50231
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 558], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50232
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50233
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
|
50234
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50235
|
+
[1m[35mSQL (0.7ms)[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 19:39:48 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50236
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50237
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50238
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 559], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50239
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50240
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
50241
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
50242
|
+
------------------------------------------------------------------------------
|
|
50243
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
|
50244
|
+
------------------------------------------------------------------------------
|
|
50245
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50246
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50247
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50248
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50249
|
+
[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 19:39:48 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50250
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50251
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50252
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 560], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50253
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50254
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50255
|
+
[1m[36m (0.7ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 504]]
|
|
50256
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
|
50257
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50258
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 504 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 336) LIMIT 1
|
|
50259
|
+
[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 19:39:48 UTC +00:00], ["deliverable_id", 336], ["deliverable_type", "Foo"], ["rule_id", 504], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50260
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50261
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 19:39:48.154188' WHERE "rooler_rules"."id" = 504[0m
|
|
50262
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50263
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50264
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 504]]
|
|
50265
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (336))[0m
|
|
50266
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 19:39:48.160801' WHERE "rooler_rules"."id" = 504
|
|
50267
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50268
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
50269
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
50270
|
+
--------------------------------------------------------------------------------------------------------
|
|
50271
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
|
50272
|
+
--------------------------------------------------------------------------------------------------------
|
|
50273
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50274
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50275
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50276
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50277
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50278
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50279
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50280
|
+
[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 19:39:48 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50281
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50282
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50283
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 561], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50284
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50285
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
|
50286
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
50287
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
50288
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
|
50289
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
|
50290
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
|
50291
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50292
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50293
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50294
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50295
|
+
[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 19:39:48 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50296
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50297
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50298
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 562], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50299
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50300
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50301
|
+
[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 19:39:48 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50302
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50303
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50304
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 563], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50305
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50306
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 506]]
|
|
50307
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
|
50308
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50309
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 506 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 339) LIMIT 1[0m
|
|
50310
|
+
[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 19:39:48 UTC +00:00], ["deliverable_id", 339], ["deliverable_type", "Foo"], ["rule_id", 506], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50311
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50312
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 19:39:48.262871' WHERE "rooler_rules"."id" = 506
|
|
50313
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
|
50314
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 507]]
|
|
50315
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50316
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 507 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 339) LIMIT 1
|
|
50317
|
+
[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 19:39:48 UTC +00:00], ["deliverable_id", 339], ["deliverable_type", "Foo"], ["rule_id", 507], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50318
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50319
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 19:39:48.272681' WHERE "rooler_rules"."id" = 507[0m
|
|
50320
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50321
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50322
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50323
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 506]]
|
|
50324
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 506]]
|
|
50325
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (339))[0m
|
|
50326
|
+
[1m[35mRooler::Rule Load (0.4ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 507]]
|
|
50327
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
|
50328
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 507]]
|
|
50329
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 507]]
|
|
50330
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
50331
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
50332
|
+
----------------------------------------------------------------------------------------------------
|
|
50333
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
|
50334
|
+
----------------------------------------------------------------------------------------------------
|
|
50335
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50336
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50337
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50338
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50339
|
+
[1m[35mSQL (0.7ms)[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 19:39:48 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50340
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50341
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50342
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 564], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50343
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50344
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 508]]
|
|
50345
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
|
50346
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50347
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 508 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 341) LIMIT 1
|
|
50348
|
+
[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 19:39:48 UTC +00:00], ["deliverable_id", 341], ["deliverable_type", "Foo"], ["rule_id", 508], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50349
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50350
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 19:39:48.317264' WHERE "rooler_rules"."id" = 508[0m
|
|
50351
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 508]]
|
|
50352
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (341))[0m
|
|
50353
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50354
|
+
[1m[36m (0.4ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 508]]
|
|
50355
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (341))
|
|
50356
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 19:39:48.326038' WHERE "rooler_rules"."id" = 508[0m
|
|
50357
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50358
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50359
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 341 [["active", false], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50360
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50361
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50362
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 508]]
|
|
50363
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
|
50364
|
+
[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 (341)[0m [["rule_id", 508]]
|
|
50365
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50366
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 254]]
|
|
50367
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50368
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50369
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50370
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 341[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50371
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50372
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50373
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 508]]
|
|
50374
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
|
50375
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50376
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 508 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 341) LIMIT 1[0m
|
|
50377
|
+
[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 19:39:48 UTC +00:00], ["deliverable_id", 341], ["deliverable_type", "Foo"], ["rule_id", 508], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50378
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50379
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 19:39:48.360252' WHERE "rooler_rules"."id" = 508
|
|
50380
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50381
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
50382
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
50383
|
+
-------------------------------------------------------------------------------------------------------------------------
|
|
50384
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
|
50385
|
+
-------------------------------------------------------------------------------------------------------------------------
|
|
50386
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50387
|
+
[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 19:39:48 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50388
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50389
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50390
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 19:30:48 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 565], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50391
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50392
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50393
|
+
[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 19:39:48 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50394
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50395
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50396
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 19:28:48 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 566], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50397
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50398
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50399
|
+
[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 19:39:48 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50400
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50401
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50402
|
+
[1m[35mSQL (0.9ms)[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 567], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50403
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50404
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50405
|
+
[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-11"], ["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50406
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50407
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50408
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 568], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50409
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50410
|
+
[1m[35mRooler::Rule Load (0.8ms)[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())
|
|
50411
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
50412
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
50413
|
+
---------------------------------------------------------------------------------------
|
|
50414
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
|
50415
|
+
---------------------------------------------------------------------------------------
|
|
50416
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50417
|
+
[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 19:39:48 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50418
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50419
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50420
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
|
50421
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50422
|
+
[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-13"], ["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50423
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50424
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50425
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
|
50426
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
|
50427
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
50428
|
+
--------------------------------------------------------------------------
|
|
50429
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
|
50430
|
+
--------------------------------------------------------------------------
|
|
50431
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50432
|
+
[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-14"], ["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50433
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50434
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50435
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 571], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50436
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50437
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 571]]
|
|
50438
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
50439
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50440
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50441
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50442
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50443
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50444
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50445
|
+
[1m[36mFoo Load (0.7ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
|
50446
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
50447
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
50448
|
+
----------------------------------------------------------------------------------
|
|
50449
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
|
50450
|
+
----------------------------------------------------------------------------------
|
|
50451
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50452
|
+
[1m[36mSQL (1.1ms)[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 19:39:48 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50453
|
+
[1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50454
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50455
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 572], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50456
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50457
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50458
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50459
|
+
[1m[35m (0.9ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50460
|
+
[1m[36mRooler::Rule Load (0.9ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 572]]
|
|
50461
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
50462
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
50463
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
50464
|
+
----------------------------------------
|
|
50465
|
+
RoolerTest: test_delivers_pending_emails
|
|
50466
|
+
----------------------------------------
|
|
50467
|
+
[1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50468
|
+
[1m[35mSQL (1.1ms)[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 19:39:48 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50469
|
+
[1m[36m (0.4ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50470
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50471
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 573], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50472
|
+
[1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50473
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50474
|
+
[1m[35mSQL (1.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 19:39:48 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50475
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50476
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50477
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 574], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50478
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50479
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50480
|
+
[1m[35mRooler::Delivery Exists (0.6ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 515 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 516) LIMIT 1
|
|
50481
|
+
[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 19:39:48 UTC +00:00], ["deliverable_id", 516], ["deliverable_type", "Rooler::Rule"], ["rule_id", 515], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50482
|
+
[1m[35m (1.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50483
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
|
50484
|
+
[1m[35mRooler::Template Load (0.8ms)[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", 515]]
|
|
50485
|
+
[1m[36mRooler::Rule Load (1.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1[0m [["id", 516]]
|
|
50486
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.3ms)
|
|
50487
|
+
|
|
50488
|
+
Sent mail to test@email.com (23.3ms)
|
|
50489
|
+
Date: Fri, 28 Mar 2014 20:39:48 +0100
|
|
50490
|
+
From: default@myapp.com
|
|
50491
|
+
To: test@email.com
|
|
50492
|
+
Message-ID: <5335d004cef14_36133fce0d434cdc233bb@Yonahs-MacBook-Pro.local.mail>
|
|
50493
|
+
Subject: subject-16
|
|
50494
|
+
Mime-Version: 1.0
|
|
50495
|
+
Content-Type: text/html;
|
|
50496
|
+
charset=UTF-8
|
|
50497
|
+
Content-Transfer-Encoding: 7bit
|
|
50498
|
+
|
|
50499
|
+
body-16
|
|
50500
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 19:39:48.868536' WHERE "rooler_deliveries"."id" = 256
|
|
50501
|
+
[1m[36mRooler::Delivery Load (0.7ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 256]]
|
|
50502
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
50503
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
50504
|
+
------------------------------------------
|
|
50505
|
+
RoolerTest: test_processes_scheduled_rules
|
|
50506
|
+
------------------------------------------
|
|
50507
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50508
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50509
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50510
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50511
|
+
[1m[35mSQL (0.7ms)[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 19:39:48 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50512
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50513
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50514
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 575], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50515
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50516
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50517
|
+
[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())
|
|
50518
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 517]]
|
|
50519
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
|
50520
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50521
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 517 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 345) LIMIT 1
|
|
50522
|
+
[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 19:39:48 UTC +00:00], ["deliverable_id", 345], ["deliverable_type", "Foo"], ["rule_id", 517], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50523
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50524
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 19:39:48.902904' WHERE "rooler_rules"."id" = 517[0m
|
|
50525
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50526
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
|
50527
|
+
[1m[35mFoo Load (0.7ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 345]]
|
|
50528
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
50529
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
50530
|
+
--------------------------------------------
|
|
50531
|
+
RoolerTest: test_resets_resetable_deliveries
|
|
50532
|
+
--------------------------------------------
|
|
50533
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50534
|
+
[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 19:39:48 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50535
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50536
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50537
|
+
[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-19"], ["created_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50538
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50539
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50540
|
+
[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 19:39:48 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 576], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50541
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50542
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 518]]
|
|
50543
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
|
50544
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50545
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 518 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 346) LIMIT 1[0m
|
|
50546
|
+
[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 19:39:48 UTC +00:00], ["deliverable_id", 346], ["deliverable_type", "Foo"], ["rule_id", 518], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50547
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50548
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 19:39:48.936198' WHERE "rooler_rules"."id" = 518
|
|
50549
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50550
|
+
[1m[35mSQL (0.7ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 346 [["active", false], ["updated_at", Fri, 28 Mar 2014 19:39:48 UTC +00:00]]
|
|
50551
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50552
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50553
|
+
[1m[36mRooler::Rule Load (0.4ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
|
50554
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 518]]
|
|
50555
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
|
50556
|
+
[1m[35mRooler::Delivery Load (0.6ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (346) [["rule_id", 518]]
|
|
50557
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50558
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 258]]
|
|
50559
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50560
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50561
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
50562
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
50563
|
+
----------------------------------------
|
|
50564
|
+
Rooler::DeliveryMailerTest: test_deliver
|
|
50565
|
+
----------------------------------------
|
|
50566
|
+
[1m[35m (22.7ms)[0m SAVEPOINT active_record_1
|
|
50567
|
+
[1m[36mSQL (85.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", Mon, 31 Mar 2014 14:22:02 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Mon, 31 Mar 2014 14:22:02 UTC +00:00]]
|
|
50568
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50569
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50570
|
+
[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", Mon, 31 Mar 2014 14:22:02 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 577], ["updated_at", Mon, 31 Mar 2014 14:22:02 UTC +00:00]]
|
|
50571
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50572
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50573
|
+
[1m[36mRooler::Delivery Exists (12.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 519 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 519) LIMIT 1[0m
|
|
50574
|
+
[1m[35mSQL (1.0ms)[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["deliverable_id", 519], ["deliverable_type", "Rooler::Rule"], ["rule_id", 519], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50575
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50576
|
+
[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", 519]]
|
|
50577
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (5.8ms)
|
|
50578
|
+
|
|
50579
|
+
Sent mail to test_name@to.com (89.9ms)
|
|
50580
|
+
Date: Mon, 31 Mar 2014 16:22:03 +0200
|
|
50581
|
+
From: default@myapp.com
|
|
50582
|
+
To: test_name@to.com
|
|
50583
|
+
Cc: test_name@cc.com
|
|
50584
|
+
Message-ID: <53397a0b425bd_10a543fff8dc34cdc374a@Yonahs-MacBook-Pro.local.mail>
|
|
50585
|
+
Subject: subject is: test_name
|
|
50586
|
+
Mime-Version: 1.0
|
|
50587
|
+
Content-Type: text/html;
|
|
50588
|
+
charset=UTF-8
|
|
50589
|
+
Content-Transfer-Encoding: 7bit
|
|
50590
|
+
|
|
50591
|
+
body is: test_name
|
|
50592
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
|
50593
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
50594
|
+
---------------------------------------------------------------------------------------
|
|
50595
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
|
50596
|
+
---------------------------------------------------------------------------------------
|
|
50597
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50598
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50599
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50600
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50601
|
+
[1m[36mSQL (1.0ms)[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50602
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50603
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50604
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 578], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50605
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50606
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
|
50607
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50608
|
+
[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-2"], ["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50609
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50610
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50611
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 579], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50612
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50613
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
|
50614
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
50615
|
+
------------------------------------------------------------------------------
|
|
50616
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
|
50617
|
+
------------------------------------------------------------------------------
|
|
50618
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50619
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50620
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50621
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50622
|
+
[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-3"], ["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50623
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50624
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50625
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 580], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50626
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50627
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50628
|
+
[1m[36m (0.6ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 522]]
|
|
50629
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
|
50630
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50631
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 522 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 348) LIMIT 1
|
|
50632
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["deliverable_id", 348], ["deliverable_type", "Foo"], ["rule_id", 522], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50633
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50634
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:22:03.399784' WHERE "rooler_rules"."id" = 522[0m
|
|
50635
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50636
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50637
|
+
[1m[35m (0.7ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 522]]
|
|
50638
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (348))[0m
|
|
50639
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:22:03.407141' WHERE "rooler_rules"."id" = 522
|
|
50640
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50641
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
50642
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
50643
|
+
--------------------------------------------------------------------------------------------------------
|
|
50644
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
|
50645
|
+
--------------------------------------------------------------------------------------------------------
|
|
50646
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50647
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50648
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50649
|
+
[1m[36m (0.6ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50650
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50651
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50652
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50653
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50654
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50655
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50656
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 581], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50657
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50658
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
|
50659
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
50660
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
50661
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
|
50662
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
|
50663
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
|
50664
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50665
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50666
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50667
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50668
|
+
[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-5"], ["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50669
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50670
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50671
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 582], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50672
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50673
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50674
|
+
[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-6"], ["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50675
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50676
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50677
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 583], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50678
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50679
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 524]]
|
|
50680
|
+
[1m[36mFoo Load (0.5ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
|
50681
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50682
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 524 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 351) LIMIT 1[0m
|
|
50683
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["deliverable_id", 351], ["deliverable_type", "Foo"], ["rule_id", 524], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50684
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50685
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:22:03.539090' WHERE "rooler_rules"."id" = 524
|
|
50686
|
+
[1m[36mFoo Load (0.7ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
|
50687
|
+
[1m[35m (0.5ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 525]]
|
|
50688
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50689
|
+
[1m[35mRooler::Delivery Exists (1.0ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 525 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 351) LIMIT 1
|
|
50690
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["deliverable_id", 351], ["deliverable_type", "Foo"], ["rule_id", 525], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50691
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50692
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:22:03.553293' WHERE "rooler_rules"."id" = 525[0m
|
|
50693
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50694
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50695
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50696
|
+
[1m[36mRooler::Rule Load (1.2ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 524]]
|
|
50697
|
+
[1m[35m (0.5ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 524]]
|
|
50698
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (351))[0m
|
|
50699
|
+
[1m[35mRooler::Rule Load (0.5ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 525]]
|
|
50700
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
|
50701
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 525]]
|
|
50702
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 525]]
|
|
50703
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
50704
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
50705
|
+
----------------------------------------------------------------------------------------------------
|
|
50706
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
|
50707
|
+
----------------------------------------------------------------------------------------------------
|
|
50708
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50709
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50710
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50711
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50712
|
+
[1m[35mSQL (0.7ms)[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50713
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50714
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50715
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 584], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50716
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50717
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 526]]
|
|
50718
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
|
50719
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50720
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 526 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 353) LIMIT 1
|
|
50721
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["deliverable_id", 353], ["deliverable_type", "Foo"], ["rule_id", 526], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50722
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50723
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:22:03.598517' WHERE "rooler_rules"."id" = 526[0m
|
|
50724
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 526]]
|
|
50725
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (353))[0m
|
|
50726
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50727
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 526]]
|
|
50728
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (353))
|
|
50729
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:22:03.607152' WHERE "rooler_rules"."id" = 526[0m
|
|
50730
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50731
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50732
|
+
[1m[35mSQL (0.8ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 353 [["active", false], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50733
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50734
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50735
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 526]]
|
|
50736
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
|
50737
|
+
[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 (353)[0m [["rule_id", 526]]
|
|
50738
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50739
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 263]]
|
|
50740
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50741
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50742
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50743
|
+
[1m[36mSQL (0.6ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 353[0m [["active", true], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50744
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50745
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50746
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 526]]
|
|
50747
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
|
50748
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50749
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 526 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 353) LIMIT 1[0m
|
|
50750
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["deliverable_id", 353], ["deliverable_type", "Foo"], ["rule_id", 526], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50751
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50752
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:22:03.639361' WHERE "rooler_rules"."id" = 526
|
|
50753
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50754
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
50755
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
50756
|
+
-------------------------------------------------------------------------------------------------------------------------
|
|
50757
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
|
50758
|
+
-------------------------------------------------------------------------------------------------------------------------
|
|
50759
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50760
|
+
[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-8"], ["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50761
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50762
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50763
|
+
[1m[35mSQL (1.1ms)[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Mon, 31 Mar 2014 14:13:03 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 585], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50764
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50765
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50766
|
+
[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-9"], ["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50767
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50768
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50769
|
+
[1m[35mSQL (1.1ms)[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Mon, 31 Mar 2014 14:11:03 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 586], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50770
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50771
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50772
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50773
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50774
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50775
|
+
[1m[35mSQL (1.0ms)[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 587], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50776
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50777
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50778
|
+
[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-11"], ["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50779
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50780
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50781
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 588], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50782
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50783
|
+
[1m[35mRooler::Rule Load (8.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())
|
|
50784
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
|
50785
|
+
[1m[35m (0.4ms)[0m BEGIN
|
|
50786
|
+
---------------------------------------------------------------------------------------
|
|
50787
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
|
50788
|
+
---------------------------------------------------------------------------------------
|
|
50789
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50790
|
+
[1m[35mSQL (0.7ms)[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50791
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50792
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50793
|
+
[1m[36m (0.5ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
|
50794
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50795
|
+
[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-13"], ["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50796
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50797
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50798
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
|
50799
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
|
50800
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
50801
|
+
--------------------------------------------------------------------------
|
|
50802
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
|
50803
|
+
--------------------------------------------------------------------------
|
|
50804
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50805
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50806
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50807
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50808
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 591], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50809
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50810
|
+
[1m[36mRooler::Rule Load (0.8ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 591]]
|
|
50811
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
50812
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50813
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50814
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50815
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50816
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50817
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50818
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
|
50819
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
|
50820
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
50821
|
+
----------------------------------------------------------------------------------
|
|
50822
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
|
50823
|
+
----------------------------------------------------------------------------------
|
|
50824
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50825
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50826
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50827
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50828
|
+
[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", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 592], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50829
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50830
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50831
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:03 UTC +00:00]]
|
|
50832
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50833
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 592]]
|
|
50834
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
50835
|
+
[1m[36mFoo Load (0.6ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
|
50836
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
|
50837
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
50838
|
+
----------------------------------------
|
|
50839
|
+
RoolerTest: test_delivers_pending_emails
|
|
50840
|
+
----------------------------------------
|
|
50841
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50842
|
+
[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", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50843
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50844
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50845
|
+
[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", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 593], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50846
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50847
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50848
|
+
[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", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50849
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50850
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50851
|
+
[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", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 594], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50852
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50853
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50854
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 533 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 534) LIMIT 1[0m
|
|
50855
|
+
[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", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["deliverable_id", 534], ["deliverable_type", "Rooler::Rule"], ["rule_id", 533], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50856
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50857
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL
|
|
50858
|
+
[1m[36mRooler::Template Load (0.8ms)[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", 533]]
|
|
50859
|
+
[1m[35mRooler::Rule Load (0.9ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1 [["id", 534]]
|
|
50860
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
|
50861
|
+
|
|
50862
|
+
Sent mail to test@email.com (18.6ms)
|
|
50863
|
+
Date: Mon, 31 Mar 2014 16:22:04 +0200
|
|
50864
|
+
From: default@myapp.com
|
|
50865
|
+
To: test@email.com
|
|
50866
|
+
Message-ID: <53397a0c19d05_10a543fff8dc34cdc37545@Yonahs-MacBook-Pro.local.mail>
|
|
50867
|
+
Subject: subject-16
|
|
50868
|
+
Mime-Version: 1.0
|
|
50869
|
+
Content-Type: text/html;
|
|
50870
|
+
charset=UTF-8
|
|
50871
|
+
Content-Transfer-Encoding: 7bit
|
|
50872
|
+
|
|
50873
|
+
body-16
|
|
50874
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-31 14:22:04.122665' WHERE "rooler_deliveries"."id" = 265[0m
|
|
50875
|
+
[1m[35mRooler::Delivery Load (0.5ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1 [["id", 265]]
|
|
50876
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
50877
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
50878
|
+
------------------------------------------
|
|
50879
|
+
RoolerTest: test_processes_scheduled_rules
|
|
50880
|
+
------------------------------------------
|
|
50881
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50882
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50883
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50884
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50885
|
+
[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", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50886
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50887
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50888
|
+
[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", 60], ["created_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 595], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50889
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50890
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
50891
|
+
[1m[36mRooler::Rule Load (0.5ms)[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
|
|
50892
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 535]]
|
|
50893
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
|
50894
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50895
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 535 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 357) LIMIT 1[0m
|
|
50896
|
+
[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", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["deliverable_id", 357], ["deliverable_type", "Foo"], ["rule_id", 535], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50897
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50898
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:22:04.151872' WHERE "rooler_rules"."id" = 535
|
|
50899
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50900
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1
|
|
50901
|
+
[1m[36mFoo Load (0.6ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1[0m [["id", 357]]
|
|
50902
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
50903
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
50904
|
+
--------------------------------------------
|
|
50905
|
+
RoolerTest: test_resets_resetable_deliveries
|
|
50906
|
+
--------------------------------------------
|
|
50907
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50908
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50909
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50910
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50911
|
+
[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-19"], ["created_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50912
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50913
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50914
|
+
[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", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 596], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50915
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50916
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 536]]
|
|
50917
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
|
50918
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50919
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 536 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 358) LIMIT 1
|
|
50920
|
+
[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", Mon, 31 Mar 2014 14:22:04 UTC +00:00], ["deliverable_id", 358], ["deliverable_type", "Foo"], ["rule_id", 536], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50921
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50922
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:22:04.182064' WHERE "rooler_rules"."id" = 536[0m
|
|
50923
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50924
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 358[0m [["active", false], ["updated_at", Mon, 31 Mar 2014 14:22:04 UTC +00:00]]
|
|
50925
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50926
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50927
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules"
|
|
50928
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 536]]
|
|
50929
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
|
50930
|
+
[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 (358)[0m [["rule_id", 536]]
|
|
50931
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50932
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 267]]
|
|
50933
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50934
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
50935
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
50936
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
50937
|
+
----------------------------------------
|
|
50938
|
+
Rooler::DeliveryMailerTest: test_deliver
|
|
50939
|
+
----------------------------------------
|
|
50940
|
+
[1m[35m (0.4ms)[0m SAVEPOINT active_record_1
|
|
50941
|
+
[1m[36mSQL (7.0ms)[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
50942
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50943
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50944
|
+
[1m[35mSQL (1.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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 597], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
50945
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50946
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50947
|
+
[1m[36mRooler::Delivery Exists (1.5ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 537 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 537) LIMIT 1[0m
|
|
50948
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["deliverable_id", 537], ["deliverable_type", "Rooler::Rule"], ["rule_id", 537], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
50949
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50950
|
+
[1m[35mRooler::Template Load (1.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", 537]]
|
|
50951
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (3.4ms)
|
|
50952
|
+
|
|
50953
|
+
Sent mail to test_name@to.com (73.2ms)
|
|
50954
|
+
Date: Mon, 31 Mar 2014 16:39:22 +0200
|
|
50955
|
+
From: default@myapp.com
|
|
50956
|
+
To: test_name@to.com
|
|
50957
|
+
Cc: test_name@cc.com
|
|
50958
|
+
Message-ID: <53397e1a6a1aa_10f563fd0a5834cd440362@Yonahs-MacBook-Pro.local.mail>
|
|
50959
|
+
Subject: subject is: test_name
|
|
50960
|
+
Mime-Version: 1.0
|
|
50961
|
+
Content-Type: text/html;
|
|
50962
|
+
charset=UTF-8
|
|
50963
|
+
Content-Transfer-Encoding: 7bit
|
|
50964
|
+
|
|
50965
|
+
body is: test_name
|
|
50966
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
|
50967
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
50968
|
+
---------------------------------------------------------------------------------------
|
|
50969
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
|
50970
|
+
---------------------------------------------------------------------------------------
|
|
50971
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50972
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
50973
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50974
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50975
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
50976
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50977
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50978
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 598], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
50979
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50980
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
|
50981
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50982
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
50983
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50984
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
50985
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 599], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
50986
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50987
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
50988
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
50989
|
+
------------------------------------------------------------------------------
|
|
50990
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
|
50991
|
+
------------------------------------------------------------------------------
|
|
50992
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50993
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
50994
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50995
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
50996
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
50997
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
50998
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
50999
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 600], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51000
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51001
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51002
|
+
[1m[36m (0.6ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 540]]
|
|
51003
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
|
51004
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51005
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 540 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 360) LIMIT 1
|
|
51006
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["deliverable_id", 360], ["deliverable_type", "Foo"], ["rule_id", 540], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51007
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51008
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:39:22.545413' WHERE "rooler_rules"."id" = 540[0m
|
|
51009
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51010
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51011
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 540]]
|
|
51012
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (360))[0m
|
|
51013
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:39:22.550705' WHERE "rooler_rules"."id" = 540
|
|
51014
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51015
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
51016
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
51017
|
+
--------------------------------------------------------------------------------------------------------
|
|
51018
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
|
51019
|
+
--------------------------------------------------------------------------------------------------------
|
|
51020
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51021
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51022
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51023
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51024
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51025
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51026
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51027
|
+
[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-4"], ["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51028
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51029
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51030
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 601], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51031
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51032
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
|
51033
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
|
51034
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
51035
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
|
51036
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
|
51037
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
|
51038
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51039
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51040
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51041
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51042
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51043
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51044
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51045
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 602], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51046
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51047
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51048
|
+
[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-6"], ["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51049
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51050
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51051
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 603], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51052
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51053
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 542]]
|
|
51054
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
|
51055
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51056
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 542 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 363) LIMIT 1[0m
|
|
51057
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["deliverable_id", 363], ["deliverable_type", "Foo"], ["rule_id", 542], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51058
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51059
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:39:22.606667' WHERE "rooler_rules"."id" = 542
|
|
51060
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
|
51061
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 543]]
|
|
51062
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51063
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 543 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 363) LIMIT 1
|
|
51064
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["deliverable_id", 363], ["deliverable_type", "Foo"], ["rule_id", 543], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51065
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51066
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:39:22.613827' WHERE "rooler_rules"."id" = 543[0m
|
|
51067
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51068
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51069
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51070
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 542]]
|
|
51071
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 542]]
|
|
51072
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (363))[0m
|
|
51073
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 543]]
|
|
51074
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
|
51075
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 543]]
|
|
51076
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 543]]
|
|
51077
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
|
51078
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
51079
|
+
----------------------------------------------------------------------------------------------------
|
|
51080
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
|
51081
|
+
----------------------------------------------------------------------------------------------------
|
|
51082
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51083
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51084
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51085
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51086
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51087
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51088
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51089
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 604], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51090
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51091
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 544]]
|
|
51092
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
|
51093
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51094
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 544 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 365) LIMIT 1
|
|
51095
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["deliverable_id", 365], ["deliverable_type", "Foo"], ["rule_id", 544], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51096
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51097
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:39:22.643748' WHERE "rooler_rules"."id" = 544[0m
|
|
51098
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 544]]
|
|
51099
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (365))[0m
|
|
51100
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51101
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 544]]
|
|
51102
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (365))
|
|
51103
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:39:22.649099' WHERE "rooler_rules"."id" = 544[0m
|
|
51104
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51105
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51106
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 365 [["active", false], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51107
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51108
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51109
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 544]]
|
|
51110
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
|
51111
|
+
[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 (365)[0m [["rule_id", 544]]
|
|
51112
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51113
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 272]]
|
|
51114
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51115
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51116
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51117
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 365[0m [["active", true], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51118
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51119
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51120
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 544]]
|
|
51121
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
|
51122
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51123
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 544 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 365) LIMIT 1[0m
|
|
51124
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["deliverable_id", 365], ["deliverable_type", "Foo"], ["rule_id", 544], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51125
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51126
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:39:22.672395' WHERE "rooler_rules"."id" = 544
|
|
51127
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51128
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
|
51129
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
51130
|
+
-------------------------------------------------------------------------------------------------------------------------
|
|
51131
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
|
51132
|
+
-------------------------------------------------------------------------------------------------------------------------
|
|
51133
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51134
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51135
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51136
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51137
|
+
[1m[35mSQL (1.1ms)[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Mon, 31 Mar 2014 14:30:22 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 605], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51138
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51139
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51140
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51141
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51142
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51143
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Mon, 31 Mar 2014 14:28:22 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 606], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51144
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51145
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51146
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51147
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51148
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51149
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 607], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51150
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51151
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51152
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51153
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51154
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51155
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 608], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51156
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51157
|
+
[1m[35mRooler::Rule Load (1.2ms)[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())
|
|
51158
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
51159
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
51160
|
+
---------------------------------------------------------------------------------------
|
|
51161
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
|
51162
|
+
---------------------------------------------------------------------------------------
|
|
51163
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51164
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51165
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51166
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51167
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
|
51168
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51169
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51170
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51171
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51172
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
|
51173
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
51174
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
51175
|
+
--------------------------------------------------------------------------
|
|
51176
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
|
51177
|
+
--------------------------------------------------------------------------
|
|
51178
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51179
|
+
[1m[35mSQL (0.7ms)[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51180
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51181
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51182
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 611], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51183
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51184
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 611]]
|
|
51185
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
51186
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51187
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51188
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51189
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51190
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51191
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51192
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
|
51193
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
|
51194
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
51195
|
+
----------------------------------------------------------------------------------
|
|
51196
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
|
51197
|
+
----------------------------------------------------------------------------------
|
|
51198
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51199
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51200
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51201
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51202
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 612], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51203
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51204
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51205
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51206
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51207
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 612]]
|
|
51208
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
51209
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
|
51210
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
51211
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
|
51212
|
+
----------------------------------------
|
|
51213
|
+
RoolerTest: test_delivers_pending_emails
|
|
51214
|
+
----------------------------------------
|
|
51215
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51216
|
+
[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-16"], ["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51217
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51218
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51219
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 613], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51220
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51221
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51222
|
+
[1m[36mSQL (0.4ms)[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51223
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51224
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51225
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 614], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51226
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51227
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51228
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 551 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 552) LIMIT 1[0m
|
|
51229
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["deliverable_id", 552], ["deliverable_type", "Rooler::Rule"], ["rule_id", 551], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51230
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51231
|
+
[1m[35mRooler::Delivery Load (0.3ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL
|
|
51232
|
+
[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", 551]]
|
|
51233
|
+
[1m[35mRooler::Rule Load (0.6ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1 [["id", 552]]
|
|
51234
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.5ms)
|
|
51235
|
+
|
|
51236
|
+
Sent mail to test@email.com (16.9ms)
|
|
51237
|
+
Date: Mon, 31 Mar 2014 16:39:22 +0200
|
|
51238
|
+
From: default@myapp.com
|
|
51239
|
+
To: test@email.com
|
|
51240
|
+
Message-ID: <53397e1adc269_10f563fd0a5834cd44047a@Yonahs-MacBook-Pro.local.mail>
|
|
51241
|
+
Subject: subject-16
|
|
51242
|
+
Mime-Version: 1.0
|
|
51243
|
+
Content-Type: text/html;
|
|
51244
|
+
charset=UTF-8
|
|
51245
|
+
Content-Transfer-Encoding: 7bit
|
|
51246
|
+
|
|
51247
|
+
body-16
|
|
51248
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-31 14:39:22.916501' WHERE "rooler_deliveries"."id" = 274[0m
|
|
51249
|
+
[1m[35mRooler::Delivery Load (0.5ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1 [["id", 274]]
|
|
51250
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
51251
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
51252
|
+
------------------------------------------
|
|
51253
|
+
RoolerTest: test_processes_scheduled_rules
|
|
51254
|
+
------------------------------------------
|
|
51255
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51256
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51257
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51258
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51259
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51260
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51261
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51262
|
+
[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", 60], ["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 615], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51263
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51264
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51265
|
+
[1m[36mRooler::Rule Load (0.3ms)[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
|
|
51266
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 553]]
|
|
51267
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
|
51268
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51269
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 553 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 369) LIMIT 1[0m
|
|
51270
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["deliverable_id", 369], ["deliverable_type", "Foo"], ["rule_id", 553], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51271
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51272
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:39:22.939858' WHERE "rooler_rules"."id" = 553
|
|
51273
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51274
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1
|
|
51275
|
+
[1m[36mFoo Load (0.6ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1[0m [["id", 369]]
|
|
51276
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
51277
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
51278
|
+
--------------------------------------------
|
|
51279
|
+
RoolerTest: test_resets_resetable_deliveries
|
|
51280
|
+
--------------------------------------------
|
|
51281
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51282
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51283
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51284
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51285
|
+
[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-19"], ["created_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51286
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51287
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51288
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 616], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51289
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51290
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 554]]
|
|
51291
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
|
51292
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51293
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 554 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 370) LIMIT 1
|
|
51294
|
+
[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", Mon, 31 Mar 2014 14:39:22 UTC +00:00], ["deliverable_id", 370], ["deliverable_type", "Foo"], ["rule_id", 554], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51295
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51296
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:39:22.963943' WHERE "rooler_rules"."id" = 554[0m
|
|
51297
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51298
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 370[0m [["active", false], ["updated_at", Mon, 31 Mar 2014 14:39:22 UTC +00:00]]
|
|
51299
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51300
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51301
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules"
|
|
51302
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 554]]
|
|
51303
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
|
51304
|
+
[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 (370)[0m [["rule_id", 554]]
|
|
51305
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51306
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 276]]
|
|
51307
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51308
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51309
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
|
51310
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
51311
|
+
----------------------------------------
|
|
51312
|
+
Rooler::DeliveryMailerTest: test_deliver
|
|
51313
|
+
----------------------------------------
|
|
51314
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51315
|
+
[1m[36mSQL (10.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", Mon, 31 Mar 2014 14:42:50 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Mon, 31 Mar 2014 14:42:50 UTC +00:00]]
|
|
51316
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51317
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51318
|
+
[1m[35mSQL (1.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", Mon, 31 Mar 2014 14:42:50 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 617], ["updated_at", Mon, 31 Mar 2014 14:42:50 UTC +00:00]]
|
|
51319
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51320
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51321
|
+
[1m[36mRooler::Delivery Exists (2.5ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 555 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 555) LIMIT 1[0m
|
|
51322
|
+
[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", Mon, 31 Mar 2014 14:42:50 UTC +00:00], ["deliverable_id", 555], ["deliverable_type", "Rooler::Rule"], ["rule_id", 555], ["updated_at", Mon, 31 Mar 2014 14:42:50 UTC +00:00]]
|
|
51323
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51324
|
+
[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", 555]]
|
|
51325
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (4.6ms)
|
|
51326
|
+
|
|
51327
|
+
Sent mail to test_name@to.com (28.7ms)
|
|
51328
|
+
Date: Mon, 31 Mar 2014 16:42:51 +0200
|
|
51329
|
+
From: default@myapp.com
|
|
51330
|
+
To: test_name@to.com
|
|
51331
|
+
Cc: test_name@cc.com
|
|
51332
|
+
Message-ID: <53397eebeb6c_110623fe0d9834ce089ce@Yonahs-MacBook-Pro.local.mail>
|
|
51333
|
+
Subject: subject is: test_name
|
|
51334
|
+
Mime-Version: 1.0
|
|
51335
|
+
Content-Type: text/html;
|
|
51336
|
+
charset=UTF-8
|
|
51337
|
+
Content-Transfer-Encoding: 7bit
|
|
51338
|
+
|
|
51339
|
+
body is: test_name
|
|
51340
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
|
51341
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
51342
|
+
---------------------------------------------------------------------------------------
|
|
51343
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
|
51344
|
+
---------------------------------------------------------------------------------------
|
|
51345
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51346
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51347
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51348
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51349
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51350
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51351
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51352
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 618], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51353
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51354
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
|
51355
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51356
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51357
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51358
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51359
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 619], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51360
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51361
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
|
51362
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
51363
|
+
------------------------------------------------------------------------------
|
|
51364
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
|
51365
|
+
------------------------------------------------------------------------------
|
|
51366
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51367
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51368
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51369
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51370
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51371
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51372
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51373
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 620], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51374
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51375
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51376
|
+
[1m[36m (0.6ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 558]]
|
|
51377
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
|
51378
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51379
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 558 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 372) LIMIT 1
|
|
51380
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["deliverable_id", 372], ["deliverable_type", "Foo"], ["rule_id", 558], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51381
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51382
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:42:51.152436' WHERE "rooler_rules"."id" = 558[0m
|
|
51383
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51384
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51385
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 558]]
|
|
51386
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (372))[0m
|
|
51387
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:42:51.157388' WHERE "rooler_rules"."id" = 558
|
|
51388
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51389
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
51390
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
51391
|
+
--------------------------------------------------------------------------------------------------------
|
|
51392
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
|
51393
|
+
--------------------------------------------------------------------------------------------------------
|
|
51394
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51395
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51396
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51397
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51398
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51399
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51400
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51401
|
+
[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-4"], ["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51402
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51403
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51404
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 621], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51405
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51406
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
|
51407
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
|
51408
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
51409
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
|
51410
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
|
51411
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
|
51412
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51413
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51414
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51415
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51416
|
+
[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-5"], ["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51417
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51418
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51419
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 622], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51420
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51421
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51422
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51423
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51424
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51425
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 623], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51426
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51427
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 560]]
|
|
51428
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
|
51429
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51430
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 560 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 375) LIMIT 1[0m
|
|
51431
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["deliverable_id", 375], ["deliverable_type", "Foo"], ["rule_id", 560], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51432
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51433
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:42:51.208987' WHERE "rooler_rules"."id" = 560
|
|
51434
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
|
51435
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 561]]
|
|
51436
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51437
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 561 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 375) LIMIT 1
|
|
51438
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["deliverable_id", 375], ["deliverable_type", "Foo"], ["rule_id", 561], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51439
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51440
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:42:51.217053' WHERE "rooler_rules"."id" = 561[0m
|
|
51441
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51442
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51443
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51444
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 560]]
|
|
51445
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 560]]
|
|
51446
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (375))[0m
|
|
51447
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 561]]
|
|
51448
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
|
51449
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 561]]
|
|
51450
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 561]]
|
|
51451
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
51452
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
51453
|
+
----------------------------------------------------------------------------------------------------
|
|
51454
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
|
51455
|
+
----------------------------------------------------------------------------------------------------
|
|
51456
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51457
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51458
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51459
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51460
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51461
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51462
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51463
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 624], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51464
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51465
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 562]]
|
|
51466
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
|
51467
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51468
|
+
[1m[35mRooler::Delivery Exists (0.5ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 562 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 377) LIMIT 1
|
|
51469
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["deliverable_id", 377], ["deliverable_type", "Foo"], ["rule_id", 562], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51470
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51471
|
+
[1m[36mSQL (0.7ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:42:51.250402' WHERE "rooler_rules"."id" = 562[0m
|
|
51472
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 562]]
|
|
51473
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (377))[0m
|
|
51474
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51475
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 562]]
|
|
51476
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (377))
|
|
51477
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:42:51.257666' WHERE "rooler_rules"."id" = 562[0m
|
|
51478
|
+
[1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51479
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51480
|
+
[1m[35mSQL (0.7ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 377 [["active", false], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51481
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51482
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51483
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 562]]
|
|
51484
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
|
51485
|
+
[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 (377)[0m [["rule_id", 562]]
|
|
51486
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51487
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 281]]
|
|
51488
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51489
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51490
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51491
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 377[0m [["active", true], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51492
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51493
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51494
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 562]]
|
|
51495
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
|
51496
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51497
|
+
[1m[36mRooler::Delivery Exists (0.7ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 562 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 377) LIMIT 1[0m
|
|
51498
|
+
[1m[35mSQL (1.0ms)[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["deliverable_id", 377], ["deliverable_type", "Foo"], ["rule_id", 562], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51499
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51500
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:42:51.288262' WHERE "rooler_rules"."id" = 562
|
|
51501
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51502
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
51503
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
51504
|
+
-------------------------------------------------------------------------------------------------------------------------
|
|
51505
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
|
51506
|
+
-------------------------------------------------------------------------------------------------------------------------
|
|
51507
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51508
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51509
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51510
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51511
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Mon, 31 Mar 2014 14:33:51 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 625], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51512
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51513
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
|
51514
|
+
[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-9"], ["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51515
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51516
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51517
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Mon, 31 Mar 2014 14:31:51 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 626], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51518
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51519
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51520
|
+
[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-10"], ["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51521
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51522
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51523
|
+
[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", 600], ["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 627], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51524
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51525
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51526
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51527
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51528
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51529
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 628], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51530
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51531
|
+
[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())
|
|
51532
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
|
51533
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
51534
|
+
---------------------------------------------------------------------------------------
|
|
51535
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
|
51536
|
+
---------------------------------------------------------------------------------------
|
|
51537
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51538
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51539
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51540
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51541
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
|
51542
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51543
|
+
[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-13"], ["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51544
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51545
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51546
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
|
51547
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
|
51548
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
51549
|
+
--------------------------------------------------------------------------
|
|
51550
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
|
51551
|
+
--------------------------------------------------------------------------
|
|
51552
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51553
|
+
[1m[35mSQL (0.7ms)[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51554
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51555
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51556
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 631], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51557
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51558
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 631]]
|
|
51559
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
51560
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51561
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51562
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51563
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51564
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51565
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51566
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
|
51567
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
51568
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
51569
|
+
----------------------------------------------------------------------------------
|
|
51570
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
|
51571
|
+
----------------------------------------------------------------------------------
|
|
51572
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51573
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51574
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51575
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51576
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 632], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51577
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51578
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51579
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51580
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51581
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 632]]
|
|
51582
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
51583
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
|
51584
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
51585
|
+
--------------------------------------------------------
|
|
51586
|
+
Rooler::TemplateTest: test_returns_nil_if_no_test_object
|
|
51587
|
+
--------------------------------------------------------
|
|
51588
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51589
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51590
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51591
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
|
51592
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 633], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51593
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51594
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 633]]
|
|
51595
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
51596
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
51597
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
51598
|
+
----------------------------------------
|
|
51599
|
+
RoolerTest: test_delivers_pending_emails
|
|
51600
|
+
----------------------------------------
|
|
51601
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51602
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51603
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51604
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51605
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 634], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51606
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51607
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51608
|
+
[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-18"], ["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51609
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51610
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51611
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 635], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51612
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51613
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51614
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 570 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 571) LIMIT 1
|
|
51615
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["deliverable_id", 571], ["deliverable_type", "Rooler::Rule"], ["rule_id", 570], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51616
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51617
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
|
51618
|
+
[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", 570]]
|
|
51619
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1[0m [["id", 571]]
|
|
51620
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
|
51621
|
+
|
|
51622
|
+
Sent mail to test@email.com (12.9ms)
|
|
51623
|
+
Date: Mon, 31 Mar 2014 16:42:51 +0200
|
|
51624
|
+
From: default@myapp.com
|
|
51625
|
+
To: test@email.com
|
|
51626
|
+
Message-ID: <53397eeb80cba_110623fe0d9834ce0908b@Yonahs-MacBook-Pro.local.mail>
|
|
51627
|
+
Subject: subject-17
|
|
51628
|
+
Mime-Version: 1.0
|
|
51629
|
+
Content-Type: text/html;
|
|
51630
|
+
charset=UTF-8
|
|
51631
|
+
Content-Transfer-Encoding: 7bit
|
|
51632
|
+
|
|
51633
|
+
body-17
|
|
51634
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-31 14:42:51.538861' WHERE "rooler_deliveries"."id" = 283
|
|
51635
|
+
[1m[36mRooler::Delivery Load (0.8ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 283]]
|
|
51636
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
|
51637
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
51638
|
+
------------------------------------------
|
|
51639
|
+
RoolerTest: test_processes_scheduled_rules
|
|
51640
|
+
------------------------------------------
|
|
51641
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51642
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51643
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51644
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51645
|
+
[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-19"], ["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51646
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51647
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51648
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 636], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51649
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51650
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51651
|
+
[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())
|
|
51652
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 572]]
|
|
51653
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
|
51654
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51655
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 572 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 381) LIMIT 1
|
|
51656
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["deliverable_id", 381], ["deliverable_type", "Foo"], ["rule_id", 572], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51657
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51658
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:42:51.566006' WHERE "rooler_rules"."id" = 572[0m
|
|
51659
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51660
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
|
51661
|
+
[1m[35mFoo Load (0.8ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 381]]
|
|
51662
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
51663
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
51664
|
+
--------------------------------------------
|
|
51665
|
+
RoolerTest: test_resets_resetable_deliveries
|
|
51666
|
+
--------------------------------------------
|
|
51667
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51668
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51669
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51670
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51671
|
+
[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-20"], ["created_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["name", "template-21"], ["subject", "subject-20"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51672
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51673
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51674
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-20"], ["template_id", 637], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51675
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51676
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 573]]
|
|
51677
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
|
51678
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51679
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 573 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 382) LIMIT 1[0m
|
|
51680
|
+
[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", Mon, 31 Mar 2014 14:42:51 UTC +00:00], ["deliverable_id", 382], ["deliverable_type", "Foo"], ["rule_id", 573], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51681
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51682
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:42:51.600135' WHERE "rooler_rules"."id" = 573
|
|
51683
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51684
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 382 [["active", false], ["updated_at", Mon, 31 Mar 2014 14:42:51 UTC +00:00]]
|
|
51685
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51686
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51687
|
+
[1m[36mRooler::Rule Load (0.4ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
|
51688
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 573]]
|
|
51689
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
|
51690
|
+
[1m[35mRooler::Delivery Load (0.6ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (382) [["rule_id", 573]]
|
|
51691
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51692
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 285]]
|
|
51693
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51694
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51695
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
51696
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
51697
|
+
----------------------------------------
|
|
51698
|
+
Rooler::DeliveryMailerTest: test_deliver
|
|
51699
|
+
----------------------------------------
|
|
51700
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
|
51701
|
+
[1m[36mSQL (10.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", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51702
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51703
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51704
|
+
[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", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 638], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51705
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51706
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
|
51707
|
+
[1m[36mRooler::Delivery Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 574 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 574) LIMIT 1[0m
|
|
51708
|
+
[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", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["deliverable_id", 574], ["deliverable_type", "Rooler::Rule"], ["rule_id", 574], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51709
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51710
|
+
[1m[35mRooler::Template Load (1.8ms)[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", 574]]
|
|
51711
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (5.3ms)
|
|
51712
|
+
|
|
51713
|
+
Sent mail to test_name@to.com (30.0ms)
|
|
51714
|
+
Date: Mon, 31 Mar 2014 16:43:29 +0200
|
|
51715
|
+
From: default@myapp.com
|
|
51716
|
+
To: test_name@to.com
|
|
51717
|
+
Cc: test_name@cc.com
|
|
51718
|
+
Message-ID: <53397f11d4aa3_1108e3ff9d1c34cd082755@Yonahs-MacBook-Pro.local.mail>
|
|
51719
|
+
Subject: subject is: test_name
|
|
51720
|
+
Mime-Version: 1.0
|
|
51721
|
+
Content-Type: text/html;
|
|
51722
|
+
charset=UTF-8
|
|
51723
|
+
Content-Transfer-Encoding: 7bit
|
|
51724
|
+
|
|
51725
|
+
body is: test_name
|
|
51726
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
|
51727
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
51728
|
+
---------------------------------------------------------------------------------------
|
|
51729
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
|
51730
|
+
---------------------------------------------------------------------------------------
|
|
51731
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51732
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51733
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51734
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51735
|
+
[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", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51736
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51737
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51738
|
+
[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", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 639], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51739
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51740
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
|
51741
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51742
|
+
[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", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51743
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51744
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51745
|
+
[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", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 640], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51746
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51747
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
|
51748
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
51749
|
+
------------------------------------------------------------------------------
|
|
51750
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
|
51751
|
+
------------------------------------------------------------------------------
|
|
51752
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51753
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51754
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51755
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51756
|
+
[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-3"], ["created_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51757
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51758
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51759
|
+
[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", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 641], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51760
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51761
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51762
|
+
[1m[36m (0.7ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 577]]
|
|
51763
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
|
51764
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51765
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 577 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 384) LIMIT 1
|
|
51766
|
+
[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", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["deliverable_id", 384], ["deliverable_type", "Foo"], ["rule_id", 577], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51767
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51768
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:43:29.980591' WHERE "rooler_rules"."id" = 577[0m
|
|
51769
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51770
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51771
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 577]]
|
|
51772
|
+
[1m[36mFoo Load (0.5ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (384))[0m
|
|
51773
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:43:29.987653' WHERE "rooler_rules"."id" = 577
|
|
51774
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51775
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
|
51776
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
51777
|
+
--------------------------------------------------------------------------------------------------------
|
|
51778
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
|
51779
|
+
--------------------------------------------------------------------------------------------------------
|
|
51780
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51781
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51782
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51783
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51784
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:29 UTC +00:00]]
|
|
51785
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51786
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51787
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51788
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51789
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51790
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 642], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51791
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51792
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
|
51793
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
|
51794
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
51795
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
|
51796
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
|
51797
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
|
51798
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51799
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51800
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51801
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51802
|
+
[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-5"], ["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51803
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51804
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51805
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 643], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51806
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51807
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51808
|
+
[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-6"], ["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51809
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51810
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51811
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 644], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51812
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51813
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 579]]
|
|
51814
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
|
51815
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51816
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 579 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 387) LIMIT 1[0m
|
|
51817
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["deliverable_id", 387], ["deliverable_type", "Foo"], ["rule_id", 579], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51818
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51819
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:43:30.046107' WHERE "rooler_rules"."id" = 579
|
|
51820
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
|
51821
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 580]]
|
|
51822
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51823
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 580 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 387) LIMIT 1
|
|
51824
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["deliverable_id", 387], ["deliverable_type", "Foo"], ["rule_id", 580], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51825
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51826
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:43:30.055319' WHERE "rooler_rules"."id" = 580[0m
|
|
51827
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51828
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51829
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51830
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 579]]
|
|
51831
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 579]]
|
|
51832
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (387))[0m
|
|
51833
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 580]]
|
|
51834
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
|
51835
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 580]]
|
|
51836
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 580]]
|
|
51837
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
|
51838
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
51839
|
+
----------------------------------------------------------------------------------------------------
|
|
51840
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
|
51841
|
+
----------------------------------------------------------------------------------------------------
|
|
51842
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51843
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51844
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51845
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51846
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51847
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51848
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51849
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 645], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51850
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51851
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 581]]
|
|
51852
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
|
51853
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51854
|
+
[1m[35mRooler::Delivery Exists (0.5ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 581 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 389) LIMIT 1
|
|
51855
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["deliverable_id", 389], ["deliverable_type", "Foo"], ["rule_id", 581], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51856
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51857
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:43:30.091262' WHERE "rooler_rules"."id" = 581[0m
|
|
51858
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 581]]
|
|
51859
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (389))[0m
|
|
51860
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51861
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 581]]
|
|
51862
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (389))
|
|
51863
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:43:30.099795' WHERE "rooler_rules"."id" = 581[0m
|
|
51864
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51865
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51866
|
+
[1m[35mSQL (0.7ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 389 [["active", false], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51867
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51868
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
51869
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 581]]
|
|
51870
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
|
51871
|
+
[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 (389)[0m [["rule_id", 581]]
|
|
51872
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51873
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 290]]
|
|
51874
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51875
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51876
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51877
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 389[0m [["active", true], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51878
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51879
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51880
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 581]]
|
|
51881
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
|
51882
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51883
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 581 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 389) LIMIT 1[0m
|
|
51884
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["deliverable_id", 389], ["deliverable_type", "Foo"], ["rule_id", 581], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51885
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51886
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:43:30.129348' WHERE "rooler_rules"."id" = 581
|
|
51887
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
51888
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
51889
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
51890
|
+
-------------------------------------------------------------------------------------------------------------------------
|
|
51891
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
|
51892
|
+
-------------------------------------------------------------------------------------------------------------------------
|
|
51893
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51894
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51895
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51896
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51897
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Mon, 31 Mar 2014 14:34:30 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 646], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51898
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51899
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51900
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51901
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51902
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51903
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Mon, 31 Mar 2014 14:32:30 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 647], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51904
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51905
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51906
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51907
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51908
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51909
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 648], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51910
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51911
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51912
|
+
[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-11"], ["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51913
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51914
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51915
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 649], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51916
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51917
|
+
[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())
|
|
51918
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
51919
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
51920
|
+
---------------------------------------------------------------------------------------
|
|
51921
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
|
51922
|
+
---------------------------------------------------------------------------------------
|
|
51923
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51924
|
+
[1m[35mSQL (0.7ms)[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51925
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51926
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51927
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
|
51928
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51929
|
+
[1m[36mSQL (1.0ms)[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51930
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51931
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51932
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
|
51933
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
51934
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
51935
|
+
--------------------------------------------------------------------------
|
|
51936
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
|
51937
|
+
--------------------------------------------------------------------------
|
|
51938
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51939
|
+
[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-14"], ["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51940
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51941
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51942
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 652], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51943
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51944
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 652]]
|
|
51945
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
51946
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51947
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51948
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51949
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51950
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51951
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51952
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
|
51953
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
51954
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
51955
|
+
----------------------------------------------------------------------------------
|
|
51956
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
|
51957
|
+
----------------------------------------------------------------------------------
|
|
51958
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51959
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51960
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51961
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51962
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 653], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51963
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51964
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51965
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51966
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51967
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 653]]
|
|
51968
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
51969
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
51970
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
51971
|
+
--------------------------------------------------------
|
|
51972
|
+
Rooler::TemplateTest: test_returns_nil_if_no_test_object
|
|
51973
|
+
--------------------------------------------------------
|
|
51974
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51975
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51976
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51977
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51978
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 654], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51979
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51980
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 654]]
|
|
51981
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
|
51982
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
|
51983
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
51984
|
+
----------------------------------------
|
|
51985
|
+
RoolerTest: test_delivers_pending_emails
|
|
51986
|
+
----------------------------------------
|
|
51987
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51988
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51989
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51990
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
51991
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 655], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51992
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51993
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
51994
|
+
[1m[35mSQL (0.9ms)[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51995
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
51996
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
51997
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 656], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
51998
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
51999
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
52000
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 589 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 590) LIMIT 1
|
|
52001
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["deliverable_id", 590], ["deliverable_type", "Rooler::Rule"], ["rule_id", 589], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
52002
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
52003
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
|
52004
|
+
[1m[35mRooler::Template Load (0.8ms)[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", 589]]
|
|
52005
|
+
[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", 590]]
|
|
52006
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.3ms)
|
|
52007
|
+
|
|
52008
|
+
Sent mail to test@email.com (16.2ms)
|
|
52009
|
+
Date: Mon, 31 Mar 2014 16:43:30 +0200
|
|
52010
|
+
From: default@myapp.com
|
|
52011
|
+
To: test@email.com
|
|
52012
|
+
Message-ID: <53397f1260310_1108e3ff9d1c34cd082881@Yonahs-MacBook-Pro.local.mail>
|
|
52013
|
+
Subject: subject-17
|
|
52014
|
+
Mime-Version: 1.0
|
|
52015
|
+
Content-Type: text/html;
|
|
52016
|
+
charset=UTF-8
|
|
52017
|
+
Content-Transfer-Encoding: 7bit
|
|
52018
|
+
|
|
52019
|
+
body-17
|
|
52020
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-31 14:43:30.408554' WHERE "rooler_deliveries"."id" = 292
|
|
52021
|
+
[1m[36mRooler::Delivery Load (0.6ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 292]]
|
|
52022
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
|
52023
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
52024
|
+
------------------------------------------
|
|
52025
|
+
RoolerTest: test_processes_scheduled_rules
|
|
52026
|
+
------------------------------------------
|
|
52027
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
52028
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
52029
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
52030
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
52031
|
+
[1m[35mSQL (0.7ms)[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
52032
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
52033
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
52034
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 657], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
52035
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
52036
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
|
52037
|
+
[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())
|
|
52038
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 591]]
|
|
52039
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
|
52040
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
52041
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 591 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 393) LIMIT 1
|
|
52042
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["deliverable_id", 393], ["deliverable_type", "Foo"], ["rule_id", 591], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
52043
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
|
52044
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:43:30.443203' WHERE "rooler_rules"."id" = 591[0m
|
|
52045
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
52046
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
|
52047
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 393]]
|
|
52048
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
|
52049
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
52050
|
+
--------------------------------------------
|
|
52051
|
+
RoolerTest: test_resets_resetable_deliveries
|
|
52052
|
+
--------------------------------------------
|
|
52053
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
52054
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
52055
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
52056
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
52057
|
+
[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-20"], ["created_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["name", "template-21"], ["subject", "subject-20"], ["to", "test@email.com"], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
52058
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
52059
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
52060
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-20"], ["template_id", 658], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
52061
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
52062
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 592]]
|
|
52063
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
|
52064
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
|
52065
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 592 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 394) LIMIT 1[0m
|
|
52066
|
+
[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", Mon, 31 Mar 2014 14:43:30 UTC +00:00], ["deliverable_id", 394], ["deliverable_type", "Foo"], ["rule_id", 592], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
52067
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
52068
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-31 14:43:30.476204' WHERE "rooler_rules"."id" = 592
|
|
52069
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
52070
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 394 [["active", false], ["updated_at", Mon, 31 Mar 2014 14:43:30 UTC +00:00]]
|
|
52071
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
52072
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
52073
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
|
52074
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 592]]
|
|
52075
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
|
52076
|
+
[1m[35mRooler::Delivery Load (0.6ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (394) [["rule_id", 592]]
|
|
52077
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
52078
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 294]]
|
|
52079
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
52080
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
|
52081
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|