Skip to content

Commit

Permalink
Merge remote branch 'rails-rails/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Jun 28, 2011
2 parents 4bed49c + c290900 commit 9b36585
Show file tree
Hide file tree
Showing 752 changed files with 12,045 additions and 17,821 deletions.
29 changes: 15 additions & 14 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
source 'http://rubygems.org'
source "http://rubygems.org"

gemspec

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

gem "sprockets", :git => "git://github.com/sstephenson/sprockets.git"

gem "coffee-script"
gem "sass"
gem "uglifier"
gem "uglifier", ">= 1.0.0"

gem "rake", ">= 0.8.7"
gem "mocha", ">= 0.9.8"
Expand All @@ -29,30 +27,33 @@ gem "memcache-client", ">= 1.8.5"
platforms :mri_18 do
gem "system_timer"
gem "ruby-debug", ">= 0.10.3"
gem 'ruby-prof'
gem "json"
end

platforms :mri_19 do
# TODO: Remove the conditional when ruby-debug19 supports Ruby >= 1.9.3
gem "ruby-debug19", :require => 'ruby-debug' if RUBY_VERSION < "1.9.3"
gem "ruby-debug19", :require => "ruby-debug" if RUBY_VERSION < "1.9.3"
end

platforms :ruby do
if ENV["RB_FSEVENT"]
gem 'rb-fsevent'
gem "rb-fsevent"
end
gem 'json'
gem 'yajl-ruby'
gem "nokogiri", ">= 1.4.4"
gem "json"
gem "yajl-ruby"
gem "nokogiri", ">= 1.4.5"

group :test do
gem "ruby-prof" if RUBY_VERSION < "1.9.3"

end
# AR
gem "sqlite3", "~> 1.3.3"

group :db do
gem "pg", ">= 0.11.0"
gem "mysql", ">= 2.8.1"
gem "mysql2", ">= 0.3.0"
gem "mysql2", ">= 0.3.6"
end
end

Expand All @@ -75,10 +76,10 @@ end
# gems that are necessary for ActiveRecord tests with Oracle database
if ENV['ORACLE_ENHANCED_PATH'] || ENV['ORACLE_ENHANCED']
platforms :ruby do
gem 'ruby-oci8', ">= 2.0.4"
gem "ruby-oci8", ">= 2.0.4"
end
if ENV['ORACLE_ENHANCED_PATH']
gem 'activerecord-oracle_enhanced-adapter', :path => ENV['ORACLE_ENHANCED_PATH']
gem "activerecord-oracle_enhanced-adapter", :path => ENV['ORACLE_ENHANCED_PATH']
else
gem "activerecord-oracle_enhanced-adapter", :git => "git://github.com/rsim/oracle-enhanced.git"
end
Expand Down
2 changes: 1 addition & 1 deletion RAILS_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0.beta
3.1.0.rc1
56 changes: 31 additions & 25 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
== Welcome to Rails

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"
templates that are primarily responsible for inserting pre-built data in between
HTML tags. The model contains the "smart" domain objects (such as Account,
Product, Person, Post) that holds all the business logic and knows how to
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
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
{README}[link:files/activerecord/README_rdoc.html].

The controller and view are handled by the Action Pack, which handles both
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
{README}[link:files/actionpack/README_rdoc.html].

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
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
can come in a variety of formats, but most view templates are HTML with embedded Ruby
code (.erb files).

The Model layer represents your domain model (such as Account, Product, Person, Post)
and encapsulates the business logic that is specific to your application. In Rails,
database-backed model classes are derived from ActiveRecord::Base. ActiveRecord allows
you to present the data from database rows as objects and embellish these data objects
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].

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
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
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].

== Getting Started

Expand Down Expand Up @@ -60,9 +65,10 @@ Rails. You can read more about Action Pack in its
== Contributing

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
guide}[http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html] for guidelines about how
to proceed. {Join us}[http://contributors.rubyonrails.org]!

== License

Ruby on Rails is released under the MIT license.

26 changes: 24 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,31 @@ desc "Generate documentation for the Rails framework"
RDoc::Task.new do |rdoc|
RDOC_MAIN = 'RDOC_MAIN.rdoc'

# This is a hack.
#
# Backslashes are needed to prevent RDoc from autolinking "Rails" to the
# documentation of the Rails module. On the other hand, as of this
# writing README.rdoc is displayed in the front page of the project in
# GitHub, where backslashes are shown and look weird.
#
# The temporary solution is to have a README.rdoc without backslashes for
# GitHub, and gsub it to generate the main page of the API.
#
# Also, relative links in GitHub have to point to blobs, whereas in the API
# they need to point to files.
#
# The idea for the future is to have totally different files, since the
# API is no longer a generic entry point to Rails and deserves a
# dedicated main page specifically thought as an API entry point.
rdoc.before_running_rdoc do
rdoc_main = File.read('README.rdoc')
rdoc_main.gsub!(/\b(?=Rails)\b/) { '\\' }

# The ^(?=\S) assertion prevents code blocks from being processed,
# 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")

File.open(RDOC_MAIN, 'w') do |f|
f.write(rdoc_main)
end
Expand All @@ -72,7 +94,7 @@ RDoc::Task.new do |rdoc|
rdoc.rdoc_files.include('railties/MIT-LICENSE')
rdoc.rdoc_files.include('railties/README.rdoc')
rdoc.rdoc_files.include('railties/lib/**/*.rb')
rdoc.rdoc_files.exclude('railties/lib/rails/generators/**/templates/*')
rdoc.rdoc_files.exclude('railties/lib/rails/generators/**/templates/**/*.rb')

rdoc.rdoc_files.include('activerecord/README.rdoc')
rdoc.rdoc_files.include('activerecord/CHANGELOG')
Expand Down
30 changes: 29 additions & 1 deletion actionmailer/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,42 @@

* No changes

*Rails 3.0.2 (unreleased)*

*Rails 3.0.7 (April 18, 2011)*

* remove AM delegating register_observer and register_interceptor to Mail [Josh Kalderimis]


*Rails 3.0.6 (April 5, 2011)

* Don't allow i18n to change the minor version, version now set to ~> 0.5.0 [Santiago Pastorino]


*Rails 3.0.5 (February 26, 2011)*

* No changes.


*Rails 3.0.4 (February 8, 2011)*

* No changes.


*Rails 3.0.3 (November 16, 2010)*

* No changes.


*Rails 3.0.2 (November 15, 2010)*

* No changes


*Rails 3.0.1 (October 15, 2010)*

* No Changes, just a version bump.


*Rails 3.0.0 (August 29, 2010)*

* subject is automatically looked up on I18n using mailer_name and action_name as scope as in t(".subject") [JK]
Expand Down
6 changes: 3 additions & 3 deletions actionmailer/README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Example:
)

if email.has_attachments?
for attachment in email.attachments
email.attachments.each do |attachment|
page.attachments.create({
:file => attachment, :description => email.subject
})
Expand Down Expand Up @@ -153,9 +153,9 @@ Action Mailer is released under the MIT license.

API documentation is at

* http://api.rubyonrails.com
* http://api.rubyonrails.org

Bug reports and feature requests can be filed with the rest for the Ruby on Rails project here:

* https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets
* https://github.com/rails/rails/issues

4 changes: 2 additions & 2 deletions actionmailer/Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env rake
require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rubygems/package_task'

desc "Default Task"
task :default => [ :test ]
Expand All @@ -24,7 +24,7 @@ end

spec = eval(File.read('actionmailer.gemspec'))

Rake::GemPackageTask.new(spec) do |p|
Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec
end

Expand Down
1 change: 0 additions & 1 deletion actionmailer/actionmailer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Gem::Specification.new do |s|
s.author = 'David Heinemeier Hansson'
s.email = 'david@loudthinking.com'
s.homepage = 'http://www.rubyonrails.org'
s.rubyforge_project = 'actionmailer'

s.files = Dir['CHANGELOG', 'README.rdoc', 'MIT-LICENSE', 'lib/**/*']
s.require_path = 'lib'
Expand Down
2 changes: 0 additions & 2 deletions actionmailer/lib/action_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@
module ActionMailer
extend ::ActiveSupport::Autoload

autoload :AdvAttrAccessor
autoload :Collector
autoload :Base
autoload :DeliveryMethods
autoload :MailHelper
autoload :OldApi
autoload :TestCase
autoload :TestHelper
end
28 changes: 0 additions & 28 deletions actionmailer/lib/action_mailer/adv_attr_accessor.rb

This file was deleted.

Loading

0 comments on commit 9b36585

Please sign in to comment.