diff options
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/lib/action_mailer/vendor.rb | 4 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/address.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/attachments.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/base64.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/base64.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/compat.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/config.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/core_extensions.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/encode.rb) | 32 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/header.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/index.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/interface.rb) | 7 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/loader.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/loader.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/mail.rb) | 4 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/mailbox.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/main.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/main.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mbox.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/mbox.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/net.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/obsolete.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/parser.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/port.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/quoting.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/require_arch.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/require_arch.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/scanner.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner_r.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/scanner_r.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/stringio.rb) | 0 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/utils.rb) | 2 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/version.rb (renamed from actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/version.rb) | 2 |
28 files changed, 38 insertions, 13 deletions
diff --git a/actionmailer/lib/action_mailer/vendor.rb b/actionmailer/lib/action_mailer/vendor.rb index 56a2858be5..7a20e9bd6e 100644 --- a/actionmailer/lib/action_mailer/vendor.rb +++ b/actionmailer/lib/action_mailer/vendor.rb @@ -2,9 +2,9 @@ require 'rubygems' begin - gem 'tmail', '~> 1.2.2' + gem 'tmail', '~> 1.2.3' rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/tmail-1.2.2" + $:.unshift "#{File.dirname(__FILE__)}/vendor/tmail-1.2.3" end begin diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail.rb index 18003659a6..18003659a6 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/address.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb index fa8e5bcd8c..fa8e5bcd8c 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/address.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/attachments.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb index 5dc5efae5e..5dc5efae5e 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/attachments.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/base64.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/base64.rb index e294c62960..e294c62960 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/base64.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/base64.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/compat.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb index 1275df79a6..1275df79a6 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/compat.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/config.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb index 3a876dcdbd..3a876dcdbd 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/config.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/core_extensions.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb index da62c33bbf..da62c33bbf 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/core_extensions.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/encode.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb index 63bccce4fc..458dbbfe6a 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/encode.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb @@ -339,22 +339,36 @@ module TMail def scanadd( str, force = false ) types = '' strs = [] - + if str.respond_to?(:encoding) + enc = str.encoding + str.force_encoding(Encoding::ASCII_8BIT) + end until str.empty? if m = /\A[^\e\t\r\n ]+/.match(str) types << (force ? 'j' : 'a') - strs.push m[0] - + if str.respond_to?(:encoding) + strs.push m[0].force_encoding(enc) + else + strs.push m[0] + end elsif m = /\A[\t\r\n ]+/.match(str) types << 's' - strs.push m[0] + if str.respond_to?(:encoding) + strs.push m[0].force_encoding(enc) + else + strs.push m[0] + end elsif m = /\A\e../.match(str) esc = m[0] str = m.post_match if esc != "\e(B" and m = /\A[^\e]+/.match(str) types << 'j' - strs.push m[0] + if str.respond_to?(:encoding) + strs.push m[0].force_encoding(enc) + else + strs.push m[0] + end end else @@ -453,7 +467,13 @@ module TMail size = max_bytes(chunksize, str.size) - 6 size = (size % 2 == 0) ? (size) : (size - 1) return nil if size <= 0 - "\e$B#{str.slice!(0, size)}\e(B" + if str.respond_to?(:encoding) + enc = str.encoding + str.force_encoding(Encoding::ASCII_8BIT) + "\e$B#{str.slice!(0, size)}\e(B".force_encoding(enc) + else + "\e$B#{str.slice!(0, size)}\e(B" + end end def extract_A( chunksize, str ) diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/header.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb index 9153dcd7c6..9153dcd7c6 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/header.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/index.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb index 554e2fd696..554e2fd696 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/index.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/interface.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb index 206653bd5d..a6d428d7d6 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/interface.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb @@ -591,12 +591,17 @@ module TMail end # Destructively sets the message ID of the mail object instance to the passed in string + # + # Invalid message IDs are ignored (silently, unless configured otherwise) and result in + # a nil message ID. Left and right angle brackets are required. # # Example: # # mail = TMail::Mail.new + # mail.message_id = "<348F04F142D69C21-291E56D292BC@xxxx.net>" + # mail.message_id #=> "<348F04F142D69C21-291E56D292BC@xxxx.net>" # mail.message_id = "this_is_my_badly_formatted_message_id" - # mail.message_id #=> "this_is_my_badly_formatted_message_id" + # mail.message_id #=> nil def message_id=( str ) set_string_attr 'Message-Id', str end diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/loader.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/loader.rb index 6c0e251102..6c0e251102 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/loader.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/loader.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/mail.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb index fef6b01c39..5a319907ae 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/mail.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb @@ -408,8 +408,8 @@ module TMail when /\AFrom (\S+)/ unixfrom = $1 - when /^charset=.*/ - + when /^charset=.*/ + else raise SyntaxError, "wrong mail header: '#{line.inspect}'" end diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/mailbox.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb index b0bc6a7f74..b0bc6a7f74 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/mailbox.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/main.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/main.rb index e52772793f..e52772793f 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/main.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/main.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/mbox.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mbox.rb index 6c0e251102..6c0e251102 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/mbox.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mbox.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/net.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb index 65147228a1..65147228a1 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/net.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/obsolete.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb index 22b0a126ca..22b0a126ca 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/obsolete.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/parser.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb index ab1a828471..ab1a828471 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/parser.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/port.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb index 445f0e632b..445f0e632b 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/port.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/quoting.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb index cb9f4288f1..cb9f4288f1 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/quoting.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/require_arch.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/require_arch.rb index b4fffb8abb..b4fffb8abb 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/require_arch.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/require_arch.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/scanner.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner.rb index a5d01396b8..a5d01396b8 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/scanner.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/scanner_r.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner_r.rb index f2075502d8..f2075502d8 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/scanner_r.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner_r.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/stringio.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb index 8357398788..8357398788 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/stringio.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/utils.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb index 9a3afe8985..dc594a4229 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/utils.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb @@ -118,7 +118,7 @@ module TMail ATOM_UNSAFE = /[#{Regexp.quote aspecial}#{control}#{lwsp}]/n PHRASE_UNSAFE = /[#{Regexp.quote aspecial}#{control}]/n TOKEN_UNSAFE = /[#{Regexp.quote tspecial}#{control}#{lwsp}]/n - + # Returns true if the string supplied is free from characters not allowed as an ATOM def atom_safe?( str ) not ATOM_UNSAFE === str diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/version.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/version.rb index 6bf8cc8061..95228497c0 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/version.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/version.rb @@ -32,7 +32,7 @@ module TMail module VERSION MAJOR = 1 MINOR = 2 - TINY = 2 + TINY = 3 STRING = [MAJOR, MINOR, TINY].join('.') end |