Permalink
Browse files

Merge branch 'master' of https://github.com/rails/rails into performa…

…nce_test

Conflicts:
	activesupport/lib/active_support/testing/performance.rb
  • Loading branch information...
2 parents 1c2b223 + 70f9558 commit aec7456f81985b88d6d604679d754636183b5b3a @goncalossilva goncalossilva committed May 8, 2011
Showing 371 changed files with 7,586 additions and 22,008 deletions.
View
@@ -22,3 +22,4 @@ railties/doc
railties/guides/output
railties/tmp
.rvmrc
+RDOC_MAIN.rdoc
View
@@ -5,15 +5,12 @@ gemspec
if ENV['AREL']
gem "arel", :path => ENV['AREL']
else
- gem "arel", :git => "git://github.com/rails/arel.git"
+ gem "arel", '~> 2.1.0'
end
-gem "rack", :git => "git://github.com/rack/rack.git"
-gem "rack-test", :git => "git://github.com/brynary/rack-test.git"
-
-gem "sprockets", :git => "git://github.com/sstephenson/sprockets.git"
gem "coffee-script"
-gem "sass", ">= 3.0"
+gem "sass"
+gem "uglifier"
gem "rake", ">= 0.8.7"
gem "mocha", ">= 0.9.8"
@@ -26,12 +23,10 @@ end
# AS
gem "memcache-client", ">= 1.8.5"
-gem "fssm", "~> 0.2.5"
platforms :mri_18 do
gem "system_timer"
gem "ruby-debug", ">= 0.10.3"
- gem 'ruby-prof'
gem "json"
end
@@ -48,19 +43,22 @@ platforms :ruby do
gem 'yajl-ruby'
gem "nokogiri", ">= 1.4.4"
+ group :test do
+ gem 'ruby-prof'
+ end
# AR
gem "sqlite3", "~> 1.3.3"
group :db do
- gem "pg", ">= 0.9.0"
+ gem "pg", ">= 0.11.0"
gem "mysql", ">= 2.8.1"
- gem "mysql2", :git => "git://github.com/brianmario/mysql2.git"
+ gem "mysql2", ">= 0.3.0"
end
end
platforms :jruby do
gem "ruby-debug", ">= 0.10.3"
-
+ gem "json"
gem "activerecord-jdbcsqlite3-adapter"
# This is needed by now to let tests work on JRuby
View
@@ -1 +1 @@
-3.1.0.beta
+3.1.0.beta1
View
@@ -1,6 +1,6 @@
-== Welcome to \Rails
+== Welcome to Rails
-\Rails is a web-application framework that includes everything needed to create
+Rails is a web-application framework that includes everything needed to create
database-backed web applications according to the Model-View-Control pattern.
This pattern splits the view (also called the presentation) into "dumb"
@@ -11,7 +11,7 @@ persist themselves to a database. The controller handles the incoming requests
(such as Save New Account, Update Product, Show Post) by manipulating the model
and directing data to the view.
-In \Rails, the model is handled by what's called an object-relational mapping
+In Rails, the model is handled by what's called an object-relational mapping
layer entitled Active Record. This layer allows you to present the data from
database rows as objects and embellish these data objects with business logic
methods. You can read more about Active Record in its
@@ -22,17 +22,17 @@ layers by its two parts: Action View and Action Controller. These two layers
are bundled in a single package due to their heavy interdependence. This is
unlike the relationship between the Active Record and Action Pack that is much
more separate. Each of these packages can be used independently outside of
-\Rails. You can read more about Action Pack in its
+Rails. You can read more about Action Pack in its
{README}[link:files/actionpack/README_rdoc.html].
== Getting Started
-1. Install \Rails at the command prompt if you haven't yet:
+1. Install Rails at the command prompt if you haven't yet:
gem install rails
-2. At the command prompt, create a new \Rails application:
+2. At the command prompt, create a new Rails application:
rails new myapp
@@ -59,10 +59,10 @@ more separate. Each of these packages can be used independently outside of
== Contributing
-We encourage you to contribute to Ruby on \Rails! Please check out the {Contributing to Rails
+We encourage you to contribute to Ruby on Rails! Please check out the {Contributing to Rails
guide}[http://edgeguides.rubyonrails.org/contributing_to_rails.html] for guidelines about how
to proceed. {Join us}[http://contributors.rubyonrails.org]!
== License
-Ruby on \Rails is released under the MIT license.
+Ruby on Rails is released under the MIT license.
View
@@ -49,14 +49,24 @@ end
desc "Generate documentation for the Rails framework"
RDoc::Task.new do |rdoc|
+ RDOC_MAIN = 'RDOC_MAIN.rdoc'
+
+ rdoc.before_running_rdoc do
+ rdoc_main = File.read('README.rdoc')
+ rdoc_main.gsub!(/\b(?=Rails)\b/) { '\\' }
+ File.open(RDOC_MAIN, 'w') do |f|
+ f.write(rdoc_main)
+ end
+
+ rdoc.rdoc_files.include(RDOC_MAIN)
+ end
+
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.title = "Ruby on Rails Documentation"
rdoc.options << '-f' << 'horo'
rdoc.options << '-c' << 'utf-8'
- rdoc.options << '-m' << 'README.rdoc'
-
- rdoc.rdoc_files.include('README.rdoc')
+ rdoc.options << '-m' << RDOC_MAIN
rdoc.rdoc_files.include('railties/CHANGELOG')
rdoc.rdoc_files.include('railties/MIT-LICENSE')
@@ -18,5 +18,5 @@ Gem::Specification.new do |s|
s.requirements << 'none'
s.add_dependency('actionpack', version)
- s.add_dependency('mail', '~> 2.2.16')
+ s.add_dependency('mail', '~> 2.3.0')
end
@@ -297,6 +297,10 @@ module ActionMailer #:nodoc:
# information and a cryptographic Message Digest 5 algorithm to hash important information)
# * <tt>:enable_starttls_auto</tt> - When set to true, detects if STARTTLS is enabled in your SMTP server
# and starts to use it.
+ # * <tt>:openssl_verify_mode</tt> - When using TLS, you can set how OpenSSL checks the certificate. This is
+ # really useful if you need to validate a self-signed and/or a wildcard certificate. You can use the name
+ # of an OpenSSL verify constant ('none', 'peer', 'client_once','fail_if_no_peer_cert') or directly the
+ # constant (OpenSSL::SSL::VERIFY_NONE, OpenSSL::SSL::VERIFY_PEER,...).
#
# * <tt>sendmail_settings</tt> - Allows you to override options for the <tt>:sendmail</tt> delivery method.
# * <tt>:location</tt> - The location of the sendmail executable. Defaults to <tt>/usr/sbin/sendmail</tt>.
@@ -345,8 +349,7 @@ class Base < AbstractController::Base
include AbstractController::Translation
include AbstractController::AssetPaths
- cattr_reader :protected_instance_variables
- @@protected_instance_variables = []
+ self.protected_instance_variables = %w(@_action_has_layout)
helper ActionMailer::MailHelper
include ActionMailer::OldApi
@@ -682,6 +685,9 @@ def set_content_type(m, user_content_type, class_default)
end
end
+ # Translates the +subject+ using Rails I18n class under <tt>[:actionmailer, mailer_scope, action_name]</tt> scope.
+ # If it does not find a translation for the +subject+ under the specified scope it will default to a
+ # humanized version of the <tt>action_name</tt>.
def default_i18n_subject #:nodoc:
mailer_scope = self.class.mailer_name.gsub('/', '.')
I18n.t(:subject, :scope => [mailer_scope, action_name], :default => action_name.humanize)
@@ -8,7 +8,7 @@ module OldApi #:nodoc:
included do
extend ActionMailer::AdvAttrAccessor
- self.protected_instance_variables.concat %w(@parts @mail_was_called)
+ self.protected_instance_variables.concat %w(@parts @mail_was_called @headers)
# Specify the BCC addresses for the message
adv_attr_accessor :bcc
@@ -3,7 +3,7 @@ module VERSION #:nodoc:
MAJOR = 3
MINOR = 1
TINY = 0
- PRE = "beta"
+ PRE = "beta1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
@@ -23,18 +23,18 @@
end
end
-silence_warnings do
- # These external dependencies have warnings :/
- require 'mail'
-end
-
lib = File.expand_path("#{File.dirname(__FILE__)}/../lib")
$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib)
require 'test/unit'
require 'action_mailer'
require 'action_mailer/test_case'
+silence_warnings do
+ # These external dependencies have warnings :/
+ require 'mail'
+end
+
# Show backtraces for deprecated behavior for quicker cleanup.
ActiveSupport::Deprecation.debug = true
View
@@ -1,10 +1,38 @@
*Rails 3.1.0 (unreleased)*
+* Allow AM/PM format in datetime selectors [Aditya Sanghi]
+
+* Only show dump of regular env methods on exception screen (not all the rack crap) [DHH]
+
+* auto_link has been removed with no replacement. If you still use auto_link
+ please install the rails_autolink gem:
+ http://github.com/tenderlove/rails_autolink
+
+ [tenderlove]
+
+* Added streaming support, you can enable it with: [José Valim]
+
+ class PostsController < ActionController::Base
+ stream :only => :index
+ end
+
+ Please read the docs at `ActionController::Streaming` for more information.
+
+* Added `ActionDispatch::Request.ignore_accept_header` to ignore accept headers and only consider the format given as parameter [José Valim]
+
+* Created `ActionView::Renderer` and specified an API for `ActionView::Context`, check those objects for more information [José Valim]
+
+* Added `ActionController::ParamsWrapper` to wrap parameters into a nested hash, and will be turned on for JSON request in new applications by default [Prem Sichanugrist]
+
+ This can be customized by setting `ActionController::Base.wrap_parameters` in `config/initializer/wrap_parameters.rb`
+
* RJS has been extracted out to a gem. [fxn]
-* Implicit actions named not_implemented can be rendered [Santiago Pastorino]
+* Implicit actions named not_implemented can be rendered. [Santiago Pastorino]
+
+* Wildcard route will always match the optional format segment by default. [Prem Sichanugrist]
-* Wildcard route will always matching the optional format segment by default. For example if you have this route:
+ For example if you have this route:
map '*pages' => 'pages#show'
@@ -88,8 +116,6 @@ tested.
Keys are dasherized. Values are JSON-encoded, except for strings and symbols. [Stephen Celis]
-* Added render :once. You can pass either a string or an array of strings and Rails will ensure they each of them are rendered just once. [José Valim]
-
* Deprecate old template handler API. The new API simply requires a template handler to respond to call. [José Valim]
* :rhtml and :rxml were finally removed as template handlers. [José Valim]
@@ -19,12 +19,13 @@ Gem::Specification.new do |s|
s.add_dependency('activesupport', version)
s.add_dependency('activemodel', version)
- s.add_dependency('rack-cache', '~> 1.0.0')
+ s.add_dependency('rack-cache', '~> 1.0.1')
s.add_dependency('builder', '~> 3.0.0')
- s.add_dependency('i18n', '~> 0.5.0')
- s.add_dependency('rack', '~> 1.2.1')
- s.add_dependency('rack-test', '~> 0.5.7')
- s.add_dependency('rack-mount', '~> 0.7.1')
- s.add_dependency('tzinfo', '~> 0.3.23')
+ s.add_dependency('i18n', '~> 0.6.0beta1')
+ s.add_dependency('rack', '~> 1.3.0.beta')
+ s.add_dependency('rack-test', '~> 0.6.0')
+ s.add_dependency('rack-mount', '~> 0.7.2')
+ s.add_dependency('sprockets', '~> 2.0.0.beta.2')
+ s.add_dependency('tzinfo', '~> 0.3.27')
s.add_dependency('erubis', '~> 2.7.0')
end
@@ -130,27 +130,39 @@ def action_methods
self.class.action_methods
end
- # Returns true if the name can be considered an action. This can
- # be overridden in subclasses to modify the semantics of what
- # can be considered an action.
+ # Returns true if a method for the action is available and
+ # can be dispatched, false otherwise.
#
- # For instance, this is overriden by ActionController to add
- # the implicit rendering feature.
- #
- # ==== Parameters
- # * <tt>name</tt> - The name of an action to be tested
- #
- # ==== Returns
- # * <tt>TrueClass</tt>, <tt>FalseClass</tt>
- def action_method?(name)
- self.class.action_methods.include?(name)
+ # Notice that <tt>action_methods.include?("foo")</tt> may return
+ # false and <tt>available_action?("foo")</tt> returns true because
+ # available action consider actions that are also available
+ # through other means, for example, implicit render ones.
+ def available_action?(action_name)
+ method_for_action(action_name).present?
end
private
+ # Returns true if the name can be considered an action because
+ # it has a method defined in the controller.
+ #
+ # ==== Parameters
+ # * <tt>name</tt> - The name of an action to be tested
+ #
+ # ==== Returns
+ # * <tt>TrueClass</tt>, <tt>FalseClass</tt>
+ #
+ # :api: private
+ def action_method?(name)
+ self.class.action_methods.include?(name)
+ end
+
# Call the action. Override this in a subclass to modify the
# behavior around processing an action. This, and not #process,
# is the intended way to override action dispatching.
+ #
+ # Notice that the first argument is the method to be dispatched
+ # which is *not* necessarily the same as the action name.
def process_action(method_name, *args)
send_action(method_name, *args)
end
@@ -13,8 +13,8 @@ module Callbacks
# Override AbstractController::Base's process_action to run the
# process_action callbacks around the normal behavior.
- def process_action(method_name, *args)
- run_callbacks(:process_action, method_name) do
+ def process_action(*args)
+ run_callbacks(:process_action, action_name) do
super
end
end
Oops, something went wrong.

0 comments on commit aec7456

Please sign in to comment.