Permalink
Browse files

Merge remote branch 'mainstream/master'

  • Loading branch information...
2 parents bd4a3cc + a115b5d commit cda36a0731f14b33a920bf7e32255661e06f890a @lifo lifo committed Jan 3, 2010
Showing 555 changed files with 13,588 additions and 19,110 deletions.
View
@@ -7,16 +7,9 @@ activerecord/doc
actionpack/doc
actionmailer/doc
activesupport/doc
-activemodel/pkg
-activeresource/pkg
-activerecord/pkg
-actionpack/pkg
activemodel/test/fixtures/fixture_database.sqlite3
-actionmailer/pkg
-activesupport/pkg
actionpack/test/tmp
activesupport/test/fixtures/isolation_test
-railties/pkg
railties/test/500.html
railties/test/fixtures/tmp
railties/test/initializer/root/log
@@ -31,3 +24,4 @@ railties/guides/output
bin
vendor/gems/
railties/tmp
+pkg
View
@@ -1,6 +1,6 @@
[submodule "arel"]
path = arel
url = git://github.com/rails/arel.git
-[submodule "rack-mount"]
- path = rack-mount
- url = git://github.com/rails/rack-mount.git
+[submodule "rack"]
+ path = rack
+ url = git://github.com/rails/rack.git
View
24 Gemfile
@@ -1,23 +1,27 @@
-clear_sources
-source 'http://gemcutter.org'
-
gem "rake", ">= 0.8.7"
gem "mocha", ">= 0.9.8"
+gem "ruby-debug", ">= 0.10.3" if RUBY_VERSION < '1.9'
-gem "rails", "3.0.pre", :vendored_at => "railties"
+gem "rails", "3.0.pre", :path => "railties"
%w(activesupport activemodel actionpack actionmailer activerecord activeresource).each do |lib|
- gem lib, '3.0.pre', :vendored_at => lib
+ gem lib, '3.0.pre', :path => lib
end
+# AS
+gem "i18n", ">= 0.3.0"
+
# AR
gem "arel", "0.2.pre", :git => "git://github.com/rails/arel.git"
gem "sqlite3-ruby", ">= 1.2.5"
-gem "pg", ">= 0.8.0"
-gem "mysql", ">= 2.8.1"
+
+only :test do
+ gem "pg", ">= 0.8.0"
+ gem "mysql", ">= 2.8.1"
+end
# AP
-gem "rack", "1.0.1", :git => "git://github.com/rails/rack.git"
-gem "rack-mount", :git => "git://github.com/rails/rack-mount.git"
+gem "rack", "1.1.0", :git => "git://github.com/rack/rack.git"
+gem "rack-test", "0.5.3"
gem "RedCloth", ">= 4.2.2"
if ENV['CI']
@@ -34,3 +38,5 @@ if ENV['CI']
gem "test-unit", ">= 2.0.5"
end
end
+
+disable_system_gems
View
@@ -1,9 +1,10 @@
require 'rake'
require 'rake/rdoctask'
+require 'rake/gempackagetask'
env = %(PKG_BUILD="#{ENV['PKG_BUILD']}") if ENV['PKG_BUILD']
-PROJECTS = %w(activesupport actionpack actionmailer activeresource activerecord activemodel railties)
+PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource activerecord railties)
Dir["#{File.dirname(__FILE__)}/*/lib/*/version.rb"].each do |version_path|
require version_path
@@ -23,11 +24,28 @@ task :default => %w(test test:isolated)
end
end
+desc "Smoke-test all projects"
+task :smoke do
+ (PROJECTS - %w(activerecord)).each do |project|
+ system %(cd #{project} && #{env} #{$0} test:isolated)
+ end
+ system %(cd activerecord && #{env} #{$0} sqlite3:isolated_test)
+end
+
+spec = eval(File.read('rails.gemspec'))
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.gem_spec = spec
+end
+
task :install => :gem do
+ system %(cd arel && gem build arel.gemspec && gem install arel-0.2.pre.gem --no-ri --no-rdoc --ignore-dependencies)
+ system %(cd rack && rake gem VERSION=1.0.2.pre && gem install rack-1.0.2.pre.gem --no-ri --no-rdoc --ignore-dependencies)
(PROJECTS - ["railties"]).each do |project|
+ puts "INSTALLING #{project}"
system("gem install #{project}/pkg/#{project}-#{ActionPack::VERSION::STRING}.gem --no-ri --no-rdoc")
end
- system("gem install railties/pkg/rails-#{ActionPack::VERSION::STRING}.gem --no-ri --no-rdoc")
+ system("gem install railties/pkg/railties-#{ActionPack::VERSION::STRING}.gem --no-ri --no-rdoc")
+ system("gem install pkg/rails-#{ActionPack::VERSION::STRING}.gem --no-ri --no-rdoc")
end
desc "Generate documentation for the Rails framework"
View
@@ -1,3 +1,27 @@
+*Rails 3.0 (pending)*
+
+* The Mail::Message class has helped methods for all the field types that return 'common' defaults for the common use case, so to get the subject, mail.subject will give you a string, mail.date will give you a DateTime object, mail.from will give you an array of address specs (mikel@test.lindsaar.net) etc. If you want to access the field object itself, call mail[:field_name] which will return the field object you want, which you can then chain, like mail[:from].formatted
+
+* Mail#content_type now returns the content_type field as a string. If you want the mime type of a mail, then you call Mail#mime_type (eg, text/plain), if you want the parameters of the content type field, you call Mail#content_type_parameters which gives you a hash, eg {'format' => 'flowed', 'charset' => 'utf-8'}
+
+* ActionMailer::Base :default_implicit_parts_order now is in the sequence of the order you want, no reversing of ordering takes place. The default order now is text/plain, then text/enriched, then text/html and then any other part that is not one of these three.
+
+* Mail does not have "quoted_body", "quoted_subject" etc. All of these are accessed via body.encoded, subject.encoded etc
+
+* Every object in a Mail object returns an object, never a string. So Mail.body returns a Mail::Body class object, need to call #encoded or #decoded to get the string you want.
+* Mail::Message#set_content_type does not exist, it is simply Mail::Message#content_type
+
+* Every mail message gets a unique message_id unless you specify one, had to change all the tests that check for equality with expected.encoded == actual.encoded to first replace their message_ids with control values
+
+* Mail now has a proper concept of parts, remove the ActionMailer::Part and ActionMailer::PartContainer classes
+
+* Calling #encoded on any object returns it as a string ready to go into the output stream of an email, this means it includes the \r\n at the end of the lines and the object is pre-wrapped with \r\n\t if it is a header field. Also, the "encoded" value includes the field name if it is a header field.
+
+* Attachments are only the actual attachment, with filename etc. A part contains an attachment. The part has the content_type etc. So attachments.last.content_type is invalid. But parts.last.content_type
+
+* There is no idea of a "sub_head" in Mail. A part is just a Message with some extra functionality, so it just has a "header" like a normal mail message
+
+
*2.3.2 [Final] (March 15, 2009)*
* Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP #1842 [Matt Jones]
View
@@ -23,7 +23,6 @@ task :default => [ :test ]
Rake::TestTask.new { |t|
t.libs << "test"
t.pattern = 'test/*_test.rb'
- t.verbose = true
t.warning = true
}
@@ -11,6 +11,7 @@ Gem::Specification.new do |s|
s.homepage = "http://www.rubyonrails.org"
s.add_dependency('actionpack', '= 3.0.pre')
+ s.add_dependency('mail', '~> 1.5.0')
s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*']
s.has_rdoc = true
@@ -21,36 +21,27 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++
-actionpack_path = "#{File.dirname(__FILE__)}/../../actionpack/lib"
-$:.unshift(actionpack_path) if File.directory?(actionpack_path)
+actionpack_path = File.expand_path('../../../actionpack/lib', __FILE__)
+$:.unshift(actionpack_path) if File.directory?(actionpack_path) && !$:.include?(actionpack_path)
+
require 'action_controller'
require 'action_view'
module ActionMailer
- def self.load_all!
- [Base, Part, ::Text::Format, ::Net::SMTP]
- end
+ extend ::ActiveSupport::Autoload
- autoload :AdvAttrAccessor, 'action_mailer/adv_attr_accessor'
- autoload :DeprecatedBody, 'action_mailer/deprecated_body'
- autoload :Base, 'action_mailer/base'
- autoload :DeliveryMethod, 'action_mailer/delivery_method'
- 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'
+ autoload :AdvAttrAccessor
+ autoload :Base
+ autoload :DeliveryMethod
+ autoload :DeprecatedBody
+ autoload :MailHelper
+ autoload :Quoting
+ autoload :TestCase
+ autoload :TestHelper
end
module Text
- autoload :Format, 'action_mailer/vendor/text_format'
-end
+ extend ActiveSupport::Autoload
-module Net
- autoload :SMTP, 'net/smtp'
+ autoload :Format, 'action_mailer/vendor/text_format'
end
-
-autoload :MailHelper, 'action_mailer/mail_helper'
-
-require 'action_mailer/vendor/tmail'
@@ -1,29 +1,25 @@
module ActionMailer
module AdvAttrAccessor #:nodoc:
- def self.included(base)
- base.extend(ClassMethods)
- end
-
- module ClassMethods #:nodoc:
- def adv_attr_accessor(*names)
- names.each do |name|
- ivar = "@#{name}"
+ def adv_attr_accessor(*names)
+ names.each do |name|
+ ivar = "@#{name}"
- define_method("#{name}=") do |value|
- instance_variable_set(ivar, value)
+ class_eval <<-ACCESSORS, __FILE__, __LINE__ + 1
+ def #{name}=(value)
+ #{ivar} = value
end
- define_method(name) do |*parameters|
- raise ArgumentError, "expected 0 or 1 parameters" unless parameters.length <= 1
- if parameters.empty?
- if instance_variable_names.include?(ivar)
- instance_variable_get(ivar)
- end
+ def #{name}(*args)
+ raise ArgumentError, "expected 0 or 1 parameters" unless args.length <= 1
+ if args.empty?
+ #{ivar} if instance_variable_names.include?(#{ivar.inspect})
else
- instance_variable_set(ivar, parameters.first)
+ #{ivar} = args.first
end
end
- end
+ ACCESSORS
+
+ self.protected_instance_variables << ivar if self.respond_to?(:protected_instance_variables)
end
end
end
Oops, something went wrong.

0 comments on commit cda36a0

Please sign in to comment.