mailhopper 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a3d3f1e7666a0ef1ef6edb78e1df05cbf9178627
4
+ data.tar.gz: cd3dc3b2e0ab547e813dd8b489dddab1a22a7ec6
5
+ SHA512:
6
+ metadata.gz: e45bb246727d8ea11cf39456fc483b90d714479d16f77fc7d0e9b0afafe83e5cf2344a5702f82a77ed1306d3a200befaa7818affcf0c6c60e8c686771fd2c489
7
+ data.tar.gz: 3d414c4c0e343b3db5a9650b0994cadb7dedd46dd28b59318875268bccf2efcb7b895b35f6a1488145c2aeb5cb807136554cf46267e6efe0d86c173a6b7d1ce0
@@ -1,9 +1,13 @@
1
1
  module Mailhopper
2
2
  class Email < ActiveRecord::Base
3
- attr_accessible :to_address, :from_address, :cc_address, :bcc_address,
4
- :reply_to_address, :subject, :content
5
- default_scope :order => 'created_at DESC'
6
- scope :unsent, :conditions => 'sent_at is null'
3
+ # Starting from Rails 4 <tt>attr_accessible</tt> is deprecated in favour of Strong parameters
4
+ if Rails::VERSION::MAJOR < 4
5
+ attr_accessible :to_address, :from_address, :cc_address, :bcc_address,
6
+ :reply_to_address, :subject, :content
7
+ end
8
+
9
+ default_scope lambda { order('created_at DESC') }
10
+ scope :unsent, lambda { where(:sent_at => nil) }
7
11
 
8
12
  validates :from_address, :presence => true
9
13
 
@@ -1,3 +1,3 @@
1
1
  module Mailhopper
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -6,9 +6,6 @@ Dummy::Application.configure do
6
6
  # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
11
-
12
9
  # Show full error reports and disable caching
13
10
  config.consider_all_requests_local = true
14
11
  config.action_controller.perform_caching = false
@@ -24,4 +21,9 @@ Dummy::Application.configure do
24
21
 
25
22
  # Do not compress assets
26
23
  config.assets.compress = false
24
+
25
+ # Do not eager load code on boot. This avoids loading your whole application
26
+ # just for the purpose of running a single test. If you are using a tool that
27
+ # preloads Rails for running tests, you may have to set it to true.
28
+ config.eager_load = false
27
29
  end
@@ -18,34 +18,15 @@ Dummy::Application.configure do
18
18
  # (comment out if your front-end server doesn't support this)
19
19
  config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
20
20
 
21
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
22
- # config.force_ssl = true
23
-
24
- # See everything in the log (default is :info)
25
- # config.log_level = :debug
26
-
27
- # Use a different logger for distributed setups
28
- # config.logger = SyslogLogger.new
29
-
30
- # Use a different cache store in production
31
- # config.cache_store = :mem_cache_store
32
-
33
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
34
- # config.action_controller.asset_host = "http://assets.example.com"
35
-
36
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
37
- # config.assets.precompile += %w( search.js )
38
-
39
- # Disable delivery errors, bad email addresses will be ignored
40
- # config.action_mailer.raise_delivery_errors = false
41
-
42
- # Enable threaded mode
43
- # config.threadsafe!
44
-
45
21
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
46
22
  # the I18n.default_locale when a translation can not be found)
47
23
  config.i18n.fallbacks = true
48
24
 
49
25
  # Send deprecation notices to registered listeners
50
26
  config.active_support.deprecation = :notify
27
+
28
+ # Do not eager load code on boot. This avoids loading your whole application
29
+ # just for the purpose of running a single test. If you are using a tool that
30
+ # preloads Rails for running tests, you may have to set it to true.
31
+ config.eager_load = true
51
32
  end
@@ -11,9 +11,6 @@ Dummy::Application.configure do
11
11
  config.serve_static_assets = true
12
12
  config.static_cache_control = "public, max-age=3600"
13
13
 
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
16
-
17
14
  # Show full error reports and disable caching
18
15
  config.consider_all_requests_local = true
19
16
  config.action_controller.perform_caching = false
@@ -36,4 +33,9 @@ Dummy::Application.configure do
36
33
 
37
34
  # Print deprecation notices to the stderr
38
35
  config.active_support.deprecation = :stderr
36
+
37
+ # Do not eager load code on boot. This avoids loading your whole application
38
+ # just for the purpose of running a single test. If you are using a tool that
39
+ # preloads Rails for running tests, you may have to set it to true.
40
+ config.eager_load = false
39
41
  end
@@ -821,3 +821,503 @@ Papaya
821
821
   (0.1ms) SELECT COUNT(*) FROM "emails"
822
822
  Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
823
823
   (13.6ms) rollback transaction
824
+  (0.4ms) begin transaction
825
+  (0.1ms) rollback transaction
826
+  (0.0ms) begin transaction
827
+  (0.6ms) SELECT COUNT(*) FROM "emails"
828
+ Rendered sample_mailer/hello.text.erb (2.2ms)
829
+  (0.1ms) SAVEPOINT active_record_1
830
+ SQL (44.0ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc@example.com"], ["cc_address", "cc@example.com"], ["content", "Date: Tue, 08 May 2012 07:25:45 -0400\r\nFrom: from@example.com\r\nReply-To: reply_to@example.com\r\nTo: to@example.com\r\nCc: cc@example.com\r\nMessage-ID: <4fa902b92f06f_133633fd091034cdc6445f@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Tue, 08 May 2012 11:25:45 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Tue, 08 May 2012 11:25:45 UTC +00:00]]
831
+  (0.1ms) RELEASE SAVEPOINT active_record_1
832
+
833
+ Sent mail to to@example.com (93ms)
834
+ Date: Tue, 08 May 2012 07:25:45 -0400
835
+ From: from@example.com
836
+ Reply-To: reply_to@example.com
837
+ To: to@example.com
838
+ Cc: cc@example.com
839
+ Message-ID: <4fa902b92f06f_133633fd091034cdc6445f@dgmpro.local.mail>
840
+ Subject: Hiya!
841
+ Mime-Version: 1.0
842
+ Content-Type: text/plain;
843
+ charset=UTF-8
844
+ Content-Transfer-Encoding: 7bit
845
+
846
+ Papaya
847
+  (0.1ms) SELECT COUNT(*) FROM "emails"
848
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
849
+  (0.5ms) rollback transaction
850
+  (0.0ms) begin transaction
851
+  (0.1ms) SELECT COUNT(*) FROM "emails"
852
+ Rendered sample_mailer/hello.text.erb (0.1ms)
853
+  (0.1ms) SAVEPOINT active_record_1
854
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc1@example.com,bcc2@example.com"], ["cc_address", "cc1@example.com,cc2@example.com"], ["content", "Date: Tue, 08 May 2012 07:25:45 -0400\r\nFrom: from1@example.com\r\nReply-To: reply_to@example.com\r\nTo: to1@example.com, \r\n to2@example.com\r\nCc: cc1@example.com, \r\n cc2@example.com\r\nMessage-ID: <4fa902b940e98_133633fd091034cdc645a7@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Tue, 08 May 2012 11:25:45 UTC +00:00], ["from_address", "from1@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to1@example.com,to2@example.com"], ["updated_at", Tue, 08 May 2012 11:25:45 UTC +00:00]]
855
+  (0.0ms) RELEASE SAVEPOINT active_record_1
856
+
857
+ Sent mail to to1@example.com, to2@example.com (12ms)
858
+ Date: Tue, 08 May 2012 07:25:45 -0400
859
+ From: from1@example.com
860
+ Reply-To: reply_to@example.com
861
+ To: to1@example.com,
862
+ to2@example.com
863
+ Cc: cc1@example.com,
864
+ cc2@example.com
865
+ Message-ID: <4fa902b940e98_133633fd091034cdc645a7@dgmpro.local.mail>
866
+ Subject: Hiya!
867
+ Mime-Version: 1.0
868
+ Content-Type: text/plain;
869
+ charset=UTF-8
870
+ Content-Transfer-Encoding: 7bit
871
+
872
+ Papaya
873
+  (0.1ms) SELECT COUNT(*) FROM "emails"
874
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
875
+  (0.4ms) rollback transaction
876
+  (0.0ms) begin transaction
877
+  (0.1ms) SELECT COUNT(*) FROM "emails"
878
+ Rendered sample_mailer/hello.text.erb (0.1ms)
879
+  (0.1ms) SAVEPOINT active_record_1
880
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Tue, 08 May 2012 07:25:45 -0400\r\nFrom: from@example.com\r\nTo: to@example.com\r\nMessage-ID: <4fa902b945aa6_133633fd091034cdc64677@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Tue, 08 May 2012 11:25:45 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Tue, 08 May 2012 11:25:45 UTC +00:00]]
881
+  (0.0ms) RELEASE SAVEPOINT active_record_1
882
+
883
+ Sent mail to to@example.com (8ms)
884
+ Date: Tue, 08 May 2012 07:25:45 -0400
885
+ From: from@example.com
886
+ To: to@example.com
887
+ Message-ID: <4fa902b945aa6_133633fd091034cdc64677@dgmpro.local.mail>
888
+ Subject: Hiya!
889
+ Mime-Version: 1.0
890
+ Content-Type: text/plain;
891
+ charset=UTF-8
892
+ Content-Transfer-Encoding: 7bit
893
+
894
+ Papaya
895
+  (0.1ms) SELECT COUNT(*) FROM "emails"
896
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
897
+  (0.5ms) rollback transaction
898
+  (0.0ms) begin transaction
899
+  (0.1ms) SELECT COUNT(*) FROM "emails"
900
+ Rendered sample_mailer/hello.text.erb (0.1ms)
901
+  (0.1ms) SAVEPOINT active_record_1
902
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Tue, 08 May 2012 07:25:45 -0400\r\nfrom: from.@example.com\r\nto: to@to@example.com\r\nMessage-ID: <4fa902b949bbd_133633fd091034cdc647cd@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Tue, 08 May 2012 11:25:45 UTC +00:00], ["from_address", "from.@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@to@example.com"], ["updated_at", Tue, 08 May 2012 11:25:45 UTC +00:00]]
903
+  (0.0ms) RELEASE SAVEPOINT active_record_1
904
+
905
+ Sent mail to to@to@example.com (6ms)
906
+ Date: Tue, 08 May 2012 07:25:45 -0400
907
+ from: from.@example.com
908
+ to: to@to@example.com
909
+ Message-ID: <4fa902b949bbd_133633fd091034cdc647cd@dgmpro.local.mail>
910
+ Subject: Hiya!
911
+ Mime-Version: 1.0
912
+ Content-Type: text/plain;
913
+ charset=UTF-8
914
+ Content-Transfer-Encoding: 7bit
915
+
916
+ Papaya
917
+  (0.1ms) SELECT COUNT(*) FROM "emails"
918
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
919
+  (0.5ms) rollback transaction
920
+  (0.2ms) begin transaction
921
+  (0.1ms) rollback transaction
922
+  (0.0ms) begin transaction
923
+  (0.1ms) SELECT COUNT(*) FROM "emails"
924
+ Rendered sample_mailer/hello.text.erb (0.7ms)
925
+  (0.1ms) SAVEPOINT active_record_1
926
+ SQL (2.5ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc@example.com"], ["cc_address", "cc@example.com"], ["content", "Date: Sun, 22 Dec 2013 07:00:50 -0500\r\nFrom: from@example.com\r\nReply-To: reply_to@example.com\r\nTo: to@example.com\r\nCc: cc@example.com\r\nMessage-ID: <52b6d47258783_2b263fbfc60606d86552f@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:00:50 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:00:50 UTC +00:00]]
927
+  (0.0ms) RELEASE SAVEPOINT active_record_1
928
+
929
+ Sent mail to to@example.com (15ms)
930
+ Date: Sun, 22 Dec 2013 07:00:50 -0500
931
+ From: from@example.com
932
+ Reply-To: reply_to@example.com
933
+ To: to@example.com
934
+ Cc: cc@example.com
935
+ Message-ID: <52b6d47258783_2b263fbfc60606d86552f@dgeb1.mail>
936
+ Subject: Hiya!
937
+ Mime-Version: 1.0
938
+ Content-Type: text/plain;
939
+ charset=UTF-8
940
+ Content-Transfer-Encoding: 7bit
941
+
942
+ Papaya
943
+  (0.0ms) SELECT COUNT(*) FROM "emails"
944
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
945
+  (0.5ms) rollback transaction
946
+  (0.0ms) begin transaction
947
+  (0.1ms) SELECT COUNT(*) FROM "emails"
948
+ Rendered sample_mailer/hello.text.erb (0.1ms)
949
+  (0.0ms) SAVEPOINT active_record_1
950
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc1@example.com,bcc2@example.com"], ["cc_address", "cc1@example.com,cc2@example.com"], ["content", "Date: Sun, 22 Dec 2013 07:00:50 -0500\r\nFrom: from1@example.com\r\nReply-To: reply_to@example.com\r\nTo: to1@example.com, \r\n to2@example.com\r\nCc: cc1@example.com, \r\n cc2@example.com\r\nMessage-ID: <52b6d4725e3d7_2b263fbfc60606d86562a@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:00:50 UTC +00:00], ["from_address", "from1@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to1@example.com,to2@example.com"], ["updated_at", Sun, 22 Dec 2013 12:00:50 UTC +00:00]]
951
+  (0.0ms) RELEASE SAVEPOINT active_record_1
952
+
953
+ Sent mail to to1@example.com, to2@example.com (8ms)
954
+ Date: Sun, 22 Dec 2013 07:00:50 -0500
955
+ From: from1@example.com
956
+ Reply-To: reply_to@example.com
957
+ To: to1@example.com,
958
+ to2@example.com
959
+ Cc: cc1@example.com,
960
+ cc2@example.com
961
+ Message-ID: <52b6d4725e3d7_2b263fbfc60606d86562a@dgeb1.mail>
962
+ Subject: Hiya!
963
+ Mime-Version: 1.0
964
+ Content-Type: text/plain;
965
+ charset=UTF-8
966
+ Content-Transfer-Encoding: 7bit
967
+
968
+ Papaya
969
+  (0.0ms) SELECT COUNT(*) FROM "emails"
970
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
971
+  (0.2ms) rollback transaction
972
+  (0.0ms) begin transaction
973
+  (0.1ms) SELECT COUNT(*) FROM "emails"
974
+ Rendered sample_mailer/hello.text.erb (0.0ms)
975
+  (0.0ms) SAVEPOINT active_record_1
976
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Sun, 22 Dec 2013 07:00:50 -0500\r\nFrom: from@example.com\r\nTo: to@example.com\r\nMessage-ID: <52b6d47261769_2b263fbfc60606d8657a2@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:00:50 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:00:50 UTC +00:00]]
977
+  (0.0ms) RELEASE SAVEPOINT active_record_1
978
+
979
+ Sent mail to to@example.com (5ms)
980
+ Date: Sun, 22 Dec 2013 07:00:50 -0500
981
+ From: from@example.com
982
+ To: to@example.com
983
+ Message-ID: <52b6d47261769_2b263fbfc60606d8657a2@dgeb1.mail>
984
+ Subject: Hiya!
985
+ Mime-Version: 1.0
986
+ Content-Type: text/plain;
987
+ charset=UTF-8
988
+ Content-Transfer-Encoding: 7bit
989
+
990
+ Papaya
991
+  (0.0ms) SELECT COUNT(*) FROM "emails"
992
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
993
+  (0.2ms) rollback transaction
994
+  (0.0ms) begin transaction
995
+  (0.1ms) SELECT COUNT(*) FROM "emails"
996
+ Rendered sample_mailer/hello.text.erb (0.0ms)
997
+  (0.1ms) SAVEPOINT active_record_1
998
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Sun, 22 Dec 2013 07:00:50 -0500\r\nfrom: from.@example.com\r\nto: to@to@example.com\r\nMessage-ID: <52b6d47264160_2b263fbfc60606d8658ca@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:00:50 UTC +00:00], ["from_address", "from.@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:00:50 UTC +00:00]]
999
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1000
+
1001
+ Sent mail to to@to@example.com (4ms)
1002
+ Date: Sun, 22 Dec 2013 07:00:50 -0500
1003
+ from: from.@example.com
1004
+ to: to@to@example.com
1005
+ Message-ID: <52b6d47264160_2b263fbfc60606d8658ca@dgeb1.mail>
1006
+ Subject: Hiya!
1007
+ Mime-Version: 1.0
1008
+ Content-Type: text/plain;
1009
+ charset=UTF-8
1010
+ Content-Transfer-Encoding: 7bit
1011
+
1012
+ Papaya
1013
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1014
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1015
+  (0.2ms) rollback transaction
1016
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
1017
+ Migrating to CreateEmails (20110916191655)
1018
+  (0.1ms) select sqlite_version(*)
1019
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
1020
+  (0.0ms) PRAGMA index_list("emails")
1021
+  (0.2ms) begin transaction
1022
+  (0.1ms) rollback transaction
1023
+  (0.0ms) begin transaction
1024
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1025
+ Rendered sample_mailer/hello.text.erb (0.7ms)
1026
+  (0.0ms) SAVEPOINT active_record_1
1027
+ SQL (2.3ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc@example.com"], ["cc_address", "cc@example.com"], ["content", "Date: Sun, 22 Dec 2013 07:04:44 -0500\r\nFrom: from@example.com\r\nReply-To: reply_to@example.com\r\nTo: to@example.com\r\nCc: cc@example.com\r\nMessage-ID: <52b6d55ce6162_2b683ff1848606cc14945@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:04:44 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:04:44 UTC +00:00]]
1028
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1029
+
1030
+ Sent mail to to@example.com (13ms)
1031
+ Date: Sun, 22 Dec 2013 07:04:44 -0500
1032
+ From: from@example.com
1033
+ Reply-To: reply_to@example.com
1034
+ To: to@example.com
1035
+ Cc: cc@example.com
1036
+ Message-ID: <52b6d55ce6162_2b683ff1848606cc14945@dgeb1.mail>
1037
+ Subject: Hiya!
1038
+ Mime-Version: 1.0
1039
+ Content-Type: text/plain;
1040
+ charset=UTF-8
1041
+ Content-Transfer-Encoding: 7bit
1042
+
1043
+ Papaya
1044
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1045
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1046
+  (0.3ms) rollback transaction
1047
+  (0.0ms) begin transaction
1048
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1049
+ Rendered sample_mailer/hello.text.erb (0.1ms)
1050
+  (0.0ms) SAVEPOINT active_record_1
1051
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc1@example.com,bcc2@example.com"], ["cc_address", "cc1@example.com,cc2@example.com"], ["content", "Date: Sun, 22 Dec 2013 07:04:44 -0500\r\nFrom: from1@example.com\r\nReply-To: reply_to@example.com\r\nTo: to1@example.com, \r\n to2@example.com\r\nCc: cc1@example.com, \r\n cc2@example.com\r\nMessage-ID: <52b6d55cebc0f_2b683ff1848606cc15010@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:04:44 UTC +00:00], ["from_address", "from1@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to1@example.com,to2@example.com"], ["updated_at", Sun, 22 Dec 2013 12:04:44 UTC +00:00]]
1052
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1053
+
1054
+ Sent mail to to1@example.com, to2@example.com (9ms)
1055
+ Date: Sun, 22 Dec 2013 07:04:44 -0500
1056
+ From: from1@example.com
1057
+ Reply-To: reply_to@example.com
1058
+ To: to1@example.com,
1059
+ to2@example.com
1060
+ Cc: cc1@example.com,
1061
+ cc2@example.com
1062
+ Message-ID: <52b6d55cebc0f_2b683ff1848606cc15010@dgeb1.mail>
1063
+ Subject: Hiya!
1064
+ Mime-Version: 1.0
1065
+ Content-Type: text/plain;
1066
+ charset=UTF-8
1067
+ Content-Transfer-Encoding: 7bit
1068
+
1069
+ Papaya
1070
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1071
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1072
+  (0.2ms) rollback transaction
1073
+  (0.2ms) begin transaction
1074
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1075
+ Rendered sample_mailer/hello.text.erb (0.0ms)
1076
+  (0.0ms) SAVEPOINT active_record_1
1077
+ SQL (0.3ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Sun, 22 Dec 2013 07:04:44 -0500\r\nFrom: from@example.com\r\nTo: to@example.com\r\nMessage-ID: <52b6d55cef112_2b683ff1848606cc151ee@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:04:44 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:04:44 UTC +00:00]]
1078
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1079
+
1080
+ Sent mail to to@example.com (5ms)
1081
+ Date: Sun, 22 Dec 2013 07:04:44 -0500
1082
+ From: from@example.com
1083
+ To: to@example.com
1084
+ Message-ID: <52b6d55cef112_2b683ff1848606cc151ee@dgeb1.mail>
1085
+ Subject: Hiya!
1086
+ Mime-Version: 1.0
1087
+ Content-Type: text/plain;
1088
+ charset=UTF-8
1089
+ Content-Transfer-Encoding: 7bit
1090
+
1091
+ Papaya
1092
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1093
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1094
+  (0.2ms) rollback transaction
1095
+  (0.0ms) begin transaction
1096
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1097
+ Rendered sample_mailer/hello.text.erb (0.0ms)
1098
+  (0.0ms) SAVEPOINT active_record_1
1099
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Sun, 22 Dec 2013 07:04:44 -0500\r\nfrom: from.@example.com\r\nto: to@to@example.com\r\nMessage-ID: <52b6d55cf1b92_2b683ff1848606cc1521c@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:04:44 UTC +00:00], ["from_address", "from.@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:04:44 UTC +00:00]]
1100
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1101
+
1102
+ Sent mail to to@to@example.com (4ms)
1103
+ Date: Sun, 22 Dec 2013 07:04:44 -0500
1104
+ from: from.@example.com
1105
+ to: to@to@example.com
1106
+ Message-ID: <52b6d55cf1b92_2b683ff1848606cc1521c@dgeb1.mail>
1107
+ Subject: Hiya!
1108
+ Mime-Version: 1.0
1109
+ Content-Type: text/plain;
1110
+ charset=UTF-8
1111
+ Content-Transfer-Encoding: 7bit
1112
+
1113
+ Papaya
1114
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1115
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1116
+  (0.3ms) rollback transaction
1117
+  (0.0ms) begin transaction
1118
+  (0.0ms) SAVEPOINT active_record_1
1119
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc"], ["cc_address", "cc"], ["content", "content"], ["created_at", Sun, 22 Dec 2013 12:04:44 UTC +00:00], ["from_address", "from"], ["reply_to_address", "reply_to"], ["sent_at", nil], ["subject", "subject"], ["to_address", "to"], ["updated_at", Sun, 22 Dec 2013 12:04:44 UTC +00:00]]
1120
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1121
+  (0.2ms) rollback transaction
1122
+  (0.3ms) begin transaction
1123
+  (0.0ms) rollback transaction
1124
+  (0.0ms) begin transaction
1125
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1126
+ Rendered sample_mailer/hello.text.erb (0.7ms)
1127
+  (0.1ms) SAVEPOINT active_record_1
1128
+ SQL (2.3ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc@example.com"], ["cc_address", "cc@example.com"], ["content", "Date: Sun, 22 Dec 2013 07:09:00 -0500\r\nFrom: from@example.com\r\nReply-To: reply_to@example.com\r\nTo: to@example.com\r\nCc: cc@example.com\r\nMessage-ID: <52b6d65cb3103_2b723ff05c4606cc427b5@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:09:00 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:09:00 UTC +00:00]]
1129
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1130
+
1131
+ Sent mail to to@example.com (13ms)
1132
+ Date: Sun, 22 Dec 2013 07:09:00 -0500
1133
+ From: from@example.com
1134
+ Reply-To: reply_to@example.com
1135
+ To: to@example.com
1136
+ Cc: cc@example.com
1137
+ Message-ID: <52b6d65cb3103_2b723ff05c4606cc427b5@dgeb1.mail>
1138
+ Subject: Hiya!
1139
+ Mime-Version: 1.0
1140
+ Content-Type: text/plain;
1141
+ charset=UTF-8
1142
+ Content-Transfer-Encoding: 7bit
1143
+
1144
+ Papaya
1145
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1146
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1147
+  (0.3ms) rollback transaction
1148
+  (0.0ms) begin transaction
1149
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1150
+ Rendered sample_mailer/hello.text.erb (0.0ms)
1151
+  (0.1ms) SAVEPOINT active_record_1
1152
+ SQL (0.3ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc1@example.com,bcc2@example.com"], ["cc_address", "cc1@example.com,cc2@example.com"], ["content", "Date: Sun, 22 Dec 2013 07:09:00 -0500\r\nFrom: from1@example.com\r\nReply-To: reply_to@example.com\r\nTo: to1@example.com, \r\n to2@example.com\r\nCc: cc1@example.com, \r\n cc2@example.com\r\nMessage-ID: <52b6d65cb82c7_2b723ff05c4606cc428dc@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:09:00 UTC +00:00], ["from_address", "from1@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to1@example.com,to2@example.com"], ["updated_at", Sun, 22 Dec 2013 12:09:00 UTC +00:00]]
1153
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1154
+
1155
+ Sent mail to to1@example.com, to2@example.com (9ms)
1156
+ Date: Sun, 22 Dec 2013 07:09:00 -0500
1157
+ From: from1@example.com
1158
+ Reply-To: reply_to@example.com
1159
+ To: to1@example.com,
1160
+ to2@example.com
1161
+ Cc: cc1@example.com,
1162
+ cc2@example.com
1163
+ Message-ID: <52b6d65cb82c7_2b723ff05c4606cc428dc@dgeb1.mail>
1164
+ Subject: Hiya!
1165
+ Mime-Version: 1.0
1166
+ Content-Type: text/plain;
1167
+ charset=UTF-8
1168
+ Content-Transfer-Encoding: 7bit
1169
+
1170
+ Papaya
1171
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1172
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1173
+  (0.3ms) rollback transaction
1174
+  (0.3ms) begin transaction
1175
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1176
+ Rendered sample_mailer/hello.text.erb (0.1ms)
1177
+  (0.0ms) SAVEPOINT active_record_1
1178
+ SQL (0.5ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Sun, 22 Dec 2013 07:09:00 -0500\r\nFrom: from@example.com\r\nTo: to@example.com\r\nMessage-ID: <52b6d65cbc099_2b723ff05c4606cc429a9@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:09:00 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:09:00 UTC +00:00]]
1179
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1180
+
1181
+ Sent mail to to@example.com (7ms)
1182
+ Date: Sun, 22 Dec 2013 07:09:00 -0500
1183
+ From: from@example.com
1184
+ To: to@example.com
1185
+ Message-ID: <52b6d65cbc099_2b723ff05c4606cc429a9@dgeb1.mail>
1186
+ Subject: Hiya!
1187
+ Mime-Version: 1.0
1188
+ Content-Type: text/plain;
1189
+ charset=UTF-8
1190
+ Content-Transfer-Encoding: 7bit
1191
+
1192
+ Papaya
1193
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1194
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1195
+  (0.2ms) rollback transaction
1196
+  (0.1ms) begin transaction
1197
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1198
+ Rendered sample_mailer/hello.text.erb (0.1ms)
1199
+  (0.1ms) SAVEPOINT active_record_1
1200
+ SQL (0.5ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Sun, 22 Dec 2013 07:09:00 -0500\r\nfrom: from.@example.com\r\nto: to@to@example.com\r\nMessage-ID: <52b6d65cbf6bf_2b723ff05c4606cc4305a@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:09:00 UTC +00:00], ["from_address", "from.@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:09:00 UTC +00:00]]
1201
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1202
+
1203
+ Sent mail to to@to@example.com (5ms)
1204
+ Date: Sun, 22 Dec 2013 07:09:00 -0500
1205
+ from: from.@example.com
1206
+ to: to@to@example.com
1207
+ Message-ID: <52b6d65cbf6bf_2b723ff05c4606cc4305a@dgeb1.mail>
1208
+ Subject: Hiya!
1209
+ Mime-Version: 1.0
1210
+ Content-Type: text/plain;
1211
+ charset=UTF-8
1212
+ Content-Transfer-Encoding: 7bit
1213
+
1214
+ Papaya
1215
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1216
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1217
+  (0.2ms) rollback transaction
1218
+  (0.0ms) begin transaction
1219
+  (0.0ms) SAVEPOINT active_record_1
1220
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc"], ["cc_address", "cc"], ["content", "content"], ["created_at", Sun, 22 Dec 2013 12:09:00 UTC +00:00], ["from_address", "from"], ["reply_to_address", "reply_to"], ["sent_at", nil], ["subject", "subject"], ["to_address", "to"], ["updated_at", Sun, 22 Dec 2013 12:09:00 UTC +00:00]]
1221
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1222
+  (0.2ms) rollback transaction
1223
+  (0.2ms) begin transaction
1224
+  (0.0ms) rollback transaction
1225
+  (0.0ms) begin transaction
1226
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1227
+ Rendered sample_mailer/hello.text.erb (0.8ms)
1228
+  (0.1ms) SAVEPOINT active_record_1
1229
+ SQL (2.3ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc@example.com"], ["cc_address", "cc@example.com"], ["content", "Date: Sun, 22 Dec 2013 07:13:37 -0500\r\nFrom: from@example.com\r\nReply-To: reply_to@example.com\r\nTo: to@example.com\r\nCc: cc@example.com\r\nMessage-ID: <52b6d771703a4_2ba13fd8d4c606dc25871@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:13:37 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:13:37 UTC +00:00]]
1230
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1231
+
1232
+ Sent mail to to@example.com (13ms)
1233
+ Date: Sun, 22 Dec 2013 07:13:37 -0500
1234
+ From: from@example.com
1235
+ Reply-To: reply_to@example.com
1236
+ To: to@example.com
1237
+ Cc: cc@example.com
1238
+ Message-ID: <52b6d771703a4_2ba13fd8d4c606dc25871@dgeb1.mail>
1239
+ Subject: Hiya!
1240
+ Mime-Version: 1.0
1241
+ Content-Type: text/plain;
1242
+ charset=UTF-8
1243
+ Content-Transfer-Encoding: 7bit
1244
+
1245
+ Papaya
1246
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1247
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1248
+  (0.3ms) rollback transaction
1249
+  (0.1ms) begin transaction
1250
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1251
+ Rendered sample_mailer/hello.text.erb (0.1ms)
1252
+  (0.0ms) SAVEPOINT active_record_1
1253
+ SQL (0.3ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc1@example.com,bcc2@example.com"], ["cc_address", "cc1@example.com,cc2@example.com"], ["content", "Date: Sun, 22 Dec 2013 07:13:37 -0500\r\nFrom: from1@example.com\r\nReply-To: reply_to@example.com\r\nTo: to1@example.com, \r\n to2@example.com\r\nCc: cc1@example.com, \r\n cc2@example.com\r\nMessage-ID: <52b6d77176302_2ba13fd8d4c606dc25988@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:13:37 UTC +00:00], ["from_address", "from1@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to1@example.com,to2@example.com"], ["updated_at", Sun, 22 Dec 2013 12:13:37 UTC +00:00]]
1254
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1255
+
1256
+ Sent mail to to1@example.com, to2@example.com (9ms)
1257
+ Date: Sun, 22 Dec 2013 07:13:37 -0500
1258
+ From: from1@example.com
1259
+ Reply-To: reply_to@example.com
1260
+ To: to1@example.com,
1261
+ to2@example.com
1262
+ Cc: cc1@example.com,
1263
+ cc2@example.com
1264
+ Message-ID: <52b6d77176302_2ba13fd8d4c606dc25988@dgeb1.mail>
1265
+ Subject: Hiya!
1266
+ Mime-Version: 1.0
1267
+ Content-Type: text/plain;
1268
+ charset=UTF-8
1269
+ Content-Transfer-Encoding: 7bit
1270
+
1271
+ Papaya
1272
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1273
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1274
+  (0.2ms) rollback transaction
1275
+  (0.0ms) begin transaction
1276
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1277
+ Rendered sample_mailer/hello.text.erb (0.0ms)
1278
+  (0.0ms) SAVEPOINT active_record_1
1279
+ SQL (0.3ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Sun, 22 Dec 2013 07:13:37 -0500\r\nFrom: from@example.com\r\nTo: to@example.com\r\nMessage-ID: <52b6d77179718_2ba13fd8d4c606dc26020@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:13:37 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:13:37 UTC +00:00]]
1280
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1281
+
1282
+ Sent mail to to@example.com (5ms)
1283
+ Date: Sun, 22 Dec 2013 07:13:37 -0500
1284
+ From: from@example.com
1285
+ To: to@example.com
1286
+ Message-ID: <52b6d77179718_2ba13fd8d4c606dc26020@dgeb1.mail>
1287
+ Subject: Hiya!
1288
+ Mime-Version: 1.0
1289
+ Content-Type: text/plain;
1290
+ charset=UTF-8
1291
+ Content-Transfer-Encoding: 7bit
1292
+
1293
+ Papaya
1294
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1295
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1296
+  (0.3ms) rollback transaction
1297
+  (0.0ms) begin transaction
1298
+  (0.1ms) SELECT COUNT(*) FROM "emails"
1299
+ Rendered sample_mailer/hello.text.erb (0.0ms)
1300
+  (0.0ms) SAVEPOINT active_record_1
1301
+ SQL (0.3ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Sun, 22 Dec 2013 07:13:37 -0500\r\nfrom: from.@example.com\r\nto: to@to@example.com\r\nMessage-ID: <52b6d7717c093_2ba13fd8d4c606dc26146@dgeb1.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Sun, 22 Dec 2013 12:13:37 UTC +00:00], ["from_address", "from.@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@to@example.com"], ["updated_at", Sun, 22 Dec 2013 12:13:37 UTC +00:00]]
1302
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1303
+
1304
+ Sent mail to to@to@example.com (4ms)
1305
+ Date: Sun, 22 Dec 2013 07:13:37 -0500
1306
+ from: from.@example.com
1307
+ to: to@to@example.com
1308
+ Message-ID: <52b6d7717c093_2ba13fd8d4c606dc26146@dgeb1.mail>
1309
+ Subject: Hiya!
1310
+ Mime-Version: 1.0
1311
+ Content-Type: text/plain;
1312
+ charset=UTF-8
1313
+ Content-Transfer-Encoding: 7bit
1314
+
1315
+ Papaya
1316
+  (0.0ms) SELECT COUNT(*) FROM "emails"
1317
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
1318
+  (0.5ms) rollback transaction
1319
+  (0.2ms) begin transaction
1320
+  (0.0ms) SAVEPOINT active_record_1
1321
+ SQL (0.3ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc"], ["cc_address", "cc"], ["content", "content"], ["created_at", Sun, 22 Dec 2013 12:13:37 UTC +00:00], ["from_address", "from"], ["reply_to_address", "reply_to"], ["sent_at", nil], ["subject", "subject"], ["to_address", "to"], ["updated_at", Sun, 22 Dec 2013 12:13:37 UTC +00:00]]
1322
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1323
+  (0.2ms) rollback transaction
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe "Email" do
3
+ describe Mailhopper::Email do
4
4
  let(:email) { Mailhopper::Email.new }
5
5
 
6
6
  it "should require a from address" do
@@ -54,7 +54,7 @@ describe "Email" do
54
54
  it "should be generated even when mail is sent to invalid addresses" do
55
55
  headers = {
56
56
  :from => 'from.@example.com',
57
- :to => 'to.@example.com',
57
+ :to => 'to@to@example.com',
58
58
  :cc => nil,
59
59
  :bcc => nil,
60
60
  :reply_to => nil,
@@ -64,6 +64,35 @@ describe "Email" do
64
64
 
65
65
  generate_and_verify_email(headers, content)
66
66
  end
67
+
68
+ describe '#create_from_mail' do
69
+
70
+ subject { Mailhopper::Email }
71
+
72
+ let(:mail) do
73
+ double('mail', {
74
+ :from => 'from',
75
+ :to => 'to',
76
+ :cc => 'cc',
77
+ :bcc => 'bcc',
78
+ :reply_to => 'reply_to',
79
+ :subject => 'subject',
80
+ :to_s => 'content'
81
+ })
82
+ end
83
+
84
+ it 'creates successully with all data populated right' do
85
+ email = subject.send(:create_from_mail, mail)
86
+ assert email.valid?
87
+ assert_equal 'to', email.to_address
88
+ assert_equal 'from', email.from_address
89
+ assert_equal 'cc', email.cc_address
90
+ assert_equal 'bcc', email.bcc_address
91
+ assert_equal 'reply_to', email.reply_to_address
92
+ assert_equal 'subject', email.subject
93
+ assert_equal 'content', email.content
94
+ end
95
+ end
67
96
  end
68
97
 
69
98
  private
metadata CHANGED
@@ -1,49 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailhopper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dan Gebhardt
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-05-08 00:00:00.000000000 Z
11
+ date: 2013-12-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
- requirement: &70327828773120 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 3.1.0
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *70327828773120
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 3.1.0
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: sqlite3
27
- requirement: &70327828772620 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ! '>='
31
+ - - '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: 1.3.4
33
34
  type: :development
34
35
  prerelease: false
35
- version_requirements: *70327828772620
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.3.4
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: rspec-rails
38
- requirement: &70327828772240 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
- - - ! '>='
45
+ - - '>='
42
46
  - !ruby/object:Gem::Version
43
47
  version: '0'
44
48
  type: :development
45
49
  prerelease: false
46
- version_requirements: *70327828772240
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
47
55
  description: Mailhopper stores your application's emails in an ActiveRecord queue
48
56
  for asynchronous delivery. Use Mailhopper in combination with a delivery agent such
49
57
  as DelayedMailhopper.
@@ -106,27 +114,26 @@ files:
106
114
  - spec/spec_helper.rb
107
115
  homepage: https://github.com/cerebris/mailhopper
108
116
  licenses: []
117
+ metadata: {}
109
118
  post_install_message:
110
119
  rdoc_options: []
111
120
  require_paths:
112
121
  - lib
113
122
  required_ruby_version: !ruby/object:Gem::Requirement
114
- none: false
115
123
  requirements:
116
- - - ! '>='
124
+ - - '>='
117
125
  - !ruby/object:Gem::Version
118
126
  version: '0'
119
127
  required_rubygems_version: !ruby/object:Gem::Requirement
120
- none: false
121
128
  requirements:
122
- - - ! '>='
129
+ - - '>='
123
130
  - !ruby/object:Gem::Version
124
131
  version: '0'
125
132
  requirements: []
126
133
  rubyforge_project:
127
- rubygems_version: 1.8.15
134
+ rubygems_version: 2.1.11
128
135
  signing_key:
129
- specification_version: 3
136
+ specification_version: 4
130
137
  summary: A simple ActiveRecord-based email queue for Rails apps.
131
138
  test_files:
132
139
  - spec/dummy/app/assets/javascripts/application.js