dripper_mail 0.0.3 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aeb86a580024bdc9498221562a0d91c6969902e8
4
- data.tar.gz: 4e83fb57d93dbf27286d0df1e19699c922feb111
3
+ metadata.gz: 586dbad5b012035b4ee7892e6acdcd685372825c
4
+ data.tar.gz: 2645b3d0fdcbb818071bf62a9f0322ff5d15e31d
5
5
  SHA512:
6
- metadata.gz: 8dae2f1499242529a879d0d0b9157b086911c9da1fd09a8fdeb0e8b7180962247444876ecef6f186f0e179a5641b818945145ee2b8997a532d3dba523f4f84ec
7
- data.tar.gz: c55347f39b702c9f17b445cb6272985016f150a55d68aab95e1a79ca22b9242ed1d5275357cb771d64dd98f25ba56ee683cb8d1c1f321a9fcc8f3159876b7c82
6
+ metadata.gz: 68d4eb7bdcbbe2fc49366fd0f0b6cc71e1ce99d81f57b8eb216fbf8bd53043eb01cb36afd3a2233011d67c5b9d6925c77b29422573554b6b897676eb4d260e2e
7
+ data.tar.gz: 9380ef86130df890fe2fc7240c9c8c8b332bb42b5c2d387c203711b9c2681b1194038db37b5cba839aca11844e29e0aadd2dd2b79e207cda0336bf8170a99a18
@@ -1,4 +1,3 @@
1
- # yaffle/lib/yaffle/acts_as_yaffle.rb
2
1
  module Dripper
3
2
  module Drippable
4
3
  extend ActiveSupport::Concern
@@ -7,5 +7,4 @@ class DripperJob < ActiveJob::Base
7
7
  r.execute obj
8
8
  end
9
9
  end
10
-
11
10
  end
@@ -1,3 +1,3 @@
1
1
  module Dripper
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.8"
3
3
  end
data/lib/dripper_mail.rb CHANGED
@@ -4,6 +4,7 @@ require "dripper/dripper_job"
4
4
 
5
5
  module Dripper
6
6
  @registry = []
7
+ mattr_accessor :job_queue
7
8
 
8
9
  def self.registry
9
10
  @registry
@@ -31,11 +32,13 @@ class DripperProxy
31
32
  attr_accessor :scope
32
33
  attr_accessor :parent
33
34
  attr_accessor :children
35
+ attr_accessor :wait
36
+ attr_accessor :wait_until
34
37
 
35
38
  def initialize(opts={}, &block)
36
39
  # if there's a parent, initialize all values to the parent values first
37
40
  # then override with children
38
- [:model, :mailer, :action].each do |method|
41
+ [:model, :mailer, :action, :wait, :wait_until].each do |method|
39
42
  parent = opts[:parent]
40
43
  if parent
41
44
  instance_variable_set "@#{method}", parent.send(method)
@@ -97,10 +100,19 @@ class DripperProxy
97
100
  # instantiate the mailer and run the code
98
101
  mailer_obj = self.mailer.to_s.classify.constantize
99
102
  mail_obj = mailer_obj.send self.action, obj
100
- mail_obj.deliver_now
103
+ if mail_obj
104
+ if self.wait
105
+ mail_obj.deliver_later(wait: self.wait)
106
+ elsif self.wait_until
107
+ mail_obj.deliver_later(wait_until: self.wait_until)
108
+ else
109
+ mail_obj.deliver_now
110
+ end
111
+
112
+ # insert a row
113
+ Dripper::Message.create!(dripper_action_id: dripper_action.id, drippable: obj)
114
+ end
101
115
 
102
- # insert a row
103
- Dripper::Message.create!(dripper_action_id: dripper_action.id, drippable: obj)
104
116
  end
105
117
 
106
118
 
@@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
3
3
  require 'rails/all'
4
4
 
5
5
  Bundler.require(*Rails.groups)
6
- require "dripper"
6
+ require "dripper_mail"
7
7
 
8
8
  module Dummy
9
9
  class Application < Rails::Application
@@ -24825,3 +24825,632 @@ Content-Transfer-Encoding: 7bit
24825
24825
  DripperTest: test_truth
24826
24826
  -----------------------
24827
24827
   (0.0ms) rollback transaction
24828
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
24829
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
24830
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
24831
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
24832
+  (0.1ms) begin transaction
24833
+ -----------------------------------
24834
+ Dripper::RunTwiceTest: test_2nd_Run
24835
+ -----------------------------------
24836
+ Dripper::Action Load (0.1ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
24837
+  (0.0ms) SAVEPOINT active_record_1
24838
+ SQL (0.3ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "welcome"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:08:50.648043"], ["updated_at", "2016-04-08 03:08:50.648043"]]
24839
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24840
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
24841
+  (0.0ms) SAVEPOINT active_record_1
24842
+ SQL (0.2ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "newsletter"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:08:50.649711"], ["updated_at", "2016-04-08 03:08:50.649711"]]
24843
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24844
+  (0.0ms) SAVEPOINT active_record_1
24845
+ SQL (0.1ms) INSERT INTO "users" ("email", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "foo@bar.com"], ["username", "foo"], ["created_at", "2016-04-08 03:08:50.653288"], ["updated_at", "2016-04-08 03:08:50.653288"]]
24846
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24847
+  (0.0ms) SAVEPOINT active_record_1
24848
+ SQL (0.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo2@bar.com"], ["created_at", "2016-04-08 03:08:50.654020"], ["updated_at", "2016-04-08 03:08:50.654020"]]
24849
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24850
+  (0.0ms) SAVEPOINT active_record_1
24851
+ SQL (0.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo3@bar.com"], ["created_at", "2016-04-08 03:08:50.654585"], ["updated_at", "2016-04-08 03:08:50.654585"]]
24852
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24853
+ Dripper::Action Load (0.1ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
24854
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:08:50.000000') [["drippable_type", "User"], ["dripper_action_id", 1]]
24855
+ Rendered user_mailer/welcome.html.erb within layouts/mailer (0.8ms)
24856
+ Rendered user_mailer/welcome.text.erb within layouts/mailer (0.2ms)
24857
+
24858
+ UserMailer#welcome: processed outbound mail in 122.6ms
24859
+
24860
+ Sent mail to to@example.org (4.3ms)
24861
+ Date: Thu, 07 Apr 2016 20:08:50 -0700
24862
+ From: from@example.com
24863
+ To: to@example.org
24864
+ Message-ID: <570720c2c18bc_5e873fe6f485e20497452@Douglass-MacBook-Pro.local.mail>
24865
+ Subject: Welcome
24866
+ Mime-Version: 1.0
24867
+ Content-Type: multipart/alternative;
24868
+ boundary="--==_mimepart_570720c2c0cce_5e873fe6f485e204973e3";
24869
+ charset=UTF-8
24870
+ Content-Transfer-Encoding: 7bit
24871
+
24872
+
24873
+ ----==_mimepart_570720c2c0cce_5e873fe6f485e204973e3
24874
+ Content-Type: text/plain;
24875
+ charset=UTF-8
24876
+ Content-Transfer-Encoding: 7bit
24877
+
24878
+ UserMailer#welcome
24879
+
24880
+ Hi, find me in app/views/user_mailer/welcome.text.erb
24881
+
24882
+
24883
+ ----==_mimepart_570720c2c0cce_5e873fe6f485e204973e3
24884
+ Content-Type: text/html;
24885
+ charset=UTF-8
24886
+ Content-Transfer-Encoding: 7bit
24887
+
24888
+ <html>
24889
+ <body>
24890
+ <h1>UserMailer#welcome</h1>
24891
+
24892
+ <p>
24893
+ Hi, find me in app/views/user_mailer/welcome.html.erb
24894
+ </p>
24895
+
24896
+ </body>
24897
+ </html>
24898
+
24899
+ ----==_mimepart_570720c2c0cce_5e873fe6f485e204973e3--
24900
+
24901
+  (0.0ms) SAVEPOINT active_record_1
24902
+ SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 1], ["drippable_type", "User"], ["created_at", "2016-04-08 03:08:50.799642"], ["updated_at", "2016-04-08 03:08:50.799642"]]
24903
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24904
+ Rendered user_mailer/welcome.html.erb within layouts/mailer (0.1ms)
24905
+ Rendered user_mailer/welcome.text.erb within layouts/mailer (0.0ms)
24906
+
24907
+ UserMailer#welcome: processed outbound mail in 1.8ms
24908
+
24909
+ Sent mail to to@example.org (2.3ms)
24910
+ Date: Thu, 07 Apr 2016 20:08:50 -0700
24911
+ From: from@example.com
24912
+ To: to@example.org
24913
+ Message-ID: <570720c2c428e_5e873fe6f485e204976c9@Douglass-MacBook-Pro.local.mail>
24914
+ Subject: Welcome
24915
+ Mime-Version: 1.0
24916
+ Content-Type: multipart/alternative;
24917
+ boundary="--==_mimepart_570720c2c3c84_5e873fe6f485e20497573";
24918
+ charset=UTF-8
24919
+ Content-Transfer-Encoding: 7bit
24920
+
24921
+
24922
+ ----==_mimepart_570720c2c3c84_5e873fe6f485e20497573
24923
+ Content-Type: text/plain;
24924
+ charset=UTF-8
24925
+ Content-Transfer-Encoding: 7bit
24926
+
24927
+ UserMailer#welcome
24928
+
24929
+ Hi, find me in app/views/user_mailer/welcome.text.erb
24930
+
24931
+
24932
+ ----==_mimepart_570720c2c3c84_5e873fe6f485e20497573
24933
+ Content-Type: text/html;
24934
+ charset=UTF-8
24935
+ Content-Transfer-Encoding: 7bit
24936
+
24937
+ <html>
24938
+ <body>
24939
+ <h1>UserMailer#welcome</h1>
24940
+
24941
+ <p>
24942
+ Hi, find me in app/views/user_mailer/welcome.html.erb
24943
+ </p>
24944
+
24945
+ </body>
24946
+ </html>
24947
+
24948
+ ----==_mimepart_570720c2c3c84_5e873fe6f485e20497573--
24949
+
24950
+  (0.0ms) SAVEPOINT active_record_1
24951
+ SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 2], ["drippable_type", "User"], ["created_at", "2016-04-08 03:08:50.805417"], ["updated_at", "2016-04-08 03:08:50.805417"]]
24952
+  (0.0ms) RELEASE SAVEPOINT active_record_1
24953
+ Rendered user_mailer/welcome.html.erb within layouts/mailer (0.0ms)
24954
+ Rendered user_mailer/welcome.text.erb within layouts/mailer (0.0ms)
24955
+
24956
+ UserMailer#welcome: processed outbound mail in 1.4ms
24957
+
24958
+ Sent mail to to@example.org (2.2ms)
24959
+ Date: Thu, 07 Apr 2016 20:08:50 -0700
24960
+ From: from@example.com
24961
+ To: to@example.org
24962
+ Message-ID: <570720c2c567c_5e873fe6f485e204978b0@Douglass-MacBook-Pro.local.mail>
24963
+ Subject: Welcome
24964
+ Mime-Version: 1.0
24965
+ Content-Type: multipart/alternative;
24966
+ boundary="--==_mimepart_570720c2c50d3_5e873fe6f485e20497798";
24967
+ charset=UTF-8
24968
+ Content-Transfer-Encoding: 7bit
24969
+
24970
+
24971
+ ----==_mimepart_570720c2c50d3_5e873fe6f485e20497798
24972
+ Content-Type: text/plain;
24973
+ charset=UTF-8
24974
+ Content-Transfer-Encoding: 7bit
24975
+
24976
+ UserMailer#welcome
24977
+
24978
+ Hi, find me in app/views/user_mailer/welcome.text.erb
24979
+
24980
+
24981
+ ----==_mimepart_570720c2c50d3_5e873fe6f485e20497798
24982
+ Content-Type: text/html;
24983
+ charset=UTF-8
24984
+ Content-Transfer-Encoding: 7bit
24985
+
24986
+ <html>
24987
+ <body>
24988
+ <h1>UserMailer#welcome</h1>
24989
+
24990
+ <p>
24991
+ Hi, find me in app/views/user_mailer/welcome.html.erb
24992
+ </p>
24993
+
24994
+ </body>
24995
+ </html>
24996
+
24997
+ ----==_mimepart_570720c2c50d3_5e873fe6f485e20497798--
24998
+
24999
+  (0.0ms) SAVEPOINT active_record_1
25000
+ SQL (0.0ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 3], ["drippable_type", "User"], ["created_at", "2016-04-08 03:08:50.810325"], ["updated_at", "2016-04-08 03:08:50.810325"]]
25001
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25002
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25003
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."username" IS NOT NULL) AND ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:08:50.000000') [["drippable_type", "User"], ["dripper_action_id", 2]]
25004
+ Rendered user_mailer/newsletter.html.erb within layouts/mailer (0.2ms)
25005
+ Rendered user_mailer/newsletter.text.erb within layouts/mailer (0.1ms)
25006
+
25007
+ UserMailer#newsletter: processed outbound mail in 7.2ms
25008
+
25009
+ Sent mail to to@example.org (2.5ms)
25010
+ Date: Thu, 07 Apr 2016 20:08:50 -0700
25011
+ From: from@example.com
25012
+ To: to@example.org
25013
+ Message-ID: <570720c2c86ea_5e873fe6f485e20498032@Douglass-MacBook-Pro.local.mail>
25014
+ Subject: Newsletter
25015
+ Mime-Version: 1.0
25016
+ Content-Type: multipart/alternative;
25017
+ boundary="--==_mimepart_570720c2c813c_5e873fe6f485e204979d2";
25018
+ charset=UTF-8
25019
+ Content-Transfer-Encoding: 7bit
25020
+
25021
+
25022
+ ----==_mimepart_570720c2c813c_5e873fe6f485e204979d2
25023
+ Content-Type: text/plain;
25024
+ charset=UTF-8
25025
+ Content-Transfer-Encoding: 7bit
25026
+
25027
+ UserMailer#newsletter
25028
+
25029
+ Hi, find me in app/views/user_mailer/newsletter.text.erb
25030
+
25031
+
25032
+ ----==_mimepart_570720c2c813c_5e873fe6f485e204979d2
25033
+ Content-Type: text/html;
25034
+ charset=UTF-8
25035
+ Content-Transfer-Encoding: 7bit
25036
+
25037
+ <html>
25038
+ <body>
25039
+ <h1>UserMailer#newsletter</h1>
25040
+
25041
+ <p>
25042
+ Hi, find me in app/views/user_mailer/newsletter.html.erb
25043
+ </p>
25044
+
25045
+ </body>
25046
+ </html>
25047
+
25048
+ ----==_mimepart_570720c2c813c_5e873fe6f485e204979d2--
25049
+
25050
+  (0.0ms) SAVEPOINT active_record_1
25051
+ SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 2], ["drippable_id", 1], ["drippable_type", "User"], ["created_at", "2016-04-08 03:08:50.823193"], ["updated_at", "2016-04-08 03:08:50.823193"]]
25052
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25053
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
25054
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:08:50.000000') [["drippable_type", "User"], ["dripper_action_id", 1]]
25055
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25056
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."username" IS NOT NULL) AND ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:08:50.000000') [["drippable_type", "User"], ["dripper_action_id", 2]]
25057
+  (2.3ms) rollback transaction
25058
+  (0.0ms) begin transaction
25059
+ ---------------------------------
25060
+ Dripper::MessageTest: test_Config
25061
+ ---------------------------------
25062
+  (0.0ms) SAVEPOINT active_record_1
25063
+ SQL (0.2ms) INSERT INTO "users" ("email", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "foo@bar.com"], ["username", "foo"], ["created_at", "2016-04-08 03:08:50.831300"], ["updated_at", "2016-04-08 03:08:50.831300"]]
25064
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25065
+  (0.0ms) SAVEPOINT active_record_1
25066
+ SQL (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo2@bar.com"], ["created_at", "2016-04-08 03:08:50.832320"], ["updated_at", "2016-04-08 03:08:50.832320"]]
25067
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25068
+  (0.0ms) SAVEPOINT active_record_1
25069
+ SQL (0.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo3@bar.com"], ["created_at", "2016-04-08 03:08:50.833213"], ["updated_at", "2016-04-08 03:08:50.833213"]]
25070
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25071
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
25072
+  (0.0ms) SAVEPOINT active_record_1
25073
+ SQL (0.0ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "welcome"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:08:50.834531"], ["updated_at", "2016-04-08 03:08:50.834531"]]
25074
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25075
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25076
+  (0.0ms) SAVEPOINT active_record_1
25077
+ SQL (0.0ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "newsletter"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:08:50.835560"], ["updated_at", "2016-04-08 03:08:50.835560"]]
25078
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25079
+  (0.4ms) rollback transaction
25080
+  (0.0ms) begin transaction
25081
+ --------------------------------------
25082
+ Dripper::MessageTest: test_Integration
25083
+ --------------------------------------
25084
+  (0.0ms) SAVEPOINT active_record_1
25085
+ SQL (0.1ms) INSERT INTO "users" ("email", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "foo@bar.com"], ["username", "foo"], ["created_at", "2016-04-08 03:08:50.837091"], ["updated_at", "2016-04-08 03:08:50.837091"]]
25086
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25087
+  (0.0ms) SAVEPOINT active_record_1
25088
+ SQL (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo2@bar.com"], ["created_at", "2016-04-08 03:08:50.837894"], ["updated_at", "2016-04-08 03:08:50.837894"]]
25089
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25090
+  (0.0ms) SAVEPOINT active_record_1
25091
+ SQL (0.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo3@bar.com"], ["created_at", "2016-04-08 03:08:50.838652"], ["updated_at", "2016-04-08 03:08:50.838652"]]
25092
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25093
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
25094
+  (0.0ms) SAVEPOINT active_record_1
25095
+ SQL (0.0ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "welcome"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:08:50.839691"], ["updated_at", "2016-04-08 03:08:50.839691"]]
25096
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25097
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25098
+  (0.0ms) SAVEPOINT active_record_1
25099
+ SQL (0.0ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "newsletter"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:08:50.840617"], ["updated_at", "2016-04-08 03:08:50.840617"]]
25100
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25101
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
25102
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:08:50.000000') [["drippable_type", "User"], ["dripper_action_id", 1]]
25103
+  (0.0ms) SAVEPOINT active_record_1
25104
+ SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 1], ["drippable_type", "User"], ["created_at", "2016-04-08 03:08:50.842800"], ["updated_at", "2016-04-08 03:08:50.842800"]]
25105
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25106
+  (0.0ms) SAVEPOINT active_record_1
25107
+ SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 2], ["drippable_type", "User"], ["created_at", "2016-04-08 03:08:50.843734"], ["updated_at", "2016-04-08 03:08:50.843734"]]
25108
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25109
+  (0.0ms) SAVEPOINT active_record_1
25110
+ SQL (0.0ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 3], ["drippable_type", "User"], ["created_at", "2016-04-08 03:08:50.844597"], ["updated_at", "2016-04-08 03:08:50.844597"]]
25111
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25112
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25113
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."username" IS NOT NULL) AND ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:08:50.000000') [["drippable_type", "User"], ["dripper_action_id", 2]]
25114
+  (0.9ms) rollback transaction
25115
+  (0.1ms) begin transaction
25116
+ -----------------------
25117
+ DripperTest: test_truth
25118
+ -----------------------
25119
+  (0.0ms) rollback transaction
25120
+  (0.0ms) begin transaction
25121
+ ---------------------------------------
25122
+ Dripper::ConcernTest: test_Concern_Test
25123
+ ---------------------------------------
25124
+ Dripper::Action Load (0.1ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25125
+  (0.0ms) SAVEPOINT active_record_1
25126
+ SQL (0.2ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "newsletter"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:08:57.735777"], ["updated_at", "2016-04-08 03:08:57.735777"]]
25127
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25128
+  (0.0ms) SAVEPOINT active_record_1
25129
+ SQL (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo@bar.com"], ["created_at", "2016-04-08 03:08:57.738475"], ["updated_at", "2016-04-08 03:08:57.738475"]]
25130
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25131
+  (0.0ms) SAVEPOINT active_record_1
25132
+ SQL (0.1ms) INSERT INTO "newsletters" ("user_id", "title", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["user_id", 1], ["title", "test"], ["created_at", "2016-04-08 03:08:57.742147"], ["updated_at", "2016-04-08 03:08:57.742147"]]
25133
+ [ActiveJob] Newsletter Load (0.1ms) SELECT "newsletters".* FROM "newsletters" WHERE "newsletters"."id" = ? LIMIT 1 [["id", 1]]
25134
+ [ActiveJob] [DripperJob] [e02bc5e9-e500-4fb3-b4e9-323c78c51022] Performing DripperJob from Inline(default) with arguments: gid://dummy/Newsletter/1
25135
+ [ActiveJob] [DripperJob] [e02bc5e9-e500-4fb3-b4e9-323c78c51022] Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25136
+ [ActiveJob] [DripperJob] [e02bc5e9-e500-4fb3-b4e9-323c78c51022] Newsletter Load (0.1ms) SELECT "newsletters".* FROM "newsletters" WHERE ("newsletters"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (newsletters.created_at >= '2016-04-08 03:08:57.000000') AND "newsletters"."id" = ? [["drippable_type", "Newsletter"], ["dripper_action_id", 1], ["id", 1]]
25137
+ [ActiveJob] [DripperJob] [e02bc5e9-e500-4fb3-b4e9-323c78c51022] SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 1], ["drippable_type", "Newsletter"], ["created_at", "2016-04-08 03:08:57.746415"], ["updated_at", "2016-04-08 03:08:57.746415"]]
25138
+ [ActiveJob] [DripperJob] [e02bc5e9-e500-4fb3-b4e9-323c78c51022] Performed DripperJob from Inline(default) in 2.16ms
25139
+ [ActiveJob] Enqueued DripperJob (Job ID: e02bc5e9-e500-4fb3-b4e9-323c78c51022) to Inline(default) with arguments: gid://dummy/Newsletter/1
25140
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25141
+  (0.4ms) rollback transaction
25142
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
25143
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
25144
+  (0.1ms) begin transaction
25145
+ -----------------------------------
25146
+ Dripper::RunTwiceTest: test_2nd_Run
25147
+ -----------------------------------
25148
+ Dripper::Action Load (0.1ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
25149
+  (0.0ms) SAVEPOINT active_record_1
25150
+ SQL (0.3ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "welcome"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:09:53.984912"], ["updated_at", "2016-04-08 03:09:53.984912"]]
25151
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25152
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25153
+  (0.0ms) SAVEPOINT active_record_1
25154
+ SQL (0.2ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "newsletter"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:09:53.986478"], ["updated_at", "2016-04-08 03:09:53.986478"]]
25155
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25156
+  (0.0ms) SAVEPOINT active_record_1
25157
+ SQL (0.1ms) INSERT INTO "users" ("email", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "foo@bar.com"], ["username", "foo"], ["created_at", "2016-04-08 03:09:53.990060"], ["updated_at", "2016-04-08 03:09:53.990060"]]
25158
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25159
+  (0.0ms) SAVEPOINT active_record_1
25160
+ SQL (0.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo2@bar.com"], ["created_at", "2016-04-08 03:09:53.990779"], ["updated_at", "2016-04-08 03:09:53.990779"]]
25161
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25162
+  (0.0ms) SAVEPOINT active_record_1
25163
+ SQL (0.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo3@bar.com"], ["created_at", "2016-04-08 03:09:53.991355"], ["updated_at", "2016-04-08 03:09:53.991355"]]
25164
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25165
+ Dripper::Action Load (0.1ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
25166
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:09:53.000000') [["drippable_type", "User"], ["dripper_action_id", 1]]
25167
+ Rendered user_mailer/welcome.html.erb within layouts/mailer (0.8ms)
25168
+ Rendered user_mailer/welcome.text.erb within layouts/mailer (0.2ms)
25169
+
25170
+ UserMailer#welcome: processed outbound mail in 111.7ms
25171
+
25172
+ Sent mail to to@example.org (4.4ms)
25173
+ Date: Thu, 07 Apr 2016 20:09:54 -0700
25174
+ From: from@example.com
25175
+ To: to@example.org
25176
+ Message-ID: <570721021cf5a_5ed13fd74445e204614a7@Douglass-MacBook-Pro.local.mail>
25177
+ Subject: Welcome
25178
+ Mime-Version: 1.0
25179
+ Content-Type: multipart/alternative;
25180
+ boundary="--==_mimepart_570721021c38d_5ed13fd74445e20461374";
25181
+ charset=UTF-8
25182
+ Content-Transfer-Encoding: 7bit
25183
+
25184
+
25185
+ ----==_mimepart_570721021c38d_5ed13fd74445e20461374
25186
+ Content-Type: text/plain;
25187
+ charset=UTF-8
25188
+ Content-Transfer-Encoding: 7bit
25189
+
25190
+ UserMailer#welcome
25191
+
25192
+ Hi, find me in app/views/user_mailer/welcome.text.erb
25193
+
25194
+
25195
+ ----==_mimepart_570721021c38d_5ed13fd74445e20461374
25196
+ Content-Type: text/html;
25197
+ charset=UTF-8
25198
+ Content-Transfer-Encoding: 7bit
25199
+
25200
+ <html>
25201
+ <body>
25202
+ <h1>UserMailer#welcome</h1>
25203
+
25204
+ <p>
25205
+ Hi, find me in app/views/user_mailer/welcome.html.erb
25206
+ </p>
25207
+
25208
+ </body>
25209
+ </html>
25210
+
25211
+ ----==_mimepart_570721021c38d_5ed13fd74445e20461374--
25212
+
25213
+  (0.0ms) SAVEPOINT active_record_1
25214
+ SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 1], ["drippable_type", "User"], ["created_at", "2016-04-08 03:09:54.125822"], ["updated_at", "2016-04-08 03:09:54.125822"]]
25215
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25216
+ Rendered user_mailer/welcome.html.erb within layouts/mailer (0.0ms)
25217
+ Rendered user_mailer/welcome.text.erb within layouts/mailer (0.0ms)
25218
+
25219
+ UserMailer#welcome: processed outbound mail in 1.5ms
25220
+
25221
+ Sent mail to to@example.org (2.2ms)
25222
+ Date: Thu, 07 Apr 2016 20:09:54 -0700
25223
+ From: from@example.com
25224
+ To: to@example.org
25225
+ Message-ID: <570721021f8d3_5ed13fd74445e204616bb@Douglass-MacBook-Pro.local.mail>
25226
+ Subject: Welcome
25227
+ Mime-Version: 1.0
25228
+ Content-Type: multipart/alternative;
25229
+ boundary="--==_mimepart_570721021f340_5ed13fd74445e204615a8";
25230
+ charset=UTF-8
25231
+ Content-Transfer-Encoding: 7bit
25232
+
25233
+
25234
+ ----==_mimepart_570721021f340_5ed13fd74445e204615a8
25235
+ Content-Type: text/plain;
25236
+ charset=UTF-8
25237
+ Content-Transfer-Encoding: 7bit
25238
+
25239
+ UserMailer#welcome
25240
+
25241
+ Hi, find me in app/views/user_mailer/welcome.text.erb
25242
+
25243
+
25244
+ ----==_mimepart_570721021f340_5ed13fd74445e204615a8
25245
+ Content-Type: text/html;
25246
+ charset=UTF-8
25247
+ Content-Transfer-Encoding: 7bit
25248
+
25249
+ <html>
25250
+ <body>
25251
+ <h1>UserMailer#welcome</h1>
25252
+
25253
+ <p>
25254
+ Hi, find me in app/views/user_mailer/welcome.html.erb
25255
+ </p>
25256
+
25257
+ </body>
25258
+ </html>
25259
+
25260
+ ----==_mimepart_570721021f340_5ed13fd74445e204615a8--
25261
+
25262
+  (0.0ms) SAVEPOINT active_record_1
25263
+ SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 2], ["drippable_type", "User"], ["created_at", "2016-04-08 03:09:54.131031"], ["updated_at", "2016-04-08 03:09:54.131031"]]
25264
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25265
+ Rendered user_mailer/welcome.html.erb within layouts/mailer (0.0ms)
25266
+ Rendered user_mailer/welcome.text.erb within layouts/mailer (0.0ms)
25267
+
25268
+ UserMailer#welcome: processed outbound mail in 1.3ms
25269
+
25270
+ Sent mail to to@example.org (2.2ms)
25271
+ Date: Thu, 07 Apr 2016 20:09:54 -0700
25272
+ From: from@example.com
25273
+ To: to@example.org
25274
+ Message-ID: <5707210220b45_5ed13fd74445e20461879@Douglass-MacBook-Pro.local.mail>
25275
+ Subject: Welcome
25276
+ Mime-Version: 1.0
25277
+ Content-Type: multipart/alternative;
25278
+ boundary="--==_mimepart_57072102205c0_5ed13fd74445e20461711";
25279
+ charset=UTF-8
25280
+ Content-Transfer-Encoding: 7bit
25281
+
25282
+
25283
+ ----==_mimepart_57072102205c0_5ed13fd74445e20461711
25284
+ Content-Type: text/plain;
25285
+ charset=UTF-8
25286
+ Content-Transfer-Encoding: 7bit
25287
+
25288
+ UserMailer#welcome
25289
+
25290
+ Hi, find me in app/views/user_mailer/welcome.text.erb
25291
+
25292
+
25293
+ ----==_mimepart_57072102205c0_5ed13fd74445e20461711
25294
+ Content-Type: text/html;
25295
+ charset=UTF-8
25296
+ Content-Transfer-Encoding: 7bit
25297
+
25298
+ <html>
25299
+ <body>
25300
+ <h1>UserMailer#welcome</h1>
25301
+
25302
+ <p>
25303
+ Hi, find me in app/views/user_mailer/welcome.html.erb
25304
+ </p>
25305
+
25306
+ </body>
25307
+ </html>
25308
+
25309
+ ----==_mimepart_57072102205c0_5ed13fd74445e20461711--
25310
+
25311
+  (0.0ms) SAVEPOINT active_record_1
25312
+ SQL (0.0ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 3], ["drippable_type", "User"], ["created_at", "2016-04-08 03:09:54.135637"], ["updated_at", "2016-04-08 03:09:54.135637"]]
25313
+  (0.1ms) RELEASE SAVEPOINT active_record_1
25314
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25315
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."username" IS NOT NULL) AND ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:09:53.000000') [["drippable_type", "User"], ["dripper_action_id", 2]]
25316
+ Rendered user_mailer/newsletter.html.erb within layouts/mailer (0.2ms)
25317
+ Rendered user_mailer/newsletter.text.erb within layouts/mailer (0.2ms)
25318
+
25319
+ UserMailer#newsletter: processed outbound mail in 6.7ms
25320
+
25321
+ Sent mail to to@example.org (2.2ms)
25322
+ Date: Thu, 07 Apr 2016 20:09:54 -0700
25323
+ From: from@example.com
25324
+ To: to@example.org
25325
+ Message-ID: <5707210223908_5ed13fd74445e204620ad@Douglass-MacBook-Pro.local.mail>
25326
+ Subject: Newsletter
25327
+ Mime-Version: 1.0
25328
+ Content-Type: multipart/alternative;
25329
+ boundary="--==_mimepart_5707210223342_5ed13fd74445e20461934";
25330
+ charset=UTF-8
25331
+ Content-Transfer-Encoding: 7bit
25332
+
25333
+
25334
+ ----==_mimepart_5707210223342_5ed13fd74445e20461934
25335
+ Content-Type: text/plain;
25336
+ charset=UTF-8
25337
+ Content-Transfer-Encoding: 7bit
25338
+
25339
+ UserMailer#newsletter
25340
+
25341
+ Hi, find me in app/views/user_mailer/newsletter.text.erb
25342
+
25343
+
25344
+ ----==_mimepart_5707210223342_5ed13fd74445e20461934
25345
+ Content-Type: text/html;
25346
+ charset=UTF-8
25347
+ Content-Transfer-Encoding: 7bit
25348
+
25349
+ <html>
25350
+ <body>
25351
+ <h1>UserMailer#newsletter</h1>
25352
+
25353
+ <p>
25354
+ Hi, find me in app/views/user_mailer/newsletter.html.erb
25355
+ </p>
25356
+
25357
+ </body>
25358
+ </html>
25359
+
25360
+ ----==_mimepart_5707210223342_5ed13fd74445e20461934--
25361
+
25362
+  (0.0ms) SAVEPOINT active_record_1
25363
+ SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 2], ["drippable_id", 1], ["drippable_type", "User"], ["created_at", "2016-04-08 03:09:54.147519"], ["updated_at", "2016-04-08 03:09:54.147519"]]
25364
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25365
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
25366
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:09:53.000000') [["drippable_type", "User"], ["dripper_action_id", 1]]
25367
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25368
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."username" IS NOT NULL) AND ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:09:53.000000') [["drippable_type", "User"], ["dripper_action_id", 2]]
25369
+  (2.3ms) rollback transaction
25370
+  (0.0ms) begin transaction
25371
+ ---------------------------------
25372
+ Dripper::MessageTest: test_Config
25373
+ ---------------------------------
25374
+  (0.0ms) SAVEPOINT active_record_1
25375
+ SQL (0.2ms) INSERT INTO "users" ("email", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "foo@bar.com"], ["username", "foo"], ["created_at", "2016-04-08 03:09:54.155765"], ["updated_at", "2016-04-08 03:09:54.155765"]]
25376
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25377
+  (0.0ms) SAVEPOINT active_record_1
25378
+ SQL (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo2@bar.com"], ["created_at", "2016-04-08 03:09:54.156844"], ["updated_at", "2016-04-08 03:09:54.156844"]]
25379
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25380
+  (0.0ms) SAVEPOINT active_record_1
25381
+ SQL (0.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo3@bar.com"], ["created_at", "2016-04-08 03:09:54.157838"], ["updated_at", "2016-04-08 03:09:54.157838"]]
25382
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25383
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
25384
+  (0.0ms) SAVEPOINT active_record_1
25385
+ SQL (0.0ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "welcome"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:09:54.159015"], ["updated_at", "2016-04-08 03:09:54.159015"]]
25386
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25387
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25388
+  (0.0ms) SAVEPOINT active_record_1
25389
+ SQL (0.1ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "newsletter"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:09:54.160001"], ["updated_at", "2016-04-08 03:09:54.160001"]]
25390
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25391
+  (0.4ms) rollback transaction
25392
+  (0.0ms) begin transaction
25393
+ --------------------------------------
25394
+ Dripper::MessageTest: test_Integration
25395
+ --------------------------------------
25396
+  (0.0ms) SAVEPOINT active_record_1
25397
+ SQL (0.2ms) INSERT INTO "users" ("email", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "foo@bar.com"], ["username", "foo"], ["created_at", "2016-04-08 03:09:54.161611"], ["updated_at", "2016-04-08 03:09:54.161611"]]
25398
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25399
+  (0.0ms) SAVEPOINT active_record_1
25400
+ SQL (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo2@bar.com"], ["created_at", "2016-04-08 03:09:54.162604"], ["updated_at", "2016-04-08 03:09:54.162604"]]
25401
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25402
+  (0.0ms) SAVEPOINT active_record_1
25403
+ SQL (0.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo3@bar.com"], ["created_at", "2016-04-08 03:09:54.163379"], ["updated_at", "2016-04-08 03:09:54.163379"]]
25404
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25405
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
25406
+  (0.0ms) SAVEPOINT active_record_1
25407
+ SQL (0.0ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "welcome"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:09:54.164453"], ["updated_at", "2016-04-08 03:09:54.164453"]]
25408
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25409
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25410
+  (0.0ms) SAVEPOINT active_record_1
25411
+ SQL (0.0ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "newsletter"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:09:54.165396"], ["updated_at", "2016-04-08 03:09:54.165396"]]
25412
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25413
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "welcome"], ["mailer", "user_mailer"]]
25414
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:09:54.000000') [["drippable_type", "User"], ["dripper_action_id", 1]]
25415
+  (0.0ms) SAVEPOINT active_record_1
25416
+ SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 1], ["drippable_type", "User"], ["created_at", "2016-04-08 03:09:54.167609"], ["updated_at", "2016-04-08 03:09:54.167609"]]
25417
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25418
+  (0.0ms) SAVEPOINT active_record_1
25419
+ SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 2], ["drippable_type", "User"], ["created_at", "2016-04-08 03:09:54.168523"], ["updated_at", "2016-04-08 03:09:54.168523"]]
25420
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25421
+  (0.0ms) SAVEPOINT active_record_1
25422
+ SQL (0.0ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 3], ["drippable_type", "User"], ["created_at", "2016-04-08 03:09:54.169377"], ["updated_at", "2016-04-08 03:09:54.169377"]]
25423
+  (0.1ms) RELEASE SAVEPOINT active_record_1
25424
+ Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25425
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."username" IS NOT NULL) AND ("users"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (users.created_at >= '2016-04-08 03:09:54.000000') [["drippable_type", "User"], ["dripper_action_id", 2]]
25426
+  (0.1ms) SAVEPOINT active_record_1
25427
+ SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 2], ["drippable_id", 1], ["drippable_type", "User"], ["created_at", "2016-04-08 03:09:56.815384"], ["updated_at", "2016-04-08 03:09:56.815384"]]
25428
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25429
+  (0.5ms) rollback transaction
25430
+  (0.0ms) begin transaction
25431
+ -----------------------
25432
+ DripperTest: test_truth
25433
+ -----------------------
25434
+  (0.0ms) rollback transaction
25435
+  (0.0ms) begin transaction
25436
+ ---------------------------------------
25437
+ Dripper::ConcernTest: test_Concern_Test
25438
+ ---------------------------------------
25439
+ Dripper::Action Load (0.1ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? ORDER BY "dripper_actions"."id" ASC LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25440
+  (0.0ms) SAVEPOINT active_record_1
25441
+ SQL (0.2ms) INSERT INTO "dripper_actions" ("action", "mailer", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["action", "newsletter"], ["mailer", "user_mailer"], ["created_at", "2016-04-08 03:09:56.820352"], ["updated_at", "2016-04-08 03:09:56.820352"]]
25442
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25443
+  (0.0ms) SAVEPOINT active_record_1
25444
+ SQL (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "foo@bar.com"], ["created_at", "2016-04-08 03:09:56.822884"], ["updated_at", "2016-04-08 03:09:56.822884"]]
25445
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25446
+  (0.1ms) SAVEPOINT active_record_1
25447
+ SQL (0.1ms) INSERT INTO "newsletters" ("user_id", "title", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["user_id", 1], ["title", "test"], ["created_at", "2016-04-08 03:09:56.827253"], ["updated_at", "2016-04-08 03:09:56.827253"]]
25448
+ [ActiveJob] Newsletter Load (0.1ms) SELECT "newsletters".* FROM "newsletters" WHERE "newsletters"."id" = ? LIMIT 1 [["id", 1]]
25449
+ [ActiveJob] [DripperJob] [76fb3d5a-5936-4eab-a5ea-9673a6cd7642] Performing DripperJob from Inline(default) with arguments: gid://dummy/Newsletter/1
25450
+ [ActiveJob] [DripperJob] [76fb3d5a-5936-4eab-a5ea-9673a6cd7642] Dripper::Action Load (0.0ms) SELECT "dripper_actions".* FROM "dripper_actions" WHERE "dripper_actions"."action" = ? AND "dripper_actions"."mailer" = ? LIMIT 1 [["action", "newsletter"], ["mailer", "user_mailer"]]
25451
+ [ActiveJob] [DripperJob] [76fb3d5a-5936-4eab-a5ea-9673a6cd7642] Newsletter Load (0.1ms) SELECT "newsletters".* FROM "newsletters" WHERE ("newsletters"."id" NOT IN (SELECT "dripper_messages"."drippable_id" FROM "dripper_messages" WHERE "dripper_messages"."drippable_type" = ? AND "dripper_messages"."dripper_action_id" = ?)) AND (newsletters.created_at >= '2016-04-08 03:09:56.000000') AND "newsletters"."id" = ? [["drippable_type", "Newsletter"], ["dripper_action_id", 1], ["id", 1]]
25452
+ [ActiveJob] [DripperJob] [76fb3d5a-5936-4eab-a5ea-9673a6cd7642] SQL (0.1ms) INSERT INTO "dripper_messages" ("dripper_action_id", "drippable_id", "drippable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["dripper_action_id", 1], ["drippable_id", 1], ["drippable_type", "Newsletter"], ["created_at", "2016-04-08 03:09:56.831935"], ["updated_at", "2016-04-08 03:09:56.831935"]]
25453
+ [ActiveJob] [DripperJob] [76fb3d5a-5936-4eab-a5ea-9673a6cd7642] Performed DripperJob from Inline(default) in 2.31ms
25454
+ [ActiveJob] Enqueued DripperJob (Job ID: 76fb3d5a-5936-4eab-a5ea-9673a6cd7642) to Inline(default) with arguments: gid://dummy/Newsletter/1
25455
+  (0.0ms) RELEASE SAVEPOINT active_record_1
25456
+  (0.5ms) rollback transaction
@@ -4,7 +4,6 @@ require 'mocha/mini_test'
4
4
 
5
5
  module Dripper
6
6
  class ConcernTest < ActiveSupport::TestCase
7
- require 'dripper'
8
7
 
9
8
  def setup
10
9
  Dripper.config model: :newsletters do
@@ -4,7 +4,6 @@ require 'mocha/mini_test'
4
4
 
5
5
  module Dripper
6
6
  class MessageTest < ActiveSupport::TestCase
7
- require 'dripper'
8
7
 
9
8
  def setup
10
9
  # create the mailer
@@ -15,7 +14,7 @@ module Dripper
15
14
  Dripper.config model: :users do
16
15
  dripper mailer: :user_mailer do
17
16
  dripper action: :welcome
18
- dripper action: :newsletter, scope: -> {has_username}
17
+ dripper action: :newsletter, wait: 1.minutes, scope: -> {has_username}
19
18
  end
20
19
  end
21
20
 
@@ -33,6 +32,7 @@ module Dripper
33
32
  test "Integration" do
34
33
  msg = mock()
35
34
  msg.stubs(:deliver_now)
35
+ msg.stubs(:deliver_later)
36
36
 
37
37
  # expect that welcome was called 2x, newsletter called once
38
38
  UserMailer.stubs(:welcome)
@@ -4,7 +4,6 @@ require 'mocha/mini_test'
4
4
 
5
5
  module Dripper
6
6
  class RunTwiceTest < ActiveSupport::TestCase
7
- require 'dripper'
8
7
 
9
8
  def setup
10
9
  Dripper.config model: :users do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dripper_mail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Tarr
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sqlite3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  description: 'An opinionated rails drip email engine that depends on ActiveRecord
28
42
  and ActionMailer '
29
43
  email: