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 Jul 18, 2011
2 parents 0eae392 + b475f74 commit fa3268d
Show file tree
Hide file tree
Showing 675 changed files with 8,864 additions and 7,471 deletions.
31 changes: 18 additions & 13 deletions Gemfile
@@ -1,17 +1,20 @@
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 "jquery-rails"
gem "coffee-script"
gem "sass"
gem "uglifier", :git => "git://github.com/lautis/uglifier.git"
gem "rack", :git => "git://github.com/rack/rack.git"

# 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"
gem "mocha", ">= 0.9.8"
Expand All @@ -20,6 +23,7 @@ group :doc do
gem "rdoc", "~> 3.4"
gem "horo", "= 1.0.3"
gem "RedCloth", "~> 4.2" if RUBY_VERSION < "1.9.3"
gem "w3c_validators"
end

# AS
Expand All @@ -33,27 +37,28 @@ 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'
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 @@ -76,10 +81,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
@@ -1 +1 @@
3.1.0.beta1
3.2.0.beta
56 changes: 31 additions & 25 deletions README.rdoc
@@ -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
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
4 changes: 2 additions & 2 deletions actionmailer/README.rdoc
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,7 +153,7 @@ 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:

Expand Down
4 changes: 2 additions & 2 deletions actionmailer/Rakefile
@@ -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
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
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.

0 comments on commit fa3268d

Please sign in to comment.