actionpack 5.2.7.1 → 6.0.0.beta1

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.

Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +109 -472
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +1 -1
  5. data/lib/abstract_controller/base.rb +4 -2
  6. data/lib/abstract_controller/caching/fragments.rb +6 -21
  7. data/lib/abstract_controller/callbacks.rb +12 -0
  8. data/lib/abstract_controller/collector.rb +1 -1
  9. data/lib/abstract_controller/helpers.rb +2 -2
  10. data/lib/abstract_controller/railties/routes_helpers.rb +1 -1
  11. data/lib/action_controller/api.rb +2 -1
  12. data/lib/action_controller/base.rb +2 -7
  13. data/lib/action_controller/caching.rb +1 -1
  14. data/lib/action_controller/log_subscriber.rb +8 -5
  15. data/lib/action_controller/metal/conditional_get.rb +9 -3
  16. data/lib/action_controller/metal/data_streaming.rb +5 -6
  17. data/lib/action_controller/metal/default_headers.rb +17 -0
  18. data/lib/action_controller/metal/exceptions.rb +22 -1
  19. data/lib/action_controller/metal/flash.rb +5 -5
  20. data/lib/action_controller/metal/force_ssl.rb +17 -57
  21. data/lib/action_controller/metal/head.rb +1 -1
  22. data/lib/action_controller/metal/helpers.rb +1 -2
  23. data/lib/action_controller/metal/http_authentication.rb +21 -22
  24. data/lib/action_controller/metal/implicit_render.rb +2 -12
  25. data/lib/action_controller/metal/instrumentation.rb +3 -5
  26. data/lib/action_controller/metal/live.rb +28 -26
  27. data/lib/action_controller/metal/mime_responds.rb +13 -2
  28. data/lib/action_controller/metal/params_wrapper.rb +18 -14
  29. data/lib/action_controller/metal/redirecting.rb +32 -11
  30. data/lib/action_controller/metal/rendering.rb +1 -1
  31. data/lib/action_controller/metal/request_forgery_protection.rb +32 -97
  32. data/lib/action_controller/metal/strong_parameters.rb +57 -34
  33. data/lib/action_controller/metal/url_for.rb +1 -1
  34. data/lib/action_controller/metal.rb +2 -2
  35. data/lib/action_controller/railties/helpers.rb +1 -1
  36. data/lib/action_controller/renderer.rb +15 -2
  37. data/lib/action_controller/test_case.rb +5 -9
  38. data/lib/action_controller.rb +1 -0
  39. data/lib/action_dispatch/http/cache.rb +14 -10
  40. data/lib/action_dispatch/http/content_disposition.rb +45 -0
  41. data/lib/action_dispatch/http/content_security_policy.rb +17 -8
  42. data/lib/action_dispatch/http/filter_parameters.rb +8 -6
  43. data/lib/action_dispatch/http/filter_redirect.rb +1 -1
  44. data/lib/action_dispatch/http/headers.rb +1 -1
  45. data/lib/action_dispatch/http/mime_negotiation.rb +7 -10
  46. data/lib/action_dispatch/http/mime_type.rb +1 -5
  47. data/lib/action_dispatch/http/parameter_filter.rb +5 -79
  48. data/lib/action_dispatch/http/parameters.rb +13 -3
  49. data/lib/action_dispatch/http/request.rb +10 -13
  50. data/lib/action_dispatch/http/response.rb +14 -14
  51. data/lib/action_dispatch/http/upload.rb +5 -0
  52. data/lib/action_dispatch/http/url.rb +81 -81
  53. data/lib/action_dispatch/journey/formatter.rb +1 -1
  54. data/lib/action_dispatch/journey/nfa/simulator.rb +0 -2
  55. data/lib/action_dispatch/journey/nodes/node.rb +9 -8
  56. data/lib/action_dispatch/journey/path/pattern.rb +3 -4
  57. data/lib/action_dispatch/journey/router/utils.rb +10 -10
  58. data/lib/action_dispatch/journey/router.rb +0 -3
  59. data/lib/action_dispatch/journey/scanner.rb +11 -4
  60. data/lib/action_dispatch/journey/visitors.rb +1 -1
  61. data/lib/action_dispatch/middleware/callbacks.rb +2 -4
  62. data/lib/action_dispatch/middleware/cookies.rb +49 -70
  63. data/lib/action_dispatch/middleware/debug_exceptions.rb +32 -58
  64. data/lib/action_dispatch/middleware/debug_locks.rb +5 -5
  65. data/lib/action_dispatch/middleware/debug_view.rb +50 -0
  66. data/lib/action_dispatch/middleware/exception_wrapper.rb +36 -7
  67. data/lib/action_dispatch/middleware/executor.rb +1 -1
  68. data/lib/action_dispatch/middleware/flash.rb +1 -1
  69. data/lib/action_dispatch/middleware/host_authorization.rb +103 -0
  70. data/lib/action_dispatch/middleware/remote_ip.rb +6 -8
  71. data/lib/action_dispatch/middleware/request_id.rb +2 -2
  72. data/lib/action_dispatch/middleware/session/abstract_store.rb +0 -14
  73. data/lib/action_dispatch/middleware/session/cache_store.rb +6 -11
  74. data/lib/action_dispatch/middleware/session/cookie_store.rb +11 -27
  75. data/lib/action_dispatch/middleware/ssl.rb +8 -8
  76. data/lib/action_dispatch/middleware/stack.rb +2 -2
  77. data/lib/action_dispatch/middleware/static.rb +5 -6
  78. data/lib/action_dispatch/middleware/templates/rescues/_source.html.erb +4 -2
  79. data/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb +45 -35
  80. data/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb +7 -0
  81. data/lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb +5 -0
  82. data/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb +20 -2
  83. data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb +4 -4
  84. data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb +2 -2
  85. data/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb +19 -0
  86. data/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.text.erb +3 -0
  87. data/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb +2 -2
  88. data/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb +1 -1
  89. data/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +2 -2
  90. data/lib/action_dispatch/middleware/templates/routes/_table.html.erb +3 -0
  91. data/lib/action_dispatch/railtie.rb +1 -0
  92. data/lib/action_dispatch/request/session.rb +8 -6
  93. data/lib/action_dispatch/routing/inspector.rb +99 -50
  94. data/lib/action_dispatch/routing/mapper.rb +36 -29
  95. data/lib/action_dispatch/routing/polymorphic_routes.rb +7 -12
  96. data/lib/action_dispatch/routing/route_set.rb +11 -12
  97. data/lib/action_dispatch/routing/url_for.rb +1 -0
  98. data/lib/action_dispatch/routing.rb +3 -2
  99. data/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +3 -3
  100. data/lib/action_dispatch/testing/assertions/response.rb +2 -3
  101. data/lib/action_dispatch/testing/assertions/routing.rb +7 -2
  102. data/lib/action_dispatch/testing/integration.rb +11 -5
  103. data/lib/action_dispatch/testing/test_process.rb +2 -2
  104. data/lib/action_dispatch/testing/test_response.rb +4 -32
  105. data/lib/action_dispatch.rb +7 -6
  106. data/lib/action_pack/gem_version.rb +4 -4
  107. data/lib/action_pack.rb +1 -1
  108. metadata +25 -23
@@ -14,40 +14,12 @@ module ActionDispatch
14
14
  new response.status, response.headers, response.body
15
15
  end
16
16
 
17
- def initialize(*) # :nodoc:
18
- super
19
- @response_parser = RequestEncoder.parser(content_type)
20
- end
21
-
22
- # Was the response successful?
23
- def success?
24
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
25
- The success? predicate is deprecated and will be removed in Rails 6.0.
26
- Please use successful? as provided by Rack::Response::Helpers.
27
- MSG
28
- successful?
29
- end
30
-
31
- # Was the URL not found?
32
- def missing?
33
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
34
- The missing? predicate is deprecated and will be removed in Rails 6.0.
35
- Please use not_found? as provided by Rack::Response::Helpers.
36
- MSG
37
- not_found?
38
- end
39
-
40
- # Was there a server-side error?
41
- def error?
42
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
43
- The error? predicate is deprecated and will be removed in Rails 6.0.
44
- Please use server_error? as provided by Rack::Response::Helpers.
45
- MSG
46
- server_error?
17
+ def parsed_body
18
+ @parsed_body ||= response_parser.call(body)
47
19
  end
48
20
 
49
- def parsed_body
50
- @parsed_body ||= @response_parser.call(body)
21
+ def response_parser
22
+ @response_parser ||= RequestEncoder.parser(content_type)
51
23
  end
52
24
  end
53
25
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  #--
4
- # Copyright (c) 2004-2018 David Heinemeier Hansson
4
+ # Copyright (c) 2004-2019 David Heinemeier Hansson
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining
7
7
  # a copy of this software and associated documentation files (the
@@ -49,11 +49,13 @@ module ActionDispatch
49
49
  end
50
50
 
51
51
  autoload_under "middleware" do
52
+ autoload :HostAuthorization
52
53
  autoload :RequestId
53
54
  autoload :Callbacks
54
55
  autoload :Cookies
55
56
  autoload :DebugExceptions
56
57
  autoload :DebugLocks
58
+ autoload :DebugView
57
59
  autoload :ExceptionWrapper
58
60
  autoload :Executor
59
61
  autoload :Flash
@@ -83,11 +85,10 @@ module ActionDispatch
83
85
  end
84
86
 
85
87
  module Session
86
- autoload :AbstractStore, "action_dispatch/middleware/session/abstract_store"
87
- autoload :AbstractSecureStore, "action_dispatch/middleware/session/abstract_store"
88
- autoload :CookieStore, "action_dispatch/middleware/session/cookie_store"
89
- autoload :MemCacheStore, "action_dispatch/middleware/session/mem_cache_store"
90
- autoload :CacheStore, "action_dispatch/middleware/session/cache_store"
88
+ autoload :AbstractStore, "action_dispatch/middleware/session/abstract_store"
89
+ autoload :CookieStore, "action_dispatch/middleware/session/cookie_store"
90
+ autoload :MemCacheStore, "action_dispatch/middleware/session/mem_cache_store"
91
+ autoload :CacheStore, "action_dispatch/middleware/session/cache_store"
91
92
  end
92
93
 
93
94
  mattr_accessor :test_app
@@ -7,10 +7,10 @@ module ActionPack
7
7
  end
8
8
 
9
9
  module VERSION
10
- MAJOR = 5
11
- MINOR = 2
12
- TINY = 7
13
- PRE = "1"
10
+ MAJOR = 6
11
+ MINOR = 0
12
+ TINY = 0
13
+ PRE = "beta1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
data/lib/action_pack.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  #--
4
- # Copyright (c) 2004-2018 David Heinemeier Hansson
4
+ # Copyright (c) 2004-2019 David Heinemeier Hansson
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining
7
7
  # a copy of this software and associated documentation files (the
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.2.7.1
4
+ version: 6.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-26 00:00:00.000000000 Z
11
+ date: 2019-01-18 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.2.7.1
19
+ version: 6.0.0.beta1
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.2.7.1
26
+ version: 6.0.0.beta1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -31,9 +31,6 @@ dependencies:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.0'
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: 2.0.8
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -41,9 +38,6 @@ dependencies:
41
38
  - - "~>"
42
39
  - !ruby/object:Gem::Version
43
40
  version: '2.0'
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 2.0.8
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: rack-test
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -98,28 +92,28 @@ dependencies:
98
92
  requirements:
99
93
  - - '='
100
94
  - !ruby/object:Gem::Version
101
- version: 5.2.7.1
95
+ version: 6.0.0.beta1
102
96
  type: :runtime
103
97
  prerelease: false
104
98
  version_requirements: !ruby/object:Gem::Requirement
105
99
  requirements:
106
100
  - - '='
107
101
  - !ruby/object:Gem::Version
108
- version: 5.2.7.1
102
+ version: 6.0.0.beta1
109
103
  - !ruby/object:Gem::Dependency
110
104
  name: activemodel
111
105
  requirement: !ruby/object:Gem::Requirement
112
106
  requirements:
113
107
  - - '='
114
108
  - !ruby/object:Gem::Version
115
- version: 5.2.7.1
109
+ version: 6.0.0.beta1
116
110
  type: :development
117
111
  prerelease: false
118
112
  version_requirements: !ruby/object:Gem::Requirement
119
113
  requirements:
120
114
  - - '='
121
115
  - !ruby/object:Gem::Version
122
- version: 5.2.7.1
116
+ version: 6.0.0.beta1
123
117
  description: Web apps on Rails. Simple, battle-tested conventions for building and
124
118
  testing MVC web applications. Works with any Rack-compatible server.
125
119
  email: david@loudthinking.com
@@ -157,6 +151,7 @@ files:
157
151
  - lib/action_controller/metal/content_security_policy.rb
158
152
  - lib/action_controller/metal/cookies.rb
159
153
  - lib/action_controller/metal/data_streaming.rb
154
+ - lib/action_controller/metal/default_headers.rb
160
155
  - lib/action_controller/metal/etag_with_flash.rb
161
156
  - lib/action_controller/metal/etag_with_template_digest.rb
162
157
  - lib/action_controller/metal/exceptions.rb
@@ -187,6 +182,7 @@ files:
187
182
  - lib/action_controller/test_case.rb
188
183
  - lib/action_dispatch.rb
189
184
  - lib/action_dispatch/http/cache.rb
185
+ - lib/action_dispatch/http/content_disposition.rb
190
186
  - lib/action_dispatch/http/content_security_policy.rb
191
187
  - lib/action_dispatch/http/filter_parameters.rb
192
188
  - lib/action_dispatch/http/filter_redirect.rb
@@ -228,9 +224,11 @@ files:
228
224
  - lib/action_dispatch/middleware/cookies.rb
229
225
  - lib/action_dispatch/middleware/debug_exceptions.rb
230
226
  - lib/action_dispatch/middleware/debug_locks.rb
227
+ - lib/action_dispatch/middleware/debug_view.rb
231
228
  - lib/action_dispatch/middleware/exception_wrapper.rb
232
229
  - lib/action_dispatch/middleware/executor.rb
233
230
  - lib/action_dispatch/middleware/flash.rb
231
+ - lib/action_dispatch/middleware/host_authorization.rb
234
232
  - lib/action_dispatch/middleware/public_exceptions.rb
235
233
  - lib/action_dispatch/middleware/reloader.rb
236
234
  - lib/action_dispatch/middleware/remote_ip.rb
@@ -249,11 +247,15 @@ files:
249
247
  - lib/action_dispatch/middleware/templates/rescues/_source.text.erb
250
248
  - lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
251
249
  - lib/action_dispatch/middleware/templates/rescues/_trace.text.erb
250
+ - lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb
251
+ - lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb
252
252
  - lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb
253
253
  - lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb
254
254
  - lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb
255
255
  - lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb
256
256
  - lib/action_dispatch/middleware/templates/rescues/layout.erb
257
+ - lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb
258
+ - lib/action_dispatch/middleware/templates/rescues/missing_exact_template.text.erb
257
259
  - lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb
258
260
  - lib/action_dispatch/middleware/templates/rescues/missing_template.text.erb
259
261
  - lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb
@@ -299,9 +301,9 @@ homepage: http://rubyonrails.org
299
301
  licenses:
300
302
  - MIT
301
303
  metadata:
302
- source_code_uri: https://github.com/rails/rails/tree/v5.2.7.1/actionpack
303
- changelog_uri: https://github.com/rails/rails/blob/v5.2.7.1/actionpack/CHANGELOG.md
304
- post_install_message:
304
+ source_code_uri: https://github.com/rails/rails/tree/v6.0.0.beta1/actionpack
305
+ changelog_uri: https://github.com/rails/rails/blob/v6.0.0.beta1/actionpack/CHANGELOG.md
306
+ post_install_message:
305
307
  rdoc_options: []
306
308
  require_paths:
307
309
  - lib
@@ -309,16 +311,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
309
311
  requirements:
310
312
  - - ">="
311
313
  - !ruby/object:Gem::Version
312
- version: 2.2.2
314
+ version: 2.5.0
313
315
  required_rubygems_version: !ruby/object:Gem::Requirement
314
316
  requirements:
315
- - - ">="
317
+ - - ">"
316
318
  - !ruby/object:Gem::Version
317
- version: '0'
319
+ version: 1.3.1
318
320
  requirements:
319
321
  - none
320
- rubygems_version: 3.1.6
321
- signing_key:
322
+ rubygems_version: 3.0.1
323
+ signing_key:
322
324
  specification_version: 4
323
325
  summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
324
326
  test_files: []