Skip to content

Commit

Permalink
additionally register UnixToUnix encoding as 'x-uue'
Browse files Browse the repository at this point in the history
  • Loading branch information
jkraemer authored and jeremy committed Aug 16, 2018
1 parent 19592c0 commit 870fc4f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Compatibility:
* Restore LF=>CRLF conversions for properly encoded non-binary emails. (rubys)
* Gracefully parse certain invalid Content-Type headers. (rafbm)
* Support `x-uue` transfer encoding as uuencoding. (jkraemer)

Features:
* Expose Mail::Field#unparsed_value to read the raw field value, before parsing. (Tensho)
Expand Down
1 change: 1 addition & 0 deletions lib/mail/encodings/unix_to_unix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def self.encode(str)

Encodings.register(NAME, self)
Encodings.register("uuencode", self)
Encodings.register("x-uue", self)
end
end
end
4 changes: 4 additions & 0 deletions spec/mail/encodings/unix_to_unix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ def encode(str)
expect(Mail::Encodings.get_encoding('x-uuencode')).to eq(Mail::Encodings::UnixToUnix)
end

it "is registered as x-uue" do
expect(Mail::Encodings.get_encoding('x-uue')).to eq(Mail::Encodings::UnixToUnix)
end

it "can transport itself" do
expect(Mail::Encodings::UnixToUnix.can_transport?(Mail::Encodings::UnixToUnix)).to be_truthy
end
Expand Down

0 comments on commit 870fc4f

Please sign in to comment.