From 3457db712e1a66838ddd37e99fa86e108ad758a7 Mon Sep 17 00:00:00 2001 From: Dalibor Nasevic Date: Thu, 3 Mar 2011 01:03:25 +0100 Subject: Correct spelling for Base64 in action_mailer --- actionmailer/lib/action_mailer/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 15b0d01154..16fcf112b7 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -291,7 +291,7 @@ module ActionMailer #:nodoc: # * :authentication - If your mail server requires authentication, you need to specify the # authentication type here. # This is a symbol and one of :plain (will send the password in the clear), :login (will - # send password BASE64 encoded) or :cram_md5 (combines a Challenge/Response mechanism to exchange + # send password Base64 encoded) or :cram_md5 (combines a Challenge/Response mechanism to exchange # information and a cryptographic Message Digest 5 algorithm to hash important information) # * :enable_starttls_auto - When set to true, detects if STARTTLS is enabled in your SMTP server # and starts to use it. -- cgit v1.2.3 From b12a4a9296469f4866b20a5db8c02cdc8844d9db Mon Sep 17 00:00:00 2001 From: JudeArasu Date: Sat, 5 Mar 2011 06:08:21 +0530 Subject: typo changes --- actionmailer/README.rdoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/README.rdoc b/actionmailer/README.rdoc index b346bd9e79..fb93fd1080 100644 --- a/actionmailer/README.rdoc +++ b/actionmailer/README.rdoc @@ -75,9 +75,9 @@ Or you can just chain the methods together like: == Receiving emails To receive emails, you need to implement a public instance method called receive that takes a -tmail object as its single parameter. The Action Mailer framework has a corresponding class method, +email object as its single parameter. The Action Mailer framework has a corresponding class method, which is also called receive, that accepts a raw, unprocessed email as a string, which it then turns -into the tmail object and calls the receive instance method. +into the email object and calls the receive instance method. Example: @@ -104,7 +104,7 @@ trivial case like this: rails runner 'Mailman.receive(STDIN.read)' However, invoking Rails in the runner for each mail to be received is very resource intensive. A single -instance of Rails should be run within a daemon if it is going to be utilized to process more than just +instance of Rails should be run within a daemon, if it is going to be utilized to process more than just a limited number of email. == Configuration @@ -145,3 +145,4 @@ API documentation is at Bug reports and feature requests can be filed with the rest for the Ruby on Rails project here: * https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets + -- cgit v1.2.3 From d8462510c5378f9204778ffb9df4fdbece7dccd0 Mon Sep 17 00:00:00 2001 From: Dalibor Nasevic Date: Sun, 6 Mar 2011 00:27:37 +0100 Subject: Fixed identation in actionmailer base_test --- actionmailer/test/base_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 1b793d255e..6a7931da8c 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -153,8 +153,8 @@ class BaseTest < ActiveSupport::TestCase assert_equal(2, email.parts.length) assert_equal("multipart/related", email.mime_type) assert_equal("multipart/alternative", email.parts[0].mime_type) - assert_equal("text/plain", email.parts[0].parts[0].mime_type) - assert_equal("text/html", email.parts[0].parts[1].mime_type) + assert_equal("text/plain", email.parts[0].parts[0].mime_type) + assert_equal("text/html", email.parts[0].parts[1].mime_type) assert_equal("logo.png", email.parts[1].filename) end -- cgit v1.2.3 From e80db417ed656018d0ad4335260c3a2313142a57 Mon Sep 17 00:00:00 2001 From: JudeArasu Date: Sun, 6 Mar 2011 10:53:44 +0530 Subject: styles applied for usage --- actionmailer/lib/rails/generators/mailer/USAGE | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/rails/generators/mailer/USAGE b/actionmailer/lib/rails/generators/mailer/USAGE index a08d459739..99d1ea3885 100644 --- a/actionmailer/lib/rails/generators/mailer/USAGE +++ b/actionmailer/lib/rails/generators/mailer/USAGE @@ -1,15 +1,16 @@ -Description: +*Description:* Stubs out a new mailer and its views. Pass the mailer name, either CamelCased or under_scored, and an optional list of emails as arguments. This generates a mailer class in app/mailers and invokes your template engine and test framework generators. -Example: - `rails generate mailer Notifications signup forgot_password invoice` +*Example:* + -rails generate mailer Notifications signup forgot_password invoice- creates a Notifications mailer class, views, test, and fixtures: Mailer: app/mailers/notifications.rb Views: app/views/notifications/signup.erb [...] Test: test/functional/notifications_test.rb Fixtures: test/fixtures/notifications/signup [...] + -- cgit v1.2.3 From 1d4826937e438ebcd6a2f9e29d2e466a43fef7a8 Mon Sep 17 00:00:00 2001 From: JudeArasu Date: Sun, 6 Mar 2011 11:38:18 +0530 Subject: style changes --- actionmailer/lib/rails/generators/mailer/USAGE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/rails/generators/mailer/USAGE b/actionmailer/lib/rails/generators/mailer/USAGE index 99d1ea3885..8f4ba5916a 100644 --- a/actionmailer/lib/rails/generators/mailer/USAGE +++ b/actionmailer/lib/rails/generators/mailer/USAGE @@ -1,12 +1,12 @@ -*Description:* +Description: Stubs out a new mailer and its views. Pass the mailer name, either CamelCased or under_scored, and an optional list of emails as arguments. This generates a mailer class in app/mailers and invokes your template engine and test framework generators. -*Example:* - -rails generate mailer Notifications signup forgot_password invoice- +Example: + rails generate mailer Notifications signup forgot_password invoice creates a Notifications mailer class, views, test, and fixtures: Mailer: app/mailers/notifications.rb -- cgit v1.2.3 From 2cd3dcabe26530ba73d87383732a35c02ff797f6 Mon Sep 17 00:00:00 2001 From: JudeArasu Date: Sun, 6 Mar 2011 12:53:23 +0530 Subject: Revert "style changes" This reverts commit 1d4826937e438ebcd6a2f9e29d2e466a43fef7a8. --- actionmailer/lib/rails/generators/mailer/USAGE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/rails/generators/mailer/USAGE b/actionmailer/lib/rails/generators/mailer/USAGE index 8f4ba5916a..99d1ea3885 100644 --- a/actionmailer/lib/rails/generators/mailer/USAGE +++ b/actionmailer/lib/rails/generators/mailer/USAGE @@ -1,12 +1,12 @@ -Description: +*Description:* Stubs out a new mailer and its views. Pass the mailer name, either CamelCased or under_scored, and an optional list of emails as arguments. This generates a mailer class in app/mailers and invokes your template engine and test framework generators. -Example: - rails generate mailer Notifications signup forgot_password invoice +*Example:* + -rails generate mailer Notifications signup forgot_password invoice- creates a Notifications mailer class, views, test, and fixtures: Mailer: app/mailers/notifications.rb -- cgit v1.2.3 From ac59a2a1d67aca74895ceddbc709a467c572144b Mon Sep 17 00:00:00 2001 From: JudeArasu Date: Sun, 6 Mar 2011 12:55:56 +0530 Subject: style changes --- actionmailer/lib/rails/generators/mailer/USAGE | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/rails/generators/mailer/USAGE b/actionmailer/lib/rails/generators/mailer/USAGE index 99d1ea3885..448ddbd5df 100644 --- a/actionmailer/lib/rails/generators/mailer/USAGE +++ b/actionmailer/lib/rails/generators/mailer/USAGE @@ -1,12 +1,14 @@ -*Description:* +Description: +============ Stubs out a new mailer and its views. Pass the mailer name, either CamelCased or under_scored, and an optional list of emails as arguments. This generates a mailer class in app/mailers and invokes your template engine and test framework generators. -*Example:* - -rails generate mailer Notifications signup forgot_password invoice- +Example: +======== + rails generate mailer Notifications signup forgot_password invoice creates a Notifications mailer class, views, test, and fixtures: Mailer: app/mailers/notifications.rb -- cgit v1.2.3 From 8bbc5b4f5fd0ccc0b496cbdb2abb07d24b84aaba Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 6 Mar 2011 17:42:42 +0100 Subject: Revert "Fixed identation in actionmailer base_test" Please excuse the revert. Albeit the commit is totally innocent, docrails has a strong no-code policy we need to enforce. Please feel free to submit the fix as a patch and assign it to me, I'll apply right away. This reverts commit d8462510c5378f9204778ffb9df4fdbece7dccd0. --- actionmailer/test/base_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 6a7931da8c..1b793d255e 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -153,8 +153,8 @@ class BaseTest < ActiveSupport::TestCase assert_equal(2, email.parts.length) assert_equal("multipart/related", email.mime_type) assert_equal("multipart/alternative", email.parts[0].mime_type) - assert_equal("text/plain", email.parts[0].parts[0].mime_type) - assert_equal("text/html", email.parts[0].parts[1].mime_type) + assert_equal("text/plain", email.parts[0].parts[0].mime_type) + assert_equal("text/html", email.parts[0].parts[1].mime_type) assert_equal("logo.png", email.parts[1].filename) end -- cgit v1.2.3 From 112c8025791e51209f1aa8f7b8623f1a5ed3e015 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Mon, 7 Mar 2011 05:52:47 +0900 Subject: s/a/an/ --- actionmailer/README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer') diff --git a/actionmailer/README.rdoc b/actionmailer/README.rdoc index fb93fd1080..2db6140d64 100644 --- a/actionmailer/README.rdoc +++ b/actionmailer/README.rdoc @@ -74,7 +74,7 @@ Or you can just chain the methods together like: == Receiving emails -To receive emails, you need to implement a public instance method called receive that takes a +To receive emails, you need to implement a public instance method called receive that takes an email object as its single parameter. The Action Mailer framework has a corresponding class method, which is also called receive, that accepts a raw, unprocessed email as a string, which it then turns into the email object and calls the receive instance method. -- cgit v1.2.3 From 5bed37779acea804af0bf5efd25839ef5c1e2cdd Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Mon, 7 Mar 2011 05:56:02 +0900 Subject: "SSL everywhere" for GitHub URLs see: https://github.com/blog/738-sidejack-prevention-phase-2-ssl-everywhere --- actionmailer/README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer') diff --git a/actionmailer/README.rdoc b/actionmailer/README.rdoc index 2db6140d64..0fa18d751b 100644 --- a/actionmailer/README.rdoc +++ b/actionmailer/README.rdoc @@ -128,7 +128,7 @@ The latest version of Action Mailer can be installed with Rubygems: Source code can be downloaded as part of the Rails project on GitHub -* http://github.com/rails/rails/tree/master/actionmailer/ +* https://github.com/rails/rails/tree/master/actionmailer/ == License -- cgit v1.2.3 From c528297d17236e57fa4076272547367870158034 Mon Sep 17 00:00:00 2001 From: Dalibor Nasevic Date: Sun, 6 Mar 2011 20:03:06 +0100 Subject: Fixed indentation in actionmailer base_test [#6538 state:committed] Signed-off-by: Xavier Noria --- actionmailer/test/base_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 1b793d255e..6a7931da8c 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -153,8 +153,8 @@ class BaseTest < ActiveSupport::TestCase assert_equal(2, email.parts.length) assert_equal("multipart/related", email.mime_type) assert_equal("multipart/alternative", email.parts[0].mime_type) - assert_equal("text/plain", email.parts[0].parts[0].mime_type) - assert_equal("text/html", email.parts[0].parts[1].mime_type) + assert_equal("text/plain", email.parts[0].parts[0].mime_type) + assert_equal("text/html", email.parts[0].parts[1].mime_type) assert_equal("logo.png", email.parts[1].filename) end -- cgit v1.2.3 From fb34f8577c47d958ca32b7ab585c1904e1a776b1 Mon Sep 17 00:00:00 2001 From: Mat Brown Date: Wed, 9 Mar 2011 04:40:03 +0800 Subject: Rename conflicting ActionMailer::MailHelper#simple_format method This was conflicting with ActionView::Helpers::TextHelper#simple_format from within email templates. --- actionmailer/lib/action_mailer/mail_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index 887c7012d9..75901bc431 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -4,7 +4,7 @@ module ActionMailer # each line, and wrapped at 72 columns. def block_format(text) formatted = text.split(/\n\r\n/).collect { |paragraph| - simple_format(paragraph) + format_paragraph(paragraph) }.join("\n") # Make list points stand on their own line @@ -30,7 +30,7 @@ module ActionMailer end private - def simple_format(text, len = 72, indent = 2) + def format_paragraph(text, len = 72, indent = 2) sentences = [[]] text.split.each do |word| -- cgit v1.2.3 From 8e73e589a8949c8162f81148bb497804fa641e1d Mon Sep 17 00:00:00 2001 From: Diego Carrion Date: Wed, 9 Mar 2011 16:06:48 -0300 Subject: publicise ActionMailer::MailHelper.format_paragraph [#6550 state:committed] Signed-off-by: Santiago Pastorino --- actionmailer/lib/action_mailer/mail_helper.rb | 9 ++++++++- actionmailer/test/mail_helper_test.rb | 13 +++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index 75901bc431..e708e36369 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -29,7 +29,14 @@ module ActionMailer @_message.attachments end - private + # Returns +text+ wrapped at +len+ columns and indented +indent+ spaces. + # + # === Examples + # + # my_text = "Here is a sample text with more than 40 characters" + # + # simple_format(my_text, 25, 4) + # # => " Here is a sample text with\n more than 40 characters" def format_paragraph(text, len = 72, indent = 2) sentences = [[]] diff --git a/actionmailer/test/mail_helper_test.rb b/actionmailer/test/mail_helper_test.rb index 7cc0804323..17e9c82045 100644 --- a/actionmailer/test/mail_helper_test.rb +++ b/actionmailer/test/mail_helper_test.rb @@ -14,6 +14,14 @@ class HelperMailer < ActionMailer::Base end end + def use_format_paragraph + @text = "But soft! What light through yonder window breaks?" + + mail_with_defaults do |format| + format.html { render(:inline => "<%= format_paragraph @text, 15, 1 %>") } + end + end + def use_mailer mail_with_defaults do |format| format.html { render(:inline => "<%= mailer.message.subject %>") } @@ -50,5 +58,10 @@ class MailerHelperTest < ActionMailer::TestCase mail = HelperMailer.use_message assert_match "using helpers", mail.body.encoded end + + def test_use_format_paragraph + mail = HelperMailer.use_format_paragraph + assert_match " But soft! What\r\n light through\r\n yonder window\r\n breaks?", mail.body.encoded + end end -- cgit v1.2.3 From 51a269b2282ec09cf58614e738a2d0e40d2909d3 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 9 Mar 2011 20:17:30 -0200 Subject: Fix typo --- actionmailer/lib/action_mailer/mail_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index e708e36369..6f22adc479 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -35,7 +35,7 @@ module ActionMailer # # my_text = "Here is a sample text with more than 40 characters" # - # simple_format(my_text, 25, 4) + # format_paragraph(my_text, 25, 4) # # => " Here is a sample text with\n more than 40 characters" def format_paragraph(text, len = 72, indent = 2) sentences = [[]] -- cgit v1.2.3