maildown 0.0.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96676395a1034211a073736fb9ad48f51c72f27e
4
- data.tar.gz: 8b692775e6eb4c32ef8f8df0b9e8d28cdef09b2b
3
+ metadata.gz: 847ff20b1b3ab1e407996c247ee581b2a6478fe6
4
+ data.tar.gz: 962b050fb870616662467fcb9e79f6d5f736478b
5
5
  SHA512:
6
- metadata.gz: bb24c61487732d5614d8acd7b2185796117fc228a983b25f64ce7676a7c2a772712fd973b9ba3ef971a0b0735d127c00104de22b2d6f332b023746cd8c0db365
7
- data.tar.gz: 51a03c20a0d74aabccae9a49965842a1727f6b0eb38bb448f71bb0bf8eeb9babaa581a0feffaf83e8e3180d430ea42f08332630c98f4b5e02ef10f9d6e54fc7d
6
+ metadata.gz: 417ef54f34355c7dec1ca652f7abbf59eaed13909c0a1abf767322be219b65efc1a2259545fea1b6a7ca372b06bf6aefb144b1d13d6b8a6c29871da617405ee6
7
+ data.tar.gz: 0ebc3e520263090547dcbe213da6cbd36c4cb01dbbffe85e27a0ee6d5f2124b33ce93432626c2e149e3e16364c37bf86ed514f1fded9022a14253be02c174c25
data/Rakefile CHANGED
@@ -18,7 +18,6 @@ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
18
  load 'rails/tasks/engine.rake'
19
19
 
20
20
 
21
-
22
21
  Bundler::GemHelper.install_tasks
23
22
 
24
23
  require 'rake/testtask'
@@ -0,0 +1,19 @@
1
+ module Maildown
2
+ module MarkdownEngine
3
+ def self.to_html(string)
4
+ Thread.current[:maildown_markdown_engine_block].call(string)
5
+ end
6
+
7
+ def self.set(&block)
8
+ Thread.current[:maildown_markdown_engine_block] = block
9
+ end
10
+
11
+ def self.block
12
+ Thread.current[:maildown_markdown_engine_block]
13
+ end
14
+ end
15
+ end
16
+
17
+ Maildown::MarkdownEngine.set do |string|
18
+ Kramdown::Document.new(string).to_html
19
+ end
@@ -0,0 +1,35 @@
1
+ module Maildown
2
+ class Md
3
+ attr_accessor :string
4
+
5
+ # responses is an array of hashes containing a body: and :content_type
6
+ def initialize(responses)
7
+ @responses = responses.reject {|r| r[:content_type] == Mime::HTML.to_s || r[:content_type] == Mime::TEXT.to_s }
8
+ md_response = responses.detect {|r| r[:content_type] == Mime::MD.to_s }
9
+ if md_response.present?
10
+ @string = md_response[:body]
11
+ @responses.delete(md_response)
12
+ end
13
+ end
14
+
15
+ def to_text
16
+ string
17
+ end
18
+
19
+ def to_html
20
+ Maildown::MarkdownEngine.to_html(string)
21
+ end
22
+
23
+ def to_responses
24
+ [
25
+ { body: to_text, content_type: "text/plain"},
26
+ { body: to_html, content_type: "text/html"}
27
+ ].concat(@responses)
28
+ end
29
+
30
+
31
+ def contains_md?
32
+ string.present?
33
+ end
34
+ end
35
+ end
@@ -1,3 +1,3 @@
1
1
  module Maildown
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0.0"
3
3
  end
data/lib/maildown.rb CHANGED
@@ -1,40 +1,8 @@
1
- require "maildown/engine"
2
1
  require 'kramdown'
3
2
 
4
3
  module Maildown
5
- class Md
6
- attr_accessor :string
7
-
8
- # responses is an array of hashes containing a body: and :content_type
9
- def initialize(responses)
10
- @responses = responses.reject {|r| r[:content_type] == Mime::HTML.to_s || r[:content_type] == Mime::TEXT.to_s }
11
- md_response = responses.detect {|r| r[:content_type] == Mime::MD.to_s }
12
- if md_response.present?
13
- @string = md_response[:body]
14
- @responses.delete(md_response)
15
- end
16
- end
17
-
18
- def to_text
19
- string
20
- end
21
-
22
- def to_html
23
- Kramdown::Document.new(string).to_html
24
- end
25
-
26
- def to_responses
27
- [
28
- { body: to_text, content_type: "text/plain"},
29
- { body: to_html, content_type: "text/html"}
30
- ].concat(@responses)
31
- end
32
-
33
-
34
- def contains_md?
35
- string.present?
36
- end
37
- end
38
4
  end
39
5
 
6
+ require 'maildown/markdown_engine'
7
+ require 'maildown/md'
40
8
  require 'maildown/ext/action_mailer'
@@ -1,4 +1,3 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
- mount Maildown::Engine => "/maildown"
4
3
  end
@@ -1,252 +1,17 @@
1
-  (0.2ms) begin transaction
2
- -------------------
3
- MaildownTest: test_
4
- -------------------
5
-  (0.1ms) rollback transaction
6
-  (0.1ms) begin transaction
7
- ------------------------
8
- MaildownTest: test_truth
9
- ------------------------
10
-  (0.0ms) rollback transaction
11
-  (0.2ms) begin transaction
12
- -------------------
13
- MaildownTest: test_
14
- -------------------
15
-  (0.2ms) rollback transaction
16
-  (0.1ms) begin transaction
17
- ------------------------
18
- MaildownTest: test_truth
19
- ------------------------
20
-  (0.1ms) rollback transaction
21
-  (0.2ms) begin transaction
22
- -------------------
23
- MaildownTest: test_
24
- -------------------
25
-  (0.1ms) rollback transaction
26
-  (0.1ms) begin transaction
27
- ------------------------
28
- MaildownTest: test_truth
29
- ------------------------
30
-  (0.0ms) rollback transaction
31
-  (0.3ms) begin transaction
32
- ------------------------------------
33
- MaildownTest: test_no_md_in_response
34
- ------------------------------------
35
-  (0.0ms) rollback transaction
36
-  (0.0ms) begin transaction
37
- ------------------------------------
38
- MaildownTest: test_parse_md_response
39
- ------------------------------------
40
-  (0.1ms) rollback transaction
41
-  (0.0ms) begin transaction
42
- ------------------------
43
- MaildownTest: test_truth
44
- ------------------------
45
-  (0.0ms) rollback transaction
46
1
   (0.3ms) begin transaction
47
- --------------------------
48
- ExtActionMailerTest: test_
49
- --------------------------
50
-  (0.2ms) rollback transaction
51
-  (0.1ms) begin transaction
52
- ------------------------------------
53
- MaildownTest: test_no_md_in_response
54
- ------------------------------------
55
-  (0.1ms) rollback transaction
56
-  (0.1ms) begin transaction
57
- ------------------------------------
58
- MaildownTest: test_parse_md_response
59
- ------------------------------------
60
-  (0.1ms) rollback transaction
61
-  (0.1ms) begin transaction
62
- ------------------------
63
- MaildownTest: test_truth
64
- ------------------------
65
-  (0.1ms) rollback transaction
66
-  (0.2ms) begin transaction
67
- --------------------------
68
- ExtActionMailerTest: test_
69
- --------------------------
70
-  (0.1ms) rollback transaction
71
-  (0.1ms) begin transaction
72
- ------------------------------------
73
- MaildownTest: test_no_md_in_response
74
- ------------------------------------
75
-  (0.1ms) rollback transaction
76
-  (0.0ms) begin transaction
77
- ------------------------------------
78
- MaildownTest: test_parse_md_response
79
- ------------------------------------
80
-  (0.1ms) rollback transaction
81
-  (0.0ms) begin transaction
82
- ------------------------
83
- MaildownTest: test_truth
84
- ------------------------
85
-  (0.0ms) rollback transaction
86
-  (0.2ms) begin transaction
87
- --------------------------
88
- ExtActionMailerTest: test_
89
- --------------------------
90
-  (0.2ms) rollback transaction
91
-  (0.1ms) begin transaction
92
- ------------------------------------
93
- MaildownTest: test_no_md_in_response
94
- ------------------------------------
95
-  (0.1ms) rollback transaction
96
-  (0.1ms) begin transaction
97
- ------------------------------------
98
- MaildownTest: test_parse_md_response
99
- ------------------------------------
100
-  (0.1ms) rollback transaction
101
-  (0.0ms) begin transaction
102
- ------------------------
103
- MaildownTest: test_truth
104
- ------------------------
105
-  (0.0ms) rollback transaction
106
-  (0.2ms) begin transaction
107
- --------------------------
108
- ExtActionMailerTest: test_
109
- --------------------------
110
-  (0.2ms) rollback transaction
111
-  (0.1ms) begin transaction
112
- ------------------------------------
113
- MaildownTest: test_no_md_in_response
114
- ------------------------------------
115
-  (0.1ms) rollback transaction
116
-  (0.0ms) begin transaction
117
- ------------------------------------
118
- MaildownTest: test_parse_md_response
119
- ------------------------------------
120
-  (0.1ms) rollback transaction
121
-  (0.1ms) begin transaction
122
- ------------------------
123
- MaildownTest: test_truth
124
- ------------------------
125
-  (0.1ms) rollback transaction
126
-  (0.2ms) begin transaction
127
- --------------------------
128
- ExtActionMailerTest: test_
129
- --------------------------
130
-  (0.2ms) rollback transaction
131
-  (0.1ms) begin transaction
132
- ------------------------------------
133
- MaildownTest: test_no_md_in_response
134
- ------------------------------------
135
-  (0.1ms) rollback transaction
136
-  (0.1ms) begin transaction
137
- ------------------------------------
138
- MaildownTest: test_parse_md_response
139
- ------------------------------------
140
-  (0.1ms) rollback transaction
141
-  (0.0ms) begin transaction
142
- ------------------------
143
- MaildownTest: test_truth
144
- ------------------------
145
-  (0.0ms) rollback transaction
146
-  (0.2ms) begin transaction
147
- --------------------------
148
- ExtActionMailerTest: test_
149
- --------------------------
150
-  (0.0ms) rollback transaction
151
-  (0.0ms) begin transaction
152
- ------------------------------------
153
- MaildownTest: test_no_md_in_response
154
- ------------------------------------
155
-  (0.0ms) rollback transaction
156
-  (0.0ms) begin transaction
157
- ------------------------------------
158
- MaildownTest: test_parse_md_response
159
- ------------------------------------
2
+ -----------------------------------------------------------
3
+ ExtActionMailerTest: test_correctly_registered_md_mime_type
4
+ -----------------------------------------------------------
160
5
   (0.1ms) rollback transaction
161
6
   (0.0ms) begin transaction
162
- ------------------------
163
- MaildownTest: test_truth
164
- ------------------------
165
-  (0.0ms) rollback transaction
166
-  (0.2ms) begin transaction
167
- --------------------------
168
- ExtActionMailerTest: test_
169
- --------------------------
170
-  (0.0ms) rollback transaction
171
-  (0.0ms) begin transaction
172
- ------------------------------------
173
- MaildownTest: test_no_md_in_response
174
- ------------------------------------
175
-  (0.0ms) rollback transaction
176
-  (0.1ms) begin transaction
177
- ------------------------------------
178
- MaildownTest: test_parse_md_response
179
- ------------------------------------
180
-  (0.1ms) rollback transaction
181
-  (0.1ms) begin transaction
182
- ------------------------
183
- MaildownTest: test_truth
184
- ------------------------
185
-  (0.0ms) rollback transaction
186
-  (0.2ms) begin transaction
187
- --------------------------
188
- ExtActionMailerTest: test_
189
- --------------------------
190
-  (0.2ms) rollback transaction
191
-  (0.1ms) begin transaction
192
- ------------------------------------
193
- MaildownTest: test_no_md_in_response
194
- ------------------------------------
195
-  (0.1ms) rollback transaction
196
-  (0.1ms) begin transaction
197
- ------------------------------------
198
- MaildownTest: test_parse_md_response
199
- ------------------------------------
200
-  (0.1ms) rollback transaction
201
-  (0.1ms) begin transaction
202
- ------------------------
203
- MaildownTest: test_truth
204
- ------------------------
7
+ -------------------------------------------------------------
8
+ ExtActionMailerTest: test_default_types_on_action_mailer_base
9
+ -------------------------------------------------------------
205
10
   (0.0ms) rollback transaction
206
-  (0.2ms) begin transaction
207
- --------------------------
208
- ExtActionMailerTest: test_
209
- --------------------------
210
-  (0.2ms) rollback transaction
211
-  (0.1ms) begin transaction
212
- ------------------------------------
213
- MaildownTest: test_no_md_in_response
214
- ------------------------------------
215
-  (0.1ms) rollback transaction
216
-  (0.1ms) begin transaction
217
- ------------------------------------
218
- MaildownTest: test_parse_md_response
219
- ------------------------------------
220
-  (0.1ms) rollback transaction
221
11
   (0.0ms) begin transaction
222
- ------------------------
223
- MaildownTest: test_truth
224
- ------------------------
225
-  (0.0ms) rollback transaction
226
-  (0.2ms) begin transaction
227
- --------------------------
228
- ExtActionMailerTest: test_
229
- --------------------------
230
-  (0.1ms) rollback transaction
231
-  (0.1ms) begin transaction
232
- ------------------------------------
233
- MaildownTest: test_no_md_in_response
234
- ------------------------------------
235
-  (0.0ms) rollback transaction
236
-  (0.1ms) begin transaction
237
- ------------------------------------
238
- MaildownTest: test_parse_md_response
239
- ------------------------------------
240
-  (0.0ms) rollback transaction
241
-  (0.1ms) begin transaction
242
- ------------------------
243
- MaildownTest: test_truth
244
- ------------------------
245
-  (0.0ms) rollback transaction
246
-  (0.2ms) begin transaction
247
- --------------------------
248
- ExtActionMailerTest: test_
249
- --------------------------
12
+ ----------------------------------------------
13
+ ExtActionMailerTest: test_monkeypatch_location
14
+ ----------------------------------------------
250
15
   (0.0ms) rollback transaction
251
16
   (0.0ms) begin transaction
252
17
  ------------------------------------
@@ -256,43 +21,23 @@ MaildownTest: test_no_md_in_response
256
21
   (0.0ms) begin transaction
257
22
  ------------------------------------
258
23
  MaildownTest: test_parse_md_response
259
- ------------------------------------
260
-  (0.0ms) rollback transaction
261
-  (0.0ms) begin transaction
262
- ------------------------
263
- MaildownTest: test_truth
264
- ------------------------
265
-  (0.0ms) rollback transaction
266
-  (0.2ms) begin transaction
267
- --------------------------
268
- ExtActionMailerTest: test_
269
- --------------------------
270
-  (0.0ms) rollback transaction
271
-  (0.0ms) begin transaction
272
- ------------------------------------
273
- MaildownTest: test_no_md_in_response
274
- ------------------------------------
275
-  (0.0ms) rollback transaction
276
-  (0.1ms) begin transaction
277
- ------------------------------------
278
- MaildownTest: test_parse_md_response
279
24
  ------------------------------------
280
25
   (0.1ms) rollback transaction
281
-  (0.1ms) begin transaction
282
- ------------------------
283
- MaildownTest: test_truth
284
- ------------------------
285
-  (0.0ms) rollback transaction
286
-  (0.2ms) begin transaction
26
+  (0.5ms) begin transaction
287
27
  -----------------------------------------------------------
288
28
  ExtActionMailerTest: test_correctly_registered_md_mime_type
289
29
  -----------------------------------------------------------
290
-  (0.0ms) rollback transaction
30
+  (0.1ms) rollback transaction
291
31
   (0.1ms) begin transaction
292
32
  -------------------------------------------------------------
293
33
  ExtActionMailerTest: test_default_types_on_action_mailer_base
294
34
  -------------------------------------------------------------
295
-  (0.2ms) rollback transaction
35
+  (0.1ms) rollback transaction
36
+  (0.1ms) begin transaction
37
+ ----------------------------------------------
38
+ ExtActionMailerTest: test_monkeypatch_location
39
+ ----------------------------------------------
40
+  (0.1ms) rollback transaction
296
41
   (0.1ms) begin transaction
297
42
  ------------------------------------
298
43
  MaildownTest: test_no_md_in_response
@@ -303,22 +48,22 @@ MaildownTest: test_no_md_in_response
303
48
  MaildownTest: test_parse_md_response
304
49
  ------------------------------------
305
50
   (0.1ms) rollback transaction
306
-  (0.1ms) begin transaction
307
- ------------------------
308
- MaildownTest: test_truth
309
- ------------------------
310
-  (0.0ms) rollback transaction
311
-  (0.2ms) begin transaction
51
+  (0.3ms) begin transaction
312
52
  -----------------------------------------------------------
313
53
  ExtActionMailerTest: test_correctly_registered_md_mime_type
314
54
  -----------------------------------------------------------
315
55
   (0.1ms) rollback transaction
316
-  (0.0ms) begin transaction
56
+  (0.1ms) begin transaction
317
57
  -------------------------------------------------------------
318
58
  ExtActionMailerTest: test_default_types_on_action_mailer_base
319
59
  -------------------------------------------------------------
320
60
   (0.0ms) rollback transaction
321
61
   (0.0ms) begin transaction
62
+ ----------------------------------------------
63
+ ExtActionMailerTest: test_monkeypatch_location
64
+ ----------------------------------------------
65
+  (0.0ms) rollback transaction
66
+  (0.0ms) begin transaction
322
67
  ------------------------------------
323
68
  MaildownTest: test_no_md_in_response
324
69
  ------------------------------------
@@ -329,51 +74,51 @@ MaildownTest: test_parse_md_response
329
74
  ------------------------------------
330
75
   (0.1ms) rollback transaction
331
76
   (0.0ms) begin transaction
332
- ------------------------
333
- MaildownTest: test_truth
334
- ------------------------
335
-  (0.0ms) rollback transaction
77
+ ---------------------------------------
78
+ MarkdownEngineTest: test_can_set_engine
79
+ ---------------------------------------
80
+  (0.1ms) rollback transaction
336
81
   (0.2ms) begin transaction
337
82
  -----------------------------------------------------------
338
83
  ExtActionMailerTest: test_correctly_registered_md_mime_type
339
84
  -----------------------------------------------------------
340
85
   (0.0ms) rollback transaction
341
-  (0.0ms) begin transaction
86
+  (0.1ms) begin transaction
342
87
  -------------------------------------------------------------
343
88
  ExtActionMailerTest: test_default_types_on_action_mailer_base
344
89
  -------------------------------------------------------------
345
90
   (0.0ms) rollback transaction
346
-  (0.0ms) begin transaction
91
+  (0.1ms) begin transaction
347
92
  ----------------------------------------------
348
93
  ExtActionMailerTest: test_monkeypatch_location
349
94
  ----------------------------------------------
350
-  (0.2ms) rollback transaction
351
-  (0.1ms) begin transaction
95
+  (0.0ms) rollback transaction
96
+  (0.0ms) begin transaction
352
97
  ------------------------------------
353
98
  MaildownTest: test_no_md_in_response
354
99
  ------------------------------------
355
-  (0.1ms) rollback transaction
100
+  (0.0ms) rollback transaction
356
101
   (0.1ms) begin transaction
357
102
  ------------------------------------
358
103
  MaildownTest: test_parse_md_response
359
104
  ------------------------------------
360
105
   (0.1ms) rollback transaction
361
106
   (0.0ms) begin transaction
362
- ------------------------
363
- MaildownTest: test_truth
364
- ------------------------
365
-  (0.0ms) rollback transaction
107
+ ---------------------------------------
108
+ MarkdownEngineTest: test_can_set_engine
109
+ ---------------------------------------
110
+  (0.1ms) rollback transaction
366
111
   (0.2ms) begin transaction
367
112
  -----------------------------------------------------------
368
113
  ExtActionMailerTest: test_correctly_registered_md_mime_type
369
114
  -----------------------------------------------------------
370
115
   (0.0ms) rollback transaction
371
-  (0.0ms) begin transaction
116
+  (0.1ms) begin transaction
372
117
  -------------------------------------------------------------
373
118
  ExtActionMailerTest: test_default_types_on_action_mailer_base
374
119
  -------------------------------------------------------------
375
120
   (0.0ms) rollback transaction
376
-  (0.0ms) begin transaction
121
+  (0.1ms) begin transaction
377
122
  ----------------------------------------------
378
123
  ExtActionMailerTest: test_monkeypatch_location
379
124
  ----------------------------------------------
@@ -383,21 +128,21 @@ ExtActionMailerTest: test_monkeypatch_location
383
128
  MaildownTest: test_no_md_in_response
384
129
  ------------------------------------
385
130
   (0.0ms) rollback transaction
386
-  (0.0ms) begin transaction
131
+  (0.1ms) begin transaction
387
132
  ------------------------------------
388
133
  MaildownTest: test_parse_md_response
389
134
  ------------------------------------
390
135
   (0.1ms) rollback transaction
391
136
   (0.0ms) begin transaction
392
- ------------------------
393
- MaildownTest: test_truth
394
- ------------------------
137
+ ---------------------------------------
138
+ MarkdownEngineTest: test_can_set_engine
139
+ ---------------------------------------
395
140
   (0.0ms) rollback transaction
396
-  (0.2ms) begin transaction
141
+  (0.3ms) begin transaction
397
142
  -----------------------------------------------------------
398
143
  ExtActionMailerTest: test_correctly_registered_md_mime_type
399
144
  -----------------------------------------------------------
400
-  (0.0ms) rollback transaction
145
+  (0.1ms) rollback transaction
401
146
   (0.0ms) begin transaction
402
147
  -------------------------------------------------------------
403
148
  ExtActionMailerTest: test_default_types_on_action_mailer_base
@@ -418,8 +163,8 @@ MaildownTest: test_no_md_in_response
418
163
  MaildownTest: test_parse_md_response
419
164
  ------------------------------------
420
165
   (0.1ms) rollback transaction
421
-  (0.1ms) begin transaction
422
- ------------------------
423
- MaildownTest: test_truth
424
- ------------------------
166
+  (0.0ms) begin transaction
167
+ ---------------------------------------
168
+ MarkdownEngineTest: test_can_set_engine
169
+ ---------------------------------------
425
170
   (0.0ms) rollback transaction
data/test/test_helper.rb CHANGED
@@ -10,9 +10,9 @@ Rails.backtrace_cleaner.remove_silencers!
10
10
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
11
 
12
12
  # Load fixtures from the engine
13
- if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
- ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
- end
13
+ # if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ # ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ # end
16
16
 
17
17
 
18
18
  def orig_text_response
@@ -7,7 +7,6 @@ class MaildownTest < ActiveSupport::TestCase
7
7
  assert_equal parses_responses, md.to_responses
8
8
  end
9
9
 
10
-
11
10
  test "no md in response" do
12
11
  md = ::Maildown::Md.new([])
13
12
  refute md.contains_md?
@@ -0,0 +1,19 @@
1
+ require 'test_helper'
2
+
3
+ class MarkdownEngineTest < ActiveSupport::TestCase
4
+
5
+ def setup
6
+ @default_setup = Maildown::MarkdownEngine.block
7
+ end
8
+
9
+ def teardown
10
+ Maildown::MarkdownEngine.set(&@default_setup)
11
+ end
12
+
13
+ test "can set engine" do
14
+ Maildown::MarkdownEngine.set do |text|
15
+ "foo: #{text}"
16
+ end
17
+ assert_equal "foo: bar", Maildown::MarkdownEngine.to_html("bar")
18
+ end
19
+ 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: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - schneems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-30 00:00:00.000000000 Z
11
+ date: 2013-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '>'
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.0
19
+ version: 4.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '>'
25
25
  - !ruby/object:Gem::Version
26
- version: 3.2.0
26
+ version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: kramdown
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -60,14 +60,9 @@ executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - app/assets/javascripts/maildown/application.js
64
- - app/assets/stylesheets/maildown/application.css
65
- - app/controllers/maildown/application_controller.rb
66
- - app/helpers/maildown/application_helper.rb
67
- - app/views/layouts/maildown/application.html.erb
68
- - config/routes.rb
69
- - lib/maildown/engine.rb
70
63
  - lib/maildown/ext/action_mailer.rb
64
+ - lib/maildown/markdown_engine.rb
65
+ - lib/maildown/md.rb
71
66
  - lib/maildown/version.rb
72
67
  - lib/maildown.rb
73
68
  - lib/tasks/maildown_tasks.rake
@@ -106,11 +101,10 @@ files:
106
101
  - test/dummy/public/favicon.ico
107
102
  - test/dummy/Rakefile
108
103
  - test/dummy/README.rdoc
109
- - test/integration/navigation_test.rb
110
- - test/maildown_test.rb
111
104
  - test/test_helper.rb
112
105
  - test/unit/ext_action_mailer_test.rb
113
106
  - test/unit/maildown_test.rb
107
+ - test/unit/markdown_engine_test.rb
114
108
  homepage: https://www.github.com/schneems/maildown
115
109
  licenses:
116
110
  - MIT
@@ -169,8 +163,7 @@ test_files:
169
163
  - test/dummy/public/favicon.ico
170
164
  - test/dummy/Rakefile
171
165
  - test/dummy/README.rdoc
172
- - test/integration/navigation_test.rb
173
- - test/maildown_test.rb
174
166
  - test/test_helper.rb
175
167
  - test/unit/ext_action_mailer_test.rb
176
168
  - test/unit/maildown_test.rb
169
+ - test/unit/markdown_engine_test.rb
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,13 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require_tree .
13
- */
@@ -1,4 +0,0 @@
1
- module Maildown
2
- class ApplicationController < ActionController::Base
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module Maildown
2
- module ApplicationHelper
3
- end
4
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Maildown</title>
5
- <%= stylesheet_link_tag "maildown/application", media: "all" %>
6
- <%= javascript_include_tag "maildown/application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
data/config/routes.rb DELETED
@@ -1,2 +0,0 @@
1
- Maildown::Engine.routes.draw do
2
- end
@@ -1,5 +0,0 @@
1
- module Maildown
2
- class Engine < ::Rails::Engine
3
- isolate_namespace Maildown
4
- end
5
- end
@@ -1,10 +0,0 @@
1
- require 'test_helper'
2
-
3
- class NavigationTest < ActionDispatch::IntegrationTest
4
- fixtures :all
5
-
6
- # test "the truth" do
7
- # assert true
8
- # end
9
- end
10
-
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class MaildownTest < ActiveSupport::TestCase
4
- test "truth" do
5
- assert_kind_of Module, Maildown
6
- end
7
- end