Skip to content

Commit

Permalink
Push duck punches to an ext directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
monde committed Oct 31, 2011
1 parent db02526 commit afbb1cb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
11 changes: 11 additions & 0 deletions lib/ext/object.rb
@@ -0,0 +1,11 @@
class Object

def blank?
respond_to?(:empty?) ? empty? : !self
end

def present?
!blank?
end

end
24 changes: 5 additions & 19 deletions lib/mms2r.rb
Expand Up @@ -52,32 +52,18 @@ def self.parse raw_mail

end

class Object

unless defined?(:blank?)
def blank?
respond_to?(:empty?) ? empty? : !self
end
end

unless defined?(:present?)
def present?
!blank?
end
end
end

%W{ mail fileutils pathname tmpdir yaml uuidtools iconv exifr }.each do |g|
begin
gem 'mail', '= 2.2.13' if g == 'mail'
require g
rescue LoadError
require 'rubygems'
require g
end
end

require File.join(File.dirname(__FILE__), 'mail_ext')
require File.join(File.dirname(__FILE__), 'mms2r', 'media')
require File.join(File.dirname(__FILE__), 'mms2r', 'media', 'sprint')
require File.join(File.dirname(__FILE__), 'ext/mail')
require File.join(File.dirname(__FILE__), 'ext/object')
require File.join(File.dirname(__FILE__), 'mms2r/media')
require File.join(File.dirname(__FILE__), 'mms2r/media/sprint')

MMS2R.register('pm.sprint.com', MMS2R::Media::Sprint)

0 comments on commit afbb1cb

Please sign in to comment.