actionpack 4.2.3 → 4.2.4.rc1
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 +20 -0
- data/lib/action_controller/base.rb +1 -1
- data/lib/action_controller/metal/mime_responds.rb +2 -0
- data/lib/action_controller/metal/params_wrapper.rb +3 -3
- data/lib/action_controller/test_case.rb +5 -0
- data/lib/action_dispatch/http/upload.rb +7 -1
- data/lib/action_dispatch/journey/router.rb +2 -1
- data/lib/action_dispatch/middleware/ssl.rb +1 -1
- data/lib/action_dispatch/testing/assertions/routing.rb +1 -1
- data/lib/action_dispatch/testing/integration.rb +2 -0
- data/lib/action_pack/gem_version.rb +2 -2
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34266592872f3b5676772eed123aee591b6c95bc
|
4
|
+
data.tar.gz: a0a550c6651e01b968c7a2219fef02f2d297f40e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bce1dcca8c7d543125c79fe4bb6f6422567e4d5c16946ccb0d30fbe05f4a242eee8201acf3b108cbeb71aa87b75858c868941833ee19d4c11bc92ad11c7214d5
|
7
|
+
data.tar.gz: e884f90c1a246c79ca0355fb4f3c5a99c77abea132e5b2543f185ae158e888e19f6c011df6ace3f3f888b8782762b584d6d1d6c375c49bccb4e6a0441852fee7
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
## Rails 4.2.4 (August 14, 2015) ##
|
2
|
+
|
3
|
+
* ActionController::TestSession now accepts a default value as well as
|
4
|
+
a block for generating a default value based off the key provided.
|
5
|
+
|
6
|
+
This fixes calls to session#fetch in ApplicationController instances that
|
7
|
+
take more two arguments or a block from raising `ArgumentError: wrong
|
8
|
+
number of arguments (2 for 1)` when performing controller tests.
|
9
|
+
|
10
|
+
*Matthew Gerrior*
|
11
|
+
|
12
|
+
* Fix to keep original header instance in `ActionDispatch::SSL`
|
13
|
+
|
14
|
+
`ActionDispatch::SSL` changes headers to `Hash`.
|
15
|
+
So some headers will be broken if there are some middlewares
|
16
|
+
on `ActionDispatch::SSL` and if it uses `Rack::Utils::HeaderHash`.
|
17
|
+
|
18
|
+
*Fumiaki Matsushima*
|
19
|
+
|
20
|
+
|
1
21
|
## Rails 4.2.3 (June 25, 2015) ##
|
2
22
|
|
3
23
|
* Fix rake routes not showing the right format when
|
@@ -183,7 +183,7 @@ module ActionController
|
|
183
183
|
# Shortcut helper that returns all the modules included in
|
184
184
|
# ActionController::Base except the ones passed as arguments:
|
185
185
|
#
|
186
|
-
# class
|
186
|
+
# class MyBaseController < ActionController::Metal
|
187
187
|
# ActionController::Base.without_modules(:ParamsWrapper, :Streaming).each do |left|
|
188
188
|
# include left
|
189
189
|
# end
|
@@ -4,6 +4,7 @@ module ActionController #:nodoc:
|
|
4
4
|
module MimeResponds
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
|
+
# :stopdoc:
|
7
8
|
module ClassMethods
|
8
9
|
def respond_to(*)
|
9
10
|
raise NoMethodError, "The controller-level `respond_to' feature has " \
|
@@ -21,6 +22,7 @@ module ActionController #:nodoc:
|
|
21
22
|
" gem 'responders', '~> 2.0'\n" \
|
22
23
|
"Consult the Rails upgrade guide for details."
|
23
24
|
end
|
25
|
+
# :startdoc:
|
24
26
|
|
25
27
|
# Without web-service support, an action which collects the data for displaying a list of people
|
26
28
|
# might look something like this:
|
@@ -5,8 +5,8 @@ require 'active_support/core_ext/struct'
|
|
5
5
|
require 'action_dispatch/http/mime_type'
|
6
6
|
|
7
7
|
module ActionController
|
8
|
-
# Wraps the parameters hash into a nested hash. This will allow clients to
|
9
|
-
#
|
8
|
+
# Wraps the parameters hash into a nested hash. This will allow clients to
|
9
|
+
# submit requests without having to specify any root elements.
|
10
10
|
#
|
11
11
|
# This functionality is enabled in +config/initializers/wrap_parameters.rb+
|
12
12
|
# and can be customized. If you are upgrading to \Rails 3.1, this file will
|
@@ -16,7 +16,7 @@ module ActionController
|
|
16
16
|
# a non-empty array:
|
17
17
|
#
|
18
18
|
# class UsersController < ApplicationController
|
19
|
-
# wrap_parameters format: [:json, :xml]
|
19
|
+
# wrap_parameters format: [:json, :xml, :url_encoded_form, :multipart_form]
|
20
20
|
# end
|
21
21
|
#
|
22
22
|
# If you enable +ParamsWrapper+ for +:json+ format, instead of having to
|
@@ -327,6 +327,10 @@ module ActionController
|
|
327
327
|
clear
|
328
328
|
end
|
329
329
|
|
330
|
+
def fetch(*args, &block)
|
331
|
+
@data.fetch(*args, &block)
|
332
|
+
end
|
333
|
+
|
330
334
|
private
|
331
335
|
|
332
336
|
def load!
|
@@ -601,6 +605,7 @@ module ActionController
|
|
601
605
|
parameters = paramify_values(parameters) if html_format?(parameters)
|
602
606
|
|
603
607
|
@html_document = nil
|
608
|
+
@html_scanner_document = nil
|
604
609
|
|
605
610
|
unless @controller.respond_to?(:recycle!)
|
606
611
|
@controller.extend(Testing::Functional)
|
@@ -28,7 +28,13 @@ module ActionDispatch
|
|
28
28
|
raise(ArgumentError, ':tempfile is required') unless @tempfile
|
29
29
|
|
30
30
|
@original_filename = hash[:filename]
|
31
|
-
|
31
|
+
if @original_filename
|
32
|
+
begin
|
33
|
+
@original_filename.encode!(Encoding::UTF_8)
|
34
|
+
rescue EncodingError
|
35
|
+
@original_filename.force_encoding(Encoding::UTF_8)
|
36
|
+
end
|
37
|
+
end
|
32
38
|
@content_type = hash[:type]
|
33
39
|
@headers = hash[:head]
|
34
40
|
end
|
@@ -121,7 +121,8 @@ module ActionDispatch
|
|
121
121
|
end
|
122
122
|
|
123
123
|
def match_head_routes(routes, req)
|
124
|
-
|
124
|
+
verb_specific_routes = routes.reject { |route| route.verb == // }
|
125
|
+
head_routes = match_routes(verb_specific_routes, req)
|
125
126
|
|
126
127
|
if head_routes.empty?
|
127
128
|
begin
|
@@ -165,7 +165,7 @@ module ActionDispatch
|
|
165
165
|
|
166
166
|
# ROUTES TODO: These assertions should really work in an integration context
|
167
167
|
def method_missing(selector, *args, &block)
|
168
|
-
if defined?(@controller) && @controller && @routes && @routes.named_routes.route_defined?(selector)
|
168
|
+
if defined?(@controller) && @controller && defined?(@routes) && @routes && @routes.named_routes.route_defined?(selector)
|
169
169
|
@controller.send(selector, *args, &block)
|
170
170
|
else
|
171
171
|
super
|
@@ -301,6 +301,7 @@ module ActionDispatch
|
|
301
301
|
response = _mock_session.last_response
|
302
302
|
@response = ActionDispatch::TestResponse.from_response(response)
|
303
303
|
@html_document = nil
|
304
|
+
@html_scanner_document = nil
|
304
305
|
@url_options = nil
|
305
306
|
|
306
307
|
@controller = session.last_request.env['action_controller.instance']
|
@@ -338,6 +339,7 @@ module ActionDispatch
|
|
338
339
|
# reset the html_document variable, except for cookies/assigns calls
|
339
340
|
unless method == 'cookies' || method == 'assigns'
|
340
341
|
@html_document = nil
|
342
|
+
@html_scanner_document = nil
|
341
343
|
reset_template_assertion
|
342
344
|
end
|
343
345
|
|
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.2.
|
4
|
+
version: 4.2.4.rc1
|
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: 2015-
|
11
|
+
date: 2015-08-14 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.2.
|
19
|
+
version: 4.2.4.rc1
|
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.2.
|
26
|
+
version: 4.2.4.rc1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,28 +98,28 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - '='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 4.2.
|
101
|
+
version: 4.2.4.rc1
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
106
|
- - '='
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version: 4.2.
|
108
|
+
version: 4.2.4.rc1
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
110
|
name: activemodel
|
111
111
|
requirement: !ruby/object:Gem::Requirement
|
112
112
|
requirements:
|
113
113
|
- - '='
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version: 4.2.
|
115
|
+
version: 4.2.4.rc1
|
116
116
|
type: :development
|
117
117
|
prerelease: false
|
118
118
|
version_requirements: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
120
|
- - '='
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: 4.2.
|
122
|
+
version: 4.2.4.rc1
|
123
123
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
124
124
|
testing MVC web applications. Works with any Rack-compatible server.
|
125
125
|
email: david@loudthinking.com
|
@@ -294,14 +294,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
294
294
|
version: 1.9.3
|
295
295
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
296
296
|
requirements:
|
297
|
-
- - "
|
297
|
+
- - ">"
|
298
298
|
- !ruby/object:Gem::Version
|
299
|
-
version:
|
299
|
+
version: 1.3.1
|
300
300
|
requirements:
|
301
301
|
- none
|
302
302
|
rubyforge_project:
|
303
|
-
rubygems_version: 2.4.
|
303
|
+
rubygems_version: 2.4.7
|
304
304
|
signing_key:
|
305
305
|
specification_version: 4
|
306
306
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|
307
307
|
test_files: []
|
308
|
+
has_rdoc:
|