From 0432d151647f2178ddee79979827d552447c251f Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Wed, 16 Jul 2008 13:00:36 +0100 Subject: Merge with docrails. --- actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb | 4 ++-- actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb | 2 +- actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb | 2 +- actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'actionmailer/lib') diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb index fa8e5bcd8c..982ad5b661 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb @@ -38,7 +38,7 @@ module TMail # = Class Address # # Provides a complete handling library for email addresses. Can parse a string of an - # address directly or take in preformatted addresses themseleves. Allows you to add + # address directly or take in preformatted addresses themselves. Allows you to add # and remove phrases from the front of the address and provides a compare function for # email addresses. # @@ -143,7 +143,7 @@ module TMail # This is to catch an unquoted "@" symbol in the local part of the # address. Handles addresses like <"@"@me.com> and makes sure they - # stay like <"@"@me.com> (previously were becomming <@@me.com>) + # stay like <"@"@me.com> (previously were becoming <@@me.com>) if local && (local.join == '@' || local.join =~ /\A[^"].*?@.*?[^"]\Z/) @local = "\"#{local.join}\"" else diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb index 9153dcd7c6..dbdefcf979 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb @@ -59,7 +59,7 @@ module TMail # # This is because a mailbox doesn't have the : after the From that designates the # beginning of the envelope sender (which can be different to the from address of - # the emial) + # the email) # # Other fields can be passed as normal, "Reply-To", "Received" etc. # diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb index a6d428d7d6..2fc2dbdfc7 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb @@ -42,7 +42,7 @@ module TMail # Allows you to query the mail object with a string to get the contents # of the field you want. # - # Returns a string of the exact contnts of the field + # Returns a string of the exact contents of the field # # mail.from = "mikel " # mail.header_string("From") #=> "mikel " diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb index 5a319907ae..c3a8803dc4 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb @@ -255,7 +255,7 @@ module TMail alias fetch [] # Allows you to set or delete TMail header objects at will. - # Eamples: + # Examples: # @mail = TMail::Mail.new # @mail['to'].to_s # => 'mikel@test.com.au' # @mail['to'] = 'mikel@elsewhere.org' @@ -265,7 +265,7 @@ module TMail # @mail['to'].to_s # => nil # @mail.encoded # => "\r\n" # - # Note: setting mail[] = nil actualy deletes the header field in question from the object, + # Note: setting mail[] = nil actually deletes the header field in question from the object, # it does not just set the value of the hash to nil def []=( key, val ) dkey = key.downcase -- cgit v1.2.3 From 746122735269b9077c7d5d99d88e8b22d88ad8d5 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 19 Jul 2008 12:23:08 -0500 Subject: Ruby 1.9: Call join on template_root instead of to_s --- actionmailer/lib/action_mailer/base.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'actionmailer/lib') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 5a71935009..e4920f0c86 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -529,7 +529,7 @@ module ActionMailer #:nodoc: end def render_message(method_name, body) - render :file => method_name, :body => body, :use_full_path => true + render :file => method_name, :body => body end def render(opts) @@ -537,12 +537,11 @@ module ActionMailer #:nodoc: if opts[:file] && opts[:file] !~ /\// opts[:file] = "#{mailer_name}/#{opts[:file]}" end - opts[:use_full_path] = true initialize_template_class(body).render(opts) end def template_path - "#{template_root}/#{mailer_name}" + "#{template_root.join}/#{mailer_name}" end def initialize_template_class(assigns) -- cgit v1.2.3 From e23156e87bd32206a5ea529fbecc04fdf37d7bc2 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 19 Jul 2008 12:35:42 -0500 Subject: Only create a path for ActionMailer template root instead of a path set. Better fix than 7461227 --- actionmailer/lib/action_mailer/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionmailer/lib') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index e4920f0c86..bf60e2f3d5 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -426,7 +426,7 @@ module ActionMailer #:nodoc: end def template_root=(root) - write_inheritable_attribute(:template_root, ActionView::PathSet.new(Array(root))) + write_inheritable_attribute(:template_root, ActionView::PathSet::Path.new(root)) end end @@ -541,7 +541,7 @@ module ActionMailer #:nodoc: end def template_path - "#{template_root.join}/#{mailer_name}" + "#{template_root}/#{mailer_name}" end def initialize_template_class(assigns) -- cgit v1.2.3 From 55bfe6be52da1130abb1c148f10d8e9a11368ffd Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 19 Jul 2008 15:27:55 -0500 Subject: Ensure ActionView::PathSet::Path is not initialized with a precompiled path --- actionmailer/lib/action_mailer/base.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionmailer/lib') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index bf60e2f3d5..a43296461b 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -426,7 +426,8 @@ module ActionMailer #:nodoc: end def template_root=(root) - write_inheritable_attribute(:template_root, ActionView::PathSet::Path.new(root)) + root = ActionView::PathSet::Path.new(root) if root.is_a?(String) + write_inheritable_attribute(:template_root, root) end end -- cgit v1.2.3