Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rails/rails
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Apr 13, 2010
2 parents dc25138 + b4fd5e6 commit 8e9df34
Show file tree
Hide file tree
Showing 19 changed files with 55 additions and 27 deletions.
3 changes: 3 additions & 0 deletions actionmailer/CHANGELOG
@@ -1,7 +1,10 @@
*Rails 3.0.0 [beta 3] (April 13th, 2010)*

* Removed all quoting.rb type files from ActionMailer and put Mail 2.2.0 in instead [ML]

* Lot of updates to various test cases that now work better with the new Mail and so have different expectations


*Rails 3.0.0 [beta 2] (April 1st, 2010)*

* Added interceptors and observers from Mail [ML]
Expand Down
2 changes: 1 addition & 1 deletion actionmailer/lib/action_mailer/base.rb
Expand Up @@ -541,7 +541,7 @@ def mail(headers={}, &block)
wrap_delivery_behavior!(headers.delete(:delivery_method))

# Assign all headers except parts_order, content_type and body
assignable = headers.except(:parts_order, :content_type, :body)
assignable = headers.except(:parts_order, :content_type, :body, :template_name, :template_path)
assignable.each { |k, v| m[k] = v }

# Render the templates and blocks
Expand Down
10 changes: 5 additions & 5 deletions actionmailer/test/base_test.rb
Expand Up @@ -510,28 +510,28 @@ def different_layout(layout_name='')

# Rendering
test "you can specify a different template for implicit render" do
mail = BaseMailer.implicit_different_template('implicit_multipart')
mail = BaseMailer.implicit_different_template('implicit_multipart').deliver
assert_equal("HTML Implicit Multipart", mail.html_part.body.decoded)
assert_equal("TEXT Implicit Multipart", mail.text_part.body.decoded)
end

test "you can specify a different template for explicit render" do
mail = BaseMailer.explicit_different_template('explicit_multipart_templates')
mail = BaseMailer.explicit_different_template('explicit_multipart_templates').deliver
assert_equal("HTML Explicit Multipart Templates", mail.html_part.body.decoded)
assert_equal("TEXT Explicit Multipart Templates", mail.text_part.body.decoded)
end

test "you can specify a different layout" do
mail = BaseMailer.different_layout('different_layout')
mail = BaseMailer.different_layout('different_layout').deliver
assert_equal("HTML -- HTML", mail.html_part.body.decoded)
assert_equal("PLAIN -- PLAIN", mail.text_part.body.decoded)
end

test "you can specify the template path for implicit lookup" do
mail = BaseMailer.welcome_from_another_path('another.path/base_mailer')
mail = BaseMailer.welcome_from_another_path('another.path/base_mailer').deliver
assert_equal("Welcome from another path", mail.body.encoded)

mail = BaseMailer.welcome_from_another_path(['unknown/invalid', 'another.path/base_mailer'])
mail = BaseMailer.welcome_from_another_path(['unknown/invalid', 'another.path/base_mailer']).deliver
assert_equal("Welcome from another path", mail.body.encoded)
end

Expand Down
2 changes: 1 addition & 1 deletion actionpack/CHANGELOG
@@ -1,4 +1,4 @@
*Rails 3.0.0 [beta 3] (pending)*
*Rails 3.0.0 [beta 3] (April 13th, 2010)*

* New option :as added to form_for allows to change the object name. The old <% form_for :client, @post %> becomes <% form_for @post, :as => :client %> [spastorino]

Expand Down
2 changes: 1 addition & 1 deletion actionpack/test/controller/layout_test.rb
Expand Up @@ -209,7 +209,7 @@ def test_layout_status_is_rendered
end
end

unless RUBY_PLATFORM =~ /(:?mswin|mingw|bccwin)/
unless RUBY_PLATFORM =~ /mswin|mingw/
class LayoutSymlinkedTest < LayoutTest
layout "symlinked/symlinked_layout"
end
Expand Down
5 changes: 5 additions & 0 deletions activemodel/CHANGELOG
@@ -1,3 +1,8 @@
*Rails 3.0.0 [beta 3] (April 13th, 2010)*

* No changes


*Rails 3.0.0 [beta 2] (April 1st, 2010)*

* #new_record? and #destroyed? were removed from ActiveModel::Lint. Use
Expand Down
2 changes: 1 addition & 1 deletion activerecord/CHANGELOG
@@ -1,4 +1,4 @@
*Rails 3.0.0 [Beta 2] (pending)*
*Rails 3.0.0 [beta 3] (April 13th, 2010)*

* Add Relation extensions. [Pratik Naik]

Expand Down
5 changes: 5 additions & 0 deletions activeresource/CHANGELOG
@@ -1,3 +1,8 @@
*Rails 3.0.0 [beta 3] (April 13th, 2010)*

* No changes


*Rails 3.0.0 [beta 1] (February 4, 2010)*

* Add support for errors in JSON format. #1956 [Fabien Jakimowicz]
Expand Down
2 changes: 1 addition & 1 deletion activesupport/CHANGELOG
@@ -1,4 +1,4 @@
*Rails 3.0.0 [beta 3] (pending)*
*Rails 3.0.0 [beta 3] (April 13th, 2010)*

* Improve transliteration quality. #4374 [Norman Clarke]

Expand Down
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/core_ext/proc.rb
@@ -1,4 +1,4 @@
require "active_support/core_ext/object"
require "active_support/core_ext/kernel/singleton_class"

class Proc #:nodoc:
def bind(object)
Expand Down
3 changes: 3 additions & 0 deletions railties/CHANGELOG
@@ -1,5 +1,8 @@
*Rails 3.0.0 [beta 3] (April 13th, 2010)*

* Renamed config.cookie_secret to config.secret_token and pass it as env key. [JV]


*Rails 3.0.0 [beta 2] (April 1st, 2010)*

* Session store configuration has changed [YK & CL]
Expand Down
2 changes: 1 addition & 1 deletion railties/guides/source/initialization.textile
Expand Up @@ -2636,7 +2636,7 @@ The method +find_with_root_flag+ is defined on +Rails::Engine+ (the superclass o
root = File.exist?("#{root_path}/#{flag}") ? root_path : default
raise "Could not find root path for #{self}" unless root

RUBY_PLATFORM =~ /(:?mswin|mingw)/ ?
RUBY_PLATFORM =~ /mswin|mingw/ ?
Pathname.new(root).expand_path : Pathname.new(root).realpath
end
</ruby>
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/commands/runner.rb
Expand Up @@ -18,7 +18,7 @@
opts.on("-h", "--help",
"Show this help message.") { $stderr.puts opts; exit }

if RUBY_PLATFORM !~ /(:?mswin|mingw)/
if RUBY_PLATFORM !~ /mswin|mingw/
opts.separator ""
opts.separator "You can also use runner as a shebang line for your scripts like this:"
opts.separator "-------------------------------------------------------------"
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/engine.rb
Expand Up @@ -119,7 +119,7 @@ def find_root_with_flag(flag, default=nil)
root = File.exist?("#{root_path}/#{flag}") ? root_path : default
raise "Could not find root path for #{self}" unless root

RUBY_PLATFORM =~ /(:?mswin|mingw)/ ?
RUBY_PLATFORM =~ /mswin|mingw/ ?
Pathname.new(root).expand_path : Pathname.new(root).realpath
end
end
Expand Down
@@ -1,13 +1,14 @@
<%%= form_for(@<%= singular_name %>) do |f| %>
<%% if @<%= singular_name %>.errors.any? %>
<div id="errorExplanation">
<h2><%%= pluralize(@<%= singular_name %>.errors.count, "error") %> prohibited this <%= singular_name %> from being saved:</h2>
<ul>
<%% @<%= singular_name %>.errors.full_messages.each do |msg| %>
<li><%%= msg %></li>
<%% end %>
</ul>
</div>
<div id="error_explanation">
<h2><%%= pluralize(@<%= singular_name %>.errors.count, "error") %> prohibited this <%= singular_name %> from being saved:</h2>

<ul>
<%% @<%= singular_name %>.errors.full_messages.each do |msg| %>
<li><%%= msg %></li>
<%% end %>
</ul>
</div>
<%% end %>

<% for attribute in attributes -%>
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/generators/rails/app/app_generator.rb
Expand Up @@ -265,7 +265,7 @@ def mysql_socket
"/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4
"/opt/local/var/run/mysql5/mysqld.sock", # mac + darwinports + mysql5
"/opt/lampp/var/mysql/mysql.sock" # xampp for linux
].find { |f| File.exist?(f) } unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
].find { |f| File.exist?(f) } unless RUBY_PLATFORM =~ /mswin|mingw/
end

def empty_directory_with_gitkeep(destination, config = {})
Expand Down
Expand Up @@ -34,7 +34,7 @@ div.field, div.actions {
display: table;
}

#errorExplanation {
#error_explanation {
width: 450px;
border: 2px solid red;
padding: 7px;
Expand All @@ -43,7 +43,7 @@ div.field, div.actions {
background-color: #f0f0f0;
}

#errorExplanation h2 {
#error_explanation h2 {
text-align: left;
font-weight: bold;
padding: 5px 5px 5px 15px;
Expand All @@ -54,7 +54,7 @@ div.field, div.actions {
color: #fff;
}

#errorExplanation ul li {
#error_explanation ul li {
font-size: 12px;
list-style: square;
}
2 changes: 1 addition & 1 deletion railties/lib/rails/test_unit/testing.rake
Expand Up @@ -30,7 +30,7 @@ end
module Kernel
def silence_stderr
old_stderr = STDERR.dup
STDERR.reopen(RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'NUL:' : '/dev/null')
STDERR.reopen(RUBY_PLATFORM =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
STDERR.sync = true
yield
ensure
Expand Down
11 changes: 11 additions & 0 deletions release.rb
@@ -0,0 +1,11 @@
version = ARGV.pop

%w( activesupport activemodel activerecord activeresource actionpack actionmailer railties ).each do |framework|
puts "Building and pushing #{framework}..."
`cd #{framework} && gem build #{framework}.gemspec && gem push #{framework}-#{version}.gem && rm #{framework}-#{version}.gem`
end

puts "Building and pushing Rails..."
`gem build rails.gemspec`
`gem push rails-#{version}.gem`
`rm rails-#{version}.gem`

0 comments on commit 8e9df34

Please sign in to comment.