actionpack 4.0.0.rc1 → 4.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionpack might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -3
- data/lib/action_controller/metal/url_for.rb +2 -1
- data/lib/action_controller/test_case.rb +0 -6
- data/lib/action_dispatch/http/parameters.rb +1 -1
- data/lib/action_dispatch/middleware/exception_wrapper.rb +1 -0
- data/lib/action_dispatch/middleware/public_exceptions.rb +2 -3
- data/lib/action_dispatch/middleware/templates/rescues/layout.erb +6 -0
- data/lib/action_dispatch/routing/inspector.rb +1 -1
- data/lib/action_dispatch/routing/mapper.rb +1 -1
- data/lib/action_dispatch/routing/route_set.rb +1 -0
- data/lib/action_dispatch/testing/integration.rb +1 -7
- data/lib/action_pack/version.rb +1 -1
- data/lib/action_view/dependency_tracker.rb +1 -1
- data/lib/action_view/helpers/asset_url_helper.rb +2 -1
- data/lib/action_view/helpers/form_tag_helper.rb +1 -1
- data/lib/action_view/lookup_context.rb +1 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 797c49ae681c32c478447d8307499c1205688bee
|
4
|
+
data.tar.gz: 34f6871e8a0befed6080b163e032155b436b99e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9a2453f05fa4d50ab68b9398784c6255818b0724616aab9ea8b1fb13fb8901cc3d4b7aef3b4000bf39ce47ee6a73d4e4c8ea4d8b88e87a4af1a8202c8ee9fa4
|
7
|
+
data.tar.gz: 90849b7210e4491f98f51c04d23068a702dd2b1047ff5dbc056a36cb1755a9410d7ad23226bcb32c257b13e0cefd5d461ec8cf491ff88b55e03ac04bf6e7a0ea
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
## Rails 4.0.0 (
|
1
|
+
## Rails 4.0.0.rc2 (June 11, 2013) ##
|
2
|
+
|
3
|
+
* Fix an issue where partials with a number in the filename weren't being digested for cache dependencies.
|
4
|
+
|
5
|
+
*Bryan Ricker*
|
6
|
+
|
7
|
+
|
8
|
+
## Rails 4.0.0.rc1 (April 29, 2013) ##
|
2
9
|
|
3
10
|
* Add support for passing custom url options other than `:host` and custom
|
4
11
|
status and flash options to `force_ssl`.
|
@@ -1058,6 +1065,14 @@
|
|
1058
1065
|
|
1059
1066
|
*Andrew White*
|
1060
1067
|
|
1068
|
+
* In the routes DSL the `:via` option of `match` is now mandatory.
|
1069
|
+
|
1070
|
+
For routes that respond to one single verb it is recommended to use the more specific
|
1071
|
+
macros `get`, `post`, etc. instead. You can still map all HTTP verbs to one action
|
1072
|
+
with `match`, but it has to be explictly configured using `:via => :all`.
|
1073
|
+
|
1074
|
+
*José Valim and Yehuda Katz*
|
1075
|
+
|
1061
1076
|
* Add `index` method to FormBuilder class. *Jorge Bejar*
|
1062
1077
|
|
1063
1078
|
* Remove the leading \n added by textarea on `assert_select`. *Santiago Pastorino*
|
@@ -1106,8 +1121,6 @@
|
|
1106
1121
|
|
1107
1122
|
*dlee*
|
1108
1123
|
|
1109
|
-
* Integration tests support the `OPTIONS` method. *Jeremy Kemper*
|
1110
|
-
|
1111
1124
|
* `expires_in` accepts a `must_revalidate` flag. If true, "must-revalidate"
|
1112
1125
|
is added to the Cache-Control header. *fxn*
|
1113
1126
|
|
@@ -32,7 +32,8 @@ module ActionController
|
|
32
32
|
|
33
33
|
if (same_origin = _routes.equal?(env["action_dispatch.routes"])) ||
|
34
34
|
(script_name = env["ROUTES_#{_routes.object_id}_SCRIPT_NAME"]) ||
|
35
|
-
(original_script_name = env['
|
35
|
+
(original_script_name = env['ORIGINAL_SCRIPT_NAME'])
|
36
|
+
|
36
37
|
@_url_options.dup.tap do |options|
|
37
38
|
if original_script_name
|
38
39
|
options[:original_script_name] = original_script_name
|
@@ -499,12 +499,6 @@ module ActionController
|
|
499
499
|
process(action, "HEAD", *args)
|
500
500
|
end
|
501
501
|
|
502
|
-
# Simulate a OPTIONS request with the given parameters and set/volley the response.
|
503
|
-
# See +get+ for more details.
|
504
|
-
def options(action, *args)
|
505
|
-
process(action, "OPTIONS", *args)
|
506
|
-
end
|
507
|
-
|
508
502
|
def xml_http_request(request_method, action, parameters = nil, session = nil, flash = nil)
|
509
503
|
@request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
|
510
504
|
@request.env['HTTP_ACCEPT'] ||= [Mime::JS, Mime::HTML, Mime::XML, 'text/xml', Mime::ALL].join(', ')
|
@@ -65,7 +65,7 @@ module ActionDispatch
|
|
65
65
|
|
66
66
|
new_hash = {}
|
67
67
|
params.each do |k, v|
|
68
|
-
new_key = k.is_a?(String) ? k.dup.force_encoding(
|
68
|
+
new_key = k.is_a?(String) ? k.dup.force_encoding(Encoding::UTF_8).encode! : k
|
69
69
|
new_hash[new_key] =
|
70
70
|
case v
|
71
71
|
when Hash
|
@@ -13,6 +13,7 @@ module ActionDispatch
|
|
13
13
|
'ActionController::NotImplemented' => :not_implemented,
|
14
14
|
'ActionController::UnknownFormat' => :not_acceptable,
|
15
15
|
'ActionController::InvalidAuthenticityToken' => :unprocessable_entity,
|
16
|
+
'ActionDispatch::ParamsParser::ParseError' => :bad_request,
|
16
17
|
'ActionController::BadRequest' => :bad_request,
|
17
18
|
'ActionController::ParameterMissing' => :bad_request
|
18
19
|
)
|
@@ -7,11 +7,10 @@ module ActionDispatch
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def call(env)
|
10
|
-
exception = env["action_dispatch.exception"]
|
11
10
|
status = env["PATH_INFO"][1..-1]
|
12
11
|
request = ActionDispatch::Request.new(env)
|
13
12
|
content_type = request.formats.first
|
14
|
-
body = { :status => status, :error =>
|
13
|
+
body = { :status => status, :error => Rack::Utils::HTTP_STATUS_CODES.fetch(status.to_i, Rack::Utils::HTTP_STATUS_CODES[500]) }
|
15
14
|
|
16
15
|
render(status, content_type, body)
|
17
16
|
end
|
@@ -19,7 +18,7 @@ module ActionDispatch
|
|
19
18
|
private
|
20
19
|
|
21
20
|
def render(status, content_type, body)
|
22
|
-
format =
|
21
|
+
format = "to_#{content_type.to_sym}" if content_type
|
23
22
|
if format && body.respond_to?(format)
|
24
23
|
render_format(status, content_type, body.public_send(format))
|
25
24
|
else
|
@@ -69,7 +69,7 @@ module ActionDispatch
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def internal?
|
72
|
-
controller =~ %r{\Arails/(info|welcome)} || path =~ %r{\A#{Rails.application.config.assets.prefix}}
|
72
|
+
controller.to_s =~ %r{\Arails/(info|welcome)} || path =~ %r{\A#{Rails.application.config.assets.prefix}}
|
73
73
|
end
|
74
74
|
|
75
75
|
def engine?
|
@@ -299,7 +299,7 @@ module ActionDispatch
|
|
299
299
|
end
|
300
300
|
end
|
301
301
|
|
302
|
-
# Invokes
|
302
|
+
# Invokes Journey::Router::Utils.normalize_path and ensure that
|
303
303
|
# (:locale) becomes (/:locale) instead of /(:locale). Except
|
304
304
|
# for root cases, where the latter is the correct one.
|
305
305
|
def self.normalize_path(path)
|
@@ -62,12 +62,6 @@ module ActionDispatch
|
|
62
62
|
process :head, path, parameters, headers_or_env
|
63
63
|
end
|
64
64
|
|
65
|
-
# Performs a OPTIONS request with the given parameters. See +#get+ for
|
66
|
-
# more details.
|
67
|
-
def options(path, parameters = nil, headers_or_env = nil)
|
68
|
-
process :options, path, parameters, headers_or_env
|
69
|
-
end
|
70
|
-
|
71
65
|
# Performs an XMLHttpRequest request with the given parameters, mirroring
|
72
66
|
# a request from the Prototype library.
|
73
67
|
#
|
@@ -342,7 +336,7 @@ module ActionDispatch
|
|
342
336
|
@integration_session = Integration::Session.new(app)
|
343
337
|
end
|
344
338
|
|
345
|
-
%w(get post patch put head delete
|
339
|
+
%w(get post patch put head delete cookies assigns
|
346
340
|
xml_http_request xhr get_via_redirect post_via_redirect).each do |method|
|
347
341
|
define_method(method) do |*args|
|
348
342
|
reset! unless integration_session
|
data/lib/action_pack/version.rb
CHANGED
@@ -39,7 +39,7 @@ module ActionView
|
|
39
39
|
render\s* # render, followed by optional whitespace
|
40
40
|
\(? # start an optional parenthesis for the render call
|
41
41
|
(partial:|:partial\s+=>)?\s* # naming the partial, used with collection -- 1st capture
|
42
|
-
([@a-z"'][
|
42
|
+
([@a-z"'][@\w\/\."']+) # the template name itself -- 2nd capture
|
43
43
|
/x
|
44
44
|
|
45
45
|
def self.call(name, template)
|
@@ -193,7 +193,6 @@ module ActionView
|
|
193
193
|
request = self.request if respond_to?(:request)
|
194
194
|
host = config.asset_host if defined? config.asset_host
|
195
195
|
host ||= request.base_url if request && options[:protocol] == :request
|
196
|
-
return unless host
|
197
196
|
|
198
197
|
if host.respond_to?(:call)
|
199
198
|
arity = host.respond_to?(:arity) ? host.arity : host.method(:call).arity
|
@@ -204,6 +203,8 @@ module ActionView
|
|
204
203
|
host = host % (Zlib.crc32(source) % 4)
|
205
204
|
end
|
206
205
|
|
206
|
+
return unless host
|
207
|
+
|
207
208
|
if host =~ URI_REGEXP
|
208
209
|
host
|
209
210
|
else
|
@@ -81,7 +81,7 @@ module ActionView
|
|
81
81
|
# ==== Options
|
82
82
|
# * <tt>:multiple</tt> - If set to true the selection will allow multiple choices.
|
83
83
|
# * <tt>:disabled</tt> - If set to true, the user will not be able to use this input.
|
84
|
-
# * <tt>:include_blank</tt> - If set to true, an empty option will be
|
84
|
+
# * <tt>:include_blank</tt> - If set to true, an empty option will be created.
|
85
85
|
# * <tt>:prompt</tt> - Create a prompt option with blank value and the text asking user to select something
|
86
86
|
# * Any other key creates standard HTML attributes for the tag.
|
87
87
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.0.0.
|
19
|
+
version: 4.0.0.rc2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.0.0.
|
26
|
+
version: 4.0.0.rc2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: builder
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 4.0.0.
|
89
|
+
version: 4.0.0.rc2
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 4.0.0.
|
96
|
+
version: 4.0.0.rc2
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: tzinfo
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -380,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
380
380
|
requirements:
|
381
381
|
- none
|
382
382
|
rubyforge_project:
|
383
|
-
rubygems_version: 2.0.
|
383
|
+
rubygems_version: 2.0.2
|
384
384
|
signing_key:
|
385
385
|
specification_version: 4
|
386
386
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|