diff --git a/vendor/rails/actionmailer/CHANGELOG b/vendor/rails/actionmailer/CHANGELOG index de5aeab0..9f1a7ca8 100644 --- a/vendor/rails/actionmailer/CHANGELOG +++ b/vendor/rails/actionmailer/CHANGELOG @@ -1,3 +1,24 @@ +*2.3.5 (November 25, 2009)* + +* Minor Bug Fixes and deprecation warnings + +*2.3.4 (September 4, 2009)* + +* Minor bug fixes. + +*2.3.3 (July 12, 2009)* + +* No changes, just a version bump. + +*2.3.2 [Final] (March 15, 2009)* + +* Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP #1842 [Matt Jones] + +* Fixed RFC-2045 quoted-printable bug #1421 [squadette] + +* Fixed that no body charset would be set when there are attachments present #740 [Paweł Kondzior] + + *2.2.1 [RC2] (November 14th, 2008)* * Turn on STARTTLS if it is available in Net::SMTP (added in Ruby 1.8.7) and the SMTP server supports it (This is required for Gmail's SMTP server) #1336 [Grant Hollingworth] @@ -5,7 +26,7 @@ *2.2.0 [RC1] (October 24th, 2008)* -* Add layout functionality to mailers [Pratik] +* Add layout functionality to mailers [Pratik Naik] Mailer layouts behaves just like controller layouts, except layout names need to have '_mailer' postfix for them to be automatically picked up. @@ -17,7 +38,7 @@ * Less verbose mail logging: just recipients for :info log level; the whole email for :debug only. #8000 [iaddict, Tarmo Tänav] -* Updated TMail to version 1.2.1 [raasdnil] +* Updated TMail to version 1.2.1 [Mikel Lindsaar] * Fixed that you don't have to call super in ActionMailer::TestCase#setup #10406 [jamesgolick] @@ -29,7 +50,7 @@ *2.0.1* (December 7th, 2007) -* Update ActionMailer so it treats ActionView the same way that ActionController does. Closes #10244 [rick] +* Update ActionMailer so it treats ActionView the same way that ActionController does. Closes #10244 [Rick Olson] * Pass the template_root as an array as ActionView's view_path * Request templates with the "#{mailer_name}/#{action}" as opposed to just "#{action}" @@ -38,11 +59,11 @@ * Update README to use new smtp settings configuration API. Closes #10060 [psq] -* Allow ActionMailer subclasses to individually set their delivery method (so two subclasses can have different delivery methods) #10033 [zdennis] +* Allow ActionMailer subclasses to individually set their delivery method (so two subclasses can have different delivery methods) #10033 [Zach Dennis] -* Update TMail to v1.1.0. Use an updated version of TMail if available. [mikel] +* Update TMail to v1.1.0. Use an updated version of TMail if available. [Mikel Lindsaar] -* Introduce a new base test class for testing Mailers. ActionMailer::TestCase [Koz] +* Introduce a new base test class for testing Mailers. ActionMailer::TestCase [Michael Koziarski] * Fix silent failure of rxml templates. #9879 [jstewart] @@ -77,7 +98,7 @@ *1.3.2* (February 5th, 2007) -* Deprecate server_settings renaming it to smtp_settings, add sendmail_settings to allow you to override the arguments to and location of the sendmail executable. [Koz] +* Deprecate server_settings renaming it to smtp_settings, add sendmail_settings to allow you to override the arguments to and location of the sendmail executable. [Michael Koziarski] *1.3.1* (January 16th, 2007) @@ -97,7 +118,7 @@ * Tighten rescue clauses. #5985 [james@grayproductions.net] -* Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. [DHH] +* Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. [David Heinemeier Hansson] * Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar] diff --git a/vendor/rails/actionmailer/MIT-LICENSE b/vendor/rails/actionmailer/MIT-LICENSE index 13c90d46..e7accc5e 100644 --- a/vendor/rails/actionmailer/MIT-LICENSE +++ b/vendor/rails/actionmailer/MIT-LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2008 David Heinemeier Hansson +Copyright (c) 2004-2009 David Heinemeier Hansson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/vendor/rails/actionmailer/Rakefile b/vendor/rails/actionmailer/Rakefile index 572766ea..2d099a9a 100644 --- a/vendor/rails/actionmailer/Rakefile +++ b/vendor/rails/actionmailer/Rakefile @@ -4,7 +4,6 @@ require 'rake/testtask' require 'rake/rdoctask' require 'rake/packagetask' require 'rake/gempackagetask' -require 'rake/contrib/sshpublisher' require File.join(File.dirname(__FILE__), 'lib', 'action_mailer', 'version') PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : '' @@ -55,7 +54,7 @@ spec = Gem::Specification.new do |s| s.rubyforge_project = "actionmailer" s.homepage = "http://www.rubyonrails.org" - s.add_dependency('actionpack', '= 2.2.2' + PKG_BUILD) + s.add_dependency('actionpack', '= 2.3.5' + PKG_BUILD) s.has_rdoc = true s.requirements << 'none' @@ -76,12 +75,14 @@ end desc "Publish the API documentation" task :pgem => [:package] do + require 'rake/contrib/sshpublisher' Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'` end desc "Publish the API documentation" task :pdoc => [:rdoc] do + require 'rake/contrib/sshpublisher' Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/am", "doc").upload end diff --git a/vendor/rails/actionmailer/lib/action_mailer.rb b/vendor/rails/actionmailer/lib/action_mailer.rb index 2a9210de..02c536c8 100644 --- a/vendor/rails/actionmailer/lib/action_mailer.rb +++ b/vendor/rails/actionmailer/lib/action_mailer.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2004-2008 David Heinemeier Hansson +# Copyright (c) 2004-2009 David Heinemeier Hansson # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,22 +31,32 @@ rescue LoadError end end -require 'action_mailer/vendor' -require 'tmail' +require 'action_view' -require 'action_mailer/base' -require 'action_mailer/helpers' -require 'action_mailer/mail_helper' -require 'action_mailer/quoting' -require 'action_mailer/test_helper' +module ActionMailer + def self.load_all! + [Base, Part, ::Text::Format, ::Net::SMTP] + end -require 'net/smtp' - -ActionMailer::Base.class_eval do - include ActionMailer::Quoting - include ActionMailer::Helpers - - helper MailHelper + autoload :AdvAttrAccessor, 'action_mailer/adv_attr_accessor' + autoload :Base, 'action_mailer/base' + autoload :Helpers, 'action_mailer/helpers' + autoload :Part, 'action_mailer/part' + autoload :PartContainer, 'action_mailer/part_container' + autoload :Quoting, 'action_mailer/quoting' + autoload :TestCase, 'action_mailer/test_case' + autoload :TestHelper, 'action_mailer/test_helper' + autoload :Utils, 'action_mailer/utils' end -silence_warnings { TMail::Encoder.const_set("MAX_LINE_LEN", 200) } +module Text + autoload :Format, 'action_mailer/vendor/text_format' +end + +module Net + autoload :SMTP, 'net/smtp' +end + +autoload :MailHelper, 'action_mailer/mail_helper' + +require 'action_mailer/vendor/tmail' diff --git a/vendor/rails/actionmailer/lib/action_mailer/base.rb b/vendor/rails/actionmailer/lib/action_mailer/base.rb index 19ce77ea..84997de3 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/base.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/base.rb @@ -1,9 +1,3 @@ -require 'action_mailer/adv_attr_accessor' -require 'action_mailer/part' -require 'action_mailer/part_container' -require 'action_mailer/utils' -require 'tmail/net' - module ActionMailer #:nodoc: # Action Mailer allows you to send email from your application using a mailer model and views. # @@ -23,6 +17,7 @@ module ActionMailer #:nodoc: # class Notifier < ActionMailer::Base # def signup_notification(recipient) # recipients recipient.email_address_with_name + # bcc ["bcc@example.com", "Order Watcher "] # from "system@example.com" # subject "New account information" # body :account => recipient @@ -218,6 +213,8 @@ module ActionMailer #:nodoc: # * :password - If your mail server requires authentication, set the password in this setting. # * :authentication - If your mail server requires authentication, you need to specify the authentication type here. # This is a symbol and one of :plain, :login, :cram_md5. + # * :enable_starttls_auto - When set to true, detects if STARTTLS is enabled in your SMTP server and starts to use it. + # It works only on Ruby >= 1.8.7 and Ruby >= 1.9. Default is true. # # * sendmail_settings - Allows you to override options for the :sendmail delivery method. # * :location - The location of the sendmail executable. Defaults to /usr/sbin/sendmail. @@ -235,17 +232,20 @@ module ActionMailer #:nodoc: # # * default_charset - The default charset used for the body and to encode the subject. Defaults to UTF-8. You can also # pick a different charset from inside a method with +charset+. + # # * default_content_type - The default content type used for the main part of the message. Defaults to "text/plain". You # can also pick a different content type from inside a method with +content_type+. + # # * default_mime_version - The default mime version used for the message. Defaults to 1.0. You # can also pick a different value from inside a method with +mime_version+. + # # * default_implicit_parts_order - When a message is built implicitly (i.e. multiple parts are assembled from templates # which specify the content type in their filenames) this variable controls how the parts are ordered. Defaults to # ["text/html", "text/enriched", "text/plain"]. Items that appear first in the array have higher priority in the mail client # and appear last in the mime encoded message. You can also pick a different order from inside a method with # +implicit_parts_order+. class Base - include AdvAttrAccessor, PartContainer + include AdvAttrAccessor, PartContainer, Quoting, Utils if Object.const_defined?(:ActionController) include ActionController::UrlWriter include ActionController::Layout @@ -254,15 +254,18 @@ module ActionMailer #:nodoc: private_class_method :new #:nodoc: class_inheritable_accessor :view_paths + self.view_paths = [] + cattr_accessor :logger @@smtp_settings = { - :address => "localhost", - :port => 25, - :domain => 'localhost.localdomain', - :user_name => nil, - :password => nil, - :authentication => nil + :address => "localhost", + :port => 25, + :domain => 'localhost.localdomain', + :user_name => nil, + :password => nil, + :authentication => nil, + :enable_starttls_auto => true, } cattr_accessor :smtp_settings @@ -426,12 +429,6 @@ module ActionMailer #:nodoc: new.deliver!(mail) end - def register_template_extension(extension) - ActiveSupport::Deprecation.warn( - "ActionMailer::Base.register_template_extension has been deprecated." + - "Use ActionView::Base.register_template_extension instead", caller) - end - def template_root self.view_paths && self.view_paths.first end @@ -482,7 +479,7 @@ module ActionMailer #:nodoc: ) end unless @parts.empty? - @content_type = "multipart/alternative" + @content_type = "multipart/alternative" if @content_type !~ /^multipart/ @parts = sort_parts(@parts, @implicit_parts_order) end end @@ -546,10 +543,16 @@ module ActionMailer #:nodoc: @headers ||= {} @body ||= {} @mime_version = @@default_mime_version.dup if @@default_mime_version + @sent_on ||= Time.now end def render_message(method_name, body) + if method_name.respond_to?(:content_type) + @current_template_content_type = method_name.content_type + end render :file => method_name, :body => body + ensure + @current_template_content_type = nil end def render(opts) @@ -568,11 +571,17 @@ module ActionMailer #:nodoc: end def default_template_format - :html + if @current_template_content_type + Mime::Type.lookup(@current_template_content_type).to_sym + else + :html + end end def candidate_for_layout?(options) - !@template.send(:_exempt_from_layout?, default_template_name) + !self.view_paths.find_template(default_template_name, default_template_format).exempt_from_layout? + rescue ActionView::MissingTemplate + return true end def template_root @@ -588,7 +597,9 @@ module ActionMailer #:nodoc: end def initialize_template_class(assigns) - ActionView::Base.new(view_paths, assigns, self) + template = ActionView::Base.new(self.class.view_paths, assigns, self) + template.template_format = default_template_format + template end def sort_parts(parts, order = []) @@ -637,11 +648,11 @@ module ActionMailer #:nodoc: if @parts.empty? m.set_content_type(real_content_type, nil, ctype_attrs) - m.body = Utils.normalize_new_lines(body) + m.body = normalize_new_lines(body) else if String === body part = TMail::Mail.new - part.body = Utils.normalize_new_lines(body) + part.body = normalize_new_lines(body) part.set_content_type(real_content_type, nil, ctype_attrs) part.set_content_disposition "inline" m.parts << part @@ -664,10 +675,10 @@ module ActionMailer #:nodoc: def perform_delivery_smtp(mail) destinations = mail.destinations mail.ready_to_send - sender = mail['return-path'] || mail.from + sender = (mail['return-path'] && mail['return-path'].spec) || mail['from'] smtp = Net::SMTP.new(smtp_settings[:address], smtp_settings[:port]) - smtp.enable_starttls_auto if smtp.respond_to?(:enable_starttls_auto) + smtp.enable_starttls_auto if smtp_settings[:enable_starttls_auto] && smtp.respond_to?(:enable_starttls_auto) smtp.start(smtp_settings[:domain], smtp_settings[:user_name], smtp_settings[:password], smtp_settings[:authentication]) do |smtp| smtp.sendmail(mail.encoded, sender, destinations) @@ -687,4 +698,9 @@ module ActionMailer #:nodoc: deliveries << mail end end + + Base.class_eval do + include Helpers + helper MailHelper + end end diff --git a/vendor/rails/actionmailer/lib/action_mailer/helpers.rb b/vendor/rails/actionmailer/lib/action_mailer/helpers.rb index 5f6dcd77..31f7de8d 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/helpers.rb @@ -1,3 +1,5 @@ +require 'active_support/dependencies' + module ActionMailer module Helpers #:nodoc: def self.included(base) #:nodoc: diff --git a/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb b/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb index 11fd7d77..351b966a 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb @@ -1,5 +1,3 @@ -require 'text/format' - module MailHelper # Uses Text::Format to take the text and format it, indented two spaces for # each line, and wrapped at 72 columns. diff --git a/vendor/rails/actionmailer/lib/action_mailer/part.rb b/vendor/rails/actionmailer/lib/action_mailer/part.rb index 2dabf15f..2bbb59cd 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/part.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/part.rb @@ -1,15 +1,10 @@ -require 'action_mailer/adv_attr_accessor' -require 'action_mailer/part_container' -require 'action_mailer/utils' - module ActionMailer # Represents a subpart of an email message. It shares many similar # attributes of ActionMailer::Base. Although you can create parts manually # and add them to the +parts+ list of the mailer, it is easier # to use the helper methods in ActionMailer::PartContainer. class Part - include ActionMailer::AdvAttrAccessor - include ActionMailer::PartContainer + include AdvAttrAccessor, PartContainer, Utils # Represents the body of the part, as a string. This should not be a # Hash (like ActionMailer::Base), but if you want a template to be rendered @@ -64,7 +59,7 @@ module ActionMailer when "base64" then part.body = TMail::Base64.folding_encode(body) when "quoted-printable" - part.body = [Utils.normalize_new_lines(body)].pack("M*") + part.body = [normalize_new_lines(body)].pack("M*") else part.body = body end @@ -93,7 +88,10 @@ module ActionMailer part.parts << prt end - part.set_content_type(real_content_type, nil, ctype_attrs) if real_content_type =~ /multipart/ + if real_content_type =~ /multipart/ + ctype_attrs.delete 'charset' + part.set_content_type(real_content_type, nil, ctype_attrs) + end end headers.each { |k,v| part[k] = v } @@ -102,7 +100,6 @@ module ActionMailer end private - def squish(values={}) values.delete_if { |k,v| v.nil? } end diff --git a/vendor/rails/actionmailer/lib/action_mailer/part_container.rb b/vendor/rails/actionmailer/lib/action_mailer/part_container.rb index 3e3d6b9d..abfd8f84 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/part_container.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/part_container.rb @@ -41,7 +41,11 @@ module ActionMailer private def parse_content_type(defaults=nil) - return [defaults && defaults.content_type, {}] if content_type.blank? + if content_type.blank? + return defaults ? + [ defaults.content_type, { 'charset' => defaults.charset } ] : + [ nil, {} ] + end ctype, *attrs = content_type.split(/;\s*/) attrs = attrs.inject({}) { |h,s| k,v = s.split(/=/, 2); h[k] = v; h } [ctype, {"charset" => charset || defaults && defaults.charset}.merge(attrs)] diff --git a/vendor/rails/actionmailer/lib/action_mailer/quoting.rb b/vendor/rails/actionmailer/lib/action_mailer/quoting.rb index a2f2c707..94fa0420 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/quoting.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/quoting.rb @@ -12,7 +12,7 @@ module ActionMailer # account multi-byte characters (if executing with $KCODE="u", for instance) def quoted_printable_encode(character) result = "" - character.each_byte { |b| result << "=%02x" % b } + character.each_byte { |b| result << "=%02X" % b } result end diff --git a/vendor/rails/actionmailer/lib/action_mailer/test_case.rb b/vendor/rails/actionmailer/lib/action_mailer/test_case.rb index d474afe3..8035db6f 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/test_case.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/test_case.rb @@ -10,7 +10,7 @@ module ActionMailer end class TestCase < ActiveSupport::TestCase - include ActionMailer::Quoting + include Quoting, TestHelper setup :initialize_test_deliveries setup :set_expected_mail diff --git a/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb b/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb index 3a161244..f234c024 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb @@ -58,6 +58,7 @@ module ActionMailer end end +# TODO: Deprecate this module Test module Unit class TestCase diff --git a/vendor/rails/actionmailer/lib/action_mailer/utils.rb b/vendor/rails/actionmailer/lib/action_mailer/utils.rb index 552f695a..26d2e60a 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/utils.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/utils.rb @@ -3,6 +3,5 @@ module ActionMailer def normalize_new_lines(text) text.to_s.gsub(/\r\n?/, "\n") end - module_function :normalize_new_lines end end diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor.rb deleted file mode 100644 index 7a20e9bd..00000000 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Prefer gems to the bundled libs. -require 'rubygems' - -begin - gem 'tmail', '~> 1.2.3' -rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/tmail-1.2.3" -end - -begin - gem 'text-format', '>= 0.6.3' -rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/text-format-0.6.3" -end diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb index de054db8..2d20c7a6 100755 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb @@ -1150,7 +1150,7 @@ if __FILE__ == $0 assert_equal(Text::Format::JUSTIFY, @format_o.format_style) assert_match(/^of freedom, and that government of the people, by the people, for the$/, @format_o.format(GETTYSBURG).split("\n")[-3]) - assert_raises(ArgumentError) { @format_o.format_style = 33 } + assert_raise(ArgumentError) { @format_o.format_style = 33 } end def test_tag_paragraph diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/text_format.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/text_format.rb new file mode 100644 index 00000000..c6c8c394 --- /dev/null +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/text_format.rb @@ -0,0 +1,10 @@ +# Prefer gems to the bundled libs. +require 'rubygems' + +begin + gem 'text-format', '>= 0.6.3' +rescue Gem::LoadError + $:.unshift "#{File.dirname(__FILE__)}/text-format-0.6.3" +end + +require 'text/format' diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb index ab1a8284..0ddc5252 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb @@ -43,6 +43,7 @@ module Racc class Parser + old_verbose, $VERBOSE = $VERBOSE, nil Racc_Runtime_Version = '1.4.5' Racc_Runtime_Revision = '$Revision: 1.7 $'.split[1] @@ -71,6 +72,7 @@ module Racc Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R Racc_Runtime_Type = 'ruby' end + $VERBOSE = old_verbose def Parser.racc_runtime_type Racc_Runtime_Type diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb new file mode 100644 index 00000000..51d36cdd --- /dev/null +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb @@ -0,0 +1,17 @@ +# Prefer gems to the bundled libs. +require 'rubygems' + +begin + gem 'tmail', '~> 1.2.3' +rescue Gem::LoadError + $:.unshift "#{File.dirname(__FILE__)}/tmail-1.2.3" +end + +module TMail +end + +require 'tmail' + +silence_warnings do + TMail::Encoder.const_set("MAX_LINE_LEN", 200) +end diff --git a/vendor/rails/actionmailer/lib/action_mailer/version.rb b/vendor/rails/actionmailer/lib/action_mailer/version.rb index 52659515..a4289055 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/version.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/version.rb @@ -1,8 +1,8 @@ module ActionMailer module VERSION #:nodoc: MAJOR = 2 - MINOR = 2 - TINY = 2 + MINOR = 3 + TINY = 5 STRING = [MAJOR, MINOR, TINY].join('.') end diff --git a/vendor/rails/actionmailer/lib/actionmailer.rb b/vendor/rails/actionmailer/lib/actionmailer.rb index 50641629..878607ea 100644 --- a/vendor/rails/actionmailer/lib/actionmailer.rb +++ b/vendor/rails/actionmailer/lib/actionmailer.rb @@ -1 +1,2 @@ require 'action_mailer' +ActiveSupport::Deprecation.warn 'require "actionmailer" is deprecated and will be removed in Rails 3. Use require "action_mailer" instead.' diff --git a/vendor/rails/actionmailer/test/abstract_unit.rb b/vendor/rails/actionmailer/test/abstract_unit.rb index 1617b88c..9728ae5b 100644 --- a/vendor/rails/actionmailer/test/abstract_unit.rb +++ b/vendor/rails/actionmailer/test/abstract_unit.rb @@ -1,3 +1,4 @@ +require 'rubygems' require 'test/unit' $:.unshift "#{File.dirname(__FILE__)}/../lib" @@ -9,8 +10,15 @@ require 'action_mailer/test_case' # Show backtraces for deprecated behavior for quicker cleanup. ActiveSupport::Deprecation.debug = true +# Bogus template processors +ActionView::Template.register_template_handler :haml, lambda { |template| "Look its HAML!".inspect } +ActionView::Template.register_template_handler :bak, lambda { |template| "Lame backup".inspect } + $:.unshift "#{File.dirname(__FILE__)}/fixtures/helpers" -ActionMailer::Base.template_root = "#{File.dirname(__FILE__)}/fixtures" + +ActionView::Base.cache_template_loading = true +FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures') +ActionMailer::Base.template_root = FIXTURE_LOAD_PATH class MockSMTP def self.deliveries @@ -37,7 +45,6 @@ class Net::SMTP end def uses_gem(gem_name, test_name, version = '> 0') - require 'rubygems' gem gem_name.to_s, version require gem_name.to_s yield @@ -45,13 +52,6 @@ rescue LoadError $stderr.puts "Skipping #{test_name} tests. `gem install #{gem_name}` and try again." end -# Wrap tests that use Mocha and skip if unavailable. -unless defined? uses_mocha - def uses_mocha(test_name, &block) - uses_gem('mocha', test_name, '>= 0.5.5', &block) - end -end - def set_delivery_method(delivery_method) @old_delivery_method = ActionMailer::Base.delivery_method ActionMailer::Base.delivery_method = delivery_method diff --git a/vendor/rails/actionmailer/test/asset_host_test.rb b/vendor/rails/actionmailer/test/asset_host_test.rb new file mode 100644 index 00000000..1c92dd26 --- /dev/null +++ b/vendor/rails/actionmailer/test/asset_host_test.rb @@ -0,0 +1,54 @@ +require 'abstract_unit' + +class AssetHostMailer < ActionMailer::Base + def email_with_asset(recipient) + recipients recipient + subject "testing email containing asset path while asset_host is set" + from "tester@example.com" + end +end + +class AssetHostTest < Test::Unit::TestCase + def setup + set_delivery_method :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries = [] + + @recipient = 'test@localhost' + end + + def teardown + restore_delivery_method + end + + def test_asset_host_as_string + ActionController::Base.asset_host = "http://www.example.com" + mail = AssetHostMailer.deliver_email_with_asset(@recipient) + assert_equal "\"Somelogo\"", mail.body.strip + end + + def test_asset_host_as_one_arguement_proc + ActionController::Base.asset_host = Proc.new { |source| + if source.starts_with?('/images') + "http://images.example.com" + else + "http://assets.example.com" + end + } + mail = AssetHostMailer.deliver_email_with_asset(@recipient) + assert_equal "\"Somelogo\"", mail.body.strip + end + + def test_asset_host_as_two_arguement_proc + ActionController::Base.asset_host = Proc.new {|source,request| + if request && request.ssl? + "https://www.example.com" + else + "http://www.example.com" + end + } + mail = nil + assert_nothing_raised { mail = AssetHostMailer.deliver_email_with_asset(@recipient) } + assert_equal "\"Somelogo\"", mail.body.strip + end +end \ No newline at end of file diff --git a/vendor/rails/actionmailer/test/fixtures/asset_host_mailer/email_with_asset.html.erb b/vendor/rails/actionmailer/test/fixtures/asset_host_mailer/email_with_asset.html.erb new file mode 100644 index 00000000..b3f0438d --- /dev/null +++ b/vendor/rails/actionmailer/test/fixtures/asset_host_mailer/email_with_asset.html.erb @@ -0,0 +1 @@ +<%= image_tag "somelogo.png" %> \ No newline at end of file diff --git a/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.html.erb b/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.html.erb new file mode 100644 index 00000000..6d73f199 --- /dev/null +++ b/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.html.erb @@ -0,0 +1 @@ +text/html multipart \ No newline at end of file diff --git a/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.plain.erb b/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.plain.erb new file mode 100644 index 00000000..f4b91e40 --- /dev/null +++ b/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.plain.erb @@ -0,0 +1 @@ +text/plain multipart \ No newline at end of file diff --git a/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb b/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb index d66927aa..f6a6a49c 100644 --- a/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +++ b/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb @@ -1,5 +1,5 @@ module ExampleHelper def example_format(text) - "#{text}" + "#{h(text)}".html_safe! end end diff --git a/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.text.erb b/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.text.erb new file mode 100644 index 00000000..111576b6 --- /dev/null +++ b/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.text.erb @@ -0,0 +1 @@ +text/plain layout - <%= yield %> \ No newline at end of file diff --git a/vendor/rails/actionmailer/test/mail_layout_test.rb b/vendor/rails/actionmailer/test/mail_layout_test.rb index ffba9a16..50901f52 100644 --- a/vendor/rails/actionmailer/test/mail_layout_test.rb +++ b/vendor/rails/actionmailer/test/mail_layout_test.rb @@ -20,6 +20,14 @@ class AutoLayoutMailer < ActionMailer::Base from "tester@example.com" body render(:inline => "Hello, <%= @world %>", :layout => false, :body => { :world => "Earth" }) end + + def multipart(recipient, type = nil) + recipients recipient + subject "You have a mail" + from "tester@example.com" + + content_type(type) if type + end end class ExplicitLayoutMailer < ActionMailer::Base @@ -56,6 +64,43 @@ class LayoutMailerTest < Test::Unit::TestCase assert_equal "Hello from layout Inside", mail.body.strip end + def test_should_pickup_multipart_layout + mail = AutoLayoutMailer.create_multipart(@recipient) + assert_equal "multipart/alternative", mail.content_type + assert_equal 2, mail.parts.size + + assert_equal 'text/plain', mail.parts.first.content_type + assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body + + assert_equal 'text/html', mail.parts.last.content_type + assert_equal "Hello from layout text/html multipart", mail.parts.last.body + end + + def test_should_pickup_multipartmixed_layout + mail = AutoLayoutMailer.create_multipart(@recipient, "multipart/mixed") + assert_equal "multipart/mixed", mail.content_type + assert_equal 2, mail.parts.size + + assert_equal 'text/plain', mail.parts.first.content_type + assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body + + assert_equal 'text/html', mail.parts.last.content_type + assert_equal "Hello from layout text/html multipart", mail.parts.last.body + end + + def test_should_fix_multipart_layout + mail = AutoLayoutMailer.create_multipart(@recipient, "text/plain") + assert_equal "multipart/alternative", mail.content_type + assert_equal 2, mail.parts.size + + assert_equal 'text/plain', mail.parts.first.content_type + assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body + + assert_equal 'text/html', mail.parts.last.content_type + assert_equal "Hello from layout text/html multipart", mail.parts.last.body + end + + def test_should_pickup_layout_given_to_render mail = AutoLayoutMailer.create_spam(@recipient) assert_equal "Spammer layout Hello, Earth", mail.body.strip diff --git a/vendor/rails/actionmailer/test/mail_service_test.rb b/vendor/rails/actionmailer/test/mail_service_test.rb index b88beb33..db6d3df6 100644 --- a/vendor/rails/actionmailer/test/mail_service_test.rb +++ b/vendor/rails/actionmailer/test/mail_service_test.rb @@ -18,7 +18,6 @@ class TestMailer < ActionMailer::Base @recipients = recipient @subject = "[Signed up] Welcome #{recipient}" @from = "system@loudthinking.com" - @sent_on = Time.local(2004, 12, 12) @body["recipient"] = recipient end @@ -289,8 +288,6 @@ class TestMailer < ActionMailer::Base end end -uses_mocha 'ActionMailerTest' do - class ActionMailerTest < Test::Unit::TestCase include ActionMailer::Quoting @@ -332,6 +329,7 @@ class ActionMailerTest < Test::Unit::TestCase assert_equal "multipart/mixed", created.content_type assert_equal "multipart/alternative", created.parts.first.content_type assert_equal "bar", created.parts.first.header['foo'].to_s + assert_nil created.parts.first.charset assert_equal "text/plain", created.parts.first.parts.first.content_type assert_equal "text/html", created.parts.first.parts[1].content_type assert_equal "application/octet-stream", created.parts[1].content_type @@ -357,12 +355,14 @@ class ActionMailerTest < Test::Unit::TestCase end def test_signed_up + Time.stubs(:now => Time.now) + expected = new_mail expected.to = @recipient expected.subject = "[Signed up] Welcome #{@recipient}" expected.body = "Hello there, \n\nMr. #{@recipient}" expected.from = "system@loudthinking.com" - expected.date = Time.local(2004, 12, 12) + expected.date = Time.now created = nil assert_nothing_raised { created = TestMailer.create_signed_up(@recipient) } @@ -389,6 +389,8 @@ class ActionMailerTest < Test::Unit::TestCase end def test_custom_templating_extension + assert ActionView::Template.template_handler_extensions.include?("haml"), "haml extension was not registered" + # N.b., custom_templating_extension.text.plain.haml is expected to be in fixtures/test_mailer directory expected = new_mail expected.to = @recipient @@ -568,7 +570,9 @@ class ActionMailerTest < Test::Unit::TestCase mail = TestMailer.create_signed_up(@recipient) logger = mock() logger.expects(:info).with("Sent mail to #{@recipient}") - logger.expects(:debug).with("\n#{mail.encoded}") + logger.expects(:debug).with() do |logged_text| + logged_text =~ /\[Signed up\] Welcome/ + end TestMailer.logger = logger TestMailer.deliver_signed_up(@recipient) end @@ -799,6 +803,8 @@ EOF end def test_implicitly_multipart_messages + assert ActionView::Template.template_handler_extensions.include?("bak"), "bak extension was not registered" + mail = TestMailer.create_implicitly_multipart_example(@recipient) assert_equal 3, mail.parts.length assert_equal "1.0", mail.mime_version @@ -812,6 +818,8 @@ EOF end def test_implicitly_multipart_messages_with_custom_order + assert ActionView::Template.template_handler_extensions.include?("bak"), "bak extension was not registered" + mail = TestMailer.create_implicitly_multipart_example(@recipient, nil, ["text/yaml", "text/plain"]) assert_equal 3, mail.parts.length assert_equal "text/html", mail.parts[0].content_type @@ -915,6 +923,8 @@ EOF def test_multipart_with_template_path_with_dots mail = FunkyPathMailer.create_multipart_with_template_path_with_dots(@recipient) assert_equal 2, mail.parts.length + assert_equal 'text/plain', mail.parts[0].content_type + assert_equal 'utf-8', mail.parts[0].charset end def test_custom_content_type_attributes @@ -932,6 +942,7 @@ EOF ActionMailer::Base.delivery_method = :smtp TestMailer.deliver_return_path assert_match %r{^Return-Path: }, MockSMTP.deliveries[0][0] + assert_equal "another@somewhere.test", MockSMTP.deliveries[0][1].to_s end def test_body_is_stored_as_an_ivar @@ -940,6 +951,7 @@ EOF end def test_starttls_is_enabled_if_supported + ActionMailer::Base.smtp_settings[:enable_starttls_auto] = true MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(true) MockSMTP.any_instance.expects(:enable_starttls_auto) ActionMailer::Base.delivery_method = :smtp @@ -947,25 +959,34 @@ EOF end def test_starttls_is_disabled_if_not_supported + ActionMailer::Base.smtp_settings[:enable_starttls_auto] = true MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(false) MockSMTP.any_instance.expects(:enable_starttls_auto).never ActionMailer::Base.delivery_method = :smtp TestMailer.deliver_signed_up(@recipient) end -end -end # uses_mocha + def test_starttls_is_not_enabled + ActionMailer::Base.smtp_settings[:enable_starttls_auto] = false + MockSMTP.any_instance.expects(:respond_to?).never + MockSMTP.any_instance.expects(:enable_starttls_auto).never + ActionMailer::Base.delivery_method = :smtp + TestMailer.deliver_signed_up(@recipient) + ensure + ActionMailer::Base.smtp_settings[:enable_starttls_auto] = true + end +end class InheritableTemplateRootTest < Test::Unit::TestCase def test_attr expected = "#{File.dirname(__FILE__)}/fixtures/path.with.dots" - assert_equal expected, FunkyPathMailer.template_root + assert_equal expected, FunkyPathMailer.template_root.to_s sub = Class.new(FunkyPathMailer) sub.template_root = 'test/path' - assert_equal 'test/path', sub.template_root - assert_equal expected, FunkyPathMailer.template_root + assert_equal 'test/path', sub.template_root.to_s + assert_equal expected, FunkyPathMailer.template_root.to_s end end @@ -1051,7 +1072,7 @@ class RespondToTest < Test::Unit::TestCase end def test_should_still_raise_exception_with_expected_message_when_calling_an_undefined_method - error = assert_raises NoMethodError do + error = assert_raise NoMethodError do RespondToMailer.not_a_method end diff --git a/vendor/rails/actionmailer/test/quoting_test.rb b/vendor/rails/actionmailer/test/quoting_test.rb index 13a859a5..2fee1379 100644 --- a/vendor/rails/actionmailer/test/quoting_test.rb +++ b/vendor/rails/actionmailer/test/quoting_test.rb @@ -1,6 +1,5 @@ # encoding: utf-8 require 'abstract_unit' -require 'tmail' require 'tempfile' class QuotingTest < Test::Unit::TestCase @@ -49,8 +48,10 @@ class QuotingTest < Test::Unit::TestCase result = execute_in_sandbox(<<-CODE) $:.unshift(File.dirname(__FILE__) + "/../lib/") - $KCODE = 'u' - require 'jcode' + if RUBY_VERSION < '1.9' + $KCODE = 'u' + require 'jcode' + end require 'action_mailer/quoting' include ActionMailer::Quoting quoted_printable(#{original.inspect}, "UTF-8") diff --git a/vendor/rails/actionmailer/test/test_helper_test.rb b/vendor/rails/actionmailer/test/test_helper_test.rb index f8913e54..65b07a71 100644 --- a/vendor/rails/actionmailer/test/test_helper_test.rb +++ b/vendor/rails/actionmailer/test/test_helper_test.rb @@ -26,7 +26,7 @@ class TestHelperMailerTest < ActionMailer::TestCase end def test_determine_default_mailer_raises_correct_error - assert_raises(ActionMailer::NonInferrableMailerError) do + assert_raise(ActionMailer::NonInferrableMailerError) do self.class.determine_default_mailer("NotAMailerTest") end end @@ -36,7 +36,7 @@ class TestHelperMailerTest < ActionMailer::TestCase end def test_encode - assert_equal "=?utf-8?Q?=0aasdf=0a?=", encode("\nasdf\n") + assert_equal "=?utf-8?Q?=0Aasdf=0A?=", encode("\nasdf\n") end def test_assert_emails @@ -84,7 +84,7 @@ class TestHelperMailerTest < ActionMailer::TestCase end def test_assert_emails_too_few_sent - error = assert_raises Test::Unit::AssertionFailedError do + error = assert_raise ActiveSupport::TestCase::Assertion do assert_emails 2 do TestHelperMailer.deliver_test end @@ -94,7 +94,7 @@ class TestHelperMailerTest < ActionMailer::TestCase end def test_assert_emails_too_many_sent - error = assert_raises Test::Unit::AssertionFailedError do + error = assert_raise ActiveSupport::TestCase::Assertion do assert_emails 1 do TestHelperMailer.deliver_test TestHelperMailer.deliver_test @@ -105,7 +105,7 @@ class TestHelperMailerTest < ActionMailer::TestCase end def test_assert_no_emails_failure - error = assert_raises Test::Unit::AssertionFailedError do + error = assert_raise ActiveSupport::TestCase::Assertion do assert_no_emails do TestHelperMailer.deliver_test end diff --git a/vendor/rails/actionpack/CHANGELOG b/vendor/rails/actionpack/CHANGELOG index 0e56977e..3875bbe6 100644 --- a/vendor/rails/actionpack/CHANGELOG +++ b/vendor/rails/actionpack/CHANGELOG @@ -1,9 +1,155 @@ -*2.2.2 [2.2 Final]* +*2.3.5 (November 25, 2009)* -* Deprecated the :file default for ActionView#render to prepare for 2.3's new :partial default [DHH] +* Minor Bug Fixes and deprecation warnings + +* Ruby 1.9 Support + +* Fix filtering parameters when there are Fixnum or other un-dupable values. + +* Improvements to ActionView::TestCase + +* Compatiblity with the rails_xss plugin + +*2.3.4 (September 4, 2009)* + +* Sanitize multibyte strings before escaping them with escape_once. CVE-2009-3009 + +* Introduce grouped_collection_select helper. #1249 [Dan Codeape, Erik Ostrom] + +* Ruby 1.9: fix Content-Length for multibyte send_data streaming. #2661 [Sava Chankov] -*2.2.1 [RC2] (November 14th, 2008)* +*2.3.3 (July 12, 2009)* + +* Fixed that TestResponse.cookies was returning cookies unescaped #1867 [Doug McInnes] + + +*2.3.2 [Final] (March 15, 2009)* + +* Fixed that redirection would just log the options, not the final url (which lead to "Redirected to #") [DHH] + +* Don't check authenticity tokens for any AJAX requests [Ross Kaffenberger/Bryan Helmkamp] + +* Added ability to pass in :public => true to fresh_when, stale?, and expires_in to make the request proxy cachable #2095 [Gregg Pollack] + +* Fixed that passing a custom form builder would be forwarded to nested fields_for calls #2023 [Eloy Duran/Nate Wiger] + +* Form option helpers now support disabled option tags and the use of lambdas for selecting/disabling option tags from collections #837 [Tekin] + +* Added partial scoping to TranslationHelper#translate, so if you call translate(".foo") from the people/index.html.erb template, you'll actually be calling I18n.translate("people.index.foo") [DHH] + +* Fix a syntax error in current_page?() that was prevent matches against URL's with multiple query parameters #1385, #1868 [chris finne/Andrew White] + +* Added localized rescue template when I18n.locale is set (ex: public/404.da.html) #1835 [José Valim] + +* Make the form_for and fields_for helpers support the new Active Record nested update options. #1202 [Eloy Duran] + + <% form_for @person do |person_form| %> + ... + <% person_form.fields_for :projects do |project_fields| %> + <% if project_fields.object.active? %> + Name: <%= project_fields.text_field :name %> + <% end %> + <% end %> + <% end %> + + +* Added grouped_options_for_select helper method for wrapping option tags in optgroups. #977 [Jon Crawford] + +* Implement HTTP Digest authentication. #1230 [Gregg Kellogg, Pratik Naik] Example : + + class DummyDigestController < ActionController::Base + USERS = { "lifo" => 'world' } + + before_filter :authenticate + + def index + render :text => "Hello Secret" + end + + private + + def authenticate + authenticate_or_request_with_http_digest("Super Secret") do |username| + # Return the user's password + USERS[username] + end + end + end + +* Improved i18n support for the number_to_human_size helper. Changes the storage_units translation data; update your translations accordingly. #1634 [Yaroslav Markin] + storage_units: + # %u is the storage unit, %n is the number (default: 2 MB) + format: "%n %u" + units: + byte: + one: "Byte" + other: "Bytes" + kb: "KB" + mb: "MB" + gb: "GB" + tb: "TB" + +* Added :silence option to BenchmarkHelper#benchmark and turned log_level into a hash parameter and deprecated the old use [DHH] + +* Fixed the AssetTagHelper cache to use the computed asset host as part of the cache key instead of just assuming the its a string #1299 [DHH] + +* Make ActionController#render(string) work as a shortcut for render :file/:template/:action => string. [#1435] [Pratik Naik] Examples: + + # Instead of render(:action => 'other_action') + render('other_action') # argument has no '/' + render(:other_action) + + # Instead of render(:template => 'controller/action') + render('controller/action') # argument must not begin with a '/', but contain a '/' + + # Instead of render(:file => '/Users/lifo/home.html.erb') + render('/Users/lifo/home.html.erb') # argument must begin with a '/' + +* Add :prompt option to date/time select helpers. #561 [Sam Oliver] + +* Fixed that send_file shouldn't set an etag #1578 [Hongli Lai] + +* Allow users to opt out of the spoofing checks in Request#remote_ip. Useful for sites whose traffic regularly triggers false positives. [Darren Boyd] + +* Deprecated formatted_polymorphic_url. [Jeremy Kemper] + +* Added the option to declare an asset_host as an object that responds to call (see http://github.com/dhh/asset-hosting-with-minimum-ssl for an example) [David Heinemeier Hansson] + +* Added support for multiple routes.rb files (useful for plugin engines). This also means that draw will no longer clear the route set, you have to do that by hand (shouldn't make a difference to you unless you're doing some funky stuff) [David Heinemeier Hansson] + +* Dropped formatted_* routes in favor of just passing in :format as an option. This cuts resource routes generation in half #1359 [aaronbatalion] + +* Remove support for old double-encoded cookies from the cookie store. These values haven't been generated since before 2.1.0, and any users who have visited the app in the intervening 6 months will have had their cookie upgraded. [Michael Koziarski] + +* Allow helpers directory to be overridden via ActionController::Base.helpers_dir #1424 [Sam Pohlenz] + +* Remove deprecated ActionController::Base#assign_default_content_type_and_charset + +* Changed the default of ActionView#render to assume partials instead of files when not given an options hash [David Heinemeier Hansson]. Examples: + + # Instead of <%= render :partial => "account" %> + <%= render "account" %> + + # Instead of <%= render :partial => "account", :locals => { :account => @buyer } %> + <%= render "account", :account => @buyer %> + + # @account is an Account instance, so it uses the RecordIdentifier to replace + # <%= render :partial => "accounts/account", :locals => { :account => @account } %> + <%= render(@account) %> + + # @posts is an array of Post instances, so it uses the RecordIdentifier to replace + # <%= render :partial => "posts/post", :collection => @posts %> + <%= render(@posts) %> + +* Remove deprecated render_component. Please use the plugin from http://github.com/rails/render_component/tree/master [Pratik Naik] + +* Fixed RedCloth and BlueCloth shouldn't preload. Instead just assume that they're available if you want to use textilize and markdown and let autoload require them [David Heinemeier Hansson] + + +*2.2.2 (November 21st, 2008)* + +* I18n: translate number_to_human_size. Add storage_units: [Bytes, KB, MB, GB, TB] to your translations. #1448 [Yaroslav Markin] * Restore backwards compatible functionality for setting relative_url_root. Include deprecation @@ -15,7 +161,7 @@ product.resources :images, :except => :destroy end -* Added render :js for people who want to render inline JavaScript replies without using RJS [DHH] +* Added render :js for people who want to render inline JavaScript replies without using RJS [David Heinemeier Hansson] * Fixed that polymorphic_url should compact given array #1317 [hiroshi] @@ -25,9 +171,9 @@ * Fix regression bug that made date_select and datetime_select raise a Null Pointer Exception when a nil date/datetime was passed and only month and year were displayed #1289 [Bernardo Padua/Tor Erik] -* Simplified the logging format for parameters (don't include controller, action, and format as duplicates) [DHH] +* Simplified the logging format for parameters (don't include controller, action, and format as duplicates) [David Heinemeier Hansson] -* Remove the logging of the Session ID when the session store is CookieStore [DHH] +* Remove the logging of the Session ID when the session store is CookieStore [David Heinemeier Hansson] * Fixed regex in redirect_to to fully support URI schemes #1247 [Seth Fitzsimmons] @@ -38,7 +184,7 @@ * Fix incorrect closing CDATA delimiter and that HTML::Node.parse would blow up on unclosed CDATA sections [packagethief] -* Added stale? and fresh_when methods to provide a layer of abstraction above request.fresh? and friends [DHH]. Example: +* Added stale? and fresh_when methods to provide a layer of abstraction above request.fresh? and friends [David Heinemeier Hansson]. Example: class ArticlesController < ApplicationController def show_with_respond_to_block @@ -88,13 +234,13 @@ * Fixed FormTagHelper#submit_tag with :disable_with option wouldn't submit the button's value when was clicked #633 [Jose Fernandez] -* Stopped logging template compiles as it only clogs up the log [DHH] +* Stopped logging template compiles as it only clogs up the log [David Heinemeier Hansson] -* Changed the X-Runtime header to report in milliseconds [DHH] +* Changed the X-Runtime header to report in milliseconds [David Heinemeier Hansson] -* Changed BenchmarkHelper#benchmark to report in milliseconds [DHH] +* Changed BenchmarkHelper#benchmark to report in milliseconds [David Heinemeier Hansson] -* Changed logging format to be millisecond based and skip misleading stats [DHH]. Went from: +* Changed logging format to be millisecond based and skip misleading stats [David Heinemeier Hansson]. Went from: Completed in 0.10000 (4 reqs/sec) | Rendering: 0.04000 (40%) | DB: 0.00400 (4%) | 200 OK [http://example.com] @@ -118,7 +264,7 @@ * Added button_to_remote helper. #3641 [Donald Piret, Tarmo Tänav] -* Deprecate render_component. Please use render_component plugin from http://github.com/rails/render_component/tree/master [Pratik] +* Deprecate render_component. Please use render_component plugin from http://github.com/rails/render_component/tree/master [Pratik Naik] * Routes may be restricted to lists of HTTP methods instead of a single method or :any. #407 [Brennan Dunn, Gaius Centus Novus] map.resource :posts, :collection => { :search => [:get, :post] } @@ -152,7 +298,7 @@ * All 2xx requests are considered successful [Josh Peek] -* Fixed that AssetTagHelper#compute_public_path shouldn't cache the asset_host along with the source or per-request proc's won't run [DHH] +* Fixed that AssetTagHelper#compute_public_path shouldn't cache the asset_host along with the source or per-request proc's won't run [David Heinemeier Hansson] * Removed config.action_view.cache_template_loading, use config.cache_classes instead [Josh Peek] @@ -215,7 +361,7 @@ * Replaced TemplateFinder abstraction with ViewLoadPaths [Josh Peek] -* Added block-call style to link_to [Sam Stephenson/DHH]. Example: +* Added block-call style to link_to [Sam Stephenson/David Heinemeier Hansson]. Example: <% link_to(@profile) do %> <%= @profile.name %> -- Check it out!! @@ -246,30 +392,30 @@ * Added session(:on) to turn session management back on in a controller subclass if the superclass turned it off (Peter Jones) [#136] -* Change the request forgery protection to go by Content-Type instead of request.format so that you can't bypass it by POSTing to "#{request.uri}.xml" [rick] +* Change the request forgery protection to go by Content-Type instead of request.format so that you can't bypass it by POSTing to "#{request.uri}.xml" [Rick Olson] * InstanceTag#default_time_from_options with hash args uses Time.current as default; respects hash settings when time falls in system local spring DST gap [Geoff Buesing] * select_date defaults to Time.zone.today when config.time_zone is set [Geoff Buesing] * Fixed that TextHelper#text_field would corrypt when raw HTML was used as the value (mchenryc, Kevin Glowacz) [#80] -* Added ActionController::TestCase#rescue_action_in_public! to control whether the action under test should use the regular rescue_action path instead of simply raising the exception inline (great for error testing) [DHH] +* Added ActionController::TestCase#rescue_action_in_public! to control whether the action under test should use the regular rescue_action path instead of simply raising the exception inline (great for error testing) [David Heinemeier Hansson] -* Reduce number of instance variables being copied from controller to view. [Pratik] +* Reduce number of instance variables being copied from controller to view. [Pratik Naik] * select_datetime and select_time default to Time.zone.now when config.time_zone is set [Geoff Buesing] * datetime_select defaults to Time.zone.now when config.time_zone is set [Geoff Buesing] -* Remove ActionController::Base#view_controller_internals flag. [Pratik] +* Remove ActionController::Base#view_controller_internals flag. [Pratik Naik] * Add conditional options to caches_page method. [Paul Horsfall] -* Move missing template logic to ActionView. [Pratik] +* Move missing template logic to ActionView. [Pratik Naik] -* Introduce ActionView::InlineTemplate class. [Pratik] +* Introduce ActionView::InlineTemplate class. [Pratik Naik] -* Automatically parse posted JSON content for Mime::JSON requests. [rick] +* Automatically parse posted JSON content for Mime::JSON requests. [Rick Olson] POST /posts {"post": {"title": "Breaking News"}} @@ -279,14 +425,14 @@ # ... end -* add json_escape ERB util to escape html entities in json strings that are output in HTML pages. [rick] +* add json_escape ERB util to escape html entities in json strings that are output in HTML pages. [Rick Olson] * Provide a helper proxy to access helper methods from outside views. Closes #10839 [Josh Peek] e.g. ApplicationController.helpers.simple_format(text) * Improve documentation. [Xavier Noria, leethal, jerome] -* Ensure RJS redirect_to doesn't html-escapes string argument. Closes #8546 [josh, eventualbuddha, Pratik] +* Ensure RJS redirect_to doesn't html-escapes string argument. Closes #8546 [Josh Peek, eventualbuddha, Pratik Naik] * Support render :partial => collection of heterogeneous elements. #11491 [Zach Dennis] @@ -298,17 +444,17 @@ * Fixed HTML::Tokenizer (used in sanitize helper) didn't handle unclosed CDATA tags #10071 [esad, packagethief] -* Improve documentation. [Radar, Jan De Poorter, chuyeow, xaviershay, danger, miloops, Xavier Noria, Sunny Ripert] +* Improve documentation. [Ryan Bigg, Jan De Poorter, Cheah Chu Yeow, Xavier Shay, Jack Danger Canty, Emilio Tagua, Xavier Noria, Sunny Ripert] * Fixed that FormHelper#radio_button would produce invalid ids #11298 [harlancrystal] -* Added :confirm option to submit_tag #11415 [miloops] +* Added :confirm option to submit_tag #11415 [Emilio Tagua] * Fixed NumberHelper#number_with_precision to properly round in a way that works equally on Mac, Windows, Linux (closes #11409, #8275, #10090, #8027) [zhangyuanyi] -* Allow the #simple_format text_helper to take an html_options hash for each paragraph. #2448 [Francois Beausoleil, thechrisoshow] +* Allow the #simple_format text_helper to take an html_options hash for each paragraph. #2448 [François Beausoleil, Chris O'Sullivan] -* Fix regression from filter refactoring where re-adding a skipped filter resulted in it being called twice. [rick] +* Fix regression from filter refactoring where re-adding a skipped filter resulted in it being called twice. [Rick Olson] * Refactor filters to use Active Support callbacks. #11235 [Josh Peek] @@ -324,43 +470,43 @@ * Fix nested parameter hash parsing bug. #10797 [thomas.lee] -* Allow using named routes in ActionController::TestCase before any request has been made. Closes #11273 [alloy] +* Allow using named routes in ActionController::TestCase before any request has been made. Closes #11273 [Eloy Duran] -* Fixed that sweepers defined by cache_sweeper will be added regardless of the perform_caching setting. Instead, control whether the sweeper should be run with the perform_caching setting. This makes testing easier when you want to turn perform_caching on/off [DHH] +* Fixed that sweepers defined by cache_sweeper will be added regardless of the perform_caching setting. Instead, control whether the sweeper should be run with the perform_caching setting. This makes testing easier when you want to turn perform_caching on/off [David Heinemeier Hansson] * Make MimeResponds::Responder#any work without explicit types. Closes #11140 [jaw6] * Better error message for type conflicts when parsing params. Closes #7962 [spicycode, matt] -* Remove unused ActionController::Base.template_class. Closes #10787 [Pratik] +* Remove unused ActionController::Base.template_class. Closes #10787 [Pratik Naik] -* Moved template handlers related code from ActionView::Base to ActionView::Template. [Pratik] +* Moved template handlers related code from ActionView::Base to ActionView::Template. [Pratik Naik] -* Tests for div_for and content_tag_for helpers. Closes #11223 [thechrisoshow] +* Tests for div_for and content_tag_for helpers. Closes #11223 [Chris O'Sullivan] * Allow file uploads in Integration Tests. Closes #11091 [RubyRedRick] -* Refactor partial rendering into a PartialTemplate class. [Pratik] +* Refactor partial rendering into a PartialTemplate class. [Pratik Naik] -* Added that requests with JavaScript as the priority mime type in the accept header and no format extension in the parameters will be treated as though their format was :js when it comes to determining which template to render. This makes it possible for JS requests to automatically render action.js.rjs files without an explicit respond_to block [DHH] +* Added that requests with JavaScript as the priority mime type in the accept header and no format extension in the parameters will be treated as though their format was :js when it comes to determining which template to render. This makes it possible for JS requests to automatically render action.js.rjs files without an explicit respond_to block [David Heinemeier Hansson] -* Tests for distance_of_time_in_words with TimeWithZone instances. Closes #10914 [ernesto.jimenez] +* Tests for distance_of_time_in_words with TimeWithZone instances. Closes #10914 [Ernesto Jimenez] * Remove support for multivalued (e.g., '&'-delimited) cookies. [Jamis Buck] * Fix problem with render :partial collections, records, and locals. #11057 [lotswholetime] -* Added support for naming concrete classes in sweeper declarations [DHH] +* Added support for naming concrete classes in sweeper declarations [David Heinemeier Hansson] -* Remove ERB trim variables from trace template in case ActionView::Base.erb_trim_mode is changed in the application. #10098 [tpope, kampers] +* Remove ERB trim variables from trace template in case ActionView::Base.erb_trim_mode is changed in the application. #10098 [Tim Pope, Chris Kampmeier] -* Fix typo in form_helper documentation. #10650 [xaviershay, kampers] +* Fix typo in form_helper documentation. #10650 [Xavier Shay, Chris Kampmeier] * Fix bug with setting Request#format= after the getter has cached the value. #10889 [cch1] -* Correct inconsistencies in RequestForgeryProtection docs. #11032 [mislav] +* Correct inconsistencies in RequestForgeryProtection docs. #11032 [Mislav Marohnić] -* Introduce a Template class to ActionView. #11024 [lifofifo] +* Introduce a Template class to ActionView. #11024 [Pratik Naik] * Introduce the :index option for form_for and fields_for to simplify multi-model forms (see http://railscasts.com/episodes/75). #9883 [rmm5t] @@ -376,7 +522,7 @@ e.g. map.dashboard '/dashboard', :controller=>'dashboard' map.root :dashboard -* Handle corner case with image_tag when passed 'messed up' image names. #9018 [duncanbeevers, mpalmer] +* Handle corner case with image_tag when passed 'messed up' image names. #9018 [Duncan Beevers, mpalmer] * Add label_tag helper for generating elements. #10802 [DefV] @@ -384,15 +530,15 @@ * Performance: optimize route recognition. Large speedup for apps with many resource routes. #10835 [oleganza] -* Make render :partial recognise form builders and use the _form partial. #10814 [djanowski] +* Make render :partial recognise form builders and use the _form partial. #10814 [Damian Janowski] * Allow users to declare other namespaces when using the atom feed helpers. #10304 [david.calavera] * Introduce send_file :x_sendfile => true to send an X-Sendfile response header. [Jeremy Kemper] -* Fixed ActionView::Helpers::ActiveRecordHelper::form for when protect_from_forgery is used #10739 [jeremyevans] +* Fixed ActionView::Helpers::ActiveRecordHelper::form for when protect_from_forgery is used #10739 [Jeremy Evans] -* Provide nicer access to HTTP Headers. Instead of request.env["HTTP_REFERRER"] you can now use request.headers["Referrer"]. [Koz] +* Provide nicer access to HTTP Headers. Instead of request.env["HTTP_REFERRER"] you can now use request.headers["Referrer"]. [Michael Koziarski] * UrlWriter respects relative_url_root. #10748 [Cheah Chu Yeow] @@ -402,26 +548,26 @@ * assert_response failures include the exception message. #10688 [Seth Rasmussen] -* All fragment cache keys are now by default prefixed with the "views/" namespace [DHH] +* All fragment cache keys are now by default prefixed with the "views/" namespace [David Heinemeier Hansson] -* Moved the caching stores from ActionController::Caching::Fragments::* to ActiveSupport::Cache::*. If you're explicitly referring to a store, like ActionController::Caching::Fragments::MemoryStore, you need to update that reference with ActiveSupport::Cache::MemoryStore [DHH] +* Moved the caching stores from ActionController::Caching::Fragments::* to ActiveSupport::Cache::*. If you're explicitly referring to a store, like ActionController::Caching::Fragments::MemoryStore, you need to update that reference with ActiveSupport::Cache::MemoryStore [David Heinemeier Hansson] -* Deprecated ActionController::Base.fragment_cache_store for ActionController::Base.cache_store [DHH] +* Deprecated ActionController::Base.fragment_cache_store for ActionController::Base.cache_store [David Heinemeier Hansson] -* Made fragment caching in views work for rjs and builder as well #6642 [zsombor] +* Made fragment caching in views work for rjs and builder as well #6642 [Dee Zsombor] * Fixed rendering of partials with layout when done from site layout #9209 [antramm] -* Fix atom_feed_helper to comply with the atom spec. Closes #10672 [xaviershay] +* Fix atom_feed_helper to comply with the atom spec. Closes #10672 [Xavier Shay] * The tags created do not contain a date (http://feedvalidator.org/docs/error/InvalidTAG.html) * IDs are not guaranteed unique * A default self link was not provided, contrary to the documentation * NOTE: This changes tags for existing atom entries, but at least they validate now. -* Correct indentation in tests. Closes #10671 [l.guidi] +* Correct indentation in tests. Closes #10671 [Luca Guidi] -* Fix that auto_link looks for ='s in url paths (Amazon urls have them). Closes #10640 [bgreenlee] +* Fix that auto_link looks for ='s in url paths (Amazon urls have them). Closes #10640 [Brad Greenlee] * Ensure that test case setup is run even if overridden. #10382 [Josh Peek] @@ -438,7 +584,7 @@ * Added OPTIONS to list of default accepted HTTP methods #10449 [holoway] -* Added option to pass proc to ActionController::Base.asset_host for maximum configurability #10521 [chuyeow]. Example: +* Added option to pass proc to ActionController::Base.asset_host for maximum configurability #10521 [Cheah Chu Yeow]. Example: ActionController::Base.asset_host = Proc.new { |source| if source.starts_with?('/images') @@ -467,45 +613,45 @@ * Fixed send_file/binary_content for testing #8044 [tolsen] -* When a NonInferrableControllerError is raised, make the proposed fix clearer in the error message. Closes #10199 [danger] +* When a NonInferrableControllerError is raised, make the proposed fix clearer in the error message. Closes #10199 [Jack Danger Canty] * Update Prototype to 1.6.0.1. [sam] * Update script.aculo.us to 1.8.0.1. [madrobby] -* Add 'disabled' attribute to