emaildirect 1.2.0 → 1.2.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.
data/HISTORY.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 1.2.1 (Jan. 19th, 2012)
2
+ * Relay emails were losing spaces between words because EmailDirect strips out newlines.
3
+
1
4
  ## 1.2.0 (Dec. 21st, 2011)
2
5
  * Add EmailDirect.disable to disable talking to the EmailDirect server (requires fakeweb gem).
3
6
 
data/README.md CHANGED
@@ -88,7 +88,7 @@ Results in:
88
88
  Error Code: 101
89
89
  Error Message: Invalid Email Address
90
90
 
91
- ### Disabling in Development/Test
91
+ ### Disabling for development/testing
92
92
  A helper method is provided to disable talking to the EmailDirect REST server (requires the [Fakeweb gem](http://fakeweb.rubyforge.org/))
93
93
 
94
94
  EmailDirect.disable
@@ -45,6 +45,8 @@ module EmailDirect
45
45
  options[:Subject] = mail.subject
46
46
  options[:Text] = mail.multipart? ? mail.text_part.body.to_s : mail.body.to_s
47
47
  options[:HTML] = mail.multipart? ? mail.html_part.body.to_s : mail.body.to_s
48
+ # Emaildirect strips out newlines which can lead to words being smooshed together
49
+ options[:HTML].gsub! /[\r\n]+/, ' '
48
50
  # Set the envelope from to be either the return-path, the sender or the first from address
49
51
  envelope_from = mail.return_path || mail.sender || mail.from_addrs.first
50
52
  unless envelope_from.blank?
@@ -1,3 +1,3 @@
1
1
  module EmailDirect
2
- VERSION = "1.2.0" unless defined?(EmailDirect::VERSION)
2
+ VERSION = "1.2.1" unless defined?(EmailDirect::VERSION)
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emaildirect
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 0
10
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Rust
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-21 00:00:00 -08:00
18
+ date: 2012-01-19 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency