actionpack 5.0.4 → 5.0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9968d71f5c9991c690422dedd3157bc02bf97cd
4
- data.tar.gz: c00642afc747469202ebf19b852d5fd4f4ce10bd
3
+ metadata.gz: fc884ddc0c6b6344dfae9ddf168f68b659503d6e
4
+ data.tar.gz: 6bb0e76338f24af78bc43a2e3ee3aa757d885444
5
5
  SHA512:
6
- metadata.gz: 2f90702a2336c365167a82a5fa4d37d38df0a2e7b41d0a3e8a4bad953d784edf1e471bf3f1d3c1f1ccb9e2a12ead11429b97decbaa6b843650f5b20cee9f8372
7
- data.tar.gz: f9fd94b461928c24bbbcaa60ac8e359477ff3c06717268ba827a48dd871044a42aace0eebff36c6f3f35229ebe777772b7e4d23c4efde9fea677624a330a68f3
6
+ metadata.gz: 991499066b8043649f00b76887a07e5a0ecaa0d33bb590041170c01aff8784f22b4152211291ca7cc2ccc27ed8cfbcbcbf93d3dd4220e8a5e57d2f13a5725fa7
7
+ data.tar.gz: 1c7ad649d9b1f99e5ec583795caac4f73894704f13e5c1e51f72daad76f68ac1d9d2ed6da8413a6cbf4438e2919eac46dbc807819bb00686685fa30e1cefbfa8
@@ -1,3 +1,10 @@
1
+ ## Rails 5.0.5.rc1 (July 19, 2017) ##
2
+
3
+ * Fallback `ActionController::Parameters#to_s` to `Hash#to_s`.
4
+
5
+ *Kir Shatrov*
6
+
7
+
1
8
  ## Rails 5.0.4 (June 19, 2017) ##
2
9
 
3
10
  * No changes.
@@ -13,7 +13,7 @@ module AbstractController
13
13
  path = controller_path.tr('/', '.')
14
14
  defaults = [:"#{path}#{key}"]
15
15
  defaults << options[:default] if options[:default]
16
- options[:default] = defaults
16
+ options[:default] = defaults.flatten
17
17
  key = "#{path}.#{action_name}#{key}"
18
18
  end
19
19
  I18n.translate(key, options)
@@ -279,7 +279,7 @@ module ActionController
279
279
  return false unless request.has_content_type?
280
280
 
281
281
  ref = request.content_mime_type.ref
282
- _wrapper_formats.include?(ref) && _wrapper_key && !request.request_parameters[_wrapper_key]
282
+ _wrapper_formats.include?(ref) && _wrapper_key && !request.request_parameters.key?(_wrapper_key)
283
283
  end
284
284
  end
285
285
  end
@@ -179,6 +179,13 @@ module ActionController
179
179
  #
180
180
  # Returns a new array of the keys of the parameters.
181
181
 
182
+ ##
183
+ # :method: to_s
184
+ #
185
+ # :call-seq:
186
+ # to_s()
187
+ # Returns the content of the parameters as a string.
188
+
182
189
  ##
183
190
  # :method: value?
184
191
  #
@@ -195,7 +202,7 @@ module ActionController
195
202
  #
196
203
  # Returns a new array of the values of the parameters.
197
204
  delegate :keys, :key?, :has_key?, :values, :has_value?, :value?, :empty?, :include?,
198
- :as_json, to: :@parameters
205
+ :as_json, :to_s, to: :@parameters
199
206
 
200
207
  # By default, never raise an UnpermittedParameters exception if these
201
208
  # params are present. The default includes both 'controller' and 'action'
@@ -22,14 +22,17 @@ module ActionController
22
22
  initializer "action_controller.parameters_config" do |app|
23
23
  options = app.config.action_controller
24
24
 
25
- ActionController::Parameters.permit_all_parameters = options.delete(:permit_all_parameters) { false }
26
- if app.config.action_controller[:always_permitted_parameters]
27
- ActionController::Parameters.always_permitted_parameters =
28
- app.config.action_controller.delete(:always_permitted_parameters)
29
- end
30
- ActionController::Parameters.raise_on_unfiltered_parameters = options.delete(:raise_on_unfiltered_parameters) { false }
31
- ActionController::Parameters.action_on_unpermitted_parameters = options.delete(:action_on_unpermitted_parameters) do
32
- (Rails.env.test? || Rails.env.development?) ? :log : false
25
+ ActiveSupport.on_load(:action_controller) do
26
+ ActionController::Parameters.permit_all_parameters = options.delete(:permit_all_parameters) { false }
27
+ if app.config.action_controller[:always_permitted_parameters]
28
+ ActionController::Parameters.always_permitted_parameters =
29
+ app.config.action_controller.delete(:always_permitted_parameters)
30
+ end
31
+ ActionController::Parameters.raise_on_unfiltered_parameters =
32
+ options.delete(:raise_on_unfiltered_parameters) { false }
33
+ ActionController::Parameters.action_on_unpermitted_parameters = options.delete(:action_on_unpermitted_parameters) do
34
+ (Rails.env.test? || Rails.env.development?) ? :log : false
35
+ end
33
36
  end
34
37
  end
35
38
 
@@ -74,7 +74,7 @@ module ActionDispatch
74
74
  PAIR_RE = %r{(#{KV_RE})=(#{KV_RE})}
75
75
  def filtered_query_string
76
76
  query_string.gsub(PAIR_RE) do |_|
77
- parameter_filter.filter([[$1, $2]]).first.join("=")
77
+ parameter_filter.filter($1 => $2).first.join("=")
78
78
  end
79
79
  end
80
80
  end
@@ -52,7 +52,7 @@ module ActionDispatch
52
52
  end
53
53
 
54
54
  def call(original_params, parents = [])
55
- filtered_params = {}
55
+ filtered_params = original_params.class.new
56
56
 
57
57
  original_params.each do |key, value|
58
58
  parents.push(key) if deep_regexps
@@ -248,6 +248,8 @@ module ActionDispatch
248
248
  if args.size < path_params_size
249
249
  path_params -= controller_options.keys
250
250
  path_params -= result.keys
251
+ else
252
+ path_params = path_params.dup
251
253
  end
252
254
  inner_options.each_key do |key|
253
255
  path_params.delete(key)
@@ -432,7 +432,7 @@ module ActionDispatch
432
432
  end
433
433
 
434
434
  %w(get post patch put head delete cookies assigns
435
- xml_http_request xhr get_via_redirect post_via_redirect).each do |method|
435
+ xml_http_request xhr get_via_redirect post_via_redirect follow_redirect!).each do |method|
436
436
  define_method(method) do |*args|
437
437
  # reset the html_document variable, except for cookies/assigns calls
438
438
  unless method == 'cookies' || method == 'assigns'
@@ -7,8 +7,8 @@ module ActionPack
7
7
  module VERSION
8
8
  MAJOR = 5
9
9
  MINOR = 0
10
- TINY = 4
11
- PRE = nil
10
+ TINY = 5
11
+ PRE = "rc1"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
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: 5.0.4
4
+ version: 5.0.5.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: 2017-06-19 00:00:00.000000000 Z
11
+ date: 2017-07-19 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: 5.0.4
19
+ version: 5.0.5.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: 5.0.4
26
+ version: 5.0.5.rc1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -92,28 +92,28 @@ dependencies:
92
92
  requirements:
93
93
  - - '='
94
94
  - !ruby/object:Gem::Version
95
- version: 5.0.4
95
+ version: 5.0.5.rc1
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - '='
101
101
  - !ruby/object:Gem::Version
102
- version: 5.0.4
102
+ version: 5.0.5.rc1
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: activemodel
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - '='
108
108
  - !ruby/object:Gem::Version
109
- version: 5.0.4
109
+ version: 5.0.5.rc1
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - '='
115
115
  - !ruby/object:Gem::Version
116
- version: 5.0.4
116
+ version: 5.0.5.rc1
117
117
  description: Web apps on Rails. Simple, battle-tested conventions for building and
118
118
  testing MVC web applications. Works with any Rack-compatible server.
119
119
  email: david@loudthinking.com
@@ -292,9 +292,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
292
292
  version: 2.2.2
293
293
  required_rubygems_version: !ruby/object:Gem::Requirement
294
294
  requirements:
295
- - - ">="
295
+ - - ">"
296
296
  - !ruby/object:Gem::Version
297
- version: '0'
297
+ version: 1.3.1
298
298
  requirements:
299
299
  - none
300
300
  rubyforge_project: