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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9444a8218021e0c486b4a2847f244b0ce5bfc874
4
- data.tar.gz: ae941e4c69aae6e26c4a646d917b6b184cbfd090
3
+ metadata.gz: dc3cbe06b036b2b31896e94b04c323ff7b62ee2a
4
+ data.tar.gz: 0569b01477e18c99bbb4bb5d5193b8e867878f21
5
5
  SHA512:
6
- metadata.gz: 19989f63223531bb2ed422626c9e5faf4960d0b223f3075cf51e1f682f74f74c5ae4ba345f9ec0347f0345f72584b1651661196af020b117208784eceb651471
7
- data.tar.gz: f35aa31b5f0d0d90d6c30e32a070a814f3b9bf8b56f0dd96180744d92e2fc220fe9b702c8254c278d321bd398b13399f6b19e42449901b65acdaf24b9e9f89a1
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::HTML.to_s || r[:content_type] == Mime::TEXT.to_s }
8
- md_response = responses.detect {|r| r[:content_type] == Mime::MD.to_s }
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
@@ -1,3 +1,3 @@
1
1
  module Maildown
2
- VERSION = "1.0.4"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -68,3 +68,73 @@ MaildownTest: test_no_md_in_response
68
68
  MaildownTest: test_parse_md_response
69
69
  ------------------------------------
70
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.1ms) begin transaction
82
+ -----------------------------------------------------------
83
+ ExtActionMailerTest: test_correctly_registered_md_mime_type
84
+ -----------------------------------------------------------
85
+  (0.1ms) rollback transaction
86
+  (0.1ms) begin transaction
87
+ -------------------------------------------------------------
88
+ ExtActionMailerTest: test_default_types_on_action_mailer_base
89
+ -------------------------------------------------------------
90
+  (0.1ms) rollback transaction
91
+  (0.1ms) begin transaction
92
+ ----------------------------------------------
93
+ ExtActionMailerTest: test_monkeypatch_location
94
+ ----------------------------------------------
95
+  (0.0ms) rollback transaction
96
+  (0.0ms) begin transaction
97
+ ---------------------------------------
98
+ MarkdownEngineTest: test_can_set_engine
99
+ ---------------------------------------
100
+  (0.0ms) rollback transaction
101
+  (0.1ms) begin transaction
102
+ ----------------------------------------------------------
103
+ MarkdownEngineTest: test_default_works_in_multiple_threads
104
+ ----------------------------------------------------------
105
+  (0.0ms) rollback transaction
106
+  (0.1ms) begin transaction
107
+ ---------------------------------------
108
+ MarkdownEngineTest: test_can_set_engine
109
+ ---------------------------------------
110
+  (0.1ms) rollback transaction
111
+  (0.1ms) begin transaction
112
+ ----------------------------------------------------------
113
+ MarkdownEngineTest: test_default_works_in_multiple_threads
114
+ ----------------------------------------------------------
115
+  (0.1ms) rollback transaction
116
+  (0.1ms) begin transaction
117
+ ------------------------------------
118
+ MaildownTest: test_no_md_in_response
119
+ ------------------------------------
120
+  (0.0ms) rollback transaction
121
+  (0.1ms) begin transaction
122
+ ------------------------------------
123
+ MaildownTest: test_parse_md_response
124
+ ------------------------------------
125
+  (0.1ms) rollback transaction
126
+  (0.1ms) begin transaction
127
+ -----------------------------------------------------------
128
+ ExtActionMailerTest: test_correctly_registered_md_mime_type
129
+ -----------------------------------------------------------
130
+  (0.0ms) rollback transaction
131
+  (0.0ms) begin transaction
132
+ -------------------------------------------------------------
133
+ ExtActionMailerTest: test_default_types_on_action_mailer_base
134
+ -------------------------------------------------------------
135
+  (0.0ms) rollback transaction
136
+  (0.1ms) begin transaction
137
+ ----------------------------------------------
138
+ ExtActionMailerTest: test_monkeypatch_location
139
+ ----------------------------------------------
140
+  (0.0ms) 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: 1.0.4
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: 2015-06-09 00:00:00.000000000 Z
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.4.5
128
+ rubygems_version: 2.5.1
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Markdown in your mailbox