Skip to content

Commit 6335f5d

Browse files
committed
Merge branch 'master' into bodyparts
2 parents 70e3dfb + dc88847 commit 6335f5d

File tree

104 files changed

+2238
-1203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2238
-1203
lines changed

actionmailer/CHANGELOG

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
*2.3.1 [RC2] (March 5, 2009)*
1+
*2.3.2 [Final] (March 15, 2009)*
22

33
* Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP #1842 [Matt Jones]
44

5-
6-
*2.3.0 [RC1] (February 1st, 2009)*
7-
85
* Fixed RFC-2045 quoted-printable bug #1421 [squadette]
96

107
* Fixed that no body charset would be set when there are attachments present #740 [Paweł Kondzior]

actionmailer/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec = Gem::Specification.new do |s|
5555
s.rubyforge_project = "actionmailer"
5656
s.homepage = "http://www.rubyonrails.org"
5757

58-
s.add_dependency('actionpack', '= 2.3.1' + PKG_BUILD)
58+
s.add_dependency('actionpack', '= 2.3.2' + PKG_BUILD)
5959

6060
s.has_rdoc = true
6161
s.requirements << 'none'

actionmailer/lib/action_mailer/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module ActionMailer
22
module VERSION #:nodoc:
33
MAJOR = 2
44
MINOR = 3
5-
TINY = 1
5+
TINY = 2
66

77
STRING = [MAJOR, MINOR, TINY].join('.')
88
end

actionpack/CHANGELOG

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*2.3.1 [RC2] (March 5, 2009)*
1+
*2.3.2 [Final] (March 15, 2009)*
22

33
* Fixed that redirection would just log the options, not the final url (which lead to "Redirected to #<Post:0x23150b8>") [DHH]
44

@@ -14,9 +14,6 @@
1414

1515
* Added localized rescue template when I18n.locale is set (ex: public/404.da.html) #1835 [José Valim]
1616

17-
18-
*2.3.0 [RC1] (February 1st, 2009)*
19-
2017
* Make the form_for and fields_for helpers support the new Active Record nested update options. #1202 [Eloy Duran]
2118

2219
<% form_for @person do |person_form| %>

actionpack/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ spec = Gem::Specification.new do |s|
8080
s.has_rdoc = true
8181
s.requirements << 'none'
8282

83-
s.add_dependency('activesupport', '= 2.3.1' + PKG_BUILD)
83+
s.add_dependency('activesupport', '= 2.3.2' + PKG_BUILD)
8484

8585
s.require_path = 'lib'
8686
s.autorequire = 'action_controller'

actionpack/lib/action_controller/integration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
module ActionController
66
module Integration #:nodoc:
77
# An integration Session instance represents a set of requests and responses
8-
# performed sequentially by some virtual user. Becase you can instantiate
8+
# performed sequentially by some virtual user. Because you can instantiate
99
# multiple sessions and run them side-by-side, you can also mimic (to some
1010
# limited extent) multiple simultaneous users interacting with your system.
1111
#

actionpack/lib/action_controller/resources.rb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ def map_member_actions(map, resource)
630630
action_path = resource.options[:path_names][action] if resource.options[:path_names].is_a?(Hash)
631631
action_path ||= Base.resources_path_names[action] || action
632632

633-
map_resource_routes(map, resource, action, "#{resource.member_path}#{resource.action_separator}#{action_path}", "#{action}_#{resource.shallow_name_prefix}#{resource.singular}", m)
633+
map_resource_routes(map, resource, action, "#{resource.member_path}#{resource.action_separator}#{action_path}", "#{action}_#{resource.shallow_name_prefix}#{resource.singular}", m, { :force_id => true })
634634
end
635635
end
636636
end
@@ -641,9 +641,9 @@ def map_member_actions(map, resource)
641641
map_resource_routes(map, resource, :destroy, resource.member_path, route_path)
642642
end
643643

644-
def map_resource_routes(map, resource, action, route_path, route_name = nil, method = nil)
644+
def map_resource_routes(map, resource, action, route_path, route_name = nil, method = nil, resource_options = {} )
645645
if resource.has_action?(action)
646-
action_options = action_options_for(action, resource, method)
646+
action_options = action_options_for(action, resource, method, resource_options)
647647
formatted_route_path = "#{route_path}.:format"
648648

649649
if route_name && @set.named_routes[route_name.to_sym].nil?
@@ -660,22 +660,18 @@ def add_conditions_for(conditions, method)
660660
end
661661
end
662662

663-
def action_options_for(action, resource, method = nil)
663+
def action_options_for(action, resource, method = nil, resource_options = {})
664664
default_options = { :action => action.to_s }
665665
require_id = !resource.kind_of?(SingletonResource)
666+
force_id = resource_options[:force_id] && !resource.kind_of?(SingletonResource)
666667

667668
case default_options[:action]
668669
when "index", "new"; default_options.merge(add_conditions_for(resource.conditions, method || :get)).merge(resource.requirements)
669670
when "create"; default_options.merge(add_conditions_for(resource.conditions, method || :post)).merge(resource.requirements)
670671
when "show", "edit"; default_options.merge(add_conditions_for(resource.conditions, method || :get)).merge(resource.requirements(require_id))
671672
when "update"; default_options.merge(add_conditions_for(resource.conditions, method || :put)).merge(resource.requirements(require_id))
672673
when "destroy"; default_options.merge(add_conditions_for(resource.conditions, method || :delete)).merge(resource.requirements(require_id))
673-
else
674-
if method.nil? || resource.member_methods.nil? || resource.member_methods[method.to_sym].nil?
675-
default_options.merge(add_conditions_for(resource.conditions, method)).merge(resource.requirements)
676-
else
677-
resource.member_methods[method.to_sym].include?(action) ? default_options.merge(add_conditions_for(resource.conditions, method)).merge(resource.requirements(require_id)) : default_options.merge(add_conditions_for(resource.conditions, method)).merge(resource.requirements)
678-
end
674+
else default_options.merge(add_conditions_for(resource.conditions, method)).merge(resource.requirements(force_id))
679675
end
680676
end
681677
end

actionpack/lib/action_controller/vendor/rack-1.0/rack.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ def self.version
2323

2424
# Return the Rack release as a dotted string.
2525
def self.release
26-
"0.4"
26+
"1.0 bundled"
2727
end
2828

2929
autoload :Builder, "rack/builder"
3030
autoload :Cascade, "rack/cascade"
31+
autoload :Chunked, "rack/chunked"
3132
autoload :CommonLogger, "rack/commonlogger"
3233
autoload :ConditionalGet, "rack/conditionalget"
3334
autoload :ContentLength, "rack/content_length"
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
require 'rack/utils'
2+
3+
module Rack
4+
5+
# Middleware that applies chunked transfer encoding to response bodies
6+
# when the response does not include a Content-Length header.
7+
class Chunked
8+
include Rack::Utils
9+
10+
def initialize(app)
11+
@app = app
12+
end
13+
14+
def call(env)
15+
status, headers, body = @app.call(env)
16+
headers = HeaderHash.new(headers)
17+
18+
if env['HTTP_VERSION'] == 'HTTP/1.0' ||
19+
STATUS_WITH_NO_ENTITY_BODY.include?(status) ||
20+
headers['Content-Length'] ||
21+
headers['Transfer-Encoding']
22+
[status, headers.to_hash, body]
23+
else
24+
dup.chunk(status, headers, body)
25+
end
26+
end
27+
28+
def chunk(status, headers, body)
29+
@body = body
30+
headers.delete('Content-Length')
31+
headers['Transfer-Encoding'] = 'chunked'
32+
[status, headers.to_hash, self]
33+
end
34+
35+
def each
36+
term = "\r\n"
37+
@body.each do |chunk|
38+
size = bytesize(chunk)
39+
next if size == 0
40+
yield [size.to_s(16), term, chunk, term].join
41+
end
42+
yield ["0", term, "", term].join
43+
end
44+
45+
def close
46+
@body.close if @body.respond_to?(:close)
47+
end
48+
end
49+
end

actionpack/lib/action_controller/vendor/rack-1.0/rack/file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def serving
6060
body = self
6161
else
6262
body = [F.read(@path)]
63-
size = body.first.size
63+
size = Utils.bytesize(body.first)
6464
end
6565

6666
[200, {

0 commit comments

Comments
 (0)