actionpack 5.2.8.1 → 6.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of actionpack might be problematic. Click here for more details.

Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +270 -347
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +4 -3
  5. data/lib/abstract_controller/base.rb +4 -3
  6. data/lib/abstract_controller/caching/fragments.rb +6 -22
  7. data/lib/abstract_controller/caching.rb +1 -1
  8. data/lib/abstract_controller/callbacks.rb +12 -0
  9. data/lib/abstract_controller/collector.rb +1 -2
  10. data/lib/abstract_controller/helpers.rb +7 -6
  11. data/lib/abstract_controller/railties/routes_helpers.rb +1 -1
  12. data/lib/abstract_controller/translation.rb +4 -4
  13. data/lib/action_controller/api.rb +2 -1
  14. data/lib/action_controller/base.rb +2 -7
  15. data/lib/action_controller/caching.rb +1 -2
  16. data/lib/action_controller/log_subscriber.rb +8 -5
  17. data/lib/action_controller/metal/basic_implicit_render.rb +1 -1
  18. data/lib/action_controller/metal/conditional_get.rb +9 -3
  19. data/lib/action_controller/metal/content_security_policy.rb +0 -1
  20. data/lib/action_controller/metal/data_streaming.rb +5 -6
  21. data/lib/action_controller/metal/default_headers.rb +17 -0
  22. data/lib/action_controller/metal/etag_with_template_digest.rb +1 -1
  23. data/lib/action_controller/metal/exceptions.rb +23 -2
  24. data/lib/action_controller/metal/flash.rb +5 -5
  25. data/lib/action_controller/metal/force_ssl.rb +15 -56
  26. data/lib/action_controller/metal/head.rb +1 -1
  27. data/lib/action_controller/metal/helpers.rb +3 -4
  28. data/lib/action_controller/metal/http_authentication.rb +20 -21
  29. data/lib/action_controller/metal/implicit_render.rb +4 -14
  30. data/lib/action_controller/metal/instrumentation.rb +3 -6
  31. data/lib/action_controller/metal/live.rb +29 -31
  32. data/lib/action_controller/metal/mime_responds.rb +13 -2
  33. data/lib/action_controller/metal/params_wrapper.rb +18 -14
  34. data/lib/action_controller/metal/redirecting.rb +5 -5
  35. data/lib/action_controller/metal/renderers.rb +4 -4
  36. data/lib/action_controller/metal/rendering.rb +2 -3
  37. data/lib/action_controller/metal/request_forgery_protection.rb +25 -48
  38. data/lib/action_controller/metal/streaming.rb +0 -1
  39. data/lib/action_controller/metal/strong_parameters.rb +65 -44
  40. data/lib/action_controller/metal/url_for.rb +1 -1
  41. data/lib/action_controller/metal.rb +8 -6
  42. data/lib/action_controller/railties/helpers.rb +1 -1
  43. data/lib/action_controller/renderer.rb +17 -3
  44. data/lib/action_controller/template_assertions.rb +1 -1
  45. data/lib/action_controller/test_case.rb +7 -8
  46. data/lib/action_controller.rb +5 -1
  47. data/lib/action_dispatch/http/cache.rb +14 -11
  48. data/lib/action_dispatch/http/content_disposition.rb +45 -0
  49. data/lib/action_dispatch/http/content_security_policy.rb +28 -17
  50. data/lib/action_dispatch/http/filter_parameters.rb +8 -7
  51. data/lib/action_dispatch/http/filter_redirect.rb +1 -2
  52. data/lib/action_dispatch/http/headers.rb +1 -2
  53. data/lib/action_dispatch/http/mime_negotiation.rb +13 -6
  54. data/lib/action_dispatch/http/mime_type.rb +14 -8
  55. data/lib/action_dispatch/http/parameter_filter.rb +5 -79
  56. data/lib/action_dispatch/http/parameters.rb +15 -6
  57. data/lib/action_dispatch/http/request.rb +21 -14
  58. data/lib/action_dispatch/http/response.rb +40 -21
  59. data/lib/action_dispatch/http/upload.rb +9 -1
  60. data/lib/action_dispatch/http/url.rb +81 -82
  61. data/lib/action_dispatch/journey/formatter.rb +2 -3
  62. data/lib/action_dispatch/journey/gtg/builder.rb +0 -1
  63. data/lib/action_dispatch/journey/gtg/transition_table.rb +0 -1
  64. data/lib/action_dispatch/journey/nfa/simulator.rb +0 -2
  65. data/lib/action_dispatch/journey/nfa/transition_table.rb +0 -1
  66. data/lib/action_dispatch/journey/nodes/node.rb +9 -8
  67. data/lib/action_dispatch/journey/path/pattern.rb +6 -3
  68. data/lib/action_dispatch/journey/route.rb +5 -4
  69. data/lib/action_dispatch/journey/router/utils.rb +10 -10
  70. data/lib/action_dispatch/journey/router.rb +0 -4
  71. data/lib/action_dispatch/journey/routes.rb +0 -2
  72. data/lib/action_dispatch/journey/scanner.rb +10 -4
  73. data/lib/action_dispatch/journey/visitors.rb +1 -4
  74. data/lib/action_dispatch/middleware/actionable_exceptions.rb +46 -0
  75. data/lib/action_dispatch/middleware/callbacks.rb +2 -4
  76. data/lib/action_dispatch/middleware/cookies.rb +62 -78
  77. data/lib/action_dispatch/middleware/debug_exceptions.rb +45 -61
  78. data/lib/action_dispatch/middleware/debug_locks.rb +5 -5
  79. data/lib/action_dispatch/middleware/debug_view.rb +66 -0
  80. data/lib/action_dispatch/middleware/exception_wrapper.rb +49 -16
  81. data/lib/action_dispatch/middleware/flash.rb +1 -1
  82. data/lib/action_dispatch/middleware/host_authorization.rb +121 -0
  83. data/lib/action_dispatch/middleware/public_exceptions.rb +6 -3
  84. data/lib/action_dispatch/middleware/remote_ip.rb +9 -12
  85. data/lib/action_dispatch/middleware/request_id.rb +2 -2
  86. data/lib/action_dispatch/middleware/session/abstract_store.rb +0 -1
  87. data/lib/action_dispatch/middleware/session/cookie_store.rb +1 -7
  88. data/lib/action_dispatch/middleware/show_exceptions.rb +1 -2
  89. data/lib/action_dispatch/middleware/ssl.rb +8 -8
  90. data/lib/action_dispatch/middleware/stack.rb +38 -2
  91. data/lib/action_dispatch/middleware/static.rb +6 -7
  92. data/lib/action_dispatch/middleware/templates/rescues/_actions.html.erb +13 -0
  93. data/lib/action_dispatch/middleware/templates/rescues/_actions.text.erb +0 -0
  94. data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +3 -1
  95. data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb +1 -1
  96. data/lib/action_dispatch/middleware/templates/rescues/_source.html.erb +4 -2
  97. data/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb +45 -35
  98. data/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb +7 -0
  99. data/lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb +5 -0
  100. data/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb +26 -4
  101. data/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb +1 -1
  102. data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb +7 -4
  103. data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb +5 -2
  104. data/lib/action_dispatch/middleware/templates/rescues/layout.erb +4 -0
  105. data/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb +19 -0
  106. data/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.text.erb +3 -0
  107. data/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb +2 -2
  108. data/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb +1 -1
  109. data/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +2 -2
  110. data/lib/action_dispatch/middleware/templates/routes/_table.html.erb +3 -0
  111. data/lib/action_dispatch/railtie.rb +7 -2
  112. data/lib/action_dispatch/request/session.rb +9 -2
  113. data/lib/action_dispatch/routing/inspector.rb +97 -50
  114. data/lib/action_dispatch/routing/mapper.rb +63 -42
  115. data/lib/action_dispatch/routing/polymorphic_routes.rb +3 -6
  116. data/lib/action_dispatch/routing/route_set.rb +25 -31
  117. data/lib/action_dispatch/routing/url_for.rb +2 -2
  118. data/lib/action_dispatch/routing.rb +21 -20
  119. data/lib/action_dispatch/system_test_case.rb +44 -6
  120. data/lib/action_dispatch/system_testing/browser.rb +38 -7
  121. data/lib/action_dispatch/system_testing/driver.rb +11 -2
  122. data/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +6 -5
  123. data/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +7 -6
  124. data/lib/action_dispatch/testing/assertion_response.rb +0 -1
  125. data/lib/action_dispatch/testing/assertions/response.rb +2 -3
  126. data/lib/action_dispatch/testing/assertions/routing.rb +15 -3
  127. data/lib/action_dispatch/testing/assertions.rb +1 -1
  128. data/lib/action_dispatch/testing/integration.rb +33 -12
  129. data/lib/action_dispatch/testing/request_encoder.rb +2 -2
  130. data/lib/action_dispatch/testing/test_process.rb +2 -2
  131. data/lib/action_dispatch/testing/test_response.rb +4 -32
  132. data/lib/action_dispatch.rb +7 -2
  133. data/lib/action_pack/gem_version.rb +4 -4
  134. data/lib/action_pack.rb +1 -1
  135. metadata +29 -15
  136. data/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb +0 -26
@@ -9,6 +9,11 @@ module ActionDispatch
9
9
  module Assertions
10
10
  # Suite of assertions to test routes generated by \Rails and the handling of requests made to them.
11
11
  module RoutingAssertions
12
+ def setup # :nodoc:
13
+ @routes ||= nil
14
+ super
15
+ end
16
+
12
17
  # Asserts that the routing of the given +path+ was handled correctly and that the parsed options (given in the +expected_options+ hash)
13
18
  # match +path+. Basically, it asserts that \Rails recognizes the route given by +expected_options+.
14
19
  #
@@ -78,7 +83,7 @@ module ActionDispatch
78
83
  # # Asserts that the generated route gives us our custom route
79
84
  # assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" }
80
85
  def assert_generates(expected_path, options, defaults = {}, extras = {}, message = nil)
81
- if expected_path =~ %r{://}
86
+ if %r{://}.match?(expected_path)
82
87
  fail_on(URI::InvalidURIError, message) do
83
88
  uri = URI.parse(expected_path)
84
89
  expected_path = uri.path.to_s.empty? ? "/" : uri.path
@@ -155,9 +160,16 @@ module ActionDispatch
155
160
  @controller.singleton_class.include(_routes.url_helpers)
156
161
 
157
162
  if @controller.respond_to? :view_context_class
158
- @controller.view_context_class = Class.new(@controller.view_context_class) do
163
+ view_context_class = Class.new(@controller.view_context_class) do
159
164
  include _routes.url_helpers
160
165
  end
166
+
167
+ custom_view_context = Module.new {
168
+ define_method(:view_context_class) do
169
+ view_context_class
170
+ end
171
+ }
172
+ @controller.extend(custom_view_context)
161
173
  end
162
174
  end
163
175
  yield @routes
@@ -189,7 +201,7 @@ module ActionDispatch
189
201
 
190
202
  request = ActionController::TestRequest.create @controller.class
191
203
 
192
- if path =~ %r{://}
204
+ if %r{://}.match?(path)
193
205
  fail_on(URI::InvalidURIError, msg) do
194
206
  uri = URI.parse(path)
195
207
  request.env["rack.url_scheme"] = uri.scheme || "http"
@@ -14,7 +14,7 @@ module ActionDispatch
14
14
  include Rails::Dom::Testing::Assertions
15
15
 
16
16
  def html_document
17
- @html_document ||= if @response.content_type.to_s.end_with?("xml")
17
+ @html_document ||= if @response.media_type.to_s.end_with?("xml")
18
18
  Nokogiri::XML::Document.parse(@response.body)
19
19
  else
20
20
  Nokogiri::HTML::Document.parse(@response.body)
@@ -44,16 +44,17 @@ module ActionDispatch
44
44
 
45
45
  # Performs a HEAD request with the given parameters. See ActionDispatch::Integration::Session#process
46
46
  # for more details.
47
- def head(path, *args)
48
- process(:head, path, *args)
47
+ def head(path, **args)
48
+ process(:head, path, **args)
49
49
  end
50
50
 
51
51
  # Follow a single redirect response. If the last response was not a
52
52
  # redirect, an exception will be raised. Otherwise, the redirect is
53
- # performed on the location header.
54
- def follow_redirect!
53
+ # performed on the location header. Any arguments are passed to the
54
+ # underlying call to `get`.
55
+ def follow_redirect!(**args)
55
56
  raise "not a redirect! #{status} #{status_message}" unless redirect?
56
- get(response.location)
57
+ get(response.location, **args)
57
58
  status
58
59
  end
59
60
  end
@@ -189,6 +190,12 @@ module ActionDispatch
189
190
  # merged into the Rack env hash.
190
191
  # - +env+: Additional env to pass, as a Hash. The headers will be
191
192
  # merged into the Rack env hash.
193
+ # - +xhr+: Set to `true` if you want to make and Ajax request.
194
+ # Adds request headers characteristic of XMLHttpRequest e.g. HTTP_X_REQUESTED_WITH.
195
+ # The headers will be merged into the Rack env hash.
196
+ # - +as+: Used for encoding the request with different content type.
197
+ # Supports `:json` by default and will set the appropriate request headers.
198
+ # The headers will be merged into the Rack env hash.
192
199
  #
193
200
  # This method is rarely used directly. Use +#get+, +#post+, or other standard
194
201
  # HTTP methods in integration tests. +#process+ is only required when using a
@@ -210,7 +217,7 @@ module ActionDispatch
210
217
  method = :post
211
218
  end
212
219
 
213
- if path =~ %r{://}
220
+ if %r{://}.match?(path)
214
221
  path = build_expanded_path(path) do |location|
215
222
  https! URI::HTTPS === location if location.scheme
216
223
 
@@ -303,6 +310,7 @@ module ActionDispatch
303
310
  APP_SESSIONS = {}
304
311
 
305
312
  attr_reader :app
313
+ attr_accessor :root_session # :nodoc:
306
314
 
307
315
  def initialize(*args, &blk)
308
316
  super(*args, &blk)
@@ -328,7 +336,7 @@ module ActionDispatch
328
336
  klass = APP_SESSIONS[app] ||= Class.new(Integration::Session) {
329
337
  # If the app is a Rails app, make url_helpers available on the session.
330
338
  # This makes app.url_for and app.foo_path available in the console.
331
- if app.respond_to?(:routes)
339
+ if app.respond_to?(:routes) && app.routes.is_a?(ActionDispatch::Routing::RouteSet)
332
340
  include app.routes.url_helpers
333
341
  include app.routes.mounted_helpers
334
342
  end
@@ -341,15 +349,19 @@ module ActionDispatch
341
349
  end
342
350
 
343
351
  %w(get post patch put head delete cookies assigns follow_redirect!).each do |method|
344
- define_method(method) do |*args|
352
+ define_method(method) do |*args, **options|
345
353
  # reset the html_document variable, except for cookies/assigns calls
346
354
  unless method == "cookies" || method == "assigns"
347
355
  @html_document = nil
348
356
  end
349
357
 
350
- integration_session.__send__(method, *args).tap do
351
- copy_session_variables!
358
+ result = if options.any?
359
+ integration_session.__send__(method, *args, **options)
360
+ else
361
+ integration_session.__send__(method, *args)
352
362
  end
363
+ copy_session_variables!
364
+ result
353
365
  end
354
366
  end
355
367
 
@@ -366,10 +378,19 @@ module ActionDispatch
366
378
  def open_session
367
379
  dup.tap do |session|
368
380
  session.reset!
381
+ session.root_session = self.root_session || self
369
382
  yield session if block_given?
370
383
  end
371
384
  end
372
385
 
386
+ def assertions # :nodoc:
387
+ root_session ? root_session.assertions : super
388
+ end
389
+
390
+ def assertions=(assertions) # :nodoc:
391
+ root_session ? root_session.assertions = assertions : super
392
+ end
393
+
373
394
  # Copy the instance variables from the current session instance into the
374
395
  # test instance.
375
396
  def copy_session_variables! #:nodoc:
@@ -634,8 +655,8 @@ module ActionDispatch
634
655
  @@app = app
635
656
  end
636
657
 
637
- def register_encoder(*args)
638
- RequestEncoder.register_encoder(*args)
658
+ def register_encoder(*args, **options)
659
+ RequestEncoder.register_encoder(*args, **options)
639
660
  end
640
661
  end
641
662
 
@@ -38,8 +38,8 @@ module ActionDispatch
38
38
  end
39
39
 
40
40
  def self.parser(content_type)
41
- mime = Mime::Type.lookup(content_type)
42
- encoder(mime ? mime.ref : nil).response_parser
41
+ type = Mime::Type.lookup(content_type).ref if content_type
42
+ encoder(type).response_parser
43
43
  end
44
44
 
45
45
  def self.encoder(name)
@@ -8,12 +8,12 @@ module ActionDispatch
8
8
  module FixtureFile
9
9
  # Shortcut for <tt>Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.fixture_path, path), type)</tt>:
10
10
  #
11
- # post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png')
11
+ # post :change_avatar, params: { avatar: fixture_file_upload('files/spongebob.png', 'image/png') }
12
12
  #
13
13
  # To upload binary files on Windows, pass <tt>:binary</tt> as the last parameter.
14
14
  # This will not affect other platforms:
15
15
  #
16
- # post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png', :binary)
16
+ # post :change_avatar, params: { avatar: fixture_file_upload('files/spongebob.png', 'image/png', :binary) }
17
17
  def fixture_file_upload(path, mime_type = nil, binary = false)
18
18
  if self.class.respond_to?(:fixture_path) && self.class.fixture_path &&
19
19
  !File.exist?(path)
@@ -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(media_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
@@ -40,6 +40,9 @@ module ActionDispatch
40
40
  class IllegalStateError < StandardError
41
41
  end
42
42
 
43
+ class MissingController < NameError
44
+ end
45
+
43
46
  eager_autoload do
44
47
  autoload_under "http" do
45
48
  autoload :ContentSecurityPolicy
@@ -49,11 +52,14 @@ module ActionDispatch
49
52
  end
50
53
 
51
54
  autoload_under "middleware" do
55
+ autoload :HostAuthorization
52
56
  autoload :RequestId
53
57
  autoload :Callbacks
54
58
  autoload :Cookies
59
+ autoload :ActionableExceptions
55
60
  autoload :DebugExceptions
56
61
  autoload :DebugLocks
62
+ autoload :DebugView
57
63
  autoload :ExceptionWrapper
58
64
  autoload :Executor
59
65
  autoload :Flash
@@ -77,7 +83,6 @@ module ActionDispatch
77
83
  autoload :MimeNegotiation
78
84
  autoload :Parameters
79
85
  autoload :ParameterFilter
80
- autoload :Upload
81
86
  autoload :UploadedFile, "action_dispatch/http/upload"
82
87
  autoload :URL
83
88
  end
@@ -7,10 +7,10 @@ module ActionPack
7
7
  end
8
8
 
9
9
  module VERSION
10
- MAJOR = 5
11
- MINOR = 2
12
- TINY = 8
13
- PRE = "1"
10
+ MAJOR = 6
11
+ MINOR = 0
12
+ TINY = 6
13
+ PRE = nil
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.8.1
4
+ version: 6.0.6
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: 2022-07-12 00:00:00.000000000 Z
11
+ date: 2022-09-09 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.8.1
19
+ version: 6.0.6
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.8.1
26
+ version: 6.0.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -67,7 +67,7 @@ dependencies:
67
67
  version: '1.0'
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: 1.0.2
70
+ version: 1.2.0
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -77,7 +77,7 @@ dependencies:
77
77
  version: '1.0'
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: 1.0.2
80
+ version: 1.2.0
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rails-dom-testing
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -98,28 +98,28 @@ dependencies:
98
98
  requirements:
99
99
  - - '='
100
100
  - !ruby/object:Gem::Version
101
- version: 5.2.8.1
101
+ version: 6.0.6
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: 5.2.8.1
108
+ version: 6.0.6
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: 5.2.8.1
115
+ version: 6.0.6
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: 5.2.8.1
122
+ version: 6.0.6
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
@@ -157,6 +157,7 @@ files:
157
157
  - lib/action_controller/metal/content_security_policy.rb
158
158
  - lib/action_controller/metal/cookies.rb
159
159
  - lib/action_controller/metal/data_streaming.rb
160
+ - lib/action_controller/metal/default_headers.rb
160
161
  - lib/action_controller/metal/etag_with_flash.rb
161
162
  - lib/action_controller/metal/etag_with_template_digest.rb
162
163
  - lib/action_controller/metal/exceptions.rb
@@ -187,6 +188,7 @@ files:
187
188
  - lib/action_controller/test_case.rb
188
189
  - lib/action_dispatch.rb
189
190
  - lib/action_dispatch/http/cache.rb
191
+ - lib/action_dispatch/http/content_disposition.rb
190
192
  - lib/action_dispatch/http/content_security_policy.rb
191
193
  - lib/action_dispatch/http/filter_parameters.rb
192
194
  - lib/action_dispatch/http/filter_redirect.rb
@@ -224,13 +226,16 @@ files:
224
226
  - lib/action_dispatch/journey/visualizer/fsm.css
225
227
  - lib/action_dispatch/journey/visualizer/fsm.js
226
228
  - lib/action_dispatch/journey/visualizer/index.html.erb
229
+ - lib/action_dispatch/middleware/actionable_exceptions.rb
227
230
  - lib/action_dispatch/middleware/callbacks.rb
228
231
  - lib/action_dispatch/middleware/cookies.rb
229
232
  - lib/action_dispatch/middleware/debug_exceptions.rb
230
233
  - lib/action_dispatch/middleware/debug_locks.rb
234
+ - lib/action_dispatch/middleware/debug_view.rb
231
235
  - lib/action_dispatch/middleware/exception_wrapper.rb
232
236
  - lib/action_dispatch/middleware/executor.rb
233
237
  - lib/action_dispatch/middleware/flash.rb
238
+ - lib/action_dispatch/middleware/host_authorization.rb
234
239
  - lib/action_dispatch/middleware/public_exceptions.rb
235
240
  - lib/action_dispatch/middleware/reloader.rb
236
241
  - lib/action_dispatch/middleware/remote_ip.rb
@@ -243,17 +248,23 @@ files:
243
248
  - lib/action_dispatch/middleware/ssl.rb
244
249
  - lib/action_dispatch/middleware/stack.rb
245
250
  - lib/action_dispatch/middleware/static.rb
251
+ - lib/action_dispatch/middleware/templates/rescues/_actions.html.erb
252
+ - lib/action_dispatch/middleware/templates/rescues/_actions.text.erb
246
253
  - lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
247
254
  - lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb
248
255
  - lib/action_dispatch/middleware/templates/rescues/_source.html.erb
249
256
  - lib/action_dispatch/middleware/templates/rescues/_source.text.erb
250
257
  - lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
251
258
  - lib/action_dispatch/middleware/templates/rescues/_trace.text.erb
259
+ - lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb
260
+ - lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb
252
261
  - lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb
253
262
  - lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb
254
263
  - lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb
255
264
  - lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb
256
265
  - lib/action_dispatch/middleware/templates/rescues/layout.erb
266
+ - lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb
267
+ - lib/action_dispatch/middleware/templates/rescues/missing_exact_template.text.erb
257
268
  - lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb
258
269
  - lib/action_dispatch/middleware/templates/rescues/missing_template.text.erb
259
270
  - lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb
@@ -282,7 +293,6 @@ files:
282
293
  - lib/action_dispatch/system_testing/server.rb
283
294
  - lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb
284
295
  - lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb
285
- - lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
286
296
  - lib/action_dispatch/testing/assertion_response.rb
287
297
  - lib/action_dispatch/testing/assertions.rb
288
298
  - lib/action_dispatch/testing/assertions/response.rb
@@ -295,12 +305,16 @@ files:
295
305
  - lib/action_pack.rb
296
306
  - lib/action_pack/gem_version.rb
297
307
  - lib/action_pack/version.rb
298
- homepage: http://rubyonrails.org
308
+ homepage: https://rubyonrails.org
299
309
  licenses:
300
310
  - MIT
301
311
  metadata:
302
- source_code_uri: https://github.com/rails/rails/tree/v5.2.8.1/actionpack
303
- changelog_uri: https://github.com/rails/rails/blob/v5.2.8.1/actionpack/CHANGELOG.md
312
+ bug_tracker_uri: https://github.com/rails/rails/issues
313
+ changelog_uri: https://github.com/rails/rails/blob/v6.0.6/actionpack/CHANGELOG.md
314
+ documentation_uri: https://api.rubyonrails.org/v6.0.6/
315
+ mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
316
+ source_code_uri: https://github.com/rails/rails/tree/v6.0.6/actionpack
317
+ rubygems_mfa_required: 'true'
304
318
  post_install_message:
305
319
  rdoc_options: []
306
320
  require_paths:
@@ -309,7 +323,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
309
323
  requirements:
310
324
  - - ">="
311
325
  - !ruby/object:Gem::Version
312
- version: 2.2.2
326
+ version: 2.5.0
313
327
  required_rubygems_version: !ruby/object:Gem::Requirement
314
328
  requirements:
315
329
  - - ">="
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ActionDispatch
4
- module SystemTesting
5
- module TestHelpers
6
- module UndefMethods # :nodoc:
7
- extend ActiveSupport::Concern
8
- included do
9
- METHODS = %i(get post put patch delete).freeze
10
-
11
- METHODS.each do |verb|
12
- undef_method verb
13
- end
14
-
15
- def method_missing(method, *args, &block)
16
- if METHODS.include?(method)
17
- raise NoMethodError, "System tests cannot make direct requests via ##{method}; use #visit and #click_on instead. See http://www.rubydoc.info/github/teamcapybara/capybara/master#The_DSL for more information."
18
- else
19
- super
20
- end
21
- end
22
- end
23
- end
24
- end
25
- end
26
- end