rooler 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGNlOGNkZTE2MmMzMjM1YWRiNDMwNTlkZWQxZGVlZTFmZTMzOGY5MA==
4
+ NWFiZmM0MzM3OWIyNDBiODcxNjMzODU4YWVkN2ZmNDA2MDY2ZjNjZQ==
5
5
  data.tar.gz: !binary |-
6
- ODVhNWMyYjI1NDQ3NWMzMTIxNDZkNzAzZGYxYjU2MzA3NmU0Y2FiNg==
6
+ ZWViYzZhZWM0NzUzNmYxNmNlNzFmYmZiZjNlNmY4NjQ5NjZiMWUzYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OGZhMzA5NGU3NzE2ZGY3ZjQzMjY1ZWIzYmJhZGIwMzBhYjA2NTU5N2NkOWNi
10
- ZmQzM2U5NzBkZGFlMWI5MDM4OGVkYzk2ZjljNWNhOTZlNWViODhjOGMxMzU5
11
- ZjZiZTdlZGQzOGJlNTg0NmZiYTNjNWIzMzNhNTYxMTZiMzM3Y2Y=
9
+ MDcxZGVjZjk1NmQ4MDJlZDUyYWQ2MzJkYmJkMTg5YmQ1MjQ2ZjkxMmVhN2Ri
10
+ NWQwNDViZWFhNjk5ZjkyMjQ3OTAyNTE3NTk1NWFhNzcxZTIwN2M2YzAxOTg5
11
+ NGNkOTk5YjdlMDAxZjgwNDk2ZGE3ZmM1YjEzYjA2NTYzYjc3YzI=
12
12
  data.tar.gz: !binary |-
13
- NzM0MmRkNGY0N2JjOGUyN2NjMTgzZWQ1NmU5NTViMDI2NWNlOWQyYzRlOGEx
14
- NTY2ODFiNTJkNzg4YWYwZTNmMjNhMmVhMWQ3OTk1NDZjMDk2Nzk0NWI4ZDY1
15
- NzY2NDFmMzRlOTNkYmU4MjVhMDIzMGM4Mjg1ZWM3MzdlZDY5NjQ=
13
+ ZDg2ZDUzZGQ0MTA1NGEyYmM2ODE1ZTM1YjAwZjk1YWYxMzIwMzcxZmRmNjBm
14
+ ODM1NWU5MzYwYzc4Yjc2ZWExYWFmNzI5Y2U3NDg3YzZmYmNlZDZkMjMyODlh
15
+ YTAzMGUwMmVmNDZlZDg3MTFlYzJkYmJlODg4OGNkMTViN2Y0MjM=
@@ -27,7 +27,7 @@ module Rooler
27
27
  end
28
28
 
29
29
  def associations(klass)
30
- klass.reflect_on_all_associations.map(&:name)
30
+ klass.reflect_on_all_associations.map(&:class_name)
31
31
  end
32
32
 
33
33
  def liquid_methods(klass)
@@ -1,3 +1,3 @@
1
1
  module Rooler
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -43945,3 +43945,376 @@ RoolerTest: test_resets_resetable_deliveries
43945
43945
   (0.1ms) RELEASE SAVEPOINT active_record_1
43946
43946
   (0.2ms) SELECT COUNT(*) FROM "rooler_deliveries"
43947
43947
   (0.1ms) ROLLBACK
43948
+  (0.1ms) BEGIN
43949
+ ----------------------------------------
43950
+ Rooler::DeliveryMailerTest: test_deliver
43951
+ ----------------------------------------
43952
+  (0.2ms) SAVEPOINT active_record_1
43953
+ SQL (38.2ms) INSERT INTO "rooler_templates" ("body", "cc", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["body", "body is: {{rule.name}}"], ["cc", "{{rule.name}}@cc.com"], ["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["name", "template-1"], ["subject", "subject is: {{rule.name}}"], ["to", "{{rule.name}}@to.com"], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
43954
+  (0.2ms) RELEASE SAVEPOINT active_record_1
43955
+  (0.2ms) SAVEPOINT active_record_1
43956
+ SQL (1.5ms) 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", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "test_name"], ["template_id", 221], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
43957
+  (0.2ms) RELEASE SAVEPOINT active_record_1
43958
+  (0.2ms) SAVEPOINT active_record_1
43959
+ Rooler::Delivery Exists (1.1ms) SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 199 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 199) LIMIT 1
43960
+ SQL (0.9ms) INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["deliverable_id", 199], ["deliverable_type", "Rooler::Rule"], ["rule_id", 199], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
43961
+  (0.1ms) RELEASE SAVEPOINT active_record_1
43962
+ Rooler::Template Load (1.4ms) 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", 199]]
43963
+ Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (60.4ms)
43964
+
43965
+ Sent mail to test_name@to.com (44.1ms)
43966
+ Date: Thu, 27 Mar 2014 20:30:26 +0100
43967
+ From: default@myapp.com
43968
+ To: test_name@to.com
43969
+ Cc: test_name@cc.com
43970
+ Message-ID: <53347c52b9a36_40c43fd9dd434cd8334cd@Yonahs-MacBook-Pro.local.mail>
43971
+ Subject: subject is: test_name
43972
+ Mime-Version: 1.0
43973
+ Content-Type: text/html;
43974
+ charset=UTF-8
43975
+ Content-Transfer-Encoding: 7bit
43976
+
43977
+ body is: test_name
43978
+  (0.4ms) ROLLBACK
43979
+  (0.2ms) BEGIN
43980
+ ---------------------------------------------------------------------------------------
43981
+ Rooler::RuleTest: test_check_all_method_finds_objects_of_rules_class_using_klass_method
43982
+ ---------------------------------------------------------------------------------------
43983
+  (0.2ms) SAVEPOINT active_record_1
43984
+ SQL (1.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
43985
+  (0.1ms) RELEASE SAVEPOINT active_record_1
43986
+  (0.1ms) SAVEPOINT active_record_1
43987
+ SQL (0.7ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-1"], ["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["name", "template-2"], ["subject", "subject-1"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
43988
+  (0.1ms) RELEASE SAVEPOINT active_record_1
43989
+  (0.1ms) SAVEPOINT active_record_1
43990
+ SQL (0.5ms) 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", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-1"], ["template_id", 222], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
43991
+  (0.1ms) RELEASE SAVEPOINT active_record_1
43992
+ Foo Load (0.4ms) SELECT "foos".* FROM "foos" WHERE ('t')
43993
+  (0.2ms) SAVEPOINT active_record_1
43994
+ SQL (0.5ms) 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", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["name", "template-3"], ["subject", "subject-2"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
43995
+  (0.1ms) RELEASE SAVEPOINT active_record_1
43996
+  (0.2ms) SAVEPOINT active_record_1
43997
+ SQL (0.8ms) 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", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["klass_finder_method", "empty_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-2"], ["template_id", 223], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
43998
+  (0.1ms) RELEASE SAVEPOINT active_record_1
43999
+  (0.2ms) ROLLBACK
44000
+  (0.1ms) BEGIN
44001
+ ------------------------------------------------------------------------------
44002
+ Rooler::RuleTest: test_creates_deliveries_ONCE_for_objects_matching_class_rule
44003
+ ------------------------------------------------------------------------------
44004
+  (0.1ms) SAVEPOINT active_record_1
44005
+ SQL (0.5ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44006
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44007
+  (0.2ms) SAVEPOINT active_record_1
44008
+ SQL (0.6ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-3"], ["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["name", "template-4"], ["subject", "subject-3"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44009
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44010
+  (0.1ms) SAVEPOINT active_record_1
44011
+ SQL (0.4ms) 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", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-3"], ["template_id", 224], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44012
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44013
+  (0.3ms) SELECT COUNT(*) FROM "rooler_deliveries"
44014
+  (0.6ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 202]]
44015
+ Foo Load (0.4ms) SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
44016
+  (0.1ms) SAVEPOINT active_record_1
44017
+ Rooler::Delivery Exists (0.3ms) SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 202 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 134) LIMIT 1
44018
+ SQL (0.5ms) INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["deliverable_id", 134], ["deliverable_type", "Foo"], ["rule_id", 202], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44019
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44020
+ SQL (0.3ms) UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-27 19:30:26.854917' WHERE "rooler_rules"."id" = 202
44021
+  (0.2ms) SELECT COUNT(*) FROM "rooler_deliveries"
44022
+  (0.2ms) SELECT COUNT(*) FROM "rooler_deliveries"
44023
+  (0.2ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 202]]
44024
+ Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (134))
44025
+ SQL (0.2ms) UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-27 19:30:26.859140' WHERE "rooler_rules"."id" = 202
44026
+  (0.6ms) SELECT COUNT(*) FROM "rooler_deliveries"
44027
+  (0.2ms) ROLLBACK
44028
+  (0.2ms) BEGIN
44029
+ --------------------------------------------------------------------------------------------------------
44030
+ Rooler::RuleTest: test_find_by_klass_method_finds_objects_of_rules_class_using_klass_method_with_params.
44031
+ --------------------------------------------------------------------------------------------------------
44032
+  (0.2ms) SAVEPOINT active_record_1
44033
+ SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44034
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44035
+  (0.2ms) SAVEPOINT active_record_1
44036
+ SQL (0.6ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44037
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44038
+  (0.2ms) SAVEPOINT active_record_1
44039
+ SQL (0.8ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-4"], ["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["name", "template-5"], ["subject", "subject-4"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44040
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44041
+  (0.2ms) SAVEPOINT active_record_1
44042
+ SQL (1.0ms) 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", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["klass_finder_method", "take"], ["klass_name", "Foo"], ["method_params", "--- 1\n...\n"], ["name", "rule-4"], ["template_id", 225], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44043
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44044
+ Foo Load (0.3ms) SELECT "foos".* FROM "foos" LIMIT 1
44045
+  (0.2ms) ROLLBACK
44046
+  (0.2ms) BEGIN
44047
+ --------------------------------------------------------------------------------------------------------------------------------------
44048
+ Rooler::RuleTest: test_find_undelivered_by_klass_finds_unprocessed_objects_using_klass_method._works_with_both_AR_relations_and_arrays
44049
+ --------------------------------------------------------------------------------------------------------------------------------------
44050
+  (0.2ms) SAVEPOINT active_record_1
44051
+ SQL (0.5ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44052
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44053
+  (0.1ms) SAVEPOINT active_record_1
44054
+ SQL (0.5ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-5"], ["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["name", "template-6"], ["subject", "subject-5"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44055
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44056
+  (0.1ms) SAVEPOINT active_record_1
44057
+ SQL (0.5ms) 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", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-5"], ["template_id", 226], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44058
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44059
+  (0.2ms) SAVEPOINT active_record_1
44060
+ SQL (0.5ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-6"], ["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["name", "template-7"], ["subject", "subject-6"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44061
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44062
+  (0.1ms) SAVEPOINT active_record_1
44063
+ SQL (0.6ms) 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", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["klass_finder_method", "array_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-6"], ["template_id", 227], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44064
+  (0.3ms) RELEASE SAVEPOINT active_record_1
44065
+  (0.4ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 204]]
44066
+ Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
44067
+  (0.2ms) SAVEPOINT active_record_1
44068
+ Rooler::Delivery Exists (0.5ms) SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 204 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 137) LIMIT 1
44069
+ SQL (0.7ms) INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["deliverable_id", 137], ["deliverable_type", "Foo"], ["rule_id", 204], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44070
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44071
+ SQL (0.3ms) UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-27 19:30:26.941212' WHERE "rooler_rules"."id" = 204
44072
+ Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE ('t')
44073
+  (0.4ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 205]]
44074
+  (0.1ms) SAVEPOINT active_record_1
44075
+ Rooler::Delivery Exists (0.3ms) SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 205 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 137) LIMIT 1
44076
+ SQL (0.4ms) INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["deliverable_id", 137], ["deliverable_type", "Foo"], ["rule_id", 205], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44077
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44078
+ SQL (0.3ms) UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-27 19:30:26.949974' WHERE "rooler_rules"."id" = 205
44079
+  (0.1ms) SAVEPOINT active_record_1
44080
+ SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44081
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44082
+ Rooler::Rule Load (0.5ms) SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 204]]
44083
+  (0.3ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 204]]
44084
+ Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE ('t') AND ("foos"."id" NOT IN (137))
44085
+ Rooler::Rule Load (0.3ms) SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 LIMIT 1 [["id", 205]]
44086
+ Foo Load (0.2ms) SELECT "foos".* FROM "foos" WHERE ('t')
44087
+  (0.3ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 205]]
44088
+  (0.3ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 205]]
44089
+  (0.2ms) ROLLBACK
44090
+  (0.2ms) BEGIN
44091
+ ----------------------------------------------------------------------------------------------------
44092
+ Rooler::RuleTest: test_finds_delivered_objects_where_the_condition_no_longer_applies_and_resets_them
44093
+ ----------------------------------------------------------------------------------------------------
44094
+  (0.1ms) SAVEPOINT active_record_1
44095
+ SQL (0.6ms) INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44096
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44097
+  (0.1ms) SAVEPOINT active_record_1
44098
+ SQL (0.5ms) 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", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["name", "template-8"], ["subject", "subject-7"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44099
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44100
+  (0.1ms) SAVEPOINT active_record_1
44101
+ SQL (0.5ms) 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", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-7"], ["template_id", 228], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44102
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44103
+  (0.2ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 206]]
44104
+ Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
44105
+  (0.1ms) SAVEPOINT active_record_1
44106
+ Rooler::Delivery Exists (0.3ms) SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 206 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 139) LIMIT 1
44107
+ SQL (0.5ms) INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00], ["deliverable_id", 139], ["deliverable_type", "Foo"], ["rule_id", 206], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44108
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44109
+ SQL (0.3ms) UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-27 19:30:26.980215' WHERE "rooler_rules"."id" = 206
44110
+  (0.2ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 206]]
44111
+  (0.3ms) SELECT COUNT(*) FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (139))
44112
+  (0.2ms) SELECT COUNT(*) FROM "rooler_deliveries"
44113
+  (0.2ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 206]]
44114
+ Foo Load (0.2ms) SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND ("foos"."id" NOT IN (139))
44115
+ SQL (0.2ms) UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-27 19:30:26.985510' WHERE "rooler_rules"."id" = 206
44116
+  (0.2ms) SELECT COUNT(*) FROM "rooler_deliveries"
44117
+  (0.3ms) SAVEPOINT active_record_1
44118
+ SQL (1.0ms) UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 139 [["active", false], ["updated_at", Thu, 27 Mar 2014 19:30:26 UTC +00:00]]
44119
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44120
+  (0.3ms) SELECT COUNT(*) FROM "rooler_deliveries"
44121
+  (0.2ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 206]]
44122
+ Foo Load (0.4ms) SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
44123
+ Rooler::Delivery Load (0.5ms) SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (139) [["rule_id", 206]]
44124
+  (0.2ms) SAVEPOINT active_record_1
44125
+ SQL (0.6ms) DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 104]]
44126
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44127
+  (0.4ms) SELECT COUNT(*) FROM "rooler_deliveries"
44128
+  (0.2ms) SAVEPOINT active_record_1
44129
+ SQL (0.5ms) UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 139 [["active", true], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44130
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44131
+  (0.4ms) SELECT COUNT(*) FROM "rooler_deliveries"
44132
+  (0.3ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 206]]
44133
+ Foo Load (0.4ms) SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
44134
+  (0.1ms) SAVEPOINT active_record_1
44135
+ Rooler::Delivery Exists (0.3ms) SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 206 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 139) LIMIT 1
44136
+ SQL (0.5ms) INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["deliverable_id", 139], ["deliverable_type", "Foo"], ["rule_id", 206], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44137
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44138
+ SQL (0.3ms) UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-27 19:30:27.018332' WHERE "rooler_rules"."id" = 206
44139
+  (0.2ms) SELECT COUNT(*) FROM "rooler_deliveries"
44140
+  (0.1ms) ROLLBACK
44141
+  (0.1ms) BEGIN
44142
+ -------------------------------------------------------------------------------------------------------------------------
44143
+ Rooler::RuleTest: test_scope_ready_to_be_checked_returns_rules_where_last_checked_at_is_<_than_check_frequency.ago_or_nil
44144
+ -------------------------------------------------------------------------------------------------------------------------
44145
+  (0.1ms) SAVEPOINT active_record_1
44146
+ SQL (0.5ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-8"], ["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-9"], ["subject", "subject-8"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44147
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44148
+  (0.1ms) SAVEPOINT active_record_1
44149
+ SQL (1.0ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Thu, 27 Mar 2014 19:21:27 UTC +00:00], ["method_params", nil], ["name", "rule-8"], ["template_id", 229], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44150
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44151
+  (0.2ms) SAVEPOINT active_record_1
44152
+ SQL (0.6ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-9"], ["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-10"], ["subject", "subject-9"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44153
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44154
+  (0.1ms) SAVEPOINT active_record_1
44155
+ SQL (0.6ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["last_checked_at", Thu, 27 Mar 2014 19:19:27 UTC +00:00], ["method_params", nil], ["name", "rule-9"], ["template_id", 230], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44156
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44157
+  (0.2ms) SAVEPOINT active_record_1
44158
+ SQL (0.7ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-10"], ["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-11"], ["subject", "subject-10"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44159
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44160
+  (0.1ms) SAVEPOINT active_record_1
44161
+ SQL (0.6ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-10"], ["template_id", 231], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44162
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44163
+  (0.2ms) SAVEPOINT active_record_1
44164
+ SQL (0.5ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-11"], ["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-12"], ["subject", "subject-11"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44165
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44166
+  (0.1ms) SAVEPOINT active_record_1
44167
+ SQL (0.5ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-11"], ["template_id", 232], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44168
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44169
+ Rooler::Rule Load (0.7ms) 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())
44170
+  (0.1ms) ROLLBACK
44171
+  (0.1ms) BEGIN
44172
+ ---------------------------------------------------------------------------------------
44173
+ Rooler::RuleTest: test_won't_let_you_create_a_rule_with_an_invalid_class_or_method_name
44174
+ ---------------------------------------------------------------------------------------
44175
+  (0.2ms) SAVEPOINT active_record_1
44176
+ SQL (0.5ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-13"], ["subject", "subject-12"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44177
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44178
+  (0.1ms) SAVEPOINT active_record_1
44179
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
44180
+  (0.2ms) SAVEPOINT active_record_1
44181
+ SQL (0.8ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-13"], ["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-14"], ["subject", "subject-13"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44182
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44183
+  (0.2ms) SAVEPOINT active_record_1
44184
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
44185
+  (0.1ms) ROLLBACK
44186
+  (0.1ms) BEGIN
44187
+ --------------------------------------------------------------------------
44188
+ Rooler::TemplateTest: test_finds_an_object_from_one_of_the_templates_rules
44189
+ --------------------------------------------------------------------------
44190
+  (0.2ms) SAVEPOINT active_record_1
44191
+ SQL (0.5ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-15"], ["subject", "subject-14"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44192
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44193
+  (0.1ms) SAVEPOINT active_record_1
44194
+ SQL (0.4ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-14"], ["template_id", 235], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44195
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44196
+ Rooler::Rule Load (0.6ms) SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1 [["template_id", 235]]
44197
+ Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
44198
+  (0.1ms) SAVEPOINT active_record_1
44199
+ SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44200
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44201
+  (0.1ms) SAVEPOINT active_record_1
44202
+ SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44203
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44204
+ Foo Load (0.5ms) SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
44205
+  (0.2ms) ROLLBACK
44206
+  (0.1ms) BEGIN
44207
+ ----------------------------------------------------------------------------------
44208
+ Rooler::TemplateTest: test_returns_a_tree_of_liquid_methods_from_the_sample_object
44209
+ ----------------------------------------------------------------------------------
44210
+  (0.2ms) SAVEPOINT active_record_1
44211
+ SQL (0.5ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-15"], ["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-16"], ["subject", "subject-15"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44212
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44213
+  (0.1ms) SAVEPOINT active_record_1
44214
+ SQL (0.5ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-15"], ["template_id", 236], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44215
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44216
+  (0.1ms) SAVEPOINT active_record_1
44217
+ SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44218
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44219
+ Rooler::Rule Load (0.4ms) SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."template_id" = $1 [["template_id", 236]]
44220
+ Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE ('t') ORDER BY "foos"."id" ASC LIMIT 1
44221
+  (0.2ms) ROLLBACK
44222
+  (0.1ms) BEGIN
44223
+ ----------------------------------------
44224
+ RoolerTest: test_delivers_pending_emails
44225
+ ----------------------------------------
44226
+  (0.2ms) SAVEPOINT active_record_1
44227
+ SQL (0.5ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-17"], ["subject", "subject-16"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44228
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44229
+  (0.1ms) SAVEPOINT active_record_1
44230
+ SQL (0.4ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-16"], ["template_id", 237], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44231
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44232
+  (0.1ms) SAVEPOINT active_record_1
44233
+ SQL (0.7ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-18"], ["subject", "subject-17"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44234
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44235
+  (0.2ms) SAVEPOINT active_record_1
44236
+ SQL (0.8ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-17"], ["template_id", 238], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44237
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44238
+  (0.2ms) SAVEPOINT active_record_1
44239
+ Rooler::Delivery Exists (0.4ms) SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 213 AND "rooler_deliveries"."deliverable_type" = 'Rooler::Rule' AND "rooler_deliveries"."deliverable_id" = 214) LIMIT 1
44240
+ SQL (0.5ms) INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["deliverable_id", 214], ["deliverable_type", "Rooler::Rule"], ["rule_id", 213], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44241
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44242
+ Rooler::Delivery Load (0.3ms) SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."delivered_at" IS NULL
44243
+ Rooler::Template Load (0.5ms) 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", 213]]
44244
+ Rooler::Rule Load (0.6ms) SELECT "rooler_rules".* FROM "rooler_rules" WHERE "rooler_rules"."id" = $1 ORDER BY "rooler_rules"."id" ASC LIMIT 1 [["id", 214]]
44245
+ Rendered /Users/yonah/Development/spree/rooler/app/views/rooler/delivery_mailer/send_mail.html.erb (0.2ms)
44246
+
44247
+ Sent mail to test@email.com (19.7ms)
44248
+ Date: Thu, 27 Mar 2014 20:30:27 +0100
44249
+ From: default@myapp.com
44250
+ To: test@email.com
44251
+ Message-ID: <53347c5348267_40c43fd9dd434cd833565@Yonahs-MacBook-Pro.local.mail>
44252
+ Subject: subject-16
44253
+ Mime-Version: 1.0
44254
+ Content-Type: text/html;
44255
+ charset=UTF-8
44256
+ Content-Transfer-Encoding: 7bit
44257
+
44258
+ body-16
44259
+ SQL (0.4ms) UPDATE "rooler_deliveries" SET "delivered_at" = '2014-03-27 19:30:27.313532' WHERE "rooler_deliveries"."id" = 106
44260
+ Rooler::Delivery Load (0.5ms) SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 LIMIT 1 [["id", 106]]
44261
+  (0.2ms) ROLLBACK
44262
+  (0.2ms) BEGIN
44263
+ ------------------------------------------
44264
+ RoolerTest: test_processes_scheduled_rules
44265
+ ------------------------------------------
44266
+  (0.1ms) SAVEPOINT active_record_1
44267
+ SQL (0.5ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44268
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44269
+  (0.1ms) SAVEPOINT active_record_1
44270
+ SQL (0.7ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-19"], ["subject", "subject-18"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44271
+  (0.3ms) RELEASE SAVEPOINT active_record_1
44272
+  (0.2ms) SAVEPOINT active_record_1
44273
+ SQL (0.7ms) INSERT INTO "rooler_rules" ("check_frequency", "created_at", "klass_finder_method", "klass_name", "method_params", "name", "template_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["check_frequency", 60], ["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["klass_finder_method", "active_record_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-18"], ["template_id", 239], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44274
+  (0.2ms) RELEASE SAVEPOINT active_record_1
44275
+  (0.3ms) SELECT COUNT(*) FROM "rooler_deliveries"
44276
+ Rooler::Rule Load (0.4ms) 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())
44277
+  (0.2ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 215]]
44278
+ Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE ('t') AND (1=1)
44279
+  (0.1ms) SAVEPOINT active_record_1
44280
+ Rooler::Delivery Exists (0.4ms) SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 215 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 143) LIMIT 1
44281
+ SQL (0.5ms) INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["deliverable_id", 143], ["deliverable_type", "Foo"], ["rule_id", 215], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44282
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44283
+ SQL (0.3ms) UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-27 19:30:27.342658' WHERE "rooler_rules"."id" = 215
44284
+  (0.2ms) SELECT COUNT(*) FROM "rooler_deliveries"
44285
+ Rooler::Delivery Load (0.3ms) SELECT "rooler_deliveries".* FROM "rooler_deliveries" ORDER BY "rooler_deliveries"."id" DESC LIMIT 1
44286
+ Foo Load (0.6ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = $1 ORDER BY "foos"."id" ASC LIMIT 1 [["id", 143]]
44287
+  (0.2ms) ROLLBACK
44288
+  (0.1ms) BEGIN
44289
+ --------------------------------------------
44290
+ RoolerTest: test_resets_resetable_deliveries
44291
+ --------------------------------------------
44292
+  (0.1ms) SAVEPOINT active_record_1
44293
+ SQL (0.5ms) INSERT INTO "foos" ("active", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["active", true], ["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44294
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44295
+  (0.2ms) SAVEPOINT active_record_1
44296
+ SQL (0.5ms) INSERT INTO "rooler_templates" ("body", "created_at", "name", "subject", "to", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["body", "body-19"], ["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["name", "template-20"], ["subject", "subject-19"], ["to", "test@email.com"], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44297
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44298
+  (0.1ms) SAVEPOINT active_record_1
44299
+ SQL (0.4ms) 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", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["klass_finder_method", "active_finder"], ["klass_name", "Foo"], ["method_params", nil], ["name", "rule-19"], ["template_id", 240], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44300
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44301
+  (0.3ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 216]]
44302
+ Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't' AND (1=1)
44303
+  (0.1ms) SAVEPOINT active_record_1
44304
+ Rooler::Delivery Exists (0.3ms) SELECT 1 AS one FROM "rooler_deliveries" WHERE ("rooler_deliveries"."rule_id" = 216 AND "rooler_deliveries"."deliverable_type" = 'Foo' AND "rooler_deliveries"."deliverable_id" = 144) LIMIT 1
44305
+ SQL (0.4ms) INSERT INTO "rooler_deliveries" ("created_at", "deliverable_id", "deliverable_type", "rule_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00], ["deliverable_id", 144], ["deliverable_type", "Foo"], ["rule_id", 216], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44306
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44307
+ SQL (0.3ms) UPDATE "rooler_rules" SET "last_checked_at" = '2014-03-27 19:30:27.366810' WHERE "rooler_rules"."id" = 216
44308
+  (0.1ms) SAVEPOINT active_record_1
44309
+ SQL (0.9ms) UPDATE "foos" SET "active" = $1, "updated_at" = $2 WHERE "foos"."id" = 144 [["active", false], ["updated_at", Thu, 27 Mar 2014 19:30:27 UTC +00:00]]
44310
+  (0.3ms) RELEASE SAVEPOINT active_record_1
44311
+  (0.4ms) SELECT COUNT(*) FROM "rooler_deliveries"
44312
+ Rooler::Rule Load (0.4ms) SELECT "rooler_rules".* FROM "rooler_rules"
44313
+  (0.3ms) SELECT "rooler_deliveries"."deliverable_id" FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 [["rule_id", 216]]
44314
+ Foo Load (0.4ms) SELECT "foos".* FROM "foos" WHERE "foos"."active" = 't'
44315
+ Rooler::Delivery Load (0.6ms) SELECT "rooler_deliveries".* FROM "rooler_deliveries" WHERE "rooler_deliveries"."rule_id" = $1 AND "rooler_deliveries"."deliverable_id" IN (144) [["rule_id", 216]]
44316
+  (0.2ms) SAVEPOINT active_record_1
44317
+ SQL (0.3ms) DELETE FROM "rooler_deliveries" WHERE "rooler_deliveries"."id" = $1 [["id", 108]]
44318
+  (0.1ms) RELEASE SAVEPOINT active_record_1
44319
+  (0.3ms) SELECT COUNT(*) FROM "rooler_deliveries"
44320
+  (0.1ms) ROLLBACK
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rooler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yonah Forst