Sha256: 9eb640878dcd28abb394570bced25f94f61ec394125e14ec74bedaee6429e962

Contents?: true

Size: 1.27 KB

Versions: 4

Compression:

Stored size: 1.27 KB

Contents

require 'delegate'

require 'uuid'
require 'tmail'
require 'hpricot'
require 'activesupport'
require 'activerecord'

require 'mlist/util'
require 'mlist/email'
require 'mlist/message'
require 'mlist/list'
require 'mlist/mail_list'
require 'mlist/email_post'
require 'mlist/email_server'
require 'mlist/email_subscriber'
require 'mlist/server'
require 'mlist/thread'

require 'mlist/manager'

module MList
  mattr_reader :version
  @@version = YAML.load_file(File.join(File.dirname(__FILE__), '..', "VERSION.yml"))
  class << @@version
    def to_s
      @to_s ||= [self[:major], self[:minor], self[:patch]].join('.')
    end
  end
  
  class DoubleDeliveryError < StandardError
    def initialize(message)
      super("A message should never be delivered more than once. An attempt was made to deliver this message:\n#{message.inspect}")
    end
  end
end

Time::DATE_FORMATS[:mlist_reply_timestamp] = Date::DATE_FORMATS[:mlist_reply_timestamp] = lambda do |time|
  time.strftime('%a, %b %d, %Y at %I:%M %p').sub(/0(\d,)/, '\1').sub(/0(\d:)/, '\1')
end

# In order to keep the inline images in email intact. Certainly a scary bit of
# hacking, but this is the solution out there on the internet.
TMail::HeaderField::FNAME_TO_CLASS.delete 'content-id'

TMail::Mail::ALLOW_MULTIPLE['x-beenthere'] = true

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
aiwilliams-mlist-0.1.5 lib/mlist.rb
aiwilliams-mlist-0.1.6 lib/mlist.rb
aiwilliams-mlist-0.1.7 lib/mlist.rb
aiwilliams-mlist-0.1.8 lib/mlist.rb