automaildoc 0.1.2 → 0.1.3

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: 4790b575cb77c8ff9a3e7326d1ee77b75df129de
4
- data.tar.gz: 4e60c88e84df7f890defd9daf06871e3fd8eda5e
3
+ metadata.gz: 7279c1152999c7978a4915d8c926fab8ab142513
4
+ data.tar.gz: 946b23f20264a562186aecdc9bbd49edec9bcfdd
5
5
  SHA512:
6
- metadata.gz: 3a764ff13d188441103318ba42ac3dd373a051305f58a87311ebf9155a399e45699859d5fc0d92152fb2d0f6ac36d874fdde9f8210b06b467e0a324ca19c6360
7
- data.tar.gz: 40dc4aa242b636ac14d64ee0152f8e16c984dd8bb508e117bb2dc8c8feed8cc377bb5903f6be8aa36bd6840a538444601fc79ab9dc5053b2bb4edf7101fb3d38
6
+ metadata.gz: 1ab76f4f555367e530e284e85b8ceb76a8366b3df165cf8bac30ad853c12013f2108d6f806b865348d20a22fab88cb8ca6a94f87e57ead6f9ef8e34f1654837e
7
+ data.tar.gz: d27b00b1ec367b91dd8b4f727e08763006eb74427c182704c26d728e987edc523396aabda1a132a20dc7902242674079bd600799b33e8ac19f46ac74ce0db378
@@ -1,5 +1,11 @@
1
1
  ## Change Log
2
2
 
3
+ ### 0.1.3
4
+
5
+ #### Improvements
6
+
7
+ - Show html part and text part both if an email has multiparts.
8
+
3
9
  ### 0.1.2
4
10
 
5
11
  #### Fixes
@@ -46,5 +46,17 @@ module Automaildoc
46
46
  def body
47
47
  mail.body || ''
48
48
  end
49
+
50
+ def multipart?
51
+ mail.multipart?
52
+ end
53
+
54
+ def text_part
55
+ mail.text_part
56
+ end
57
+
58
+ def html_part
59
+ mail.html_part
60
+ end
49
61
  end
50
62
  end
@@ -18,8 +18,20 @@
18
18
  <span class="badge badge-default"><%= mail %></span>
19
19
  <% end %>
20
20
  </div>
21
+
22
+ <h4>Subject</h4>
21
23
  <pre><%= subject %></pre>
22
- <pre><%= body %></pre>
24
+
25
+ <h4>Body</h4>
26
+ <% if multipart? %>
27
+ <h5><%= html_part.content_type %></h5>
28
+ <pre><%= html_part.body %></pre>
29
+
30
+ <h5><%= text_part.content_type %></h5>
31
+ <pre><%= text_part.body %></pre>
32
+ <% else %>
33
+ <pre><%= body %></pre>
34
+ <% end %>
23
35
  </div>
24
36
 
25
- <hr>
37
+ <hr/>
@@ -1,3 +1,3 @@
1
1
  module Automaildoc
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: automaildoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masato Ohba
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-05 00:00:00.000000000 Z
11
+ date: 2017-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec