rooler 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/helpers/rooler/application_helper.rb +7 -0
- data/app/models/rooler/liquid_inspector.rb +15 -8
- data/lib/rooler/version.rb +1 -1
- data/test/dummy/log/test.log +3357 -0
- data/test/models/rooler/template_test.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWY3OTk5MWIwOGJlNWEyYTcxZTBkYWJmOWFmZGI5Y2NkNTA0OWI2Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmIwZTNkYzk1NDVhYjA4MWQ3OTM0YTc5M2U4YTVkNWU0Y2U0ZmU4Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTNkNjc1ZTM2MzUwMmZkYjYwYjVlNDA4NjEyMjI0NWM2YzUxNjFkZTY2MTRl
|
10
|
+
NDI0ZjlmYTMxZTg1Yjc5Yjk4OWFiMDVhYzc2ZjgxZTNkNGI4YmI3OGQ5NWIx
|
11
|
+
YWZlNTQ2NzAxMGNlOTI1N2UxYjc0YTM2ZTBmZDQ4MDFiNTY5ZGE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmZiMDIyMWY4MzVmYjNhYzQ4ZDZlNzZjMzllN2I2NzRjMjEyNTNhMjQ4MTdk
|
14
|
+
M2Y1OTQ1NGU2NmM1YWY5ZDU4ZDIwMjU4YWM3NDdlZDg1N2ZlMmM1ZmQ3MTg1
|
15
|
+
ZGM2MjczOTg1MzAwYTk3MGRhNGNhNDI2MjBlYzIzMTRmOTY5Y2I=
|
@@ -4,6 +4,13 @@ module Rooler
|
|
4
4
|
def liquidize(content, arguments)
|
5
5
|
Liquid::Template.parse(content).render(arguments, :filters => [Rooler::LiquidFilters]).html_safe
|
6
6
|
end
|
7
|
+
|
8
|
+
def print_tree(tree)
|
9
|
+
content_tag :ul do
|
10
|
+
content_tag :li, tree.name
|
11
|
+
tree.children { |child| print_tree(child) if child } # Child might be 'nil'
|
12
|
+
end
|
13
|
+
end
|
7
14
|
|
8
15
|
end
|
9
16
|
end
|
@@ -1,37 +1,44 @@
|
|
1
|
+
require 'rubytree'
|
2
|
+
|
1
3
|
module Rooler
|
2
4
|
class LiquidInspector
|
3
5
|
|
4
6
|
def initialize(klass)
|
5
|
-
@klass = klass
|
7
|
+
@klass = klass
|
8
|
+
@klass_name = klass.to_s.downcase
|
6
9
|
end
|
7
10
|
|
8
11
|
def tree
|
9
|
-
add_liquid_methods_as_nodes(::Tree::TreeNode.new(@klass))
|
12
|
+
add_liquid_methods_as_nodes(::Tree::TreeNode.new(@klass.to_s.downcase), @klass_name)
|
10
13
|
end
|
11
14
|
|
12
15
|
private
|
13
16
|
|
14
17
|
# Recursive method. Infers a class name using the name of the provided TreeNode. Creates nodes any liquid methods belonging to that class. If any of those nodes
|
15
18
|
# are also associations, it calls itself on that node.
|
16
|
-
def add_liquid_methods_as_nodes(tree)
|
17
|
-
klass =
|
19
|
+
def add_liquid_methods_as_nodes(tree, klass_name)
|
20
|
+
klass = klass_name.to_s.classify.constantize
|
18
21
|
add_nodes_to_tree(tree, liquid_methods(klass))
|
19
|
-
|
20
|
-
add_liquid_methods_as_nodes(tree[
|
22
|
+
associations(klass).each do |association|
|
23
|
+
add_liquid_methods_as_nodes(tree[association.name.to_sym], association.class_name)
|
21
24
|
end
|
22
25
|
return tree
|
23
26
|
end
|
24
27
|
|
28
|
+
#iterate over nodes and add them to the tree. the << operator does not accept an array :(
|
25
29
|
def add_nodes_to_tree(tree, nodes)
|
26
30
|
nodes.each {|node| tree << ::Tree::TreeNode.new(node)}
|
27
31
|
end
|
28
32
|
|
33
|
+
#get associations haveing the same name as any liquid methods
|
29
34
|
def associations(klass)
|
30
|
-
klass
|
35
|
+
liquid_methods = liquid_methods(klass)
|
36
|
+
return klass.reflect_on_all_associations.select {|k| liquid_methods.include?(k.name.to_sym)}
|
31
37
|
end
|
32
38
|
|
39
|
+
|
33
40
|
def liquid_methods(klass)
|
34
|
-
klass::LiquidDropClass.public_instance_methods - Liquid::Drop.public_instance_methods
|
41
|
+
klass::LiquidDropClass.public_instance_methods.map(&:to_sym) - Liquid::Drop.public_instance_methods.map(&:to_sym)
|
35
42
|
end
|
36
43
|
|
37
44
|
end
|
data/lib/rooler/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -44318,3 +44318,3360 @@ RoolerTest: test_resets_resetable_deliveries
|
|
44318
44318
|
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44319
44319
|
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44320
44320
|
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
44321
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
44322
|
+
----------------------------------------
|
44323
|
+
Rooler::DeliveryMailerTest: test_deliver
|
44324
|
+
----------------------------------------
|
44325
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44326
|
+
[1m[36mSQL (78.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", Fri, 28 Mar 2014 11:18:57 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 11:18:57 UTC +00:00]]
|
44327
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44328
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44329
|
+
[1m[35mSQL (1.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:57 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 241], ["updated_at", Fri, 28 Mar 2014 11:18:57 UTC +00:00]]
|
44330
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44331
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
44332
|
+
[1m[36mRooler::Delivery Exists (24.6ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 217 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 217) LIMIT 1[0m
|
44333
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["deliverable_id", 217], ["deliverable_type", "Rooler::Rule"], ["rule_id", 217], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44334
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44335
|
+
[1m[35mRooler::Template Load (1.2ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 217]]
|
44336
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (51.5ms)
|
44337
|
+
|
44338
|
+
Sent mail to test_name@to.com (57.6ms)
|
44339
|
+
Date: Fri, 28 Mar 2014 12:18:58 +0100
|
44340
|
+
From: default@myapp.com
|
44341
|
+
To: test_name@to.com
|
44342
|
+
Cc: test_name@cc.com
|
44343
|
+
Message-ID: <53355aa27b88b_1323880434ce0169cd@Yonahs-MacBook-Pro.local.mail>
|
44344
|
+
Subject: subject is: test_name
|
44345
|
+
Mime-Version: 1.0
|
44346
|
+
Content-Type: text/html;
|
44347
|
+
charset=UTF-8
|
44348
|
+
Content-Transfer-Encoding: 7bit
|
44349
|
+
|
44350
|
+
body is: test_name
|
44351
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
44352
|
+
[1m[35m (0.2ms)[0m BEGIN
|
44353
|
+
---------------------------------------------------------------------------------------
|
44354
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
44355
|
+
---------------------------------------------------------------------------------------
|
44356
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44357
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44358
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44359
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44360
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44361
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44362
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44363
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 242], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44364
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44365
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
44366
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44367
|
+
[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-2"], ["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44368
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44369
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44370
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 243], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44371
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44372
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
44373
|
+
[1m[35m (0.2ms)[0m BEGIN
|
44374
|
+
------------------------------------------------------------------------------
|
44375
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
44376
|
+
------------------------------------------------------------------------------
|
44377
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44378
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44379
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44380
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44381
|
+
[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 11:18:58 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44382
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44383
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44384
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 244], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44385
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44386
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44387
|
+
[1m[36m (5.4ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 220]]
|
44388
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
44389
|
+
[1m[36m (1.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44390
|
+
[1m[35mRooler::Delivery Exists (5.2ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 220 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 146) LIMIT 1
|
44391
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["deliverable_id", 146], ["deliverable_type", "Foo"], ["rule_id", 220], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44392
|
+
[1m[35m (0.5ms)[0m RELEASE SAVEPOINT active_record_1
|
44393
|
+
[1m[36mSQL (1.1ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:18:58.712565' WHERE "rooler_rules"."id" = 220[0m
|
44394
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44395
|
+
[1m[36m (1.9ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
44396
|
+
[1m[35m (4.1ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 220]]
|
44397
|
+
[1m[36mFoo Load (1.1ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (146))[0m
|
44398
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:18:58.746418' WHERE "rooler_rules"."id" = 220
|
44399
|
+
[1m[36m (2.5ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
44400
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
44401
|
+
[1m[36m (6.2ms)[0m [1mBEGIN[0m
|
44402
|
+
--------------------------------------------------------------------------------------------------------
|
44403
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
44404
|
+
--------------------------------------------------------------------------------------------------------
|
44405
|
+
[1m[35m (0.9ms)[0m SAVEPOINT active_record_1
|
44406
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44407
|
+
[1m[35m (1.0ms)[0m RELEASE SAVEPOINT active_record_1
|
44408
|
+
[1m[36m (2.9ms)[0m [1mSAVEPOINT active_record_1[0m
|
44409
|
+
[1m[35mSQL (3.0ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44410
|
+
[1m[36m (1.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44411
|
+
[1m[35m (3.7ms)[0m SAVEPOINT active_record_1
|
44412
|
+
[1m[36mSQL (4.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-4"], ["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44413
|
+
[1m[35m (1.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44414
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44415
|
+
[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 11:18:58 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 245], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44416
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44417
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
44418
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
44419
|
+
[1m[35m (0.2ms)[0m BEGIN
|
44420
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
44421
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
44422
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
44423
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44424
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44425
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44426
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44427
|
+
[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 11:18:58 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44428
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44429
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44430
|
+
[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 11:18:58 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 246], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44431
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44432
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44433
|
+
[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", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44434
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44435
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44436
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 247], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44437
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44438
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 222]]
|
44439
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
44440
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44441
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 222 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 149) LIMIT 1[0m
|
44442
|
+
[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 11:18:58 UTC +00:00], ["deliverable_id", 149], ["deliverable_type", "Foo"], ["rule_id", 222], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44443
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44444
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:18:58.894200' WHERE "rooler_rules"."id" = 222
|
44445
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
44446
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 223]]
|
44447
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44448
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 223 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 149) LIMIT 1
|
44449
|
+
[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 11:18:58 UTC +00:00], ["deliverable_id", 149], ["deliverable_type", "Foo"], ["rule_id", 223], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44450
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44451
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:18:58.904883' WHERE "rooler_rules"."id" = 223[0m
|
44452
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44453
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44454
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44455
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 222]]
|
44456
|
+
[1m[35m (0.5ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 222]]
|
44457
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (149))[0m
|
44458
|
+
[1m[35mRooler::Rule Load (0.4ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 223]]
|
44459
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
44460
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 223]]
|
44461
|
+
[1m[36m (0.4ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 223]]
|
44462
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
44463
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
44464
|
+
----------------------------------------------------------------------------------------------------
|
44465
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
44466
|
+
----------------------------------------------------------------------------------------------------
|
44467
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44468
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44469
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44470
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44471
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44472
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44473
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44474
|
+
[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 11:18:58 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 248], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44475
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44476
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 224]]
|
44477
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
44478
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44479
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 224 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 151) LIMIT 1
|
44480
|
+
[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 11:18:58 UTC +00:00], ["deliverable_id", 151], ["deliverable_type", "Foo"], ["rule_id", 224], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44481
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44482
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:18:58.948269' WHERE "rooler_rules"."id" = 224[0m
|
44483
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 224]]
|
44484
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (151))[0m
|
44485
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44486
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 224]]
|
44487
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (151))
|
44488
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:18:58.953878' WHERE "rooler_rules"."id" = 224[0m
|
44489
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44490
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44491
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 151 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44492
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44493
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44494
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 224]]
|
44495
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
44496
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (151)[0m [["rule_id", 224]]
|
44497
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44498
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 113]]
|
44499
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44500
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
44501
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44502
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 151[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44503
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44504
|
+
[1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
44505
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 224]]
|
44506
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
44507
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44508
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 224 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 151) LIMIT 1[0m
|
44509
|
+
[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 11:18:58 UTC +00:00], ["deliverable_id", 151], ["deliverable_type", "Foo"], ["rule_id", 224], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44510
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44511
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:18:58.981345' WHERE "rooler_rules"."id" = 224
|
44512
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
44513
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
44514
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
44515
|
+
-------------------------------------------------------------------------------------------------------------------------
|
44516
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
44517
|
+
-------------------------------------------------------------------------------------------------------------------------
|
44518
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44519
|
+
[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 11:18:58 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44520
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44521
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44522
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:09:58 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 249], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44523
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44524
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44525
|
+
[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 11:18:58 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:58 UTC +00:00]]
|
44526
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44527
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44528
|
+
[1m[35mSQL (0.6ms)[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 11:18:59 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:07:58 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 250], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44529
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44530
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44531
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44532
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44533
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44534
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 251], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44535
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44536
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44537
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44538
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44539
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44540
|
+
[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 11:18:59 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 252], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44541
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44542
|
+
[1m[35mRooler::Rule Load (1.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())
|
44543
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
44544
|
+
[1m[35m (0.2ms)[0m BEGIN
|
44545
|
+
---------------------------------------------------------------------------------------
|
44546
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
44547
|
+
---------------------------------------------------------------------------------------
|
44548
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44549
|
+
[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-12"], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44550
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44551
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44552
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
44553
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44554
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44555
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44556
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44557
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
44558
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
44559
|
+
[1m[35m (0.2ms)[0m BEGIN
|
44560
|
+
--------------------------------------------------------------------------
|
44561
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
44562
|
+
--------------------------------------------------------------------------
|
44563
|
+
[1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
|
44564
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44565
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44566
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44567
|
+
[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 11:18:59 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 255], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44568
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44569
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 255]]
|
44570
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
44571
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44572
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44573
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44574
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44575
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44576
|
+
[1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
|
44577
|
+
[1m[36mFoo Load (0.5ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
44578
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
44579
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
44580
|
+
----------------------------------------------------------------------------------
|
44581
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
44582
|
+
----------------------------------------------------------------------------------
|
44583
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44584
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44585
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44586
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44587
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 256], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44588
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44589
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44590
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44591
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44592
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 256]]
|
44593
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
44594
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
44595
|
+
[1m[35m (0.1ms)[0m BEGIN
|
44596
|
+
----------------------------------------
|
44597
|
+
RoolerTest: test_delivers_pending_emails
|
44598
|
+
----------------------------------------
|
44599
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44600
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44601
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44602
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44603
|
+
[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 11:18:59 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 257], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44604
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44605
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44606
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44607
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44608
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44609
|
+
[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 11:18:59 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 258], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44610
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44611
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44612
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 231 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 232) LIMIT 1
|
44613
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["deliverable_id", 232], ["deliverable_type", "Rooler::Rule"], ["rule_id", 231], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44614
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44615
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
44616
|
+
[1m[35mRooler::Template Load (0.7ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 231]]
|
44617
|
+
[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", 232]]
|
44618
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
44619
|
+
|
44620
|
+
Sent mail to test@email.com (18.1ms)
|
44621
|
+
Date: Fri, 28 Mar 2014 12:18:59 +0100
|
44622
|
+
From: default@myapp.com
|
44623
|
+
To: test@email.com
|
44624
|
+
Message-ID: <53355aa36ec09_1323880434ce01705b@Yonahs-MacBook-Pro.local.mail>
|
44625
|
+
Subject: subject-16
|
44626
|
+
Mime-Version: 1.0
|
44627
|
+
Content-Type: text/html;
|
44628
|
+
charset=UTF-8
|
44629
|
+
Content-Transfer-Encoding: 7bit
|
44630
|
+
|
44631
|
+
body-16
|
44632
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 11:18:59.467529' WHERE "rooler_deliveries"."id" = 115
|
44633
|
+
[1m[36mRooler::Delivery Load (0.9ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 115]]
|
44634
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
44635
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
44636
|
+
------------------------------------------
|
44637
|
+
RoolerTest: test_processes_scheduled_rules
|
44638
|
+
------------------------------------------
|
44639
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44640
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44641
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44642
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44643
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44644
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44645
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44646
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 259], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44647
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44648
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
44649
|
+
[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())
|
44650
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 233]]
|
44651
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
44652
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44653
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 233 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 155) LIMIT 1
|
44654
|
+
[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 11:18:59 UTC +00:00], ["deliverable_id", 155], ["deliverable_type", "Foo"], ["rule_id", 233], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44655
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44656
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:18:59.494097' WHERE "rooler_rules"."id" = 233[0m
|
44657
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44658
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
44659
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 155]]
|
44660
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
44661
|
+
[1m[35m (0.2ms)[0m BEGIN
|
44662
|
+
--------------------------------------------
|
44663
|
+
RoolerTest: test_resets_resetable_deliveries
|
44664
|
+
--------------------------------------------
|
44665
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44666
|
+
[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 11:18:59 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44667
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44668
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44669
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44670
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44671
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44672
|
+
[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 11:18:59 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 260], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44673
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44674
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 234]]
|
44675
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
44676
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44677
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 234 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 156) LIMIT 1[0m
|
44678
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00], ["deliverable_id", 156], ["deliverable_type", "Foo"], ["rule_id", 234], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44679
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44680
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:18:59.521909' WHERE "rooler_rules"."id" = 234
|
44681
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44682
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 156 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:18:59 UTC +00:00]]
|
44683
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44684
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44685
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
44686
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 234]]
|
44687
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
44688
|
+
[1m[35mRooler::Delivery Load (0.5ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (156) [["rule_id", 234]]
|
44689
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44690
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 117]]
|
44691
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44692
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44693
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
44694
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
44695
|
+
----------------------------------------
|
44696
|
+
Rooler::DeliveryMailerTest: test_deliver
|
44697
|
+
----------------------------------------
|
44698
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
44699
|
+
[1m[36mSQL (23.2ms)[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 11:43:54 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 11:43:54 UTC +00:00]]
|
44700
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
44701
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44702
|
+
[1m[35mSQL (1.1ms)[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 11:43:54 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 261], ["updated_at", Fri, 28 Mar 2014 11:43:54 UTC +00:00]]
|
44703
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44704
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44705
|
+
[1m[36mRooler::Delivery Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 235 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 235) LIMIT 1[0m
|
44706
|
+
[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 11:43:54 UTC +00:00], ["deliverable_id", 235], ["deliverable_type", "Rooler::Rule"], ["rule_id", 235], ["updated_at", Fri, 28 Mar 2014 11:43:54 UTC +00:00]]
|
44707
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44708
|
+
[1m[35mRooler::Template Load (1.3ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 235]]
|
44709
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (48.3ms)
|
44710
|
+
|
44711
|
+
Sent mail to test_name@to.com (28.5ms)
|
44712
|
+
Date: Fri, 28 Mar 2014 12:43:55 +0100
|
44713
|
+
From: default@myapp.com
|
44714
|
+
To: test_name@to.com
|
44715
|
+
Cc: test_name@cc.com
|
44716
|
+
Message-ID: <5335607b21ac9_139963fd09c834cd895711@Yonahs-MacBook-Pro.local.mail>
|
44717
|
+
Subject: subject is: test_name
|
44718
|
+
Mime-Version: 1.0
|
44719
|
+
Content-Type: text/html;
|
44720
|
+
charset=UTF-8
|
44721
|
+
Content-Transfer-Encoding: 7bit
|
44722
|
+
|
44723
|
+
body is: test_name
|
44724
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
44725
|
+
[1m[35m (0.2ms)[0m BEGIN
|
44726
|
+
---------------------------------------------------------------------------------------
|
44727
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
44728
|
+
---------------------------------------------------------------------------------------
|
44729
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44730
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44731
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44732
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44733
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44734
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
44735
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44736
|
+
[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 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 262], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44737
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44738
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
44739
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
44740
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44741
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44742
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44743
|
+
[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 11:43:55 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 263], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44744
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44745
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
44746
|
+
[1m[35m (0.1ms)[0m BEGIN
|
44747
|
+
------------------------------------------------------------------------------
|
44748
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
44749
|
+
------------------------------------------------------------------------------
|
44750
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44751
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44752
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44753
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44754
|
+
[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", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44755
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44756
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44757
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 264], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44758
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44759
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44760
|
+
[1m[36m (0.9ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 238]]
|
44761
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
44762
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44763
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 238 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 158) LIMIT 1
|
44764
|
+
[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 11:43:55 UTC +00:00], ["deliverable_id", 158], ["deliverable_type", "Foo"], ["rule_id", 238], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44765
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44766
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:43:55.239650' WHERE "rooler_rules"."id" = 238[0m
|
44767
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44768
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
44769
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 238]]
|
44770
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (158))[0m
|
44771
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:43:55.245531' WHERE "rooler_rules"."id" = 238
|
44772
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
44773
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
44774
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
44775
|
+
--------------------------------------------------------------------------------------------------------
|
44776
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
44777
|
+
--------------------------------------------------------------------------------------------------------
|
44778
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44779
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44780
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44781
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44782
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44783
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44784
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44785
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44786
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44787
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44788
|
+
[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 11:43:55 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 265], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44789
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44790
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
44791
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
44792
|
+
[1m[35m (0.2ms)[0m BEGIN
|
44793
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
44794
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
44795
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
44796
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44797
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44798
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44799
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44800
|
+
[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", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44801
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44802
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44803
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 266], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44804
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44805
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
44806
|
+
[1m[36mSQL (1.3ms)[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 11:43:55 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44807
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44808
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44809
|
+
[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 11:43:55 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 267], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44810
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44811
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 240]]
|
44812
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
44813
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44814
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 240 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 161) LIMIT 1[0m
|
44815
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["deliverable_id", 161], ["deliverable_type", "Foo"], ["rule_id", 240], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44816
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44817
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:43:55.322129' WHERE "rooler_rules"."id" = 240
|
44818
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
44819
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 241]]
|
44820
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44821
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 241 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 161) LIMIT 1
|
44822
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["deliverable_id", 161], ["deliverable_type", "Foo"], ["rule_id", 241], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44823
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44824
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:43:55.330357' WHERE "rooler_rules"."id" = 241[0m
|
44825
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44826
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44827
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44828
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 240]]
|
44829
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 240]]
|
44830
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (161))[0m
|
44831
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 241]]
|
44832
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
44833
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 241]]
|
44834
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 241]]
|
44835
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
44836
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
44837
|
+
----------------------------------------------------------------------------------------------------
|
44838
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
44839
|
+
----------------------------------------------------------------------------------------------------
|
44840
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44841
|
+
[1m[36mSQL (0.9ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44842
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44843
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44844
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44845
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44846
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44847
|
+
[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 11:43:55 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 268], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44848
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44849
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 242]]
|
44850
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
44851
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44852
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 242 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 163) LIMIT 1
|
44853
|
+
[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 11:43:55 UTC +00:00], ["deliverable_id", 163], ["deliverable_type", "Foo"], ["rule_id", 242], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44854
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44855
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:43:55.364610' WHERE "rooler_rules"."id" = 242[0m
|
44856
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 242]]
|
44857
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (163))[0m
|
44858
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44859
|
+
[1m[36m (0.5ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 242]]
|
44860
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (163))
|
44861
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:43:55.373855' WHERE "rooler_rules"."id" = 242[0m
|
44862
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44863
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44864
|
+
[1m[35mSQL (0.7ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 163 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44865
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44866
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
44867
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 242]]
|
44868
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
44869
|
+
[1m[36mRooler::Delivery Load (0.8ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (163)[0m [["rule_id", 242]]
|
44870
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
44871
|
+
[1m[36mSQL (0.7ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 122]]
|
44872
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44873
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
44874
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44875
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 163[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44876
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44877
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
44878
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 242]]
|
44879
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
44880
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44881
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 242 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 163) LIMIT 1[0m
|
44882
|
+
[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 11:43:55 UTC +00:00], ["deliverable_id", 163], ["deliverable_type", "Foo"], ["rule_id", 242], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44883
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44884
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:43:55.402911' WHERE "rooler_rules"."id" = 242
|
44885
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
44886
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
44887
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
44888
|
+
-------------------------------------------------------------------------------------------------------------------------
|
44889
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
44890
|
+
-------------------------------------------------------------------------------------------------------------------------
|
44891
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44892
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44893
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44894
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44895
|
+
[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 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:34:55 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 269], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44896
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44897
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44898
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44899
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44900
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44901
|
+
[1m[35mSQL (0.6ms)[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 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:32:55 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 270], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44902
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44903
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44904
|
+
[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", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44905
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44906
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44907
|
+
[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", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 271], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44908
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44909
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44910
|
+
[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-11"], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44911
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44912
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44913
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 272], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44914
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44915
|
+
[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())
|
44916
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
44917
|
+
[1m[35m (0.2ms)[0m BEGIN
|
44918
|
+
---------------------------------------------------------------------------------------
|
44919
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
44920
|
+
---------------------------------------------------------------------------------------
|
44921
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44922
|
+
[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 11:43:55 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44923
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44924
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44925
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
44926
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44927
|
+
[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-13"], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44928
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44929
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44930
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
44931
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
44932
|
+
[1m[35m (0.1ms)[0m BEGIN
|
44933
|
+
--------------------------------------------------------------------------
|
44934
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
44935
|
+
--------------------------------------------------------------------------
|
44936
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44937
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44938
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44939
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44940
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 275], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44941
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
44942
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 275]]
|
44943
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
44944
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44945
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44946
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44947
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44948
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44949
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44950
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
44951
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
44952
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
44953
|
+
----------------------------------------------------------------------------------
|
44954
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
44955
|
+
----------------------------------------------------------------------------------
|
44956
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
44957
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44958
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44959
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44960
|
+
[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 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 276], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44961
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44962
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
44963
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44964
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44965
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 276]]
|
44966
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
44967
|
+
[1m[36m (0.5ms)[0m [1mROLLBACK[0m
|
44968
|
+
[1m[35m (0.2ms)[0m BEGIN
|
44969
|
+
----------------------------------------
|
44970
|
+
RoolerTest: test_delivers_pending_emails
|
44971
|
+
----------------------------------------
|
44972
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44973
|
+
[1m[35mSQL (1.0ms)[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 11:43:55 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44974
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44975
|
+
[1m[35m (1.0ms)[0m SAVEPOINT active_record_1
|
44976
|
+
[1m[36mSQL (1.3ms)[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 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 277], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44977
|
+
[1m[35m (0.7ms)[0m RELEASE SAVEPOINT active_record_1
|
44978
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
44979
|
+
[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-17"], ["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44980
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
44981
|
+
[1m[35m (0.4ms)[0m SAVEPOINT active_record_1
|
44982
|
+
[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 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 278], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44983
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44984
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44985
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 249 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 250) LIMIT 1
|
44986
|
+
[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 11:43:55 UTC +00:00], ["deliverable_id", 250], ["deliverable_type", "Rooler::Rule"], ["rule_id", 249], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
44987
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
44988
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
44989
|
+
[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", 249]]
|
44990
|
+
[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", 250]]
|
44991
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.9ms)
|
44992
|
+
|
44993
|
+
Sent mail to test@email.com (23.4ms)
|
44994
|
+
Date: Fri, 28 Mar 2014 12:43:55 +0100
|
44995
|
+
From: default@myapp.com
|
44996
|
+
To: test@email.com
|
44997
|
+
Message-ID: <5335607be012c_139963fd09c834cd8958b9@Yonahs-MacBook-Pro.local.mail>
|
44998
|
+
Subject: subject-16
|
44999
|
+
Mime-Version: 1.0
|
45000
|
+
Content-Type: text/html;
|
45001
|
+
charset=UTF-8
|
45002
|
+
Content-Transfer-Encoding: 7bit
|
45003
|
+
|
45004
|
+
body-16
|
45005
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 11:43:55.938742' WHERE "rooler_deliveries"."id" = 124
|
45006
|
+
[1m[36mRooler::Delivery Load (0.7ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 124]]
|
45007
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
45008
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
45009
|
+
------------------------------------------
|
45010
|
+
RoolerTest: test_processes_scheduled_rules
|
45011
|
+
------------------------------------------
|
45012
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45013
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
45014
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45015
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
45016
|
+
[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 11:43:55 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
45017
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45018
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
45019
|
+
[1m[36mSQL (2.2ms)[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 11:43:55 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 279], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
45020
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45021
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45022
|
+
[1m[35mRooler::Rule Load (0.6ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
45023
|
+
[1m[36m (0.4ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 251]]
|
45024
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
45025
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45026
|
+
[1m[35mRooler::Delivery Exists (0.5ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 251 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 167) LIMIT 1
|
45027
|
+
[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 11:43:55 UTC +00:00], ["deliverable_id", 167], ["deliverable_type", "Foo"], ["rule_id", 251], ["updated_at", Fri, 28 Mar 2014 11:43:55 UTC +00:00]]
|
45028
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45029
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:43:55.988099' WHERE "rooler_rules"."id" = 251[0m
|
45030
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45031
|
+
[1m[36mRooler::Delivery Load (1.0ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
45032
|
+
[1m[35mFoo Load (1.0ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 167]]
|
45033
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45034
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45035
|
+
--------------------------------------------
|
45036
|
+
RoolerTest: test_resets_resetable_deliveries
|
45037
|
+
--------------------------------------------
|
45038
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45039
|
+
[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 11:43:56 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:43:56 UTC +00:00]]
|
45040
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45041
|
+
[1m[35m (0.8ms)[0m SAVEPOINT active_record_1
|
45042
|
+
[1m[36mSQL (2.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-19"], ["created_at", Fri, 28 Mar 2014 11:43:56 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:43:56 UTC +00:00]]
|
45043
|
+
[1m[35m (0.9ms)[0m RELEASE SAVEPOINT active_record_1
|
45044
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45045
|
+
[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 11:43:56 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 280], ["updated_at", Fri, 28 Mar 2014 11:43:56 UTC +00:00]]
|
45046
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45047
|
+
[1m[35m (0.6ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 252]]
|
45048
|
+
[1m[36mFoo Load (0.5ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
45049
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45050
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 252 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 168) LIMIT 1[0m
|
45051
|
+
[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", Fri, 28 Mar 2014 11:43:56 UTC +00:00], ["deliverable_id", 168], ["deliverable_type", "Foo"], ["rule_id", 252], ["updated_at", Fri, 28 Mar 2014 11:43:56 UTC +00:00]]
|
45052
|
+
[1m[36m (1.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45053
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:43:56.037789' WHERE "rooler_rules"."id" = 252
|
45054
|
+
[1m[36m (0.5ms)[0m [1mSAVEPOINT active_record_1[0m
|
45055
|
+
[1m[35mSQL (0.8ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 168 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:43:56 UTC +00:00]]
|
45056
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45057
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45058
|
+
[1m[36mRooler::Rule Load (0.4ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
45059
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 252]]
|
45060
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
45061
|
+
[1m[35mRooler::Delivery Load (0.9ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (168) [["rule_id", 252]]
|
45062
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45063
|
+
[1m[35mSQL (0.6ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 126]]
|
45064
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45065
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45066
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
45067
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
45068
|
+
----------------------------------------
|
45069
|
+
Rooler::DeliveryMailerTest: test_deliver
|
45070
|
+
----------------------------------------
|
45071
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45072
|
+
[1m[36mSQL (8.1ms)[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 11:45:46 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45073
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45074
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45075
|
+
[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", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 281], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45076
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45077
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45078
|
+
[1m[36mRooler::Delivery Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 253 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 253) LIMIT 1[0m
|
45079
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["deliverable_id", 253], ["deliverable_type", "Rooler::Rule"], ["rule_id", 253], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45080
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45081
|
+
[1m[35mRooler::Template Load (1.2ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 253]]
|
45082
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (43.5ms)
|
45083
|
+
|
45084
|
+
Sent mail to test_name@to.com (25.9ms)
|
45085
|
+
Date: Fri, 28 Mar 2014 12:45:46 +0100
|
45086
|
+
From: default@myapp.com
|
45087
|
+
To: test_name@to.com
|
45088
|
+
Cc: test_name@cc.com
|
45089
|
+
Message-ID: <533560ea73aeb_13a183fe430434cd060757@Yonahs-MacBook-Pro.local.mail>
|
45090
|
+
Subject: subject is: test_name
|
45091
|
+
Mime-Version: 1.0
|
45092
|
+
Content-Type: text/html;
|
45093
|
+
charset=UTF-8
|
45094
|
+
Content-Transfer-Encoding: 7bit
|
45095
|
+
|
45096
|
+
body is: test_name
|
45097
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
45098
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45099
|
+
---------------------------------------------------------------------------------------
|
45100
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
45101
|
+
---------------------------------------------------------------------------------------
|
45102
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45103
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45104
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45105
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45106
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45107
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45108
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45109
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 282], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45110
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45111
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
45112
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45113
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45114
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45115
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45116
|
+
[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 11:45:46 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 283], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45117
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45118
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45119
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45120
|
+
------------------------------------------------------------------------------
|
45121
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
45122
|
+
------------------------------------------------------------------------------
|
45123
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45124
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45125
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45126
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45127
|
+
[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 11:45:46 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45128
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45129
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45130
|
+
[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 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 284], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45131
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45132
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45133
|
+
[1m[36m (0.5ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 256]]
|
45134
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
45135
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45136
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 256 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 170) LIMIT 1
|
45137
|
+
[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 11:45:46 UTC +00:00], ["deliverable_id", 170], ["deliverable_type", "Foo"], ["rule_id", 256], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45138
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45139
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:45:46.558663' WHERE "rooler_rules"."id" = 256[0m
|
45140
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45141
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45142
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 256]]
|
45143
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (170))[0m
|
45144
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:45:46.563517' WHERE "rooler_rules"."id" = 256
|
45145
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45146
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
45147
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
45148
|
+
--------------------------------------------------------------------------------------------------------
|
45149
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
45150
|
+
--------------------------------------------------------------------------------------------------------
|
45151
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45152
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45153
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45154
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45155
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45156
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45157
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45158
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45159
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45160
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
45161
|
+
[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 11:45:46 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 285], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45162
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45163
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
45164
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
45165
|
+
[1m[35m (0.2ms)[0m BEGIN
|
45166
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
45167
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
45168
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
45169
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45170
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45171
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45172
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45173
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-5"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45174
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45175
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45176
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 286], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45177
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45178
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45179
|
+
[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", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45180
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45181
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45182
|
+
[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 11:45:46 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 287], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45183
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45184
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 258]]
|
45185
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
45186
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45187
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 258 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 173) LIMIT 1[0m
|
45188
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["deliverable_id", 173], ["deliverable_type", "Foo"], ["rule_id", 258], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45189
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45190
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:45:46.611199' WHERE "rooler_rules"."id" = 258
|
45191
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
45192
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 259]]
|
45193
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45194
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 259 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 173) LIMIT 1
|
45195
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["deliverable_id", 173], ["deliverable_type", "Foo"], ["rule_id", 259], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45196
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45197
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:45:46.618573' WHERE "rooler_rules"."id" = 259[0m
|
45198
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45199
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45200
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45201
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 258]]
|
45202
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 258]]
|
45203
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (173))[0m
|
45204
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 259]]
|
45205
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
45206
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 259]]
|
45207
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 259]]
|
45208
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
45209
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
45210
|
+
----------------------------------------------------------------------------------------------------
|
45211
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
45212
|
+
----------------------------------------------------------------------------------------------------
|
45213
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45214
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45215
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45216
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45217
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45218
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45219
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45220
|
+
[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 11:45:46 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 288], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45221
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45222
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 260]]
|
45223
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
45224
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45225
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 260 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 175) LIMIT 1
|
45226
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["deliverable_id", 175], ["deliverable_type", "Foo"], ["rule_id", 260], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45227
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45228
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:45:46.649687' WHERE "rooler_rules"."id" = 260[0m
|
45229
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 260]]
|
45230
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (175))[0m
|
45231
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45232
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 260]]
|
45233
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (175))
|
45234
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:45:46.655407' WHERE "rooler_rules"."id" = 260[0m
|
45235
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45236
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45237
|
+
[1m[35mSQL (0.7ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 175 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45238
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45239
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45240
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 260]]
|
45241
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
45242
|
+
[1m[36mRooler::Delivery Load (0.6ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (175)[0m [["rule_id", 260]]
|
45243
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45244
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 131]]
|
45245
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45246
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45247
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45248
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 175[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45249
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45250
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45251
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 260]]
|
45252
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
45253
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45254
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 260 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 175) LIMIT 1[0m
|
45255
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["deliverable_id", 175], ["deliverable_type", "Foo"], ["rule_id", 260], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45256
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45257
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:45:46.679990' WHERE "rooler_rules"."id" = 260
|
45258
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45259
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
45260
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
45261
|
+
-------------------------------------------------------------------------------------------------------------------------
|
45262
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
45263
|
+
-------------------------------------------------------------------------------------------------------------------------
|
45264
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45265
|
+
[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-8"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45266
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45267
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45268
|
+
[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 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:36:46 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 289], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45269
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45270
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45271
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45272
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45273
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45274
|
+
[1m[35mSQL (0.6ms)[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 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:34:46 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 290], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45275
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45276
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45277
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45278
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45279
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45280
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 291], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45281
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45282
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45283
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45284
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45285
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45286
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 292], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45287
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45288
|
+
[1m[35mRooler::Rule Load (1.0ms)[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())
|
45289
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45290
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45291
|
+
---------------------------------------------------------------------------------------
|
45292
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
45293
|
+
---------------------------------------------------------------------------------------
|
45294
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45295
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-12"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45296
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45297
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45298
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
45299
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45300
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45301
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45302
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45303
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
45304
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
45305
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45306
|
+
--------------------------------------------------------------------------
|
45307
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
45308
|
+
--------------------------------------------------------------------------
|
45309
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45310
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45311
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45312
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45313
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 295], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45314
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45315
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 295]]
|
45316
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
45317
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45318
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45319
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45320
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45321
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45322
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45323
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
45324
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
45325
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
45326
|
+
----------------------------------------------------------------------------------
|
45327
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
45328
|
+
----------------------------------------------------------------------------------
|
45329
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45330
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45331
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45332
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
45333
|
+
[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 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 296], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45334
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45335
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45336
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45337
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45338
|
+
[1m[36mRooler::Rule Load (0.4ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 296]]
|
45339
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
45340
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45341
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45342
|
+
----------------------------------------
|
45343
|
+
RoolerTest: test_delivers_pending_emails
|
45344
|
+
----------------------------------------
|
45345
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45346
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45347
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45348
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45349
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 297], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45350
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45351
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45352
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45353
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45354
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45355
|
+
[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 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 298], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45356
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45357
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45358
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 267 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 268) LIMIT 1
|
45359
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["deliverable_id", 268], ["deliverable_type", "Rooler::Rule"], ["rule_id", 267], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45360
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45361
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
45362
|
+
[1m[35mRooler::Template Load (0.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", 267]]
|
45363
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1[0m [["id", 268]]
|
45364
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.3ms)
|
45365
|
+
|
45366
|
+
Sent mail to test@email.com (13.8ms)
|
45367
|
+
Date: Fri, 28 Mar 2014 12:45:46 +0100
|
45368
|
+
From: default@myapp.com
|
45369
|
+
To: test@email.com
|
45370
|
+
Message-ID: <533560eade25c_13a183fe430434cd060866@Yonahs-MacBook-Pro.local.mail>
|
45371
|
+
Subject: subject-16
|
45372
|
+
Mime-Version: 1.0
|
45373
|
+
Content-Type: text/html;
|
45374
|
+
charset=UTF-8
|
45375
|
+
Content-Transfer-Encoding: 7bit
|
45376
|
+
|
45377
|
+
body-16
|
45378
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 11:45:46.921996' WHERE "rooler_deliveries"."id" = 133
|
45379
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 133]]
|
45380
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
45381
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
45382
|
+
------------------------------------------
|
45383
|
+
RoolerTest: test_processes_scheduled_rules
|
45384
|
+
------------------------------------------
|
45385
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45386
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45387
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45388
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45389
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45390
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45391
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45392
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 299], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45393
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45394
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45395
|
+
[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())
|
45396
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 269]]
|
45397
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
45398
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45399
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 269 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 179) LIMIT 1
|
45400
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["deliverable_id", 179], ["deliverable_type", "Foo"], ["rule_id", 269], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45401
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45402
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:45:46.946704' WHERE "rooler_rules"."id" = 269[0m
|
45403
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45404
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
45405
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 179]]
|
45406
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45407
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45408
|
+
--------------------------------------------
|
45409
|
+
RoolerTest: test_resets_resetable_deliveries
|
45410
|
+
--------------------------------------------
|
45411
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45412
|
+
[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 11:45:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45413
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45414
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45415
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45416
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45417
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45418
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 300], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45419
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45420
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 270]]
|
45421
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
45422
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45423
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 270 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 180) LIMIT 1[0m
|
45424
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00], ["deliverable_id", 180], ["deliverable_type", "Foo"], ["rule_id", 270], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45425
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45426
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:45:46.970670' WHERE "rooler_rules"."id" = 270
|
45427
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45428
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 180 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:45:46 UTC +00:00]]
|
45429
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45430
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45431
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
45432
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 270]]
|
45433
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
45434
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (180) [["rule_id", 270]]
|
45435
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45436
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 135]]
|
45437
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45438
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45439
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
45440
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
45441
|
+
----------------------------------------
|
45442
|
+
Rooler::DeliveryMailerTest: test_deliver
|
45443
|
+
----------------------------------------
|
45444
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45445
|
+
[1m[36mSQL (6.7ms)[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 11:47:46 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45446
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45447
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45448
|
+
[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", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 301], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45449
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45450
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45451
|
+
[1m[36mRooler::Delivery Exists (0.8ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 271 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 271) LIMIT 1[0m
|
45452
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["deliverable_id", 271], ["deliverable_type", "Rooler::Rule"], ["rule_id", 271], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45453
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45454
|
+
[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", 271]]
|
45455
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (45.5ms)
|
45456
|
+
|
45457
|
+
Sent mail to test_name@to.com (25.5ms)
|
45458
|
+
Date: Fri, 28 Mar 2014 12:47:46 +0100
|
45459
|
+
From: default@myapp.com
|
45460
|
+
To: test_name@to.com
|
45461
|
+
Cc: test_name@cc.com
|
45462
|
+
Message-ID: <5335616269c8d_13a9d3fc685434cd04003@Yonahs-MacBook-Pro.local.mail>
|
45463
|
+
Subject: subject is: test_name
|
45464
|
+
Mime-Version: 1.0
|
45465
|
+
Content-Type: text/html;
|
45466
|
+
charset=UTF-8
|
45467
|
+
Content-Transfer-Encoding: 7bit
|
45468
|
+
|
45469
|
+
body is: test_name
|
45470
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45471
|
+
[1m[35m (0.2ms)[0m BEGIN
|
45472
|
+
---------------------------------------------------------------------------------------
|
45473
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
45474
|
+
---------------------------------------------------------------------------------------
|
45475
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45476
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45477
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45478
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45479
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45480
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45481
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45482
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 302], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45483
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45484
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
45485
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45486
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45487
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45488
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45489
|
+
[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 11:47:46 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 303], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45490
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45491
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45492
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45493
|
+
------------------------------------------------------------------------------
|
45494
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
45495
|
+
------------------------------------------------------------------------------
|
45496
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45497
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45498
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45499
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45500
|
+
[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 11:47:46 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45501
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45502
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45503
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 304], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45504
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45505
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45506
|
+
[1m[36m (0.5ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 274]]
|
45507
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
45508
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45509
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 274 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 182) LIMIT 1
|
45510
|
+
[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 11:47:46 UTC +00:00], ["deliverable_id", 182], ["deliverable_type", "Foo"], ["rule_id", 274], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45511
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45512
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:47:46.519217' WHERE "rooler_rules"."id" = 274[0m
|
45513
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45514
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45515
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 274]]
|
45516
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (182))[0m
|
45517
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:47:46.523870' WHERE "rooler_rules"."id" = 274
|
45518
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45519
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
45520
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
45521
|
+
--------------------------------------------------------------------------------------------------------
|
45522
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
45523
|
+
--------------------------------------------------------------------------------------------------------
|
45524
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45525
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45526
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45527
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45528
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45529
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45530
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45531
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45532
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45533
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45534
|
+
[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 11:47:46 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 305], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45535
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45536
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
45537
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45538
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45539
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
45540
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
45541
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
45542
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45543
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45544
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45545
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45546
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-5"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45547
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45548
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45549
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 306], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45550
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45551
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45552
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-6"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45553
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45554
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45555
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 307], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45556
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45557
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 276]]
|
45558
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
45559
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45560
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 276 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 185) LIMIT 1[0m
|
45561
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["deliverable_id", 185], ["deliverable_type", "Foo"], ["rule_id", 276], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45562
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45563
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:47:46.567332' WHERE "rooler_rules"."id" = 276
|
45564
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
45565
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 277]]
|
45566
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45567
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 277 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 185) LIMIT 1
|
45568
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["deliverable_id", 185], ["deliverable_type", "Foo"], ["rule_id", 277], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45569
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45570
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:47:46.574426' WHERE "rooler_rules"."id" = 277[0m
|
45571
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45572
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45573
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45574
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 276]]
|
45575
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 276]]
|
45576
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (185))[0m
|
45577
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 277]]
|
45578
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
45579
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 277]]
|
45580
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 277]]
|
45581
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
45582
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
45583
|
+
----------------------------------------------------------------------------------------------------
|
45584
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
45585
|
+
----------------------------------------------------------------------------------------------------
|
45586
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45587
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45588
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45589
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45590
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45591
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45592
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45593
|
+
[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 11:47:46 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 308], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45594
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45595
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 278]]
|
45596
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
45597
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45598
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 278 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 187) LIMIT 1
|
45599
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["deliverable_id", 187], ["deliverable_type", "Foo"], ["rule_id", 278], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45600
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45601
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:47:46.606902' WHERE "rooler_rules"."id" = 278[0m
|
45602
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 278]]
|
45603
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (187))[0m
|
45604
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45605
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 278]]
|
45606
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (187))
|
45607
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:47:46.612331' WHERE "rooler_rules"."id" = 278[0m
|
45608
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45609
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45610
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 187 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45611
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45612
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45613
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 278]]
|
45614
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
45615
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (187)[0m [["rule_id", 278]]
|
45616
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45617
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 140]]
|
45618
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45619
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45620
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45621
|
+
[1m[36mSQL (0.6ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 187[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45622
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45623
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45624
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 278]]
|
45625
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
45626
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45627
|
+
[1m[36mRooler::Delivery Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 278 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 187) LIMIT 1[0m
|
45628
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["deliverable_id", 187], ["deliverable_type", "Foo"], ["rule_id", 278], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45629
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45630
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:47:46.642335' WHERE "rooler_rules"."id" = 278
|
45631
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45632
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
45633
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
45634
|
+
-------------------------------------------------------------------------------------------------------------------------
|
45635
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
45636
|
+
-------------------------------------------------------------------------------------------------------------------------
|
45637
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45638
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45639
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45640
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45641
|
+
[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 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:38:46 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 309], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45642
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45643
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45644
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45645
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45646
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45647
|
+
[1m[35mSQL (0.6ms)[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 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:36:46 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 310], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45648
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45649
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45650
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45651
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45652
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45653
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 311], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45654
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45655
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45656
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45657
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45658
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45659
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 312], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45660
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45661
|
+
[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())
|
45662
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
45663
|
+
[1m[35m (0.2ms)[0m BEGIN
|
45664
|
+
---------------------------------------------------------------------------------------
|
45665
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
45666
|
+
---------------------------------------------------------------------------------------
|
45667
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45668
|
+
[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 11:47:46 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45669
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45670
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45671
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
45672
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45673
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45674
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45675
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45676
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
45677
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45678
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45679
|
+
--------------------------------------------------------------------------
|
45680
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
45681
|
+
--------------------------------------------------------------------------
|
45682
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45683
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45684
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45685
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45686
|
+
[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 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 315], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45687
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45688
|
+
[1m[36mRooler::Rule Load (0.9ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 315]]
|
45689
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
45690
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45691
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45692
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45693
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45694
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45695
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45696
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
45697
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
45698
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
45699
|
+
----------------------------------------------------------------------------------
|
45700
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
45701
|
+
----------------------------------------------------------------------------------
|
45702
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45703
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45704
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45705
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45706
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 316], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45707
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45708
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45709
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45710
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45711
|
+
[1m[36mRooler::Rule Load (0.4ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 316]]
|
45712
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
45713
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45714
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45715
|
+
----------------------------------------
|
45716
|
+
RoolerTest: test_delivers_pending_emails
|
45717
|
+
----------------------------------------
|
45718
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45719
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45720
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45721
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45722
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 317], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45723
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45724
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45725
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45726
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45727
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45728
|
+
[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 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 318], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45729
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45730
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45731
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 285 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 286) LIMIT 1
|
45732
|
+
[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 11:47:46 UTC +00:00], ["deliverable_id", 286], ["deliverable_type", "Rooler::Rule"], ["rule_id", 285], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45733
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45734
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
45735
|
+
[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", 285]]
|
45736
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1[0m [["id", 286]]
|
45737
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
45738
|
+
|
45739
|
+
Sent mail to test@email.com (13.1ms)
|
45740
|
+
Date: Fri, 28 Mar 2014 12:47:46 +0100
|
45741
|
+
From: default@myapp.com
|
45742
|
+
To: test@email.com
|
45743
|
+
Message-ID: <53356162ccb52_13a9d3fc685434cd040188@Yonahs-MacBook-Pro.local.mail>
|
45744
|
+
Subject: subject-16
|
45745
|
+
Mime-Version: 1.0
|
45746
|
+
Content-Type: text/html;
|
45747
|
+
charset=UTF-8
|
45748
|
+
Content-Transfer-Encoding: 7bit
|
45749
|
+
|
45750
|
+
body-16
|
45751
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 11:47:46.850027' WHERE "rooler_deliveries"."id" = 142
|
45752
|
+
[1m[36mRooler::Delivery Load (0.6ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 142]]
|
45753
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
45754
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
45755
|
+
------------------------------------------
|
45756
|
+
RoolerTest: test_processes_scheduled_rules
|
45757
|
+
------------------------------------------
|
45758
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45759
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45760
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45761
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45762
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45763
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45764
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45765
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 319], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45766
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45767
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45768
|
+
[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())
|
45769
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 287]]
|
45770
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
45771
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45772
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 287 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 191) LIMIT 1
|
45773
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["deliverable_id", 191], ["deliverable_type", "Foo"], ["rule_id", 287], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45774
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45775
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:47:46.875440' WHERE "rooler_rules"."id" = 287[0m
|
45776
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45777
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
45778
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 191]]
|
45779
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45780
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45781
|
+
--------------------------------------------
|
45782
|
+
RoolerTest: test_resets_resetable_deliveries
|
45783
|
+
--------------------------------------------
|
45784
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45785
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45786
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45787
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45788
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45789
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45790
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45791
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 320], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45792
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45793
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 288]]
|
45794
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
45795
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45796
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 288 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 192) LIMIT 1[0m
|
45797
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00], ["deliverable_id", 192], ["deliverable_type", "Foo"], ["rule_id", 288], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45798
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45799
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:47:46.899568' WHERE "rooler_rules"."id" = 288
|
45800
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45801
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 192 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:47:46 UTC +00:00]]
|
45802
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45803
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45804
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
45805
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 288]]
|
45806
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
45807
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (192) [["rule_id", 288]]
|
45808
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45809
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 144]]
|
45810
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45811
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45812
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
45813
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
45814
|
+
----------------------------------------
|
45815
|
+
Rooler::DeliveryMailerTest: test_deliver
|
45816
|
+
----------------------------------------
|
45817
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45818
|
+
[1m[36mSQL (6.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 11:48:14 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 11:48:14 UTC +00:00]]
|
45819
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45820
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45821
|
+
[1m[35mSQL (0.9ms)[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 11:48:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 321], ["updated_at", Fri, 28 Mar 2014 11:48:14 UTC +00:00]]
|
45822
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45823
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45824
|
+
[1m[36mRooler::Delivery Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 289 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 289) LIMIT 1[0m
|
45825
|
+
[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 11:48:14 UTC +00:00], ["deliverable_id", 289], ["deliverable_type", "Rooler::Rule"], ["rule_id", 289], ["updated_at", Fri, 28 Mar 2014 11:48:14 UTC +00:00]]
|
45826
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45827
|
+
[1m[35mRooler::Template Load (1.2ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 289]]
|
45828
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (57.3ms)
|
45829
|
+
|
45830
|
+
Sent mail to test_name@to.com (36.5ms)
|
45831
|
+
Date: Fri, 28 Mar 2014 12:48:14 +0100
|
45832
|
+
From: default@myapp.com
|
45833
|
+
To: test_name@to.com
|
45834
|
+
Cc: test_name@cc.com
|
45835
|
+
Message-ID: <5335617ee7d74_13ac23fc645834cd0906bd@Yonahs-MacBook-Pro.local.mail>
|
45836
|
+
Subject: subject is: test_name
|
45837
|
+
Mime-Version: 1.0
|
45838
|
+
Content-Type: text/html;
|
45839
|
+
charset=UTF-8
|
45840
|
+
Content-Transfer-Encoding: 7bit
|
45841
|
+
|
45842
|
+
body is: test_name
|
45843
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
45844
|
+
[1m[35m (0.2ms)[0m BEGIN
|
45845
|
+
---------------------------------------------------------------------------------------
|
45846
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
45847
|
+
---------------------------------------------------------------------------------------
|
45848
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45849
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:14 UTC +00:00]]
|
45850
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45851
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45852
|
+
[1m[36mSQL (0.9ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 11:48:14 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:14 UTC +00:00]]
|
45853
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45854
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45855
|
+
[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 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 322], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45856
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45857
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
45858
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45859
|
+
[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", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45860
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45861
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45862
|
+
[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 11:48:15 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 323], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45863
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45864
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45865
|
+
[1m[35m (0.2ms)[0m BEGIN
|
45866
|
+
------------------------------------------------------------------------------
|
45867
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
45868
|
+
------------------------------------------------------------------------------
|
45869
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45870
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45871
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45872
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45873
|
+
[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", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45874
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45875
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
45876
|
+
[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 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 324], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45877
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45878
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45879
|
+
[1m[36m (0.6ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 292]]
|
45880
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
45881
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
45882
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 292 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 194) LIMIT 1
|
45883
|
+
[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 11:48:15 UTC +00:00], ["deliverable_id", 194], ["deliverable_type", "Foo"], ["rule_id", 292], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45884
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45885
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:48:15.059458' WHERE "rooler_rules"."id" = 292[0m
|
45886
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45887
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45888
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 292]]
|
45889
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (194))[0m
|
45890
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:48:15.063979' WHERE "rooler_rules"."id" = 292
|
45891
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45892
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
45893
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
45894
|
+
--------------------------------------------------------------------------------------------------------
|
45895
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
45896
|
+
--------------------------------------------------------------------------------------------------------
|
45897
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45898
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45899
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45900
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45901
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45902
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45903
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45904
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45905
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45906
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45907
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 325], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45908
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45909
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
45910
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
45911
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45912
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
45913
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
45914
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
45915
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45916
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45917
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45918
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45919
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-5"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45920
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45921
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45922
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 326], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45923
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45924
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45925
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-6"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45926
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45927
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45928
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 327], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45929
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45930
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 294]]
|
45931
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
45932
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45933
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 294 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 197) LIMIT 1[0m
|
45934
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["deliverable_id", 197], ["deliverable_type", "Foo"], ["rule_id", 294], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45935
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45936
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:48:15.108104' WHERE "rooler_rules"."id" = 294
|
45937
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
45938
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 295]]
|
45939
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45940
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 295 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 197) LIMIT 1
|
45941
|
+
[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 11:48:15 UTC +00:00], ["deliverable_id", 197], ["deliverable_type", "Foo"], ["rule_id", 295], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45942
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45943
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:48:15.115331' WHERE "rooler_rules"."id" = 295[0m
|
45944
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45945
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45946
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45947
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 294]]
|
45948
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 294]]
|
45949
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (197))[0m
|
45950
|
+
[1m[35mRooler::Rule Load (0.4ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 295]]
|
45951
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
45952
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 295]]
|
45953
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 295]]
|
45954
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
45955
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
45956
|
+
----------------------------------------------------------------------------------------------------
|
45957
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
45958
|
+
----------------------------------------------------------------------------------------------------
|
45959
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45960
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45961
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45962
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45963
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45964
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45965
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45966
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 328], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45967
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
45968
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 296]]
|
45969
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
45970
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45971
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 296 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 199) LIMIT 1
|
45972
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["deliverable_id", 199], ["deliverable_type", "Foo"], ["rule_id", 296], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45973
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45974
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:48:15.146946' WHERE "rooler_rules"."id" = 296[0m
|
45975
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 296]]
|
45976
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (199))[0m
|
45977
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45978
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 296]]
|
45979
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (199))
|
45980
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:48:15.153330' WHERE "rooler_rules"."id" = 296[0m
|
45981
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45982
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
45983
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 199 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45984
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45985
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
45986
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 296]]
|
45987
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
45988
|
+
[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 (199)[0m [["rule_id", 296]]
|
45989
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
45990
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 149]]
|
45991
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45992
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45993
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
45994
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 199[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
45995
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
45996
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
45997
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 296]]
|
45998
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
45999
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46000
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 296 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 199) LIMIT 1[0m
|
46001
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["deliverable_id", 199], ["deliverable_type", "Foo"], ["rule_id", 296], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46002
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46003
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:48:15.177289' WHERE "rooler_rules"."id" = 296
|
46004
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46005
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
46006
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46007
|
+
-------------------------------------------------------------------------------------------------------------------------
|
46008
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
46009
|
+
-------------------------------------------------------------------------------------------------------------------------
|
46010
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46011
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46012
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46013
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46014
|
+
[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 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:39:15 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 329], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46015
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46016
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46017
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46018
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46019
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46020
|
+
[1m[35mSQL (0.6ms)[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 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:37:15 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 330], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46021
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46022
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46023
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46024
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46025
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46026
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 331], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46027
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46028
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46029
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46030
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46031
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
46032
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 332], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46033
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46034
|
+
[1m[35mRooler::Rule Load (0.9ms)[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())
|
46035
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
46036
|
+
[1m[35m (0.2ms)[0m BEGIN
|
46037
|
+
---------------------------------------------------------------------------------------
|
46038
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
46039
|
+
---------------------------------------------------------------------------------------
|
46040
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46041
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-12"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46042
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46043
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46044
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
46045
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46046
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46047
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46048
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46049
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
46050
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
46051
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46052
|
+
--------------------------------------------------------------------------
|
46053
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
46054
|
+
--------------------------------------------------------------------------
|
46055
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46056
|
+
[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 11:48:15 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46057
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46058
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46059
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 335], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46060
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46061
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 335]]
|
46062
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
46063
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46064
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46065
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46066
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46067
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46068
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46069
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
46070
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
46071
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46072
|
+
----------------------------------------------------------------------------------
|
46073
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
46074
|
+
----------------------------------------------------------------------------------
|
46075
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46076
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46077
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46078
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46079
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 336], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46080
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46081
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46082
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46083
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46084
|
+
[1m[36mRooler::Rule Load (0.4ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 336]]
|
46085
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
46086
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
46087
|
+
[1m[35m (0.2ms)[0m BEGIN
|
46088
|
+
----------------------------------------
|
46089
|
+
RoolerTest: test_delivers_pending_emails
|
46090
|
+
----------------------------------------
|
46091
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46092
|
+
[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-16"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46093
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46094
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46095
|
+
[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 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 337], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46096
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46097
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46098
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46099
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46100
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46101
|
+
[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 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 338], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46102
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46103
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46104
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 303 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 304) LIMIT 1
|
46105
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["deliverable_id", 304], ["deliverable_type", "Rooler::Rule"], ["rule_id", 303], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46106
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46107
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
46108
|
+
[1m[35mRooler::Template Load (0.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", 303]]
|
46109
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1[0m [["id", 304]]
|
46110
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
46111
|
+
|
46112
|
+
Sent mail to test@email.com (13.2ms)
|
46113
|
+
Date: Fri, 28 Mar 2014 12:48:15 +0100
|
46114
|
+
From: default@myapp.com
|
46115
|
+
To: test@email.com
|
46116
|
+
Message-ID: <5335617f632ee_13ac23fc645834cd09073@Yonahs-MacBook-Pro.local.mail>
|
46117
|
+
Subject: subject-16
|
46118
|
+
Mime-Version: 1.0
|
46119
|
+
Content-Type: text/html;
|
46120
|
+
charset=UTF-8
|
46121
|
+
Content-Transfer-Encoding: 7bit
|
46122
|
+
|
46123
|
+
body-16
|
46124
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 11:48:15.417760' WHERE "rooler_deliveries"."id" = 151
|
46125
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 151]]
|
46126
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
46127
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46128
|
+
------------------------------------------
|
46129
|
+
RoolerTest: test_processes_scheduled_rules
|
46130
|
+
------------------------------------------
|
46131
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46132
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46133
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46134
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46135
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46136
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46137
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46138
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 339], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46139
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46140
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46141
|
+
[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())
|
46142
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 305]]
|
46143
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
46144
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46145
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 305 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 203) LIMIT 1
|
46146
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["deliverable_id", 203], ["deliverable_type", "Foo"], ["rule_id", 305], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46147
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46148
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:48:15.442186' WHERE "rooler_rules"."id" = 305[0m
|
46149
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46150
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
46151
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 203]]
|
46152
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
46153
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46154
|
+
--------------------------------------------
|
46155
|
+
RoolerTest: test_resets_resetable_deliveries
|
46156
|
+
--------------------------------------------
|
46157
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46158
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46159
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46160
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46161
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46162
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46163
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46164
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 340], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46165
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46166
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 306]]
|
46167
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
46168
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46169
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 306 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 204) LIMIT 1[0m
|
46170
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00], ["deliverable_id", 204], ["deliverable_type", "Foo"], ["rule_id", 306], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46171
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46172
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:48:15.465862' WHERE "rooler_rules"."id" = 306
|
46173
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46174
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 204 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:48:15 UTC +00:00]]
|
46175
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46176
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46177
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
46178
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 306]]
|
46179
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
46180
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (204) [["rule_id", 306]]
|
46181
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46182
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 153]]
|
46183
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46184
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46185
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
46186
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
46187
|
+
----------------------------------------
|
46188
|
+
Rooler::DeliveryMailerTest: test_deliver
|
46189
|
+
----------------------------------------
|
46190
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46191
|
+
[1m[36mSQL (8.3ms)[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 11:52:18 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46192
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46193
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46194
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 341], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46195
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46196
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46197
|
+
[1m[36mRooler::Delivery Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 307 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 307) LIMIT 1[0m
|
46198
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["deliverable_id", 307], ["deliverable_type", "Rooler::Rule"], ["rule_id", 307], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46199
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46200
|
+
[1m[35mRooler::Template Load (1.3ms)[0m SELECT "rooler_templates".* FROM "rooler_templates" INNER JOIN "rooler_rules" ON "rooler_templates"."id" = "rooler_rules"."template_id" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_templates"."id" ASC LIMIT 1 [["id", 307]]
|
46201
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (45.7ms)
|
46202
|
+
|
46203
|
+
Sent mail to test_name@to.com (27.1ms)
|
46204
|
+
Date: Fri, 28 Mar 2014 12:52:18 +0100
|
46205
|
+
From: default@myapp.com
|
46206
|
+
To: test_name@to.com
|
46207
|
+
Cc: test_name@cc.com
|
46208
|
+
Message-ID: <53356272a40ab_13be83fc471434cdc24073@Yonahs-MacBook-Pro.local.mail>
|
46209
|
+
Subject: subject is: test_name
|
46210
|
+
Mime-Version: 1.0
|
46211
|
+
Content-Type: text/html;
|
46212
|
+
charset=UTF-8
|
46213
|
+
Content-Transfer-Encoding: 7bit
|
46214
|
+
|
46215
|
+
body is: test_name
|
46216
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
46217
|
+
[1m[35m (0.2ms)[0m BEGIN
|
46218
|
+
---------------------------------------------------------------------------------------
|
46219
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
46220
|
+
---------------------------------------------------------------------------------------
|
46221
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46222
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46223
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46224
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46225
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46226
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46227
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46228
|
+
[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 11:52:18 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 342], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46229
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46230
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
46231
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46232
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46233
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46234
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46235
|
+
[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 11:52:18 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 343], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46236
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46237
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
46238
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46239
|
+
------------------------------------------------------------------------------
|
46240
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
46241
|
+
------------------------------------------------------------------------------
|
46242
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46243
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46244
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46245
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46246
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-3"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46247
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46248
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46249
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 344], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46250
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46251
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46252
|
+
[1m[36m (0.5ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 310]]
|
46253
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
46254
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46255
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 310 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 206) LIMIT 1
|
46256
|
+
[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 11:52:18 UTC +00:00], ["deliverable_id", 206], ["deliverable_type", "Foo"], ["rule_id", 310], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46257
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46258
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:52:18.756519' WHERE "rooler_rules"."id" = 310[0m
|
46259
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46260
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46261
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 310]]
|
46262
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (206))[0m
|
46263
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:52:18.761257' WHERE "rooler_rules"."id" = 310
|
46264
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46265
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
46266
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46267
|
+
--------------------------------------------------------------------------------------------------------
|
46268
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
46269
|
+
--------------------------------------------------------------------------------------------------------
|
46270
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46271
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46272
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46273
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46274
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46275
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46276
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46277
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46278
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46279
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46280
|
+
[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 11:52:18 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 345], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46281
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46282
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
46283
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
46284
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46285
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
46286
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
46287
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
46288
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46289
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46290
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46291
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46292
|
+
[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", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46293
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46294
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46295
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 346], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46296
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46297
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46298
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-6"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46299
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46300
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46301
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 347], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46302
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46303
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 312]]
|
46304
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
46305
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46306
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 312 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 209) LIMIT 1[0m
|
46307
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["deliverable_id", 209], ["deliverable_type", "Foo"], ["rule_id", 312], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46308
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46309
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:52:18.813687' WHERE "rooler_rules"."id" = 312
|
46310
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
46311
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 313]]
|
46312
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46313
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 313 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 209) LIMIT 1
|
46314
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["deliverable_id", 209], ["deliverable_type", "Foo"], ["rule_id", 313], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46315
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46316
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:52:18.820824' WHERE "rooler_rules"."id" = 313[0m
|
46317
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46318
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46319
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46320
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 312]]
|
46321
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 312]]
|
46322
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (209))[0m
|
46323
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 313]]
|
46324
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
46325
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 313]]
|
46326
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 313]]
|
46327
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
46328
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46329
|
+
----------------------------------------------------------------------------------------------------
|
46330
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
46331
|
+
----------------------------------------------------------------------------------------------------
|
46332
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46333
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46334
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46335
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46336
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46337
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46338
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46339
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 348], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46340
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46341
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 314]]
|
46342
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
46343
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46344
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 314 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 211) LIMIT 1
|
46345
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["deliverable_id", 211], ["deliverable_type", "Foo"], ["rule_id", 314], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46346
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46347
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:52:18.850552' WHERE "rooler_rules"."id" = 314[0m
|
46348
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 314]]
|
46349
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (211))[0m
|
46350
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46351
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 314]]
|
46352
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (211))
|
46353
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:52:18.855949' WHERE "rooler_rules"."id" = 314[0m
|
46354
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46355
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46356
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 211 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46357
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46358
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46359
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 314]]
|
46360
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
46361
|
+
[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 (211)[0m [["rule_id", 314]]
|
46362
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46363
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 158]]
|
46364
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46365
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46366
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46367
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 211[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46368
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46369
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46370
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 314]]
|
46371
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
46372
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
46373
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 314 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 211) LIMIT 1[0m
|
46374
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["deliverable_id", 211], ["deliverable_type", "Foo"], ["rule_id", 314], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46375
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46376
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:52:18.881769' WHERE "rooler_rules"."id" = 314
|
46377
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46378
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
46379
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46380
|
+
-------------------------------------------------------------------------------------------------------------------------
|
46381
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
46382
|
+
-------------------------------------------------------------------------------------------------------------------------
|
46383
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46384
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46385
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46386
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46387
|
+
[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", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:43:18 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 349], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46388
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46389
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46390
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46391
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46392
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46393
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:41:18 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 350], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46394
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46395
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46396
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46397
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46398
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46399
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 351], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46400
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46401
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46402
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46403
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46404
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46405
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 352], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46406
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46407
|
+
[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())
|
46408
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
46409
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46410
|
+
---------------------------------------------------------------------------------------
|
46411
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
46412
|
+
---------------------------------------------------------------------------------------
|
46413
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46414
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-12"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46415
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46416
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46417
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
46418
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46419
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46420
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46421
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46422
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
46423
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
46424
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46425
|
+
--------------------------------------------------------------------------
|
46426
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
46427
|
+
--------------------------------------------------------------------------
|
46428
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46429
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46430
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46431
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46432
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 355], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46433
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46434
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 355]]
|
46435
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
46436
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46437
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46438
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46439
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46440
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46441
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46442
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
46443
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
46444
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46445
|
+
----------------------------------------------------------------------------------
|
46446
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
46447
|
+
----------------------------------------------------------------------------------
|
46448
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46449
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46450
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
46451
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46452
|
+
[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 11:52:18 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 356], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46453
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46454
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46455
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46456
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46457
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 356]]
|
46458
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
46459
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
46460
|
+
[1m[35m (0.2ms)[0m BEGIN
|
46461
|
+
----------------------------------------
|
46462
|
+
RoolerTest: test_delivers_pending_emails
|
46463
|
+
----------------------------------------
|
46464
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46465
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46466
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46467
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46468
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 357], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46469
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46470
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46471
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:18 UTC +00:00]]
|
46472
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46473
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46474
|
+
[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 11:52:19 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 358], ["updated_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00]]
|
46475
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46476
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46477
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 321 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 322) LIMIT 1
|
46478
|
+
[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 11:52:19 UTC +00:00], ["deliverable_id", 322], ["deliverable_type", "Rooler::Rule"], ["rule_id", 321], ["updated_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00]]
|
46479
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46480
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
46481
|
+
[1m[35mRooler::Template Load (0.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", 321]]
|
46482
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1[0m [["id", 322]]
|
46483
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
46484
|
+
|
46485
|
+
Sent mail to test@email.com (13.0ms)
|
46486
|
+
Date: Fri, 28 Mar 2014 12:52:19 +0100
|
46487
|
+
From: default@myapp.com
|
46488
|
+
To: test@email.com
|
46489
|
+
Message-ID: <53356273120d3_13be83fc471434cdc24132@Yonahs-MacBook-Pro.local.mail>
|
46490
|
+
Subject: subject-16
|
46491
|
+
Mime-Version: 1.0
|
46492
|
+
Content-Type: text/html;
|
46493
|
+
charset=UTF-8
|
46494
|
+
Content-Transfer-Encoding: 7bit
|
46495
|
+
|
46496
|
+
body-16
|
46497
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 11:52:19.085448' WHERE "rooler_deliveries"."id" = 160
|
46498
|
+
[1m[36mRooler::Delivery Load (0.6ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 160]]
|
46499
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
46500
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46501
|
+
------------------------------------------
|
46502
|
+
RoolerTest: test_processes_scheduled_rules
|
46503
|
+
------------------------------------------
|
46504
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46505
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00]]
|
46506
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46507
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46508
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00]]
|
46509
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46510
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46511
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 359], ["updated_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00]]
|
46512
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46513
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46514
|
+
[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())
|
46515
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 323]]
|
46516
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
46517
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46518
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 323 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 215) LIMIT 1
|
46519
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00], ["deliverable_id", 215], ["deliverable_type", "Foo"], ["rule_id", 323], ["updated_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00]]
|
46520
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46521
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:52:19.109646' WHERE "rooler_rules"."id" = 323[0m
|
46522
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46523
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
46524
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 215]]
|
46525
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
46526
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46527
|
+
--------------------------------------------
|
46528
|
+
RoolerTest: test_resets_resetable_deliveries
|
46529
|
+
--------------------------------------------
|
46530
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46531
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00]]
|
46532
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46533
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46534
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00]]
|
46535
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46536
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46537
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 360], ["updated_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00]]
|
46538
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46539
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 324]]
|
46540
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
46541
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46542
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 324 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 216) LIMIT 1[0m
|
46543
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00], ["deliverable_id", 216], ["deliverable_type", "Foo"], ["rule_id", 324], ["updated_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00]]
|
46544
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46545
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:52:19.133903' WHERE "rooler_rules"."id" = 324
|
46546
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46547
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 216 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:52:19 UTC +00:00]]
|
46548
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46549
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46550
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
46551
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 324]]
|
46552
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
46553
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (216) [["rule_id", 324]]
|
46554
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46555
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 162]]
|
46556
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46557
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46558
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
46559
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46560
|
+
----------------------------------------
|
46561
|
+
Rooler::DeliveryMailerTest: test_deliver
|
46562
|
+
----------------------------------------
|
46563
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46564
|
+
[1m[36mSQL (6.7ms)[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 11:53:13 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 11:53:13 UTC +00:00]]
|
46565
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46566
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46567
|
+
[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", Fri, 28 Mar 2014 11:53:13 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 361], ["updated_at", Fri, 28 Mar 2014 11:53:13 UTC +00:00]]
|
46568
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46569
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46570
|
+
[1m[36mRooler::Delivery Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 325 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 325) LIMIT 1[0m
|
46571
|
+
[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 11:53:14 UTC +00:00], ["deliverable_id", 325], ["deliverable_type", "Rooler::Rule"], ["rule_id", 325], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46572
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46573
|
+
[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", 325]]
|
46574
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (43.7ms)
|
46575
|
+
|
46576
|
+
Sent mail to test_name@to.com (24.7ms)
|
46577
|
+
Date: Fri, 28 Mar 2014 12:53:14 +0100
|
46578
|
+
From: default@myapp.com
|
46579
|
+
To: test_name@to.com
|
46580
|
+
Cc: test_name@cc.com
|
46581
|
+
Message-ID: <533562aa3157b_13c293fd5bd834cd0537dc@Yonahs-MacBook-Pro.local.mail>
|
46582
|
+
Subject: subject is: test_name
|
46583
|
+
Mime-Version: 1.0
|
46584
|
+
Content-Type: text/html;
|
46585
|
+
charset=UTF-8
|
46586
|
+
Content-Transfer-Encoding: 7bit
|
46587
|
+
|
46588
|
+
body is: test_name
|
46589
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
46590
|
+
[1m[35m (0.2ms)[0m BEGIN
|
46591
|
+
---------------------------------------------------------------------------------------
|
46592
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
46593
|
+
---------------------------------------------------------------------------------------
|
46594
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46595
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46596
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46597
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46598
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46599
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46600
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46601
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 362], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46602
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46603
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
46604
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46605
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46606
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46607
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46608
|
+
[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 11:53:14 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 363], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46609
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46610
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
46611
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46612
|
+
------------------------------------------------------------------------------
|
46613
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
46614
|
+
------------------------------------------------------------------------------
|
46615
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46616
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46617
|
+
[1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46618
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46619
|
+
[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 11:53:14 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46620
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46621
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46622
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 364], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46623
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46624
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46625
|
+
[1m[36m (0.5ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 328]]
|
46626
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
46627
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46628
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 328 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 218) LIMIT 1
|
46629
|
+
[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 11:53:14 UTC +00:00], ["deliverable_id", 218], ["deliverable_type", "Foo"], ["rule_id", 328], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46630
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46631
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:14.286515' WHERE "rooler_rules"."id" = 328[0m
|
46632
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46633
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46634
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 328]]
|
46635
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (218))[0m
|
46636
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:14.291693' WHERE "rooler_rules"."id" = 328
|
46637
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46638
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
46639
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
46640
|
+
--------------------------------------------------------------------------------------------------------
|
46641
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
46642
|
+
--------------------------------------------------------------------------------------------------------
|
46643
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46644
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46645
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46646
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46647
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46648
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46649
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46650
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46651
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46652
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46653
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 365], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46654
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46655
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
46656
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
46657
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46658
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
46659
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
46660
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
46661
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46662
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46663
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46664
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46665
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-5"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46666
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46667
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46668
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 366], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46669
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46670
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46671
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-6"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46672
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46673
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46674
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 367], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46675
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46676
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 330]]
|
46677
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
46678
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46679
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 330 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 221) LIMIT 1[0m
|
46680
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["deliverable_id", 221], ["deliverable_type", "Foo"], ["rule_id", 330], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46681
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46682
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:14.335322' WHERE "rooler_rules"."id" = 330
|
46683
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
46684
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 331]]
|
46685
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46686
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 331 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 221) LIMIT 1
|
46687
|
+
[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 11:53:14 UTC +00:00], ["deliverable_id", 221], ["deliverable_type", "Foo"], ["rule_id", 331], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46688
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46689
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:14.342684' WHERE "rooler_rules"."id" = 331[0m
|
46690
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46691
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46692
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46693
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 330]]
|
46694
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 330]]
|
46695
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (221))[0m
|
46696
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 331]]
|
46697
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
46698
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 331]]
|
46699
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 331]]
|
46700
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
46701
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46702
|
+
----------------------------------------------------------------------------------------------------
|
46703
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
46704
|
+
----------------------------------------------------------------------------------------------------
|
46705
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46706
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46707
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46708
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46709
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46710
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46711
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46712
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 368], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46713
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46714
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 332]]
|
46715
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
46716
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46717
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 332 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 223) LIMIT 1
|
46718
|
+
[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 11:53:14 UTC +00:00], ["deliverable_id", 223], ["deliverable_type", "Foo"], ["rule_id", 332], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46719
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46720
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:14.372240' WHERE "rooler_rules"."id" = 332[0m
|
46721
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 332]]
|
46722
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (223))[0m
|
46723
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46724
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 332]]
|
46725
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (223))
|
46726
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:14.377584' WHERE "rooler_rules"."id" = 332[0m
|
46727
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46728
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46729
|
+
[1m[35mSQL (0.7ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 223 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46730
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46731
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46732
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 332]]
|
46733
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
46734
|
+
[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 (223)[0m [["rule_id", 332]]
|
46735
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46736
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 167]]
|
46737
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46738
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46739
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46740
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 223[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46741
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46742
|
+
[1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46743
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 332]]
|
46744
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
46745
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46746
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 332 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 223) LIMIT 1[0m
|
46747
|
+
[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 11:53:14 UTC +00:00], ["deliverable_id", 223], ["deliverable_type", "Foo"], ["rule_id", 332], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46748
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46749
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:14.406577' WHERE "rooler_rules"."id" = 332
|
46750
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46751
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
46752
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46753
|
+
-------------------------------------------------------------------------------------------------------------------------
|
46754
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
46755
|
+
-------------------------------------------------------------------------------------------------------------------------
|
46756
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46757
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46758
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46759
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46760
|
+
[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 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:44:14 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 369], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46761
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46762
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46763
|
+
[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", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46764
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46765
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46766
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:42:14 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 370], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46767
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46768
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46769
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46770
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46771
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46772
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 371], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46773
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46774
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46775
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46776
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46777
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46778
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 372], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46779
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46780
|
+
[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())
|
46781
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
46782
|
+
[1m[35m (0.2ms)[0m BEGIN
|
46783
|
+
---------------------------------------------------------------------------------------
|
46784
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
46785
|
+
---------------------------------------------------------------------------------------
|
46786
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46787
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-12"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46788
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46789
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46790
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
46791
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46792
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46793
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46794
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46795
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
46796
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
46797
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46798
|
+
--------------------------------------------------------------------------
|
46799
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
46800
|
+
--------------------------------------------------------------------------
|
46801
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46802
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46803
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46804
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46805
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 375], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46806
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46807
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 375]]
|
46808
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
46809
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46810
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46811
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46812
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46813
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46814
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46815
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
46816
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
46817
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46818
|
+
----------------------------------------------------------------------------------
|
46819
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
46820
|
+
----------------------------------------------------------------------------------
|
46821
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46822
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46823
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46824
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46825
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 376], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46826
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46827
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46828
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46829
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46830
|
+
[1m[36mRooler::Rule Load (0.4ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 376]]
|
46831
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
46832
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
46833
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46834
|
+
----------------------------------------
|
46835
|
+
RoolerTest: test_delivers_pending_emails
|
46836
|
+
----------------------------------------
|
46837
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46838
|
+
[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-16"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46839
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46840
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46841
|
+
[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 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 377], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46842
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46843
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46844
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46845
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46846
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46847
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 378], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46848
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46849
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46850
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 339 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 340) LIMIT 1
|
46851
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["deliverable_id", 340], ["deliverable_type", "Rooler::Rule"], ["rule_id", 339], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46852
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46853
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
46854
|
+
[1m[35mRooler::Template Load (0.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", 339]]
|
46855
|
+
[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", 340]]
|
46856
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
46857
|
+
|
46858
|
+
Sent mail to test@email.com (13.1ms)
|
46859
|
+
Date: Fri, 28 Mar 2014 12:53:14 +0100
|
46860
|
+
From: default@myapp.com
|
46861
|
+
To: test@email.com
|
46862
|
+
Message-ID: <533562aa9f90e_13c293fd5bd834cd0538b0@Yonahs-MacBook-Pro.local.mail>
|
46863
|
+
Subject: subject-16
|
46864
|
+
Mime-Version: 1.0
|
46865
|
+
Content-Type: text/html;
|
46866
|
+
charset=UTF-8
|
46867
|
+
Content-Transfer-Encoding: 7bit
|
46868
|
+
|
46869
|
+
body-16
|
46870
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 11:53:14.665081' WHERE "rooler_deliveries"."id" = 169
|
46871
|
+
[1m[36mRooler::Delivery Load (0.6ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 169]]
|
46872
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
46873
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
46874
|
+
------------------------------------------
|
46875
|
+
RoolerTest: test_processes_scheduled_rules
|
46876
|
+
------------------------------------------
|
46877
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46878
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46879
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46880
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46881
|
+
[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 11:53:14 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46882
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46883
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46884
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 379], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46885
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46886
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
46887
|
+
[1m[35mRooler::Rule Load (0.4ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
46888
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 341]]
|
46889
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
46890
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46891
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 341 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 227) LIMIT 1
|
46892
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["deliverable_id", 227], ["deliverable_type", "Foo"], ["rule_id", 341], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46893
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46894
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:14.689202' WHERE "rooler_rules"."id" = 341[0m
|
46895
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46896
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
46897
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 227]]
|
46898
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
46899
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46900
|
+
--------------------------------------------
|
46901
|
+
RoolerTest: test_resets_resetable_deliveries
|
46902
|
+
--------------------------------------------
|
46903
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46904
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46905
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46906
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46907
|
+
[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 11:53:14 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46908
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46909
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46910
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 380], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46911
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46912
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 342]]
|
46913
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
46914
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46915
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 342 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 228) LIMIT 1[0m
|
46916
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00], ["deliverable_id", 228], ["deliverable_type", "Foo"], ["rule_id", 342], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46917
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46918
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:14.713589' WHERE "rooler_rules"."id" = 342
|
46919
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46920
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 228 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:53:14 UTC +00:00]]
|
46921
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46922
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46923
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
46924
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 342]]
|
46925
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
46926
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (228) [["rule_id", 342]]
|
46927
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46928
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 171]]
|
46929
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46930
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46931
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
46932
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
46933
|
+
----------------------------------------
|
46934
|
+
Rooler::DeliveryMailerTest: test_deliver
|
46935
|
+
----------------------------------------
|
46936
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46937
|
+
[1m[36mSQL (6.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 11:53:36 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
46938
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
46939
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46940
|
+
[1m[35mSQL (1.1ms)[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 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 381], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
46941
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46942
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46943
|
+
[1m[36mRooler::Delivery Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 343 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 343) LIMIT 1[0m
|
46944
|
+
[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 11:53:36 UTC +00:00], ["deliverable_id", 343], ["deliverable_type", "Rooler::Rule"], ["rule_id", 343], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
46945
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46946
|
+
[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", 343]]
|
46947
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (44.1ms)
|
46948
|
+
|
46949
|
+
Sent mail to test_name@to.com (25.8ms)
|
46950
|
+
Date: Fri, 28 Mar 2014 12:53:36 +0100
|
46951
|
+
From: default@myapp.com
|
46952
|
+
To: test_name@to.com
|
46953
|
+
Cc: test_name@cc.com
|
46954
|
+
Message-ID: <533562c05d08a_13c483fe8ddc34cd014640@Yonahs-MacBook-Pro.local.mail>
|
46955
|
+
Subject: subject is: test_name
|
46956
|
+
Mime-Version: 1.0
|
46957
|
+
Content-Type: text/html;
|
46958
|
+
charset=UTF-8
|
46959
|
+
Content-Transfer-Encoding: 7bit
|
46960
|
+
|
46961
|
+
body is: test_name
|
46962
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
46963
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46964
|
+
---------------------------------------------------------------------------------------
|
46965
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
46966
|
+
---------------------------------------------------------------------------------------
|
46967
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46968
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
46969
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46970
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46971
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
46972
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46973
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46974
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 382], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
46975
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46976
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
46977
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
46978
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
46979
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46980
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
46981
|
+
[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 11:53:36 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 383], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
46982
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46983
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
46984
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46985
|
+
------------------------------------------------------------------------------
|
46986
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
46987
|
+
------------------------------------------------------------------------------
|
46988
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46989
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
46990
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46991
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
46992
|
+
[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 11:53:36 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
46993
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46994
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
46995
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 384], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
46996
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46997
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
46998
|
+
[1m[36m (0.5ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 346]]
|
46999
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
47000
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47001
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 346 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 230) LIMIT 1
|
47002
|
+
[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 11:53:36 UTC +00:00], ["deliverable_id", 230], ["deliverable_type", "Foo"], ["rule_id", 346], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47003
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47004
|
+
[1m[36mSQL (0.8ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:36.469147' WHERE "rooler_rules"."id" = 346[0m
|
47005
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47006
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47007
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 346]]
|
47008
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (230))[0m
|
47009
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:36.474422' WHERE "rooler_rules"."id" = 346
|
47010
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47011
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
47012
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47013
|
+
--------------------------------------------------------------------------------------------------------
|
47014
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
47015
|
+
--------------------------------------------------------------------------------------------------------
|
47016
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47017
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47018
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47019
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47020
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47021
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47022
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47023
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47024
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47025
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47026
|
+
[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 11:53:36 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 385], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47027
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47028
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
47029
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47030
|
+
[1m[35m (0.1ms)[0m BEGIN
|
47031
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
47032
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
47033
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
47034
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47035
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47036
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47037
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47038
|
+
[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", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47039
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47040
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47041
|
+
[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 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 386], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47042
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47043
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47044
|
+
[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", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47045
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47046
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47047
|
+
[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 11:53:36 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 387], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47048
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47049
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 348]]
|
47050
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
47051
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47052
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 348 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 233) LIMIT 1[0m
|
47053
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["deliverable_id", 233], ["deliverable_type", "Foo"], ["rule_id", 348], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47054
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47055
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:36.528462' WHERE "rooler_rules"."id" = 348
|
47056
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
47057
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 349]]
|
47058
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47059
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 349 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 233) LIMIT 1
|
47060
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["deliverable_id", 233], ["deliverable_type", "Foo"], ["rule_id", 349], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47061
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47062
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:36.535674' WHERE "rooler_rules"."id" = 349[0m
|
47063
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47064
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47065
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47066
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 348]]
|
47067
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 348]]
|
47068
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (233))[0m
|
47069
|
+
[1m[35mRooler::Rule Load (0.3ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 349]]
|
47070
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
47071
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 349]]
|
47072
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 349]]
|
47073
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
47074
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47075
|
+
----------------------------------------------------------------------------------------------------
|
47076
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
47077
|
+
----------------------------------------------------------------------------------------------------
|
47078
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47079
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["active", true], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47080
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47081
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47082
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-7"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47083
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47084
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47085
|
+
[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 11:53:36 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 388], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47086
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47087
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 350]]
|
47088
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
47089
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47090
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 350 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 235) LIMIT 1
|
47091
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["deliverable_id", 235], ["deliverable_type", "Foo"], ["rule_id", 350], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47092
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47093
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:36.568427' WHERE "rooler_rules"."id" = 350[0m
|
47094
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 350]]
|
47095
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (235))[0m
|
47096
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47097
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 350]]
|
47098
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (235))
|
47099
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:36.574270' WHERE "rooler_rules"."id" = 350[0m
|
47100
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47101
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47102
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 235 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47103
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47104
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47105
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 350]]
|
47106
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
47107
|
+
[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 (235)[0m [["rule_id", 350]]
|
47108
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47109
|
+
[1m[36mSQL (0.4ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 176]]
|
47110
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47111
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47112
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47113
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 235[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47114
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47115
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47116
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 350]]
|
47117
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
47118
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47119
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 350 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 235) LIMIT 1[0m
|
47120
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["deliverable_id", 235], ["deliverable_type", "Foo"], ["rule_id", 350], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47121
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47122
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:36.599357' WHERE "rooler_rules"."id" = 350
|
47123
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47124
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
47125
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47126
|
+
-------------------------------------------------------------------------------------------------------------------------
|
47127
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
47128
|
+
-------------------------------------------------------------------------------------------------------------------------
|
47129
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47130
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-8"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47131
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47132
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47133
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:44:36 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 389], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47134
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47135
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47136
|
+
[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", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47137
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47138
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47139
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:42:36 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 390], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47140
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47141
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47142
|
+
[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 11:53:36 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47143
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47144
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47145
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 391], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47146
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47147
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47148
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47149
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47150
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47151
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 392], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47152
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47153
|
+
[1m[35mRooler::Rule Load (1.0ms)[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())
|
47154
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47155
|
+
[1m[35m (0.1ms)[0m BEGIN
|
47156
|
+
---------------------------------------------------------------------------------------
|
47157
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
47158
|
+
---------------------------------------------------------------------------------------
|
47159
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47160
|
+
[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 11:53:36 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47161
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47162
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47163
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
47164
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47165
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47166
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47167
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47168
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
47169
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47170
|
+
[1m[35m (0.1ms)[0m BEGIN
|
47171
|
+
--------------------------------------------------------------------------
|
47172
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
47173
|
+
--------------------------------------------------------------------------
|
47174
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47175
|
+
[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", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47176
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47177
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47178
|
+
[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 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 395], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47179
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47180
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 395]]
|
47181
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
47182
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47183
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47184
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47185
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47186
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47187
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47188
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
47189
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
47190
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
47191
|
+
----------------------------------------------------------------------------------
|
47192
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
47193
|
+
----------------------------------------------------------------------------------
|
47194
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47195
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47196
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47197
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47198
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 396], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47199
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47200
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47201
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47202
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47203
|
+
[1m[36mRooler::Rule Load (0.5ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 396]]
|
47204
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
47205
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
47206
|
+
[1m[35m (0.2ms)[0m BEGIN
|
47207
|
+
----------------------------------------
|
47208
|
+
RoolerTest: test_delivers_pending_emails
|
47209
|
+
----------------------------------------
|
47210
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
47211
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47212
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47213
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47214
|
+
[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 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 397], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47215
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47216
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47217
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47218
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47219
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47220
|
+
[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 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 398], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47221
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47222
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47223
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 357 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 358) LIMIT 1
|
47224
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["deliverable_id", 358], ["deliverable_type", "Rooler::Rule"], ["rule_id", 357], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47225
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47226
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
47227
|
+
[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", 357]]
|
47228
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1[0m [["id", 358]]
|
47229
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
47230
|
+
|
47231
|
+
Sent mail to test@email.com (13.9ms)
|
47232
|
+
Date: Fri, 28 Mar 2014 12:53:36 +0100
|
47233
|
+
From: default@myapp.com
|
47234
|
+
To: test@email.com
|
47235
|
+
Message-ID: <533562c0d50c9_13c483fe8ddc34cd014736@Yonahs-MacBook-Pro.local.mail>
|
47236
|
+
Subject: subject-16
|
47237
|
+
Mime-Version: 1.0
|
47238
|
+
Content-Type: text/html;
|
47239
|
+
charset=UTF-8
|
47240
|
+
Content-Transfer-Encoding: 7bit
|
47241
|
+
|
47242
|
+
body-16
|
47243
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 11:53:36.884787' WHERE "rooler_deliveries"."id" = 178
|
47244
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 178]]
|
47245
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
47246
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47247
|
+
------------------------------------------
|
47248
|
+
RoolerTest: test_processes_scheduled_rules
|
47249
|
+
------------------------------------------
|
47250
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47251
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47252
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47253
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47254
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47255
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47256
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
47257
|
+
[1m[36mSQL (0.8ms)[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 11:53:36 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 399], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47258
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47259
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47260
|
+
[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())
|
47261
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 359]]
|
47262
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
47263
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47264
|
+
[1m[35mRooler::Delivery Exists (0.5ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 359 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 239) LIMIT 1
|
47265
|
+
[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 11:53:36 UTC +00:00], ["deliverable_id", 239], ["deliverable_type", "Foo"], ["rule_id", 359], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47266
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47267
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:36.914577' WHERE "rooler_rules"."id" = 359[0m
|
47268
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47269
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
47270
|
+
[1m[35mFoo Load (0.7ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 239]]
|
47271
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47272
|
+
[1m[35m (0.2ms)[0m BEGIN
|
47273
|
+
--------------------------------------------
|
47274
|
+
RoolerTest: test_resets_resetable_deliveries
|
47275
|
+
--------------------------------------------
|
47276
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47277
|
+
[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 11:53:36 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47278
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47279
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47280
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47281
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
47282
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47283
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 400], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47284
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47285
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 360]]
|
47286
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
47287
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47288
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 360 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 240) LIMIT 1[0m
|
47289
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00], ["deliverable_id", 240], ["deliverable_type", "Foo"], ["rule_id", 360], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47290
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47291
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:53:36.940214' WHERE "rooler_rules"."id" = 360
|
47292
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47293
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 240 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:53:36 UTC +00:00]]
|
47294
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47295
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47296
|
+
[1m[36mRooler::Rule Load (0.3ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
47297
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 360]]
|
47298
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
47299
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (240) [["rule_id", 360]]
|
47300
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47301
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 180]]
|
47302
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47303
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47304
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47305
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47306
|
+
----------------------------------------
|
47307
|
+
Rooler::DeliveryMailerTest: test_deliver
|
47308
|
+
----------------------------------------
|
47309
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47310
|
+
[1m[36mSQL (23.3ms)[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 11:56:37 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Fri, 28 Mar 2014 11:56:37 UTC +00:00]]
|
47311
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47312
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47313
|
+
[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", Fri, 28 Mar 2014 11:56:37 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 401], ["updated_at", Fri, 28 Mar 2014 11:56:37 UTC +00:00]]
|
47314
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47315
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47316
|
+
[1m[36mRooler::Delivery Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 361 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 361) LIMIT 1[0m
|
47317
|
+
[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 11:56:37 UTC +00:00], ["deliverable_id", 361], ["deliverable_type", "Rooler::Rule"], ["rule_id", 361], ["updated_at", Fri, 28 Mar 2014 11:56:37 UTC +00:00]]
|
47318
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47319
|
+
[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", 361]]
|
47320
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (44.9ms)
|
47321
|
+
|
47322
|
+
Sent mail to test_name@to.com (27.4ms)
|
47323
|
+
Date: Fri, 28 Mar 2014 12:56:38 +0100
|
47324
|
+
From: default@myapp.com
|
47325
|
+
To: test_name@to.com
|
47326
|
+
Cc: test_name@cc.com
|
47327
|
+
Message-ID: <533563762d76_13d083fe918c34ce0865e2@Yonahs-MacBook-Pro.local.mail>
|
47328
|
+
Subject: subject is: test_name
|
47329
|
+
Mime-Version: 1.0
|
47330
|
+
Content-Type: text/html;
|
47331
|
+
charset=UTF-8
|
47332
|
+
Content-Transfer-Encoding: 7bit
|
47333
|
+
|
47334
|
+
body is: test_name
|
47335
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
47336
|
+
[1m[35m (0.2ms)[0m BEGIN
|
47337
|
+
---------------------------------------------------------------------------------------
|
47338
|
+
Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
|
47339
|
+
---------------------------------------------------------------------------------------
|
47340
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47341
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47342
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47343
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47344
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-1"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47345
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47346
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47347
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 402], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47348
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47349
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t')
|
47350
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47351
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-2"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47352
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47353
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47354
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 403], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47355
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47356
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47357
|
+
[1m[35m (0.1ms)[0m BEGIN
|
47358
|
+
------------------------------------------------------------------------------
|
47359
|
+
Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
|
47360
|
+
------------------------------------------------------------------------------
|
47361
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47362
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47363
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47364
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47365
|
+
[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 11:56:38 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47366
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47367
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47368
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 404], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47369
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47370
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47371
|
+
[1m[36m (0.6ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 364]]
|
47372
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
47373
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47374
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 364 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 242) LIMIT 1
|
47375
|
+
[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 11:56:38 UTC +00:00], ["deliverable_id", 242], ["deliverable_type", "Foo"], ["rule_id", 364], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47376
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47377
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:56:38.097952' WHERE "rooler_rules"."id" = 364[0m
|
47378
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47379
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47380
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 364]]
|
47381
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (242))[0m
|
47382
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:56:38.102819' WHERE "rooler_rules"."id" = 364
|
47383
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47384
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
47385
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47386
|
+
--------------------------------------------------------------------------------------------------------
|
47387
|
+
Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
|
47388
|
+
--------------------------------------------------------------------------------------------------------
|
47389
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47390
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47391
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47392
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47393
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47394
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47395
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47396
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-4"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47397
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47398
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47399
|
+
[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 11:56:38 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 405], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47400
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47401
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" LIMIT 1
|
47402
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47403
|
+
[1m[35m (0.2ms)[0m BEGIN
|
47404
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
47405
|
+
Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
|
47406
|
+
--------------------------------------------------------------------------------------------------------------------------------------
|
47407
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47408
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47409
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47410
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47411
|
+
[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 11:56:38 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47412
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47413
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47414
|
+
[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 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 406], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47415
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47416
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47417
|
+
[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 11:56:38 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47418
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47419
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47420
|
+
[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 11:56:38 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 407], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47421
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47422
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 366]]
|
47423
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)[0m
|
47424
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47425
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 366 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 245) LIMIT 1[0m
|
47426
|
+
[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 11:56:38 UTC +00:00], ["deliverable_id", 245], ["deliverable_type", "Foo"], ["rule_id", 366], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47427
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47428
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:56:38.175286' WHERE "rooler_rules"."id" = 366
|
47429
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
47430
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 367]]
|
47431
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47432
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 367 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 245) LIMIT 1
|
47433
|
+
[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 11:56:38 UTC +00:00], ["deliverable_id", 245], ["deliverable_type", "Foo"], ["rule_id", 367], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47434
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47435
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:56:38.186389' WHERE "rooler_rules"."id" = 367[0m
|
47436
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47437
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47438
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47439
|
+
[1m[36mRooler::Rule Load (0.7ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1[0m [["id", 366]]
|
47440
|
+
[1m[35m (0.5ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 366]]
|
47441
|
+
[1m[36mFoo Load (0.5ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (245))[0m
|
47442
|
+
[1m[35mRooler::Rule Load (0.5ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 367]]
|
47443
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t')[0m
|
47444
|
+
[1m[35m (0.4ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 367]]
|
47445
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 367]]
|
47446
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
47447
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47448
|
+
----------------------------------------------------------------------------------------------------
|
47449
|
+
Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
|
47450
|
+
----------------------------------------------------------------------------------------------------
|
47451
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47452
|
+
[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 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47453
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
47454
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47455
|
+
[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 11:56:38 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47456
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47457
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47458
|
+
[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 11:56:38 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 408], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47459
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47460
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 368]]
|
47461
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
|
47462
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47463
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 368 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 247) LIMIT 1
|
47464
|
+
[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 11:56:38 UTC +00:00], ["deliverable_id", 247], ["deliverable_type", "Foo"], ["rule_id", 368], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47465
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47466
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:56:38.233790' WHERE "rooler_rules"."id" = 368[0m
|
47467
|
+
[1m[35m (0.3ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 368]]
|
47468
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (247))[0m
|
47469
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47470
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 368]]
|
47471
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (247))
|
47472
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:56:38.243238' WHERE "rooler_rules"."id" = 368[0m
|
47473
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47474
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47475
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 247 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47476
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47477
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47478
|
+
[1m[36m (0.3ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 368]]
|
47479
|
+
[1m[35mFoo Load (0.4ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
|
47480
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (247)[0m [["rule_id", 368]]
|
47481
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47482
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1[0m [["id", 185]]
|
47483
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47484
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47485
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47486
|
+
[1m[36mSQL (0.6ms)[0m [1mUPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 247[0m [["active", true], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47487
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47488
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47489
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 368]]
|
47490
|
+
[1m[36mFoo Load (0.4ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
47491
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47492
|
+
[1m[36mRooler::Delivery Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 368 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 247) LIMIT 1[0m
|
47493
|
+
[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 11:56:38 UTC +00:00], ["deliverable_id", 247], ["deliverable_type", "Foo"], ["rule_id", 368], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47494
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47495
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:56:38.276805' WHERE "rooler_rules"."id" = 368
|
47496
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47497
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
47498
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
47499
|
+
-------------------------------------------------------------------------------------------------------------------------
|
47500
|
+
Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
|
47501
|
+
-------------------------------------------------------------------------------------------------------------------------
|
47502
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47503
|
+
[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", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47504
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47505
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47506
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:47:38 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 409], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47507
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47508
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47509
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-9"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47510
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47511
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47512
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "last_checked_at", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["check_frequency", 600], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Fri, 28 Mar 2014 11:45:38 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 410], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47513
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47514
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47515
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-10"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47516
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47517
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47518
|
+
[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", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 411], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47519
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47520
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47521
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-11"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47522
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47523
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47524
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 412], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47525
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47526
|
+
[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())
|
47527
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47528
|
+
[1m[35m (0.2ms)[0m BEGIN
|
47529
|
+
---------------------------------------------------------------------------------------
|
47530
|
+
Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
|
47531
|
+
---------------------------------------------------------------------------------------
|
47532
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47533
|
+
[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", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47534
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47535
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47536
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
47537
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47538
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-13"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47539
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47540
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47541
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
47542
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
47543
|
+
[1m[35m (0.1ms)[0m BEGIN
|
47544
|
+
--------------------------------------------------------------------------
|
47545
|
+
Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
|
47546
|
+
--------------------------------------------------------------------------
|
47547
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47548
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-14"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47549
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47550
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47551
|
+
[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 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 415], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47552
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47553
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 415]]
|
47554
|
+
[1m[35mFoo Load (0.3ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
47555
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47556
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47557
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47558
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47559
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47560
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47561
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1[0m
|
47562
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
47563
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47564
|
+
----------------------------------------------------------------------------------
|
47565
|
+
Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
|
47566
|
+
----------------------------------------------------------------------------------
|
47567
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47568
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-15"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47569
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47570
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47571
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 416], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47572
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47573
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47574
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47575
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47576
|
+
[1m[36mRooler::Rule Load (0.6ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1[0m [["template_id", 416]]
|
47577
|
+
[1m[35mFoo Load (0.5ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
|
47578
|
+
[1m[36m (0.4ms)[0m [1mROLLBACK[0m
|
47579
|
+
[1m[35m (0.2ms)[0m BEGIN
|
47580
|
+
----------------------------------------
|
47581
|
+
RoolerTest: test_delivers_pending_emails
|
47582
|
+
----------------------------------------
|
47583
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47584
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-16"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47585
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47586
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47587
|
+
[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 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 417], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47588
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47589
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47590
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-17"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47591
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47592
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47593
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 418], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47594
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47595
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47596
|
+
[1m[35mRooler::Delivery Exists (0.3ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 375 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 376) LIMIT 1
|
47597
|
+
[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 11:56:38 UTC +00:00], ["deliverable_id", 376], ["deliverable_type", "Rooler::Rule"], ["rule_id", 375], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47598
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47599
|
+
[1m[36mRooler::Delivery Load (0.3ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL[0m
|
47600
|
+
[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", 375]]
|
47601
|
+
[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", 376]]
|
47602
|
+
Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
|
47603
|
+
|
47604
|
+
Sent mail to test@email.com (13.4ms)
|
47605
|
+
Date: Fri, 28 Mar 2014 12:56:38 +0100
|
47606
|
+
From: default@myapp.com
|
47607
|
+
To: test@email.com
|
47608
|
+
Message-ID: <533563768dc72_13d083fe918c34ce08668@Yonahs-MacBook-Pro.local.mail>
|
47609
|
+
Subject: subject-16
|
47610
|
+
Mime-Version: 1.0
|
47611
|
+
Content-Type: text/html;
|
47612
|
+
charset=UTF-8
|
47613
|
+
Content-Transfer-Encoding: 7bit
|
47614
|
+
|
47615
|
+
body-16
|
47616
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-28 11:56:38.592529' WHERE "rooler_deliveries"."id" = 187
|
47617
|
+
[1m[36mRooler::Delivery Load (0.5ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1[0m [["id", 187]]
|
47618
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
47619
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47620
|
+
------------------------------------------
|
47621
|
+
RoolerTest: test_processes_scheduled_rules
|
47622
|
+
------------------------------------------
|
47623
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47624
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47625
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
47626
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47627
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-18"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47628
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47629
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47630
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["check_frequency", 60], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 419], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47631
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47632
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "rooler_deliveries"[0m
|
47633
|
+
[1m[35mRooler::Rule Load (0.4ms)[0m SELECT "rooler_rules".* FROM "rooler_rules" WHERE (last_checked_at IS NULL OR check_frequency IS NULL OR (last_checked_at + check_frequency*'1 second'::interval) < now())
|
47634
|
+
[1m[36m (0.2ms)[0m [1mSELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1[0m [["rule_id", 377]]
|
47635
|
+
[1m[35mFoo Load (0.2ms)[0m SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
|
47636
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47637
|
+
[1m[35mRooler::Delivery Exists (0.4ms)[0m SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 377 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 251) LIMIT 1
|
47638
|
+
[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 11:56:38 UTC +00:00], ["deliverable_id", 251], ["deliverable_type", "Foo"], ["rule_id", 377], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47639
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47640
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:56:38.620222' WHERE "rooler_rules"."id" = 377[0m
|
47641
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47642
|
+
[1m[36mRooler::Delivery Load (0.4ms)[0m [1mSELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1[0m
|
47643
|
+
[1m[35mFoo Load (0.6ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 251]]
|
47644
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
47645
|
+
[1m[35m (0.1ms)[0m BEGIN
|
47646
|
+
--------------------------------------------
|
47647
|
+
RoolerTest: test_resets_resetable_deliveries
|
47648
|
+
--------------------------------------------
|
47649
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
47650
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47651
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47652
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
47653
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["body", "body-19"], ["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47654
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
47655
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47656
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "rooler_rules" ("created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 420], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47657
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47658
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 378]]
|
47659
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)[0m
|
47660
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47661
|
+
[1m[36mRooler::Delivery Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 378 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 252) LIMIT 1[0m
|
47662
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00], ["deliverable_id", 252], ["deliverable_type", "Foo"], ["rule_id", 378], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47663
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47664
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-28 11:56:38.646127' WHERE "rooler_rules"."id" = 378
|
47665
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47666
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 252 [["active", false], ["updated_at", Fri, 28 Mar 2014 11:56:38 UTC +00:00]]
|
47667
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47668
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47669
|
+
[1m[36mRooler::Rule Load (0.2ms)[0m [1mSELECT "rooler_rules".* FROM "rooler_rules"[0m
|
47670
|
+
[1m[35m (0.2ms)[0m SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 378]]
|
47671
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'[0m
|
47672
|
+
[1m[35mRooler::Delivery Load (0.4ms)[0m SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (252) [["rule_id", 378]]
|
47673
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
47674
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 189]]
|
47675
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
47676
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "rooler_deliveries"
|
47677
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|