maildown 3.0.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/maildown.rb +2 -8
  3. data/lib/maildown/ext/action_mailer.rb +25 -3
  4. data/lib/maildown/handlers/markdown.rb +19 -8
  5. data/lib/maildown/markdown_engine.rb +3 -3
  6. data/lib/maildown/version.rb +1 -1
  7. data/test/dummy/db/test.sqlite3 +0 -0
  8. data/test/dummy/log/test.log +3806 -0
  9. data/test/dummy/tmp/cache/assets/sprockets/v3.0/A3/A3kbR-mx77BuTQCXH_ow0ly8c8774_qjKkbRwg7o7Z8.cache +0 -0
  10. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ky/KyPopZ9bAZSzDxl0-5H4oSWt6v3Hscx-IqtKCez5N6M.cache +1 -0
  11. data/test/dummy/tmp/cache/assets/sprockets/v3.0/LQ/LQc7CZbqyqSrstnlW82z5LYgsBPDE-bOnyAvkzwGyZE.cache +1 -0
  12. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Qs/QsuZC0N-5s9LoiQKU5bmb9ddCBVsqqcG23hRRSzaNzI.cache +1 -0
  13. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Sg/SgGPXJGAAT9BnlD8lOEY30CrwX2Ww8GNvkz1_06BUuY.cache +0 -0
  14. data/test/dummy/tmp/cache/assets/sprockets/v3.0/XL/XL_FTz0ksBA62QtuUFTEXWp6sbxjcinWNxVRvwewdVQ.cache +0 -0
  15. data/test/dummy/tmp/cache/assets/sprockets/v3.0/bG/bGAz7aV3zTfJzCyTFZJ3JHHiggWMmTL8_sjwIrZof48.cache +0 -0
  16. data/test/dummy/tmp/cache/assets/sprockets/v3.0/hN/hNuDCLtFB8vWAB97u08o2jUz_JOaHtcRL85mfok6rKE.cache +0 -0
  17. data/test/dummy/tmp/cache/assets/sprockets/v3.0/hj/hj8Ir9wcVSy1KYrnWu9bpD24vDhCG3tvt-nKbNxb1Wg.cache +2 -0
  18. data/test/dummy/tmp/cache/assets/sprockets/v3.0/hz/hzfOEnv86cyXvfNc1ID57ERgXFQbUWy0mA_2kb8RMf8.cache +1 -0
  19. data/test/dummy/tmp/cache/assets/sprockets/v3.0/lL/lLPqCyZWuBhuo1Cc2h2NkRzr8qk4bog-PvgUZj9eD9A.cache +0 -0
  20. data/test/dummy/tmp/cache/assets/sprockets/v3.0/oC/oCsZTGZyV4kH8Y4OeSDUdrwfkJFPzTODZjuBKZB8oGQ.cache +2 -0
  21. data/test/dummy/tmp/cache/assets/sprockets/v3.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache +2 -0
  22. data/test/dummy/tmp/cache/assets/sprockets/v3.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache +2 -0
  23. data/test/dummy/tmp/cache/assets/sprockets/v3.0/xq/xqUVzvrduT5J0NftyOoRYuGT8PShk-KqKJrZbf_u63o.cache +1 -0
  24. data/test/dummy/tmp/cache/assets/sprockets/v3.0/zj/zjBh6TAy1PfMo7ob2ifDemYXiSU1gF4Hed-g-jXHYuQ.cache +0 -0
  25. data/test/integration/double_compile_test.rb +26 -0
  26. data/test/test_helper.rb +1 -1
  27. data/test/unit/markdown_engine_test.rb +7 -0
  28. metadata +54 -5
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=ada4fa17742b37385e89ba67e6d8af49929b5ca8cc3234d9a62c4bb0757943bb:ET
@@ -0,0 +1 @@
1
+ I"}app/assets/stylesheets/application.css?type=text/css&id=bf4247462cce58f66f3e5ff69a49606ddc7a11a00c7ad22c31d24cd45e2ae386:ET
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&id=ce936b985ee9308a9e845243ca539cbe9df2122b2f770ced76da8c4b3ad986c8:ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"8file-digest://app/assets/javascripts/application.js;TTI")file-digest://app/assets/javascripts;TTF
@@ -0,0 +1 @@
1
+ "%��Rm�v�S3.��O�L���ڹc�ƕq�=_j�
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI")file-digest://app/assets/javascripts;TTF
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"9file-digest://app/assets/stylesheets/application.css;TTI")file-digest://app/assets/stylesheets;TTF
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"9file-digest://app/assets/stylesheets/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI")file-digest://app/assets/stylesheets;TTF
@@ -0,0 +1 @@
1
+ I"�app/assets/stylesheets/application.css?type=text/css&pipeline=self&id=7cfb171258ad1295b0c37fac5318148f2277c4ecf7b1cb074a27557c8b618255:ET
@@ -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
@@ -3,7 +3,7 @@ ENV["RAILS_ENV"] = "test"
3
3
 
4
4
  require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
5
  require "rails/test_help"
6
- require "kramdown"
6
+ require "kramdown-parser-gfm"
7
7
 
8
8
  Rails.backtrace_cleaner.remove_silencers!
9
9
 
@@ -34,4 +34,11 @@ class MarkdownEngineTest < ActiveSupport::TestCase
34
34
  end
35
35
  thread.join
36
36
  end
37
+
38
+ test "handles code fences (GFM)" do
39
+ markdown = "```\nbar\n```"
40
+
41
+ actual = Maildown::MarkdownEngine.to_html(markdown)
42
+ assert_equal "<pre><code>bar\n</code></pre>\n", actual
43
+ end
37
44
  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.2.0
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: 2020-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: kramdown
28
+ name: kramdown-parser-gfm
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: m
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: sqlite3
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -135,6 +149,7 @@ files:
135
149
  - test/dummy/config/initializers/wrap_parameters.rb
136
150
  - test/dummy/config/locales/en.yml
137
151
  - test/dummy/config/routes.rb
152
+ - test/dummy/db/test.sqlite3
138
153
  - test/dummy/log/development.log
139
154
  - test/dummy/log/test.log
140
155
  - test/dummy/public/404.html
@@ -145,6 +160,23 @@ files:
145
160
  - test/dummy/test/mailers/previews/user_with_layout_mailer_preview.rb
146
161
  - test/dummy/test/mailers/user_no_layout_mailer_test.rb
147
162
  - test/dummy/test/mailers/user_with_layout_mailer_test.rb
163
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/A3/A3kbR-mx77BuTQCXH_ow0ly8c8774_qjKkbRwg7o7Z8.cache
164
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/Ky/KyPopZ9bAZSzDxl0-5H4oSWt6v3Hscx-IqtKCez5N6M.cache
165
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/LQ/LQc7CZbqyqSrstnlW82z5LYgsBPDE-bOnyAvkzwGyZE.cache
166
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/Qs/QsuZC0N-5s9LoiQKU5bmb9ddCBVsqqcG23hRRSzaNzI.cache
167
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/Sg/SgGPXJGAAT9BnlD8lOEY30CrwX2Ww8GNvkz1_06BUuY.cache
168
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/XL/XL_FTz0ksBA62QtuUFTEXWp6sbxjcinWNxVRvwewdVQ.cache
169
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/bG/bGAz7aV3zTfJzCyTFZJ3JHHiggWMmTL8_sjwIrZof48.cache
170
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/hN/hNuDCLtFB8vWAB97u08o2jUz_JOaHtcRL85mfok6rKE.cache
171
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/hj/hj8Ir9wcVSy1KYrnWu9bpD24vDhCG3tvt-nKbNxb1Wg.cache
172
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/hz/hzfOEnv86cyXvfNc1ID57ERgXFQbUWy0mA_2kb8RMf8.cache
173
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/lL/lLPqCyZWuBhuo1Cc2h2NkRzr8qk4bog-PvgUZj9eD9A.cache
174
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/oC/oCsZTGZyV4kH8Y4OeSDUdrwfkJFPzTODZjuBKZB8oGQ.cache
175
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache
176
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache
177
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/xq/xqUVzvrduT5J0NftyOoRYuGT8PShk-KqKJrZbf_u63o.cache
178
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/zj/zjBh6TAy1PfMo7ob2ifDemYXiSU1gF4Hed-g-jXHYuQ.cache
179
+ - test/integration/double_compile_test.rb
148
180
  - test/integration/layouts_test.rb
149
181
  - test/integration/strip_leading_whitespace_test.rb
150
182
  - test/integration/template_handler_test.rb
@@ -170,8 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
202
  - !ruby/object:Gem::Version
171
203
  version: '0'
172
204
  requirements: []
173
- rubyforge_project:
174
- rubygems_version: 2.7.6
205
+ rubygems_version: 3.1.2
175
206
  signing_key:
176
207
  specification_version: 4
177
208
  summary: Markdown in your mailbox
@@ -224,9 +255,27 @@ test_files:
224
255
  - test/dummy/public/422.html
225
256
  - test/dummy/public/500.html
226
257
  - test/dummy/public/404.html
258
+ - test/dummy/db/test.sqlite3
227
259
  - test/dummy/log/test.log
228
260
  - test/dummy/log/development.log
261
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/zj/zjBh6TAy1PfMo7ob2ifDemYXiSU1gF4Hed-g-jXHYuQ.cache
262
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/A3/A3kbR-mx77BuTQCXH_ow0ly8c8774_qjKkbRwg7o7Z8.cache
263
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/hj/hj8Ir9wcVSy1KYrnWu9bpD24vDhCG3tvt-nKbNxb1Wg.cache
264
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/Ky/KyPopZ9bAZSzDxl0-5H4oSWt6v3Hscx-IqtKCez5N6M.cache
265
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/LQ/LQc7CZbqyqSrstnlW82z5LYgsBPDE-bOnyAvkzwGyZE.cache
266
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/oC/oCsZTGZyV4kH8Y4OeSDUdrwfkJFPzTODZjuBKZB8oGQ.cache
267
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/lL/lLPqCyZWuBhuo1Cc2h2NkRzr8qk4bog-PvgUZj9eD9A.cache
268
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/Qs/QsuZC0N-5s9LoiQKU5bmb9ddCBVsqqcG23hRRSzaNzI.cache
269
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache
270
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache
271
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/Sg/SgGPXJGAAT9BnlD8lOEY30CrwX2Ww8GNvkz1_06BUuY.cache
272
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/hz/hzfOEnv86cyXvfNc1ID57ERgXFQbUWy0mA_2kb8RMf8.cache
273
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/bG/bGAz7aV3zTfJzCyTFZJ3JHHiggWMmTL8_sjwIrZof48.cache
274
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/hN/hNuDCLtFB8vWAB97u08o2jUz_JOaHtcRL85mfok6rKE.cache
275
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/xq/xqUVzvrduT5J0NftyOoRYuGT8PShk-KqKJrZbf_u63o.cache
276
+ - test/dummy/tmp/cache/assets/sprockets/v3.0/XL/XL_FTz0ksBA62QtuUFTEXWp6sbxjcinWNxVRvwewdVQ.cache
229
277
  - test/dummy/README.rdoc
278
+ - test/integration/double_compile_test.rb
230
279
  - test/integration/strip_leading_whitespace_test.rb
231
280
  - test/integration/template_handler_test.rb
232
281
  - test/integration/layouts_test.rb