Skip to content

Commit

Permalink
Merge pull request #12 from mvz/remove-ordered-hash
Browse files Browse the repository at this point in the history
Remove OrderedHash
  • Loading branch information
aquasync authored Jun 4, 2018
2 parents 99f5c53 + 86f4bb8 commit d9c6604
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 228 deletions.
2 changes: 1 addition & 1 deletion lib/mapi/convert/note-mime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def to_mime
next if mime.headers.keys.map(&:downcase).include? key.downcase
mime.headers[key] += vals
end
# just a stupid hack to make the content-type header last, when using OrderedHash
# just a stupid hack to make the content-type header last
mime.headers['Content-Type'] = mime.headers.delete 'Content-Type'

mime
Expand Down
2 changes: 1 addition & 1 deletion lib/mapi/convert/note-tmail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def to_tmail
#next if mime.headers.keys.map(&:downcase).include? key.downcase
mail[key] = vals.first
end
# just a stupid hack to make the content-type header last, when using OrderedHash
# just a stupid hack to make the content-type header last
#mime.headers['Content-Type'] = mime.headers.delete 'Content-Type'

mail
Expand Down
8 changes: 0 additions & 8 deletions lib/mapi/mime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# = TODO
#
# * Better streaming support, rather than an all-in-string approach.
# * Add +OrderedHash+ optionally, to not lose ordering in headers.
# * A fair bit remains to be done for this class, its fairly immature. But generally I'd like
# to see it be more generally useful.
# * All sorts of correctness issues, encoding particular.
Expand All @@ -23,13 +22,6 @@
#
module Mapi
class Mime
Hash = begin
require 'orderedhash'
OrderedHash
rescue LoadError
Hash
end

attr_reader :headers, :body, :parts, :content_type, :preamble, :epilogue

# Create a Mime object using +str+ as an initial serialization, which must contain headers
Expand Down
218 changes: 0 additions & 218 deletions lib/orderedhash.rb

This file was deleted.

0 comments on commit d9c6604

Please sign in to comment.