extended_email_reply_parser 0.3.0 → 0.3.1

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: 973b3edc0195910548a7a07712dd593a1a85eaf5
4
- data.tar.gz: 978d70f446b5c794029d00ee7692689eba284205
3
+ metadata.gz: 28188e56db27a6bcfda9da4b4e07b47d0b03f23b
4
+ data.tar.gz: e0235a53fff960d3a28f249e9af03c0ec5fb61bf
5
5
  SHA512:
6
- metadata.gz: 519d870958f4ffee3a4e89e9976c0d12bf48f71919871db62795225046ef789da590d77b79e8f8fe72cee38d0ba4b43873912584f849a7604f4b1274aa94b0f5
7
- data.tar.gz: ddd1e82ecd562dfcd99a25e9a2abd9435835e2625111a9b68ebb339a64eec918cfce8608ad2bd9d0c5a175f6fbe173fe4f94015a034d20a42e0b949fda927d3c
6
+ metadata.gz: b91056d876d0bdf911044af2d4fe42ab09f35bf2c15a2ed94d1038437b2aad3d549d50392539dead1e93ebc4b27c169d84e8551c6c2205f2e4babfdb5b87941e
7
+ data.tar.gz: 251e200710616e637acab72fa755f5db39fb672c0c569a441ee07fba200c5c1143ea89b65631355f329b67d7794aac6d3ad72e67de96556725e2f82bb17ac313
data/CHANGELOG.md CHANGED
@@ -10,6 +10,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
10
10
  ### Removed
11
11
  ### Fixed
12
12
 
13
+ ## ExtendedEmailReplyParser 0.3.1 (2016-07-26)
14
+ ### Fixed
15
+ - Fixing issue "undefined `body_in_utf8` for `nil`".
13
16
 
14
17
  ## ExtendedEmailReplyParser 0.3.0 (2016-07-22)
15
18
  ### Added
data/README.md CHANGED
@@ -40,10 +40,17 @@ This gem extends [Mail::Message](https://github.com/mikel/mail/blob/master/lib/m
40
40
  message.extract_text
41
41
  ```
42
42
 
43
- There's also a convenience method to extract the body text from an email file:
43
+ Or, to see where this comes from:
44
44
 
45
45
  ```ruby
46
- ExtendedEmailReplyParser.read "/path/to/email.eml" # => Mail::Message
46
+ ExtendedEmailReplyParser.extract_text message
47
+ ExtendedEmailReplyParser.extract_text '/path/to/email.eml'
48
+ ```
49
+
50
+ Or, in two separate steps:
51
+
52
+ ```ruby
53
+ ExtendedEmailReplyParser.read("/path/to/email.eml") # => Mail::Message
47
54
  ExtendedEmailReplyParser.read("/path/to/email.eml").extract_text # => String
48
55
  ```
49
56
 
@@ -90,6 +97,13 @@ Add this line to your application's Gemfile:
90
97
  gem 'extended_email_reply_parser'
91
98
  ```
92
99
 
100
+ Or, for the edge version:
101
+
102
+ ```ruby
103
+ # Gemfile
104
+ gem 'extended_email_reply_parser', github: 'fiedl/extended_email_reply_parser'
105
+ ```
106
+
93
107
  And then execute:
94
108
 
95
109
  ➜ bundle
@@ -3,6 +3,7 @@ require 'charlock_holmes'
3
3
  require 'email_reply_parser'
4
4
  require 'active_support'
5
5
  require 'active_support/core_ext/object/blank'
6
+ require 'active_support/core_ext/object/try'
6
7
 
7
8
  require 'extended_email_reply_parser/mail/message'
8
9
  require 'extended_email_reply_parser/email_reply_parser/email'
@@ -18,7 +18,7 @@ module Mail
18
18
  end
19
19
 
20
20
  def extract_text
21
- (self.text_part || (self if self.content_type.include?('text/plain'))).body_in_utf8
21
+ (self.text_part || (self if self.content_type.include?('text/plain'))).try(:body_in_utf8)
22
22
  end
23
23
 
24
24
  def parse
@@ -1,3 +1,3 @@
1
1
  module ExtendedEmailReplyParser
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extended_email_reply_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Fiedlschuster
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-22 00:00:00.000000000 Z
11
+ date: 2016-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler