maildown 1.0.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/maildown/md.rb +3 -3
- data/lib/maildown/version.rb +1 -1
- data/test/dummy/log/test.log +70 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc3cbe06b036b2b31896e94b04c323ff7b62ee2a
|
4
|
+
data.tar.gz: 0569b01477e18c99bbb4bb5d5193b8e867878f21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cca81efba9a4c9f6e1e86243c33ca4f3e4f2678cd81270699386782da509c13b6410598b629864f436838b28134e24c6c84876f3d635a1bbd845a0fd3ec225b7
|
7
|
+
data.tar.gz: 459d8382ce237bb3c88773a45990fd3bbd85616ea6f084bde744089645fefe636efb5d8f793a87bb12742692a73bd8a53e7c28ac080836a47016567955788648
|
data/lib/maildown/md.rb
CHANGED
@@ -4,8 +4,8 @@ module Maildown
|
|
4
4
|
|
5
5
|
# responses is an array of hashes containing a body: and :content_type
|
6
6
|
def initialize(responses)
|
7
|
-
@responses = responses.reject {|r| r[:content_type] == Mime
|
8
|
-
md_response = responses.detect {|r| r[:content_type] == Mime
|
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
9
|
if md_response.present?
|
10
10
|
@string = md_response[:body]
|
11
11
|
@responses.delete(md_response)
|
@@ -32,4 +32,4 @@ module Maildown
|
|
32
32
|
string.present?
|
33
33
|
end
|
34
34
|
end
|
35
|
-
end
|
35
|
+
end
|
data/lib/maildown/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -68,3 +68,73 @@ MaildownTest: test_no_md_in_response
|
|
68
68
|
MaildownTest: test_parse_md_response
|
69
69
|
------------------------------------
|
70
70
|
[1m[35m (0.1ms)[0m rollback transaction
|
71
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
72
|
+
------------------------------------
|
73
|
+
MaildownTest: test_no_md_in_response
|
74
|
+
------------------------------------
|
75
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
76
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
77
|
+
------------------------------------
|
78
|
+
MaildownTest: test_parse_md_response
|
79
|
+
------------------------------------
|
80
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
81
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
82
|
+
-----------------------------------------------------------
|
83
|
+
ExtActionMailerTest: test_correctly_registered_md_mime_type
|
84
|
+
-----------------------------------------------------------
|
85
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
86
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
87
|
+
-------------------------------------------------------------
|
88
|
+
ExtActionMailerTest: test_default_types_on_action_mailer_base
|
89
|
+
-------------------------------------------------------------
|
90
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
91
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
92
|
+
----------------------------------------------
|
93
|
+
ExtActionMailerTest: test_monkeypatch_location
|
94
|
+
----------------------------------------------
|
95
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
96
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
97
|
+
---------------------------------------
|
98
|
+
MarkdownEngineTest: test_can_set_engine
|
99
|
+
---------------------------------------
|
100
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
101
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
102
|
+
----------------------------------------------------------
|
103
|
+
MarkdownEngineTest: test_default_works_in_multiple_threads
|
104
|
+
----------------------------------------------------------
|
105
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
106
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
107
|
+
---------------------------------------
|
108
|
+
MarkdownEngineTest: test_can_set_engine
|
109
|
+
---------------------------------------
|
110
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
111
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
112
|
+
----------------------------------------------------------
|
113
|
+
MarkdownEngineTest: test_default_works_in_multiple_threads
|
114
|
+
----------------------------------------------------------
|
115
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
116
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
117
|
+
------------------------------------
|
118
|
+
MaildownTest: test_no_md_in_response
|
119
|
+
------------------------------------
|
120
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
121
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
122
|
+
------------------------------------
|
123
|
+
MaildownTest: test_parse_md_response
|
124
|
+
------------------------------------
|
125
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
126
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
127
|
+
-----------------------------------------------------------
|
128
|
+
ExtActionMailerTest: test_correctly_registered_md_mime_type
|
129
|
+
-----------------------------------------------------------
|
130
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
131
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
132
|
+
-------------------------------------------------------------
|
133
|
+
ExtActionMailerTest: test_default_types_on_action_mailer_base
|
134
|
+
-------------------------------------------------------------
|
135
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
136
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
137
|
+
----------------------------------------------
|
138
|
+
ExtActionMailerTest: test_monkeypatch_location
|
139
|
+
----------------------------------------------
|
140
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
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:
|
4
|
+
version: 2.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:
|
11
|
+
date: 2016-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.5.1
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Markdown in your mailbox
|