maildown 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26ca653dc43004e76229cd6ae163a8f67b3682cefa478b6daf03c5322e8877c1
4
- data.tar.gz: e4cf385979d5adcd82a6b020065a616f936db4b7f692d81f7d90ffa908614284
3
+ metadata.gz: 565cecc9d799393b149e2d4289024db58219df50de4eb298ad99487eed3206f9
4
+ data.tar.gz: aa846495adfa838b91624c5dfa4471954089be82d5e99a02214fffbc37d660a6
5
5
  SHA512:
6
- metadata.gz: eab147c20f6c250e74a4f018f0a1ca0dfb568ad357ab17f7bcc1745b255e1519f1a7f6af0f97e71192d33e1a610e3fdfa7c4241c03883c6b49ce570112c48f9d
7
- data.tar.gz: 3ea0e175ea11f1abb2d706aaeed2eac4f36e5b2859b141a2a5b74526caeeb5c745e98c156caf9191ab96629a8557b3580f3502c9dbd342ddbbb70d7639d6ec9b
6
+ metadata.gz: c308e46c646243ffbb371dee63f4a3d4f3a21912f2516839ca178ba1e0d2d623e0831a0f45ce4b2f9ce5a638501f9fd7eda42a2881e3cbbf45e2bdd78066896f
7
+ data.tar.gz: e56677bba8f4dcdc6a74bfd9bbf4ef60550765fbb4cac47bc2a854db9237ef1eb7314e2266744b58b2da1c606ee36a3a6395fb78a3ee7d18d1e6f42ee801589c
@@ -45,10 +45,15 @@ class ActionMailer::Base
45
45
  return templates if templates.first.handler != Maildown::Handlers::Markdown
46
46
 
47
47
  html_template = templates.first
48
- text_template = html_template.dup
49
- formats = html_template.formats.dup.tap { |f| f.delete(:html) }
48
+ text_template = html_template.instance_variable_get(:"@maildown_text_template")
49
+ if text_template.nil?
50
+ text_template = html_template.dup
51
+ formats = html_template.formats.dup.tap { |f| f.delete(:html) }
52
+
53
+ text_template.formats = formats
54
+ html_template.instance_variable_set(:"@maildown_text_template", text_template)
55
+ end
50
56
 
51
- text_template.formats = formats
52
57
  return [html_template, text_template]
53
58
  end
54
59
  end
@@ -1,3 +1,3 @@
1
1
  module Maildown
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
@@ -26388,3 +26388,788 @@ Content-Transfer-Encoding: 7bit
26388
26388
 
26389
26389
  ----==_mimepart_5aa98f563dfce_146d33ff750840ee08883f--
26390
26390
 
26391
+ ---------------------------------------
26392
+ MarkdownEngineTest: test_can_set_engine
26393
+ ---------------------------------------
26394
+ ----------------------------------------------------------------
26395
+ MarkdownEngineTest: test_custom_engine_works_in_multiple_threads
26396
+ ----------------------------------------------------------------
26397
+ ----------------------------------------------------------
26398
+ MarkdownEngineTest: test_default_works_in_multiple_threads
26399
+ ----------------------------------------------------------
26400
+ ----------------------------------------------------
26401
+ TemplateHandlerTest: test_strip_whitespace_templates
26402
+ ----------------------------------------------------
26403
+ Rendering user_no_layout_mailer/leading_whitespace.md+erb
26404
+ Rendered user_no_layout_mailer/leading_whitespace.md+erb (1.3ms)
26405
+ Rendering user_no_layout_mailer/leading_whitespace.md+erb
26406
+ Rendered user_no_layout_mailer/leading_whitespace.md+erb (0.1ms)
26407
+ UserNoLayoutMailer#leading_whitespace: processed outbound mail in 173.8ms
26408
+ Sent mail to foo@example.com (7.8ms)
26409
+ Date: Wed, 14 Mar 2018 22:41:05 -0500
26410
+ From: from@example.com
26411
+ Reply-To: noreply@schneems.com
26412
+ To: foo@example.com
26413
+ Message-ID: <5aa9eb51a75fe_16c893fd2a2840ddc76325@rschneeman-ltm4.internal.salesforce.com.mail>
26414
+ Subject: hello world
26415
+ Mime-Version: 1.0
26416
+ Content-Type: multipart/alternative;
26417
+ boundary="--==_mimepart_5aa9eb51a5e04_16c893fd2a2840ddc762eb";
26418
+ charset=UTF-8
26419
+ Content-Transfer-Encoding: 7bit
26420
+
26421
+
26422
+ ----==_mimepart_5aa9eb51a5e04_16c893fd2a2840ddc762eb
26423
+ Content-Type: text/plain;
26424
+ charset=UTF-8
26425
+ Content-Transfer-Encoding: 7bit
26426
+
26427
+ ## Leading
26428
+
26429
+ ----==_mimepart_5aa9eb51a5e04_16c893fd2a2840ddc762eb
26430
+ Content-Type: text/html;
26431
+ charset=UTF-8
26432
+ Content-Transfer-Encoding: 7bit
26433
+
26434
+ <h2 id="leading">Leading</h2>
26435
+
26436
+ ----==_mimepart_5aa9eb51a5e04_16c893fd2a2840ddc762eb--
26437
+
26438
+ ---------------------------------------------------
26439
+ TemplateHandlerTest: test_dont_whitespace_templates
26440
+ ---------------------------------------------------
26441
+ Rendering user_no_layout_mailer/leading_whitespace_again.md+erb
26442
+ Rendered user_no_layout_mailer/leading_whitespace_again.md+erb (3.2ms)
26443
+ Rendering user_no_layout_mailer/leading_whitespace_again.md+erb
26444
+ Rendered user_no_layout_mailer/leading_whitespace_again.md+erb (0.2ms)
26445
+ UserNoLayoutMailer#leading_whitespace_again: processed outbound mail in 28.1ms
26446
+ Sent mail to foo@example.com (1.9ms)
26447
+ Date: Wed, 14 Mar 2018 22:41:05 -0500
26448
+ From: from@example.com
26449
+ Reply-To: noreply@schneems.com
26450
+ To: foo@example.com
26451
+ Message-ID: <5aa9eb51af35e_16c893fd2a2840ddc76523@rschneeman-ltm4.internal.salesforce.com.mail>
26452
+ Subject: hello world
26453
+ Mime-Version: 1.0
26454
+ Content-Type: multipart/alternative;
26455
+ boundary="--==_mimepart_5aa9eb51aee61_16c893fd2a2840ddc764f3";
26456
+ charset=UTF-8
26457
+ Content-Transfer-Encoding: 7bit
26458
+
26459
+
26460
+ ----==_mimepart_5aa9eb51aee61_16c893fd2a2840ddc764f3
26461
+ Content-Type: text/plain;
26462
+ charset=UTF-8
26463
+ Content-Transfer-Encoding: 7bit
26464
+
26465
+ ## Leading again
26466
+
26467
+ ----==_mimepart_5aa9eb51aee61_16c893fd2a2840ddc764f3
26468
+ Content-Type: text/html;
26469
+ charset=UTF-8
26470
+ Content-Transfer-Encoding: 7bit
26471
+
26472
+ <pre><code> ## Leading again
26473
+ </code></pre>
26474
+
26475
+ ----==_mimepart_5aa9eb51aee61_16c893fd2a2840ddc764f3--
26476
+
26477
+ ----------------------------------------------
26478
+ TemplateHandlerTest: test_.md_template_handler
26479
+ ----------------------------------------------
26480
+ Started GET "/handlers/plain_markdown" for 127.0.0.1 at 2018-03-14 22:41:05 -0500
26481
+ Processing by HandlersController#show as HTML
26482
+ Parameters: {"id"=>"plain_markdown"}
26483
+ Rendering handlers/plain_markdown.html.md within layouts/application
26484
+ Rendered handlers/plain_markdown.html.md within layouts/application (0.8ms)
26485
+ Completed 200 OK in 9ms (Views: 8.4ms)
26486
+ ----------------------------------------
26487
+ TemplateHandlerTest: test_dual_templates
26488
+ ----------------------------------------
26489
+ Rendering user_no_layout_mailer/contact.md.erb
26490
+ Rendered user_no_layout_mailer/contact.md.erb (0.8ms)
26491
+ Rendering user_no_layout_mailer/contact.md.erb
26492
+ Rendered user_no_layout_mailer/contact.md.erb (0.2ms)
26493
+ UserNoLayoutMailer#contact: processed outbound mail in 27.6ms
26494
+ Sent mail to foo@example.com (2.9ms)
26495
+ Date: Wed, 14 Mar 2018 22:41:05 -0500
26496
+ From: from@example.com
26497
+ Reply-To: noreply@schneems.com
26498
+ To: foo@example.com
26499
+ Message-ID: <5aa9eb51c2c22_16c893fd2a2840ddc767ec@rschneeman-ltm4.internal.salesforce.com.mail>
26500
+ Subject: hello world
26501
+ Mime-Version: 1.0
26502
+ Content-Type: multipart/alternative;
26503
+ boundary="--==_mimepart_5aa9eb51c2417_16c893fd2a2840ddc766d8";
26504
+ charset=UTF-8
26505
+ Content-Transfer-Encoding: 7bit
26506
+
26507
+
26508
+ ----==_mimepart_5aa9eb51c2417_16c893fd2a2840ddc766d8
26509
+ Content-Type: text/plain;
26510
+ charset=UTF-8
26511
+ Content-Transfer-Encoding: 7bit
26512
+
26513
+ Dual templates **rock**!
26514
+
26515
+ ----==_mimepart_5aa9eb51c2417_16c893fd2a2840ddc766d8
26516
+ Content-Type: text/html;
26517
+ charset=UTF-8
26518
+ Content-Transfer-Encoding: 7bit
26519
+
26520
+ <p>Dual templates <strong>rock</strong>!</p>
26521
+
26522
+ ----==_mimepart_5aa9eb51c2417_16c893fd2a2840ddc766d8--
26523
+
26524
+ ----------------------------------------------
26525
+ ExtActionMailerTest: test_monkeypatch_location
26526
+ ----------------------------------------------
26527
+ -------------------------------------
26528
+ LayoutsTest: test_layout_renders_fine
26529
+ -------------------------------------
26530
+ Rendering user_with_layout_mailer/welcome.md+erb within layouts/mail_layout
26531
+ Rendered user_with_layout_mailer/welcome.md+erb within layouts/mail_layout (0.7ms)
26532
+ Rendering user_with_layout_mailer/welcome.md+erb within layouts/mail_layout
26533
+ Rendered user_with_layout_mailer/welcome.md+erb within layouts/mail_layout (0.2ms)
26534
+ UserWithLayoutMailer#welcome: processed outbound mail in 31.3ms
26535
+ Sent mail to foo@example.com (2.0ms)
26536
+ Date: Wed, 14 Mar 2018 22:41:05 -0500
26537
+ From: from@example.com
26538
+ Reply-To: noreply@schneems.com
26539
+ To: foo@example.com
26540
+ Message-ID: <5aa9eb51cc1f3_16c893fd2a2840ddc76947@rschneeman-ltm4.internal.salesforce.com.mail>
26541
+ Subject: hello world
26542
+ Mime-Version: 1.0
26543
+ Content-Type: multipart/alternative;
26544
+ boundary="--==_mimepart_5aa9eb51cbd1a_16c893fd2a2840ddc7682e";
26545
+ charset=UTF-8
26546
+ Content-Transfer-Encoding: 7bit
26547
+
26548
+
26549
+ ----==_mimepart_5aa9eb51cbd1a_16c893fd2a2840ddc7682e
26550
+ Content-Type: text/plain;
26551
+ charset=UTF-8
26552
+ Content-Transfer-Encoding: 7bit
26553
+
26554
+ TEXT## Welcome!
26555
+
26556
+
26557
+ ----==_mimepart_5aa9eb51cbd1a_16c893fd2a2840ddc7682e
26558
+ Content-Type: text/html;
26559
+ charset=UTF-8
26560
+ Content-Transfer-Encoding: 7bit
26561
+
26562
+ HTML<h2 id="welcome">Welcome!</h2>
26563
+
26564
+ ----==_mimepart_5aa9eb51cbd1a_16c893fd2a2840ddc7682e--
26565
+
26566
+ ---------------------------
26567
+ LayoutsTest: test_no_layout
26568
+ ---------------------------
26569
+ Rendering user_no_layout_mailer/welcome.md+erb
26570
+ Rendered user_no_layout_mailer/welcome.md+erb (1.3ms)
26571
+ Rendering user_no_layout_mailer/welcome.md+erb
26572
+ Rendered user_no_layout_mailer/welcome.md+erb (0.2ms)
26573
+ UserNoLayoutMailer#welcome: processed outbound mail in 30.8ms
26574
+ Sent mail to foo@example.com (2.2ms)
26575
+ Date: Wed, 14 Mar 2018 22:41:05 -0500
26576
+ From: from@example.com
26577
+ Reply-To: noreply@schneems.com
26578
+ To: foo@example.com
26579
+ Message-ID: <5aa9eb51d465f_16c893fd2a2840ddc77174@rschneeman-ltm4.internal.salesforce.com.mail>
26580
+ Subject: hello world
26581
+ Mime-Version: 1.0
26582
+ Content-Type: multipart/alternative;
26583
+ boundary="--==_mimepart_5aa9eb51d379f_16c893fd2a2840ddc770ec";
26584
+ charset=UTF-8
26585
+ Content-Transfer-Encoding: 7bit
26586
+
26587
+
26588
+ ----==_mimepart_5aa9eb51d379f_16c893fd2a2840ddc770ec
26589
+ Content-Type: text/plain;
26590
+ charset=UTF-8
26591
+ Content-Transfer-Encoding: 7bit
26592
+
26593
+ ## Welcome!
26594
+
26595
+ ----==_mimepart_5aa9eb51d379f_16c893fd2a2840ddc770ec
26596
+ Content-Type: text/html;
26597
+ charset=UTF-8
26598
+ Content-Transfer-Encoding: 7bit
26599
+
26600
+ <h2 id="welcome">Welcome!</h2>
26601
+
26602
+ ----==_mimepart_5aa9eb51d379f_16c893fd2a2840ddc770ec--
26603
+
26604
+ ----------------------------------------------
26605
+ ExtActionMailerTest: test_monkeypatch_location
26606
+ ----------------------------------------------
26607
+ ----------------------------------------
26608
+ TemplateHandlerTest: test_dual_templates
26609
+ ----------------------------------------
26610
+ Rendering user_no_layout_mailer/contact.md.erb
26611
+ Rendered user_no_layout_mailer/contact.md.erb (50.8ms)
26612
+ Rendering user_no_layout_mailer/contact.md.erb
26613
+ Rendered user_no_layout_mailer/contact.md.erb (0.2ms)
26614
+ UserNoLayoutMailer#contact: processed outbound mail in 232.2ms
26615
+ Sent mail to foo@example.com (11.1ms)
26616
+ Date: Wed, 14 Mar 2018 22:43:12 -0500
26617
+ From: from@example.com
26618
+ Reply-To: noreply@schneems.com
26619
+ To: foo@example.com
26620
+ Message-ID: <5aa9ebd0290e6_16d103fc64a840ddc16767@rschneeman-ltm4.internal.salesforce.com.mail>
26621
+ Subject: hello world
26622
+ Mime-Version: 1.0
26623
+ Content-Type: multipart/alternative;
26624
+ boundary="--==_mimepart_5aa9ebd026f7d_16d103fc64a840ddc16621";
26625
+ charset=UTF-8
26626
+ Content-Transfer-Encoding: 7bit
26627
+
26628
+
26629
+ ----==_mimepart_5aa9ebd026f7d_16d103fc64a840ddc16621
26630
+ Content-Type: text/plain;
26631
+ charset=UTF-8
26632
+ Content-Transfer-Encoding: 7bit
26633
+
26634
+ Dual templates **rock**!
26635
+
26636
+ ----==_mimepart_5aa9ebd026f7d_16d103fc64a840ddc16621
26637
+ Content-Type: text/html;
26638
+ charset=UTF-8
26639
+ Content-Transfer-Encoding: 7bit
26640
+
26641
+ <p>Dual templates <strong>rock</strong>!</p>
26642
+
26643
+ ----==_mimepart_5aa9ebd026f7d_16d103fc64a840ddc16621--
26644
+
26645
+ ----------------------------------------------
26646
+ TemplateHandlerTest: test_.md_template_handler
26647
+ ----------------------------------------------
26648
+ Started GET "/handlers/plain_markdown" for 127.0.0.1 at 2018-03-14 22:43:12 -0500
26649
+ Processing by HandlersController#show as HTML
26650
+ Parameters: {"id"=>"plain_markdown"}
26651
+ Rendering handlers/plain_markdown.html.md within layouts/application
26652
+ Rendered handlers/plain_markdown.html.md within layouts/application (0.6ms)
26653
+ Completed 200 OK in 7ms (Views: 7.3ms)
26654
+ ---------------------------------------------------
26655
+ TemplateHandlerTest: test_dont_whitespace_templates
26656
+ ---------------------------------------------------
26657
+ Rendering user_no_layout_mailer/leading_whitespace_again.md+erb
26658
+ Rendered user_no_layout_mailer/leading_whitespace_again.md+erb (3.2ms)
26659
+ Rendering user_no_layout_mailer/leading_whitespace_again.md+erb
26660
+ Rendered user_no_layout_mailer/leading_whitespace_again.md+erb (0.2ms)
26661
+ UserNoLayoutMailer#leading_whitespace_again: processed outbound mail in 31.0ms
26662
+ Sent mail to foo@example.com (2.6ms)
26663
+ Date: Wed, 14 Mar 2018 22:43:12 -0500
26664
+ From: from@example.com
26665
+ Reply-To: noreply@schneems.com
26666
+ To: foo@example.com
26667
+ Message-ID: <5aa9ebd03d756_16d103fc64a840ddc169d9@rschneeman-ltm4.internal.salesforce.com.mail>
26668
+ Subject: hello world
26669
+ Mime-Version: 1.0
26670
+ Content-Type: multipart/alternative;
26671
+ boundary="--==_mimepart_5aa9ebd03c6b3_16d103fc64a840ddc1689c";
26672
+ charset=UTF-8
26673
+ Content-Transfer-Encoding: 7bit
26674
+
26675
+
26676
+ ----==_mimepart_5aa9ebd03c6b3_16d103fc64a840ddc1689c
26677
+ Content-Type: text/plain;
26678
+ charset=UTF-8
26679
+ Content-Transfer-Encoding: 7bit
26680
+
26681
+ ## Leading again
26682
+
26683
+ ----==_mimepart_5aa9ebd03c6b3_16d103fc64a840ddc1689c
26684
+ Content-Type: text/html;
26685
+ charset=UTF-8
26686
+ Content-Transfer-Encoding: 7bit
26687
+
26688
+ <pre><code> ## Leading again
26689
+ </code></pre>
26690
+
26691
+ ----==_mimepart_5aa9ebd03c6b3_16d103fc64a840ddc1689c--
26692
+
26693
+ ----------------------------------------------------
26694
+ TemplateHandlerTest: test_strip_whitespace_templates
26695
+ ----------------------------------------------------
26696
+ Rendering user_no_layout_mailer/leading_whitespace.md+erb
26697
+ Rendered user_no_layout_mailer/leading_whitespace.md+erb (0.9ms)
26698
+ Rendering user_no_layout_mailer/leading_whitespace.md+erb
26699
+ Rendered user_no_layout_mailer/leading_whitespace.md+erb (0.1ms)
26700
+ UserNoLayoutMailer#leading_whitespace: processed outbound mail in 29.0ms
26701
+ Sent mail to foo@example.com (2.7ms)
26702
+ Date: Wed, 14 Mar 2018 22:43:12 -0500
26703
+ From: from@example.com
26704
+ Reply-To: noreply@schneems.com
26705
+ To: foo@example.com
26706
+ Message-ID: <5aa9ebd045740_16d103fc64a840ddc17158@rschneeman-ltm4.internal.salesforce.com.mail>
26707
+ Subject: hello world
26708
+ Mime-Version: 1.0
26709
+ Content-Type: multipart/alternative;
26710
+ boundary="--==_mimepart_5aa9ebd044e4f_16d103fc64a840ddc1701";
26711
+ charset=UTF-8
26712
+ Content-Transfer-Encoding: 7bit
26713
+
26714
+
26715
+ ----==_mimepart_5aa9ebd044e4f_16d103fc64a840ddc1701
26716
+ Content-Type: text/plain;
26717
+ charset=UTF-8
26718
+ Content-Transfer-Encoding: 7bit
26719
+
26720
+ ## Leading
26721
+
26722
+ ----==_mimepart_5aa9ebd044e4f_16d103fc64a840ddc1701
26723
+ Content-Type: text/html;
26724
+ charset=UTF-8
26725
+ Content-Transfer-Encoding: 7bit
26726
+
26727
+ <h2 id="leading">Leading</h2>
26728
+
26729
+ ----==_mimepart_5aa9ebd044e4f_16d103fc64a840ddc1701--
26730
+
26731
+ ---------------------------------
26732
+ DoubleCompileTest: test_no_layout
26733
+ ---------------------------------
26734
+ Rendering user_no_layout_mailer/welcome.md+erb
26735
+ Rendered user_no_layout_mailer/welcome.md+erb (1.3ms)
26736
+ Rendering user_no_layout_mailer/welcome.md+erb
26737
+ Rendered user_no_layout_mailer/welcome.md+erb (0.2ms)
26738
+ UserNoLayoutMailer#welcome: processed outbound mail in 29.3ms
26739
+ Sent mail to foo@example.com (2.2ms)
26740
+ Date: Wed, 14 Mar 2018 22:43:12 -0500
26741
+ From: from@example.com
26742
+ Reply-To: noreply@schneems.com
26743
+ To: foo@example.com
26744
+ Message-ID: <5aa9ebd04dd8d_16d103fc64a840ddc17313@rschneeman-ltm4.internal.salesforce.com.mail>
26745
+ Subject: hello world
26746
+ Mime-Version: 1.0
26747
+ Content-Type: multipart/alternative;
26748
+ boundary="--==_mimepart_5aa9ebd04d7dd_16d103fc64a840ddc1723c";
26749
+ charset=UTF-8
26750
+ Content-Transfer-Encoding: 7bit
26751
+
26752
+
26753
+ ----==_mimepart_5aa9ebd04d7dd_16d103fc64a840ddc1723c
26754
+ Content-Type: text/plain;
26755
+ charset=UTF-8
26756
+ Content-Transfer-Encoding: 7bit
26757
+
26758
+ ## Welcome!
26759
+
26760
+ ----==_mimepart_5aa9ebd04d7dd_16d103fc64a840ddc1723c
26761
+ Content-Type: text/html;
26762
+ charset=UTF-8
26763
+ Content-Transfer-Encoding: 7bit
26764
+
26765
+ <h2 id="welcome">Welcome!</h2>
26766
+
26767
+ ----==_mimepart_5aa9ebd04d7dd_16d103fc64a840ddc1723c--
26768
+
26769
+ Rendering user_no_layout_mailer/welcome.md+erb
26770
+ Rendered user_no_layout_mailer/welcome.md+erb (0.4ms)
26771
+ Rendering user_no_layout_mailer/welcome.md+erb
26772
+ Rendered user_no_layout_mailer/welcome.md+erb (0.3ms)
26773
+ UserNoLayoutMailer#welcome: processed outbound mail in 2.1ms
26774
+ Sent mail to foo@example.com (1.9ms)
26775
+ Date: Wed, 14 Mar 2018 22:43:12 -0500
26776
+ From: from@example.com
26777
+ Reply-To: noreply@schneems.com
26778
+ To: foo@example.com
26779
+ Message-ID: <5aa9ebd04ef8c_16d103fc64a840ddc175c7@rschneeman-ltm4.internal.salesforce.com.mail>
26780
+ Subject: hello world
26781
+ Mime-Version: 1.0
26782
+ Content-Type: multipart/alternative;
26783
+ boundary="--==_mimepart_5aa9ebd04eaa7_16d103fc64a840ddc174fd";
26784
+ charset=UTF-8
26785
+ Content-Transfer-Encoding: 7bit
26786
+
26787
+
26788
+ ----==_mimepart_5aa9ebd04eaa7_16d103fc64a840ddc174fd
26789
+ Content-Type: text/html;
26790
+ charset=UTF-8
26791
+ Content-Transfer-Encoding: 7bit
26792
+
26793
+ <h2 id="welcome">Welcome!</h2>
26794
+
26795
+ ----==_mimepart_5aa9ebd04eaa7_16d103fc64a840ddc174fd
26796
+ Content-Type: text/html;
26797
+ charset=UTF-8
26798
+ Content-Transfer-Encoding: 7bit
26799
+
26800
+ <h2 id="welcome">Welcome!</h2>
26801
+
26802
+ ----==_mimepart_5aa9ebd04eaa7_16d103fc64a840ddc174fd--
26803
+
26804
+ -------------------------------------
26805
+ LayoutsTest: test_layout_renders_fine
26806
+ -------------------------------------
26807
+ Rendering user_with_layout_mailer/welcome.md+erb within layouts/mail_layout
26808
+ Rendered user_with_layout_mailer/welcome.md+erb within layouts/mail_layout (0.8ms)
26809
+ Rendering user_with_layout_mailer/welcome.md+erb within layouts/mail_layout
26810
+ Rendered user_with_layout_mailer/welcome.md+erb within layouts/mail_layout (0.2ms)
26811
+ UserWithLayoutMailer#welcome: processed outbound mail in 32.9ms
26812
+ Sent mail to foo@example.com (2.3ms)
26813
+ Date: Wed, 14 Mar 2018 22:43:12 -0500
26814
+ From: from@example.com
26815
+ Reply-To: noreply@schneems.com
26816
+ To: foo@example.com
26817
+ Message-ID: <5aa9ebd0587e8_16d103fc64a840ddc17710@rschneeman-ltm4.internal.salesforce.com.mail>
26818
+ Subject: hello world
26819
+ Mime-Version: 1.0
26820
+ Content-Type: multipart/alternative;
26821
+ boundary="--==_mimepart_5aa9ebd058177_16d103fc64a840ddc176c5";
26822
+ charset=UTF-8
26823
+ Content-Transfer-Encoding: 7bit
26824
+
26825
+
26826
+ ----==_mimepart_5aa9ebd058177_16d103fc64a840ddc176c5
26827
+ Content-Type: text/plain;
26828
+ charset=UTF-8
26829
+ Content-Transfer-Encoding: 7bit
26830
+
26831
+ TEXT## Welcome!
26832
+
26833
+
26834
+ ----==_mimepart_5aa9ebd058177_16d103fc64a840ddc176c5
26835
+ Content-Type: text/html;
26836
+ charset=UTF-8
26837
+ Content-Transfer-Encoding: 7bit
26838
+
26839
+ HTML<h2 id="welcome">Welcome!</h2>
26840
+
26841
+ ----==_mimepart_5aa9ebd058177_16d103fc64a840ddc176c5--
26842
+
26843
+ ---------------------------
26844
+ LayoutsTest: test_no_layout
26845
+ ---------------------------
26846
+ Rendering user_no_layout_mailer/welcome.md+erb
26847
+ Rendered user_no_layout_mailer/welcome.md+erb (0.5ms)
26848
+ Rendering user_no_layout_mailer/welcome.md+erb
26849
+ Rendered user_no_layout_mailer/welcome.md+erb (0.4ms)
26850
+ UserNoLayoutMailer#welcome: processed outbound mail in 2.1ms
26851
+ Sent mail to foo@example.com (2.3ms)
26852
+ Date: Wed, 14 Mar 2018 22:43:12 -0500
26853
+ From: from@example.com
26854
+ Reply-To: noreply@schneems.com
26855
+ To: foo@example.com
26856
+ Message-ID: <5aa9ebd059c5c_16d103fc64a840ddc17919@rschneeman-ltm4.internal.salesforce.com.mail>
26857
+ Subject: hello world
26858
+ Mime-Version: 1.0
26859
+ Content-Type: multipart/alternative;
26860
+ boundary="--==_mimepart_5aa9ebd059746_16d103fc64a840ddc178e2";
26861
+ charset=UTF-8
26862
+ Content-Transfer-Encoding: 7bit
26863
+
26864
+
26865
+ ----==_mimepart_5aa9ebd059746_16d103fc64a840ddc178e2
26866
+ Content-Type: text/html;
26867
+ charset=UTF-8
26868
+ Content-Transfer-Encoding: 7bit
26869
+
26870
+ <h2 id="welcome">Welcome!</h2>
26871
+
26872
+ ----==_mimepart_5aa9ebd059746_16d103fc64a840ddc178e2
26873
+ Content-Type: text/html;
26874
+ charset=UTF-8
26875
+ Content-Transfer-Encoding: 7bit
26876
+
26877
+ <h2 id="welcome">Welcome!</h2>
26878
+
26879
+ ----==_mimepart_5aa9ebd059746_16d103fc64a840ddc178e2--
26880
+
26881
+ ---------------------------------------
26882
+ MarkdownEngineTest: test_can_set_engine
26883
+ ---------------------------------------
26884
+ ----------------------------------------------------------
26885
+ MarkdownEngineTest: test_default_works_in_multiple_threads
26886
+ ----------------------------------------------------------
26887
+ ----------------------------------------------------------------
26888
+ MarkdownEngineTest: test_custom_engine_works_in_multiple_threads
26889
+ ----------------------------------------------------------------
26890
+ -------------------------------------------------------------
26891
+ DoubleCompileTest: test_rendering_the_same_layout_twice_works
26892
+ -------------------------------------------------------------
26893
+ Rendering user_no_layout_mailer/welcome.md+erb
26894
+ Rendered user_no_layout_mailer/welcome.md+erb (34.8ms)
26895
+ Rendering user_no_layout_mailer/welcome.md+erb
26896
+ Rendered user_no_layout_mailer/welcome.md+erb (0.2ms)
26897
+ UserNoLayoutMailer#welcome: processed outbound mail in 61.8ms
26898
+ Sent mail to foo@example.com (4.2ms)
26899
+ Date: Wed, 14 Mar 2018 22:43:44 -0500
26900
+ From: from@example.com
26901
+ Reply-To: noreply@schneems.com
26902
+ To: foo@example.com
26903
+ Message-ID: <5aa9ebf02770f_16d5c3ff4ac43edd444de@rschneeman-ltm4.internal.salesforce.com.mail>
26904
+ Subject: hello world
26905
+ Mime-Version: 1.0
26906
+ Content-Type: multipart/alternative;
26907
+ boundary="--==_mimepart_5aa9ebf026b9d_16d5c3ff4ac43edd4434b";
26908
+ charset=UTF-8
26909
+ Content-Transfer-Encoding: 7bit
26910
+
26911
+
26912
+ ----==_mimepart_5aa9ebf026b9d_16d5c3ff4ac43edd4434b
26913
+ Content-Type: text/plain;
26914
+ charset=UTF-8
26915
+ Content-Transfer-Encoding: 7bit
26916
+
26917
+ ## Welcome!
26918
+
26919
+ ----==_mimepart_5aa9ebf026b9d_16d5c3ff4ac43edd4434b
26920
+ Content-Type: text/html;
26921
+ charset=UTF-8
26922
+ Content-Transfer-Encoding: 7bit
26923
+
26924
+ <h2 id="welcome">Welcome!</h2>
26925
+
26926
+ ----==_mimepart_5aa9ebf026b9d_16d5c3ff4ac43edd4434b--
26927
+
26928
+ Rendering user_no_layout_mailer/welcome.md+erb
26929
+ Rendered user_no_layout_mailer/welcome.md+erb (0.3ms)
26930
+ Rendering user_no_layout_mailer/welcome.md+erb
26931
+ Rendered user_no_layout_mailer/welcome.md+erb (0.0ms)
26932
+ UserNoLayoutMailer#welcome: processed outbound mail in 1.7ms
26933
+ Sent mail to foo@example.com (3.5ms)
26934
+ Date: Wed, 14 Mar 2018 22:43:44 -0500
26935
+ From: from@example.com
26936
+ Reply-To: noreply@schneems.com
26937
+ To: foo@example.com
26938
+ Message-ID: <5aa9ebf028ffe_16d5c3ff4ac43edd446b3@rschneeman-ltm4.internal.salesforce.com.mail>
26939
+ Subject: hello world
26940
+ Mime-Version: 1.0
26941
+ Content-Type: multipart/alternative;
26942
+ boundary="--==_mimepart_5aa9ebf028482_16d5c3ff4ac43edd4457c";
26943
+ charset=UTF-8
26944
+ Content-Transfer-Encoding: 7bit
26945
+
26946
+
26947
+ ----==_mimepart_5aa9ebf028482_16d5c3ff4ac43edd4457c
26948
+ Content-Type: text/plain;
26949
+ charset=UTF-8
26950
+ Content-Transfer-Encoding: 7bit
26951
+
26952
+ ## Welcome!
26953
+
26954
+ ----==_mimepart_5aa9ebf028482_16d5c3ff4ac43edd4457c
26955
+ Content-Type: text/html;
26956
+ charset=UTF-8
26957
+ Content-Transfer-Encoding: 7bit
26958
+
26959
+ <h2 id="welcome">Welcome!</h2>
26960
+
26961
+ ----==_mimepart_5aa9ebf028482_16d5c3ff4ac43edd4457c--
26962
+
26963
+ ---------------------------------------------------
26964
+ TemplateHandlerTest: test_dont_whitespace_templates
26965
+ ---------------------------------------------------
26966
+ Rendering user_no_layout_mailer/leading_whitespace_again.md+erb
26967
+ Rendered user_no_layout_mailer/leading_whitespace_again.md+erb (1.9ms)
26968
+ Rendering user_no_layout_mailer/leading_whitespace_again.md+erb
26969
+ Rendered user_no_layout_mailer/leading_whitespace_again.md+erb (0.2ms)
26970
+ UserNoLayoutMailer#leading_whitespace_again: processed outbound mail in 28.3ms
26971
+ Sent mail to foo@example.com (2.3ms)
26972
+ Date: Wed, 14 Mar 2018 22:43:44 -0500
26973
+ From: from@example.com
26974
+ Reply-To: noreply@schneems.com
26975
+ To: foo@example.com
26976
+ Message-ID: <5aa9ebf0309d6_16d5c3ff4ac43edd44878@rschneeman-ltm4.internal.salesforce.com.mail>
26977
+ Subject: hello world
26978
+ Mime-Version: 1.0
26979
+ Content-Type: multipart/alternative;
26980
+ boundary="--==_mimepart_5aa9ebf0303a7_16d5c3ff4ac43edd44742";
26981
+ charset=UTF-8
26982
+ Content-Transfer-Encoding: 7bit
26983
+
26984
+
26985
+ ----==_mimepart_5aa9ebf0303a7_16d5c3ff4ac43edd44742
26986
+ Content-Type: text/plain;
26987
+ charset=UTF-8
26988
+ Content-Transfer-Encoding: 7bit
26989
+
26990
+ ## Leading again
26991
+
26992
+ ----==_mimepart_5aa9ebf0303a7_16d5c3ff4ac43edd44742
26993
+ Content-Type: text/html;
26994
+ charset=UTF-8
26995
+ Content-Transfer-Encoding: 7bit
26996
+
26997
+ <pre><code> ## Leading again
26998
+ </code></pre>
26999
+
27000
+ ----==_mimepart_5aa9ebf0303a7_16d5c3ff4ac43edd44742--
27001
+
27002
+ ----------------------------------------------------
27003
+ TemplateHandlerTest: test_strip_whitespace_templates
27004
+ ----------------------------------------------------
27005
+ Rendering user_no_layout_mailer/leading_whitespace.md+erb
27006
+ Rendered user_no_layout_mailer/leading_whitespace.md+erb (0.8ms)
27007
+ Rendering user_no_layout_mailer/leading_whitespace.md+erb
27008
+ Rendered user_no_layout_mailer/leading_whitespace.md+erb (0.1ms)
27009
+ UserNoLayoutMailer#leading_whitespace: processed outbound mail in 25.7ms
27010
+ Sent mail to foo@example.com (2.1ms)
27011
+ Date: Wed, 14 Mar 2018 22:43:44 -0500
27012
+ From: from@example.com
27013
+ Reply-To: noreply@schneems.com
27014
+ To: foo@example.com
27015
+ Message-ID: <5aa9ebf037a69_16d5c3ff4ac43edd450d6@rschneeman-ltm4.internal.salesforce.com.mail>
27016
+ Subject: hello world
27017
+ Mime-Version: 1.0
27018
+ Content-Type: multipart/alternative;
27019
+ boundary="--==_mimepart_5aa9ebf03754d_16d5c3ff4ac43edd44951";
27020
+ charset=UTF-8
27021
+ Content-Transfer-Encoding: 7bit
27022
+
27023
+
27024
+ ----==_mimepart_5aa9ebf03754d_16d5c3ff4ac43edd44951
27025
+ Content-Type: text/plain;
27026
+ charset=UTF-8
27027
+ Content-Transfer-Encoding: 7bit
27028
+
27029
+ ## Leading
27030
+
27031
+ ----==_mimepart_5aa9ebf03754d_16d5c3ff4ac43edd44951
27032
+ Content-Type: text/html;
27033
+ charset=UTF-8
27034
+ Content-Transfer-Encoding: 7bit
27035
+
27036
+ <h2 id="leading">Leading</h2>
27037
+
27038
+ ----==_mimepart_5aa9ebf03754d_16d5c3ff4ac43edd44951--
27039
+
27040
+ ----------------------------------------
27041
+ TemplateHandlerTest: test_dual_templates
27042
+ ----------------------------------------
27043
+ Rendering user_no_layout_mailer/contact.md.erb
27044
+ Rendered user_no_layout_mailer/contact.md.erb (0.8ms)
27045
+ Rendering user_no_layout_mailer/contact.md.erb
27046
+ Rendered user_no_layout_mailer/contact.md.erb (0.1ms)
27047
+ UserNoLayoutMailer#contact: processed outbound mail in 29.5ms
27048
+ Sent mail to foo@example.com (2.0ms)
27049
+ Date: Wed, 14 Mar 2018 22:43:44 -0500
27050
+ From: from@example.com
27051
+ Reply-To: noreply@schneems.com
27052
+ To: foo@example.com
27053
+ Message-ID: <5aa9ebf03f88a_16d5c3ff4ac43edd452d9@rschneeman-ltm4.internal.salesforce.com.mail>
27054
+ Subject: hello world
27055
+ Mime-Version: 1.0
27056
+ Content-Type: multipart/alternative;
27057
+ boundary="--==_mimepart_5aa9ebf03f39d_16d5c3ff4ac43edd4517e";
27058
+ charset=UTF-8
27059
+ Content-Transfer-Encoding: 7bit
27060
+
27061
+
27062
+ ----==_mimepart_5aa9ebf03f39d_16d5c3ff4ac43edd4517e
27063
+ Content-Type: text/plain;
27064
+ charset=UTF-8
27065
+ Content-Transfer-Encoding: 7bit
27066
+
27067
+ Dual templates **rock**!
27068
+
27069
+ ----==_mimepart_5aa9ebf03f39d_16d5c3ff4ac43edd4517e
27070
+ Content-Type: text/html;
27071
+ charset=UTF-8
27072
+ Content-Transfer-Encoding: 7bit
27073
+
27074
+ <p>Dual templates <strong>rock</strong>!</p>
27075
+
27076
+ ----==_mimepart_5aa9ebf03f39d_16d5c3ff4ac43edd4517e--
27077
+
27078
+ ----------------------------------------------
27079
+ TemplateHandlerTest: test_.md_template_handler
27080
+ ----------------------------------------------
27081
+ Started GET "/handlers/plain_markdown" for 127.0.0.1 at 2018-03-14 22:43:44 -0500
27082
+ Processing by HandlersController#show as HTML
27083
+ Parameters: {"id"=>"plain_markdown"}
27084
+ Rendering handlers/plain_markdown.html.md within layouts/application
27085
+ Rendered handlers/plain_markdown.html.md within layouts/application (1.0ms)
27086
+ Completed 200 OK in 10ms (Views: 9.7ms)
27087
+ -------------------------------------
27088
+ LayoutsTest: test_layout_renders_fine
27089
+ -------------------------------------
27090
+ Rendering user_with_layout_mailer/welcome.md+erb within layouts/mail_layout
27091
+ Rendered user_with_layout_mailer/welcome.md+erb within layouts/mail_layout (0.7ms)
27092
+ Rendering user_with_layout_mailer/welcome.md+erb within layouts/mail_layout
27093
+ Rendered user_with_layout_mailer/welcome.md+erb within layouts/mail_layout (0.2ms)
27094
+ UserWithLayoutMailer#welcome: processed outbound mail in 33.5ms
27095
+ Sent mail to foo@example.com (3.9ms)
27096
+ Date: Wed, 14 Mar 2018 22:43:44 -0500
27097
+ From: from@example.com
27098
+ Reply-To: noreply@schneems.com
27099
+ To: foo@example.com
27100
+ Message-ID: <5aa9ebf051f0b_16d5c3ff4ac43edd4541@rschneeman-ltm4.internal.salesforce.com.mail>
27101
+ Subject: hello world
27102
+ Mime-Version: 1.0
27103
+ Content-Type: multipart/alternative;
27104
+ boundary="--==_mimepart_5aa9ebf0517e7_16d5c3ff4ac43edd45392";
27105
+ charset=UTF-8
27106
+ Content-Transfer-Encoding: 7bit
27107
+
27108
+
27109
+ ----==_mimepart_5aa9ebf0517e7_16d5c3ff4ac43edd45392
27110
+ Content-Type: text/plain;
27111
+ charset=UTF-8
27112
+ Content-Transfer-Encoding: 7bit
27113
+
27114
+ TEXT## Welcome!
27115
+
27116
+
27117
+ ----==_mimepart_5aa9ebf0517e7_16d5c3ff4ac43edd45392
27118
+ Content-Type: text/html;
27119
+ charset=UTF-8
27120
+ Content-Transfer-Encoding: 7bit
27121
+
27122
+ HTML<h2 id="welcome">Welcome!</h2>
27123
+
27124
+ ----==_mimepart_5aa9ebf0517e7_16d5c3ff4ac43edd45392--
27125
+
27126
+ ---------------------------
27127
+ LayoutsTest: test_no_layout
27128
+ ---------------------------
27129
+ Rendering user_no_layout_mailer/welcome.md+erb
27130
+ Rendered user_no_layout_mailer/welcome.md+erb (0.5ms)
27131
+ Rendering user_no_layout_mailer/welcome.md+erb
27132
+ Rendered user_no_layout_mailer/welcome.md+erb (0.0ms)
27133
+ UserNoLayoutMailer#welcome: processed outbound mail in 2.0ms
27134
+ Sent mail to foo@example.com (2.1ms)
27135
+ Date: Wed, 14 Mar 2018 22:43:44 -0500
27136
+ From: from@example.com
27137
+ Reply-To: noreply@schneems.com
27138
+ To: foo@example.com
27139
+ Message-ID: <5aa9ebf05411a_16d5c3ff4ac43edd456fc@rschneeman-ltm4.internal.salesforce.com.mail>
27140
+ Subject: hello world
27141
+ Mime-Version: 1.0
27142
+ Content-Type: multipart/alternative;
27143
+ boundary="--==_mimepart_5aa9ebf053be2_16d5c3ff4ac43edd455f";
27144
+ charset=UTF-8
27145
+ Content-Transfer-Encoding: 7bit
27146
+
27147
+
27148
+ ----==_mimepart_5aa9ebf053be2_16d5c3ff4ac43edd455f
27149
+ Content-Type: text/plain;
27150
+ charset=UTF-8
27151
+ Content-Transfer-Encoding: 7bit
27152
+
27153
+ ## Welcome!
27154
+
27155
+ ----==_mimepart_5aa9ebf053be2_16d5c3ff4ac43edd455f
27156
+ Content-Type: text/html;
27157
+ charset=UTF-8
27158
+ Content-Transfer-Encoding: 7bit
27159
+
27160
+ <h2 id="welcome">Welcome!</h2>
27161
+
27162
+ ----==_mimepart_5aa9ebf053be2_16d5c3ff4ac43edd455f--
27163
+
27164
+ ----------------------------------------------
27165
+ ExtActionMailerTest: test_monkeypatch_location
27166
+ ----------------------------------------------
27167
+ ---------------------------------------
27168
+ MarkdownEngineTest: test_can_set_engine
27169
+ ---------------------------------------
27170
+ ----------------------------------------------------------
27171
+ MarkdownEngineTest: test_default_works_in_multiple_threads
27172
+ ----------------------------------------------------------
27173
+ ----------------------------------------------------------------
27174
+ MarkdownEngineTest: test_custom_engine_works_in_multiple_threads
27175
+ ----------------------------------------------------------------
@@ -0,0 +1,26 @@
1
+ require 'test_helper'
2
+
3
+ class DoubleCompileTest < ActionMailer::TestCase
4
+
5
+ def test_rendering_the_same_layout_twice_works
6
+ email = UserNoLayoutMailer.welcome.deliver_now
7
+ assert !ActionMailer::Base.deliveries.empty?
8
+ # Test the body of the sent email contains what we expect it to
9
+
10
+ body_contents = /<h2 id="welcome">Welcome!<\/h2>/
11
+ assert_match body_contents, email.html_part.body.to_s
12
+
13
+ body_contents = /## Welcome!/
14
+ assert_match body_contents, email.text_part.body.to_s
15
+
16
+ email = UserNoLayoutMailer.welcome.deliver_now
17
+ assert !ActionMailer::Base.deliveries.empty?
18
+ # Test the body of the sent email contains what we expect it to
19
+
20
+ body_contents = /<h2 id="welcome">Welcome!<\/h2>/
21
+ assert_match body_contents, email.html_part.body.to_s
22
+
23
+ body_contents = /## Welcome!/
24
+ assert_match body_contents, email.text_part.body.to_s
25
+ end
26
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maildown
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - schneems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-14 00:00:00.000000000 Z
11
+ date: 2018-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -145,6 +145,7 @@ files:
145
145
  - test/dummy/test/mailers/previews/user_with_layout_mailer_preview.rb
146
146
  - test/dummy/test/mailers/user_no_layout_mailer_test.rb
147
147
  - test/dummy/test/mailers/user_with_layout_mailer_test.rb
148
+ - test/integration/double_compile_test.rb
148
149
  - test/integration/layouts_test.rb
149
150
  - test/integration/strip_leading_whitespace_test.rb
150
151
  - test/integration/template_handler_test.rb
@@ -227,6 +228,7 @@ test_files:
227
228
  - test/dummy/log/test.log
228
229
  - test/dummy/log/development.log
229
230
  - test/dummy/README.rdoc
231
+ - test/integration/double_compile_test.rb
230
232
  - test/integration/strip_leading_whitespace_test.rb
231
233
  - test/integration/template_handler_test.rb
232
234
  - test/integration/layouts_test.rb