Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
iaddict committed Aug 17, 2011
2 parents 9bd6b41 + 22e611e commit b7fd7e8
Show file tree
Hide file tree
Showing 218 changed files with 3,988 additions and 1,635 deletions.
3 changes: 1 addition & 2 deletions .gitignore
@@ -1,4 +1,3 @@
*.gem
pkg
.bundle
Gemfile.lock
Expand All @@ -22,4 +21,4 @@ railties/doc
railties/guides/output
railties/tmp
.rvmrc
RDOC_MAIN.rdoc
RDOC_MAIN.rdoc
10 changes: 7 additions & 3 deletions .travis.yml
@@ -1,12 +1,16 @@
script: 'ci/travis.rb'
notifications:
disabled: true
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
env:
- "GEM=railties"
- "GEM=ap,am,amo,ares,as"
- "GEM=ar:mysql"
- "GEM=ar:mysql2"
- "GEM=ar:sqlite3"
- "GEM=ar:sqlite3"
notifications:
email: false
irc:
- "irc.freenode.org#rails-contrib"
bundler_args: --path vendor/bundle
9 changes: 6 additions & 3 deletions Gemfile
Expand Up @@ -4,16 +4,19 @@ gemspec

if ENV['AREL']
gem "arel", :path => ENV['AREL']
else
gem "arel", '~> 2.1.3'
end

gem "jquery-rails"
# This needs to be with require false to avoid
# it being automatically loaded by sprockets
gem "uglifier", ">= 1.0.0", :require => false

gem "rake", ">= 0.8.7"
# Temp fix until rake 0.9.3 is out
if RUBY_VERSION >= "1.9.3"
gem "rake", "0.9.3.beta.1"
else
gem "rake", ">= 0.8.7"
end
gem "mocha", ">= 0.9.8"

group :doc do
Expand Down
14 changes: 7 additions & 7 deletions README.rdoc
Expand Up @@ -3,11 +3,11 @@
Rails is a web-application framework that includes everything needed to create
database-backed web applications according to the {Model-View-Controller (MVC)}[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller] pattern.

Understanding the MVC pattern is key to understanding Rails. MVC divides your application
Understanding the MVC pattern is key to understanding Rails. MVC divides your application
into three layers, each with a specific responsibility.

The View layer is composed of "templates" that are responsible for providing
appropriate representations of your application's resources. Templates
appropriate representations of your application's resources. Templates
can come in a variety of formats, but most view templates are HTML with embedded Ruby
code (.erb files).

Expand All @@ -18,18 +18,18 @@ you to present the data from database rows as objects and embellish these data o
with business logic methods. Although most Rails models are backed by a database, models
can also be ordinary Ruby classes, or Ruby classes that implement a set of interfaces as
provided by the ActiveModel module. You can read more about Active Record in its
{README}[link:blob/master/activerecord/README.rdoc].
{README}[link:/rails/rails/blob/master/activerecord/README.rdoc].

The Controller layer is responsible for handling incoming HTTP requests and providing a
suitable response. Usually this means returning HTML, but Rails controllers can also
suitable response. Usually this means returning HTML, but Rails controllers can also
generate XML, JSON, PDFs, mobile-specific views, and more. Controllers manipulate models
and render view templates in order to generate the appropriate HTTP response.

In Rails, the Controller and View layers are handled together by Action Pack.
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 which are
This is unlike the relationship between Active Record and Action Pack which are
independent. Each of these packages can be used independently outside of Rails. You
can read more about Action Pack in its {README}[link:blob/master/actionpack/README.rdoc].
can read more about Action Pack in its {README}[link:/rails/rails/blob/master/actionpack/README.rdoc].

== Getting Started

Expand All @@ -49,7 +49,7 @@ can read more about Action Pack in its {README}[link:blob/master/actionpack/READ

Run with <tt>--help</tt> for options.

4. Go to http://localhost:3000/ and you'll see:
4. Go to http://localhost:3000 and you'll see:

"Welcome aboard: You're riding Ruby on Rails!"

Expand Down
186 changes: 186 additions & 0 deletions RELEASING_RAILS.rdoc
@@ -0,0 +1,186 @@
= Releasing Rails

In this document, we'll cover the steps necessary to release Rails. Each
section contains steps to take during that time before the release. The times
suggested in each header are just that: suggestions. However, they should
really be considered as minimums.

== 10 Days before release

Today is mostly coordination tasks. Here are the things you must do today:

=== Is the CI green? If not, make it green. (See "Fixing the CI")

Do not release with a Red CI. You can find the CI status here:

http://travis-ci.org/#!/rails/rails

=== Is Sam Ruby happy? If not, make him happy.

Sam Ruby keeps a test suite that makes sure the code samples in his book (Agile
Web Development with Rails) all work. These are valuable integration tests
for Rails. You can check the status of his tests here:

http://intertwingly.net/projects/dashboard.html

Do not release with Red AWDwR tests.

=== Do we have any git dependencies? If so, contact those authors.

Having git dependencies indicates that we depend on unreleased code.
Obviously rails cannot be released when it depends on unreleased code.
Contact the authors of those particular gems and work out a release date that
suits them.

=== Contact the security team (either Koz or tenderlove)

Let them know of your plans to release. There may be security issues to be
addressed, and that can impact your release date.

=== Notify implementors.

Ruby implementors have high stakes in making sure Rails works. Be kind and
give them a heads up that Rails will be released soonish.

Send an email just giving a heads up about the upcoming release to these
lists:

* team@jruby.org
* community@rubini.us
* rubyonrails-core@googlegroups.com

Implementors will love you and help you.

== 3 Days before release

This is when you should release the release candidate. Here are your tasks
for today:

=== Is the CI green? If not, make it green.

=== Is Sam Ruby happy? If not, make him happy.

=== Contact the security team. CVE emails must be sent on this day.

=== Create a release branch.

From the stable branch, create a release branch. For example, if you're
releasing Rails 3.0.10, do this:

[aaron@higgins rails (3-0-stable)]$ git checkout -b 3-0-10
Switched to a new branch '3-0-10'
[aaron@higgins rails (3-0-10)]$

=== Update each CHANGELOG.

Many times commits are made without the CHANGELOG being updated. You should
review the commits since the last release, and fill in any missing information
for each CHANGELOG.

You can review the commits for the 3.0.10 release like this:

[aaron@higgins rails (3-0-10)]$ git log v3.0.9..

=== Update the RAILS_VERSION file to include the RC.

=== Release the gem.

IMPORTANT: Due to YAML parse problems on the rubygems.org server, it is safest
to use Ruby 1.8 when releasing.

Run `rake release`. This will populate the gemspecs with data from
RAILS_VERSION, commit the changes, tag it, and push the gems to rubygems.org.
Here are the commands that `rake release` should use, so you can understand
what to do in case anything goes wrong:

$ rake all:build
$ git commit -am'updating RAILS_VERSION'
$ git tag -m'tagging rc release' v3.0.10.rc1
$ git push
$ git push --tags
$ for i in $(ls dist); do gem push $i; done

=== Send Rails release announcements

Write a release announcement that includes the version, changes, and links to
github where people can find the specific commit list. Here are the mailing
lists where you should announce:

* rubyonrails-core@googlegroups.com
* rubyonrails-talk@googlegroups.com
* ruby-talk@ruby-lang.org

Use markdown format for your announcement. Remember to ask people to report
issues with the release candidate to the rails-core mailing list.

IMPORTANT: If any users experience regressions when using the release
candidate, you *must* postpone the release. Bugfix releases *should not*
break existing applications.

=== Post the announcement to the Rails blog.

If you used markdown format for your email, you can just paste it in to the
blog.

* http://weblog.rubyonrails.org

=== Post the announcement to the Rails twitter account.

== Time between release candidate and actual release

Check the rails-core mailing list and the github issue list for regressions in
the RC.

If any regressions are found, fix the regressions and repeat the release
candidate process. We will not release the final until 72 hours after the
last release candidate has been pushed. This means that if users find
regressions, the scheduled release date must be postponed.

When you fix the regressions, do not create a new branch. Fix them on the
stable branch, then cherry pick the commit to your release branch. No other
commits should be added to the release branch besides regression fixing commits.

== Day of release

Many of these steps are the same as for the release candidate, so if you need
more explanation on a particular step, so the RC steps.

Today, do this stuff in this order:

* Apply security patches to the release branch
* Update CHANGELOG with security fixes.
* Update RAILS_VERSION to remove the rc
* Release the gems
* Email security lists
* Email general announcement lists

=== Emailing the rails security announce list

Email the security announce list once for each vulnerability fixed.

You can do this, or ask the security team to do it.

Email the security reports to:

* rubyonrails-security@googlegroups.com
* linux-distros@vs.openwall.org

Be sure to note the security fixes in your announcement along with CVE numbers
and links to each patch. Some people may not be able to upgrade right away,
so we need to give them the security fixes in patch form.

* Blog announcements
* Twitter announcements
* Merge the release branch to the stable branch.
* Drink beer (or other cocktail)

== Misc

=== Fixing the CI

There are two simple steps for fixing the CI:

1. Identify the problem
2. Fix it

Repeat these steps until the CI is green.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -74,7 +74,7 @@ RDoc::Task.new do |rdoc|
# since no autolinking happens there and RDoc displays the backslash
# otherwise.
rdoc_main.gsub!(/^(?=\S).*?\b(?=Rails)\b/) { "#$&\\" }
rdoc_main.gsub!(%r{link:blob/master/(\w+)/README\.rdoc}, "link:files/\\1/README_rdoc.html")
rdoc_main.gsub!(%r{link:/rails/rails/blob/master/(\w+)/README\.rdoc}, "link:files/\\1/README_rdoc.html")

File.open(RDOC_MAIN, 'w') do |f|
f.write(rdoc_main)
Expand Down
8 changes: 4 additions & 4 deletions actionmailer/README.rdoc
Expand Up @@ -10,7 +10,7 @@ Mail gem. It provides a way to make emails using templates in the same
way that Action Controller renders views using templates.

Additionally, an Action Mailer class can be used to process incoming email,
such as allowing a weblog to accept new posts from an email (which could even
such as allowing a blog to accept new posts from an email (which could even
have been sent from a phone).

== Sending emails
Expand Down Expand Up @@ -74,7 +74,7 @@ Or you can just chain the methods together like:

== Setting defaults

It is possible to set default values that will be used in every method in your Action Mailer class. To implement this functionality, you just call the public class method <tt>default</tt> which you get for free from ActionMailer::Base. This method accepts a Hash as the parameter. You can use any of the headers e-mail messages has, like <tt>:from</tt> as the key. You can also pass in a string as the key, like "Content-Type", but Action Mailer does this out of the box for you, so you wont need to worry about that. Finally it is also possible to pass in a Proc that will get evaluated when it is needed.
It is possible to set default values that will be used in every method in your Action Mailer class. To implement this functionality, you just call the public class method <tt>default</tt> which you get for free from ActionMailer::Base. This method accepts a Hash as the parameter. You can use any of the headers e-mail messages has, like <tt>:from</tt> as the key. You can also pass in a string as the key, like "Content-Type", but Action Mailer does this out of the box for you, so you won't need to worry about that. Finally it is also possible to pass in a Proc that will get evaluated when it is needed.

Note that every value you set with this method will get over written if you use the same key in your mailer method.

Expand Down Expand Up @@ -135,13 +135,13 @@ The Base class has the full list of configuration options. Here's an example:

== Download and installation

The latest version of Action Mailer can be installed with Rubygems:
The latest version of Action Mailer can be installed with RubyGems:

% [sudo] gem install actionmailer

Source code can be downloaded as part of the Rails project on GitHub

* https://github.com/rails/rails/tree/master/actionmailer/
* https://github.com/rails/rails/tree/master/actionmailer


== License
Expand Down
6 changes: 4 additions & 2 deletions actionpack/CHANGELOG
Expand Up @@ -30,6 +30,8 @@

*Rails 3.1.0 (unreleased)*

* x_sendfile_header now defaults to nil and config/environments/production.rb doesn't set a particular value for it. This allows servers to set it through X-Sendfile-Type. [Santiago Pastorino]

* The submit form helper does not generate an id "object_name_id" anymore. [fbrusatti]

* Make sure respond_with with :js tries to render a template in all cases [José Valim]
Expand Down Expand Up @@ -2270,7 +2272,7 @@ superclass' view_paths. [Rick Olson]

* Update documentation for erb trim syntax. #5651 [matt@mattmargolis.net]

* Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com, sebastien@goetzilla.info]
* Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com]

* Reset @html_document between requests so assert_tag works. #4810 [Jarkko Laine, easleydp@gmail.com]

Expand Down Expand Up @@ -2867,7 +2869,7 @@ superclass' view_paths. [Rick Olson]

* Provide support for decimal columns to form helpers. Closes #5672. [Dave Thomas]

* Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com, sebastien@goetzilla.info]
* Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com]

* Reset @html_document between requests so assert_tag works. #4810 [Jarkko Laine, easleydp@gmail.com]

Expand Down
6 changes: 3 additions & 3 deletions actionpack/README.rdoc
Expand Up @@ -283,7 +283,7 @@ methods:

The last two lines are responsible for telling ActionController where the
template files are located and actually running the controller on a new
request from the web-server (like to be Apache).
request from the web-server (e.g., Apache).

And the templates look like this:

Expand Down Expand Up @@ -316,13 +316,13 @@ an URL such as /weblog/5 (where 5 is the id of the post).

== Download and installation

The latest version of Action Pack can be installed with Rubygems:
The latest version of Action Pack can be installed with RubyGems:

% [sudo] gem install actionpack

Source code can be downloaded as part of the Rails project on GitHub

* https://github.com/rails/rails/tree/master/actionpack/
* https://github.com/rails/rails/tree/master/actionpack


== License
Expand Down
4 changes: 2 additions & 2 deletions actionpack/actionpack.gemspec
Expand Up @@ -21,10 +21,10 @@ Gem::Specification.new do |s|
s.add_dependency('rack-cache', '~> 1.0.2')
s.add_dependency('builder', '~> 3.0.0')
s.add_dependency('i18n', '~> 0.6')
s.add_dependency('rack', '~> 1.3.1')
s.add_dependency('rack', '~> 1.3.2')
s.add_dependency('rack-test', '~> 0.6.0')
s.add_dependency('rack-mount', '~> 0.8.1')
s.add_dependency('sprockets', '= 2.0.0.beta.10')
s.add_dependency('sprockets', '~> 2.0.0.beta.12')
s.add_dependency('erubis', '~> 2.7.0')

s.add_development_dependency('tzinfo', '~> 0.3.29')
Expand Down

0 comments on commit b7fd7e8

Please sign in to comment.