actionpack 5.1.7 → 5.2.4.3
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 +282 -362
- data/MIT-LICENSE +1 -1
- data/README.rdoc +5 -5
- data/lib/abstract_controller.rb +3 -0
- data/lib/abstract_controller/asset_paths.rb +2 -0
- data/lib/abstract_controller/base.rb +10 -2
- data/lib/abstract_controller/caching.rb +3 -2
- data/lib/abstract_controller/caching/fragments.rb +30 -7
- data/lib/abstract_controller/callbacks.rb +25 -3
- data/lib/abstract_controller/collector.rb +2 -0
- data/lib/abstract_controller/error.rb +2 -0
- data/lib/abstract_controller/helpers.rb +4 -5
- data/lib/abstract_controller/logger.rb +2 -0
- data/lib/abstract_controller/railties/routes_helpers.rb +2 -0
- data/lib/abstract_controller/rendering.rb +9 -16
- data/lib/abstract_controller/translation.rb +2 -0
- data/lib/abstract_controller/url_for.rb +2 -0
- data/lib/action_controller.rb +3 -0
- data/lib/action_controller/api.rb +2 -0
- data/lib/action_controller/api/api_rendering.rb +2 -0
- data/lib/action_controller/base.rb +3 -0
- data/lib/action_controller/caching.rb +2 -0
- data/lib/action_controller/form_builder.rb +2 -0
- data/lib/action_controller/log_subscriber.rb +5 -3
- data/lib/action_controller/metal.rb +13 -14
- data/lib/action_controller/metal/basic_implicit_render.rb +2 -0
- data/lib/action_controller/metal/conditional_get.rb +4 -3
- data/lib/action_controller/metal/content_security_policy.rb +52 -0
- data/lib/action_controller/metal/cookies.rb +2 -0
- data/lib/action_controller/metal/data_streaming.rb +7 -5
- data/lib/action_controller/metal/etag_with_flash.rb +2 -0
- data/lib/action_controller/metal/etag_with_template_digest.rb +3 -2
- data/lib/action_controller/metal/exceptions.rb +2 -3
- data/lib/action_controller/metal/flash.rb +3 -2
- data/lib/action_controller/metal/force_ssl.rb +4 -2
- data/lib/action_controller/metal/head.rb +2 -0
- data/lib/action_controller/metal/helpers.rb +4 -3
- data/lib/action_controller/metal/http_authentication.rb +8 -9
- data/lib/action_controller/metal/implicit_render.rb +2 -0
- data/lib/action_controller/metal/instrumentation.rb +4 -6
- data/lib/action_controller/metal/live.rb +3 -1
- data/lib/action_controller/metal/mime_responds.rb +3 -1
- data/lib/action_controller/metal/parameter_encoding.rb +2 -0
- data/lib/action_controller/metal/params_wrapper.rb +14 -10
- data/lib/action_controller/metal/redirecting.rb +22 -11
- data/lib/action_controller/metal/renderers.rb +4 -3
- data/lib/action_controller/metal/rendering.rb +2 -2
- data/lib/action_controller/metal/request_forgery_protection.rb +62 -10
- data/lib/action_controller/metal/rescue.rb +5 -3
- data/lib/action_controller/metal/streaming.rb +3 -1
- data/lib/action_controller/metal/strong_parameters.rb +36 -25
- data/lib/action_controller/metal/testing.rb +2 -6
- data/lib/action_controller/metal/url_for.rb +2 -0
- data/lib/action_controller/railtie.rb +16 -4
- data/lib/action_controller/railties/helpers.rb +2 -0
- data/lib/action_controller/renderer.rb +2 -0
- data/lib/action_controller/template_assertions.rb +2 -0
- data/lib/action_controller/test_case.rb +16 -10
- data/lib/action_dispatch.rb +9 -5
- data/lib/action_dispatch/http/cache.rb +22 -14
- data/lib/action_dispatch/http/content_security_policy.rb +272 -0
- data/lib/action_dispatch/http/filter_parameters.rb +4 -2
- data/lib/action_dispatch/http/filter_redirect.rb +2 -0
- data/lib/action_dispatch/http/headers.rb +2 -0
- data/lib/action_dispatch/http/mime_negotiation.rb +4 -8
- data/lib/action_dispatch/http/mime_type.rb +15 -13
- data/lib/action_dispatch/http/mime_types.rb +17 -2
- data/lib/action_dispatch/http/parameter_filter.rb +2 -0
- data/lib/action_dispatch/http/parameters.rb +6 -9
- data/lib/action_dispatch/http/rack_cache.rb +2 -0
- data/lib/action_dispatch/http/request.rb +36 -16
- data/lib/action_dispatch/http/response.rb +11 -9
- data/lib/action_dispatch/http/upload.rb +2 -0
- data/lib/action_dispatch/http/url.rb +5 -6
- data/lib/action_dispatch/journey.rb +2 -0
- data/lib/action_dispatch/journey/formatter.rb +4 -2
- data/lib/action_dispatch/journey/gtg/builder.rb +2 -0
- data/lib/action_dispatch/journey/gtg/simulator.rb +2 -8
- data/lib/action_dispatch/journey/gtg/transition_table.rb +3 -2
- data/lib/action_dispatch/journey/nfa/builder.rb +2 -0
- data/lib/action_dispatch/journey/nfa/dot.rb +12 -10
- data/lib/action_dispatch/journey/nfa/simulator.rb +2 -0
- data/lib/action_dispatch/journey/nfa/transition_table.rb +2 -0
- data/lib/action_dispatch/journey/nodes/node.rb +2 -0
- data/lib/action_dispatch/journey/parser_extras.rb +2 -0
- data/lib/action_dispatch/journey/path/pattern.rb +4 -1
- data/lib/action_dispatch/journey/route.rb +15 -6
- data/lib/action_dispatch/journey/router.rb +3 -1
- data/lib/action_dispatch/journey/router/utils.rb +14 -7
- data/lib/action_dispatch/journey/routes.rb +3 -1
- data/lib/action_dispatch/journey/scanner.rb +1 -0
- data/lib/action_dispatch/journey/visitors.rb +5 -3
- data/lib/action_dispatch/middleware/callbacks.rb +2 -0
- data/lib/action_dispatch/middleware/cookies.rb +148 -91
- data/lib/action_dispatch/middleware/debug_exceptions.rb +4 -2
- data/lib/action_dispatch/middleware/debug_locks.rb +9 -7
- data/lib/action_dispatch/middleware/exception_wrapper.rb +5 -6
- data/lib/action_dispatch/middleware/executor.rb +2 -0
- data/lib/action_dispatch/middleware/flash.rb +4 -2
- data/lib/action_dispatch/middleware/public_exceptions.rb +6 -4
- data/lib/action_dispatch/middleware/reloader.rb +2 -0
- data/lib/action_dispatch/middleware/remote_ip.rb +7 -5
- data/lib/action_dispatch/middleware/request_id.rb +3 -1
- data/lib/action_dispatch/middleware/session/abstract_store.rb +17 -1
- data/lib/action_dispatch/middleware/session/cache_store.rb +13 -6
- data/lib/action_dispatch/middleware/session/cookie_store.rb +31 -32
- data/lib/action_dispatch/middleware/session/mem_cache_store.rb +2 -0
- data/lib/action_dispatch/middleware/show_exceptions.rb +3 -1
- data/lib/action_dispatch/middleware/ssl.rb +44 -38
- data/lib/action_dispatch/middleware/stack.rb +4 -2
- data/lib/action_dispatch/middleware/static.rb +14 -12
- data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb +21 -0
- data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb +13 -0
- data/lib/action_dispatch/middleware/templates/rescues/layout.erb +1 -0
- data/lib/action_dispatch/middleware/templates/routes/_table.html.erb +6 -2
- data/lib/action_dispatch/railtie.rb +11 -1
- data/lib/action_dispatch/request/session.rb +16 -5
- data/lib/action_dispatch/request/utils.rb +6 -4
- data/lib/action_dispatch/routing.rb +3 -1
- data/lib/action_dispatch/routing/endpoint.rb +9 -2
- data/lib/action_dispatch/routing/inspector.rb +6 -4
- data/lib/action_dispatch/routing/mapper.rb +64 -52
- data/lib/action_dispatch/routing/polymorphic_routes.rb +2 -0
- data/lib/action_dispatch/routing/redirection.rb +7 -5
- data/lib/action_dispatch/routing/route_set.rb +29 -24
- data/lib/action_dispatch/routing/routes_proxy.rb +5 -2
- data/lib/action_dispatch/routing/url_for.rb +25 -5
- data/lib/action_dispatch/system_test_case.rb +22 -6
- data/lib/action_dispatch/system_testing/browser.rb +49 -0
- data/lib/action_dispatch/system_testing/driver.rb +9 -3
- data/lib/action_dispatch/system_testing/server.rb +2 -16
- data/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +12 -14
- data/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +8 -2
- data/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb +26 -0
- data/lib/action_dispatch/testing/assertion_response.rb +2 -0
- data/lib/action_dispatch/testing/assertions.rb +2 -0
- data/lib/action_dispatch/testing/assertions/response.rb +4 -2
- data/lib/action_dispatch/testing/assertions/routing.rb +5 -5
- data/lib/action_dispatch/testing/integration.rb +24 -21
- data/lib/action_dispatch/testing/request_encoder.rb +3 -1
- data/lib/action_dispatch/testing/test_process.rb +2 -0
- data/lib/action_dispatch/testing/test_request.rb +3 -1
- data/lib/action_dispatch/testing/test_response.rb +23 -3
- data/lib/action_pack.rb +3 -1
- data/lib/action_pack/gem_version.rb +5 -3
- data/lib/action_pack/version.rb +2 -0
- metadata +23 -11
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActionDispatch
|
2
4
|
module SystemTesting
|
3
5
|
module TestHelpers
|
4
|
-
# Screenshot helper for system testing
|
6
|
+
# Screenshot helper for system testing.
|
5
7
|
module ScreenshotHelper
|
6
8
|
# Takes a screenshot of the current page in the browser.
|
7
9
|
#
|
@@ -13,13 +15,12 @@ module ActionDispatch
|
|
13
15
|
#
|
14
16
|
# You can set the +RAILS_SYSTEM_TESTING_SCREENSHOT+ environment variable to
|
15
17
|
# control the output. Possible values are:
|
16
|
-
# * [+
|
17
|
-
#
|
18
|
-
# * [+
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
# artifact format (http://buildkite.github.io/terminal/inline-images/).
|
18
|
+
# * [+simple+ (default)] Only displays the screenshot path.
|
19
|
+
# This is the default value.
|
20
|
+
# * [+inline+] Display the screenshot in the terminal using the
|
21
|
+
# iTerm image protocol (https://iterm2.com/documentation-images.html).
|
22
|
+
# * [+artifact+] Display the screenshot in the terminal, using the terminal
|
23
|
+
# artifact format (https://buildkite.github.io/terminal/inline-images/).
|
23
24
|
def take_screenshot
|
24
25
|
save_image
|
25
26
|
puts display_image
|
@@ -57,17 +58,14 @@ module ActionDispatch
|
|
57
58
|
# Environment variables have priority
|
58
59
|
output_type = ENV["RAILS_SYSTEM_TESTING_SCREENSHOT"] || ENV["CAPYBARA_INLINE_SCREENSHOT"]
|
59
60
|
|
60
|
-
#
|
61
|
-
output_type ||= "simple"
|
62
|
-
|
63
|
-
# Default
|
64
|
-
output_type ||= "inline"
|
61
|
+
# Default to outputting a path to the screenshot
|
62
|
+
output_type ||= "simple"
|
65
63
|
|
66
64
|
output_type
|
67
65
|
end
|
68
66
|
|
69
67
|
def display_image
|
70
|
-
message = "[Screenshot]: #{image_path}\n"
|
68
|
+
message = "[Screenshot]: #{image_path}\n".dup
|
71
69
|
|
72
70
|
case output_type
|
73
71
|
when "artifact"
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActionDispatch
|
2
4
|
module SystemTesting
|
3
5
|
module TestHelpers
|
@@ -15,8 +17,12 @@ module ActionDispatch
|
|
15
17
|
end
|
16
18
|
|
17
19
|
def after_teardown
|
18
|
-
|
19
|
-
|
20
|
+
begin
|
21
|
+
take_failed_screenshot
|
22
|
+
ensure
|
23
|
+
Capybara.reset_sessions!
|
24
|
+
end
|
25
|
+
ensure
|
20
26
|
super
|
21
27
|
end
|
22
28
|
end
|
@@ -0,0 +1,26 @@
|
|
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
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActionDispatch
|
2
4
|
module Assertions
|
3
5
|
# A small suite of assertions that test responses from \Rails applications.
|
@@ -45,7 +47,7 @@ module ActionDispatch
|
|
45
47
|
# # Asserts that the redirection was to the named route login_url
|
46
48
|
# assert_redirected_to login_url
|
47
49
|
#
|
48
|
-
# # Asserts that the redirection was to the
|
50
|
+
# # Asserts that the redirection was to the URL for @customer
|
49
51
|
# assert_redirected_to @customer
|
50
52
|
#
|
51
53
|
# # Asserts that the redirection matches the regular expression
|
@@ -79,7 +81,7 @@ module ActionDispatch
|
|
79
81
|
def generate_response_message(expected, actual = @response.response_code)
|
80
82
|
"Expected response to be a <#{code_with_name(expected)}>,"\
|
81
83
|
" but was a <#{code_with_name(actual)}>"
|
82
|
-
.concat(location_if_redirected).concat(response_body_if_short)
|
84
|
+
.dup.concat(location_if_redirected).concat(response_body_if_short)
|
83
85
|
end
|
84
86
|
|
85
87
|
def response_body_if_short
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "uri"
|
2
4
|
require "active_support/core_ext/hash/indifferent_access"
|
3
5
|
require "active_support/core_ext/string/access"
|
@@ -18,8 +20,8 @@ module ActionDispatch
|
|
18
20
|
# assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post})
|
19
21
|
#
|
20
22
|
# You can also pass in +extras+ with a hash containing URL parameters that would normally be in the query string. This can be used
|
21
|
-
# to assert that values in the query string will end up in the params hash correctly. To test query strings you must use the
|
22
|
-
#
|
23
|
+
# to assert that values in the query string will end up in the params hash correctly. To test query strings you must use the extras
|
24
|
+
# argument because appending the query string on the path directly will not work. For example:
|
23
25
|
#
|
24
26
|
# # Asserts that a path of '/items/list/1?view=print' returns the correct options
|
25
27
|
# assert_recognizes({controller: 'items', action: 'list', id: '1', view: 'print'}, 'items/list/1', { view: "print" })
|
@@ -132,8 +134,7 @@ module ActionDispatch
|
|
132
134
|
end
|
133
135
|
|
134
136
|
# A helper to make it easier to test different route configurations.
|
135
|
-
# This method temporarily replaces @routes
|
136
|
-
# with a new RouteSet instance.
|
137
|
+
# This method temporarily replaces @routes with a new RouteSet instance.
|
137
138
|
#
|
138
139
|
# The new instance is yielded to the passed block. Typically the block
|
139
140
|
# will create some routes using <tt>set.draw { match ... }</tt>:
|
@@ -186,7 +187,6 @@ module ActionDispatch
|
|
186
187
|
method = :get
|
187
188
|
end
|
188
189
|
|
189
|
-
# Assume given controller
|
190
190
|
request = ActionController::TestRequest.create @controller.class
|
191
191
|
|
192
192
|
if path =~ %r{://}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "stringio"
|
2
4
|
require "uri"
|
3
5
|
require "active_support/core_ext/kernel/singleton_class"
|
@@ -10,38 +12,38 @@ require "action_dispatch/testing/request_encoder"
|
|
10
12
|
module ActionDispatch
|
11
13
|
module Integration #:nodoc:
|
12
14
|
module RequestHelpers
|
13
|
-
# Performs a GET request with the given parameters. See
|
14
|
-
# details.
|
15
|
+
# Performs a GET request with the given parameters. See ActionDispatch::Integration::Session#process
|
16
|
+
# for more details.
|
15
17
|
def get(path, **args)
|
16
18
|
process(:get, path, **args)
|
17
19
|
end
|
18
20
|
|
19
|
-
# Performs a POST request with the given parameters. See
|
20
|
-
# details.
|
21
|
+
# Performs a POST request with the given parameters. See ActionDispatch::Integration::Session#process
|
22
|
+
# for more details.
|
21
23
|
def post(path, **args)
|
22
24
|
process(:post, path, **args)
|
23
25
|
end
|
24
26
|
|
25
|
-
# Performs a PATCH request with the given parameters. See
|
26
|
-
# details.
|
27
|
+
# Performs a PATCH request with the given parameters. See ActionDispatch::Integration::Session#process
|
28
|
+
# for more details.
|
27
29
|
def patch(path, **args)
|
28
30
|
process(:patch, path, **args)
|
29
31
|
end
|
30
32
|
|
31
|
-
# Performs a PUT request with the given parameters. See
|
32
|
-
# details.
|
33
|
+
# Performs a PUT request with the given parameters. See ActionDispatch::Integration::Session#process
|
34
|
+
# for more details.
|
33
35
|
def put(path, **args)
|
34
36
|
process(:put, path, **args)
|
35
37
|
end
|
36
38
|
|
37
|
-
# Performs a DELETE request with the given parameters. See
|
38
|
-
# more details.
|
39
|
+
# Performs a DELETE request with the given parameters. See ActionDispatch::Integration::Session#process
|
40
|
+
# for more details.
|
39
41
|
def delete(path, **args)
|
40
42
|
process(:delete, path, **args)
|
41
43
|
end
|
42
44
|
|
43
|
-
# Performs a HEAD request with the given parameters. See
|
44
|
-
# details.
|
45
|
+
# Performs a HEAD request with the given parameters. See ActionDispatch::Integration::Session#process
|
46
|
+
# for more details.
|
45
47
|
def head(path, *args)
|
46
48
|
process(:head, path, *args)
|
47
49
|
end
|
@@ -246,7 +248,7 @@ module ActionDispatch
|
|
246
248
|
wrapped_headers["HTTP_ACCEPT"] ||= [Mime[:js], Mime[:html], Mime[:xml], "text/xml", "*/*"].join(", ")
|
247
249
|
end
|
248
250
|
|
249
|
-
#
|
251
|
+
# This modifies the passed request_env directly.
|
250
252
|
if wrapped_headers.present?
|
251
253
|
Http::Headers.from_hash(request_env).merge!(wrapped_headers)
|
252
254
|
end
|
@@ -257,7 +259,7 @@ module ActionDispatch
|
|
257
259
|
session = Rack::Test::Session.new(_mock_session)
|
258
260
|
|
259
261
|
# NOTE: rack-test v0.5 doesn't build a default uri correctly
|
260
|
-
# Make sure requested path is always a full
|
262
|
+
# Make sure requested path is always a full URI.
|
261
263
|
session.request(build_full_uri(path, request_env), request_env)
|
262
264
|
|
263
265
|
@request_count += 1
|
@@ -324,8 +326,8 @@ module ActionDispatch
|
|
324
326
|
|
325
327
|
def create_session(app)
|
326
328
|
klass = APP_SESSIONS[app] ||= Class.new(Integration::Session) {
|
327
|
-
# If the app is a Rails app, make url_helpers available on the session
|
328
|
-
# This makes app.url_for and app.foo_path available in the console
|
329
|
+
# If the app is a Rails app, make url_helpers available on the session.
|
330
|
+
# This makes app.url_for and app.foo_path available in the console.
|
329
331
|
if app.respond_to?(:routes)
|
330
332
|
include app.routes.url_helpers
|
331
333
|
include app.routes.mounted_helpers
|
@@ -384,14 +386,15 @@ module ActionDispatch
|
|
384
386
|
integration_session.default_url_options = options
|
385
387
|
end
|
386
388
|
|
387
|
-
|
388
|
-
|
389
|
+
private
|
390
|
+
def respond_to_missing?(method, _)
|
391
|
+
integration_session.respond_to?(method) || super
|
389
392
|
end
|
390
393
|
|
391
394
|
# Delegate unhandled messages to the current session instance.
|
392
|
-
def method_missing(
|
393
|
-
if integration_session.respond_to?(
|
394
|
-
integration_session.
|
395
|
+
def method_missing(method, *args, &block)
|
396
|
+
if integration_session.respond_to?(method)
|
397
|
+
integration_session.public_send(method, *args, &block).tap do
|
395
398
|
copy_session_variables!
|
396
399
|
end
|
397
400
|
else
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActionDispatch
|
2
4
|
class RequestEncoder # :nodoc:
|
3
5
|
class IdentityEncoder
|
@@ -32,7 +34,7 @@ module ActionDispatch
|
|
32
34
|
end
|
33
35
|
|
34
36
|
def encode_params(params)
|
35
|
-
@param_encoder.call(params)
|
37
|
+
@param_encoder.call(params) if params
|
36
38
|
end
|
37
39
|
|
38
40
|
def self.parser(content_type)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "active_support/core_ext/hash/indifferent_access"
|
2
4
|
require "rack/utils"
|
3
5
|
|
@@ -9,7 +11,7 @@ module ActionDispatch
|
|
9
11
|
"HTTP_USER_AGENT" => "Rails Testing",
|
10
12
|
)
|
11
13
|
|
12
|
-
# Create a new test request with default
|
14
|
+
# Create a new test request with default +env+ values.
|
13
15
|
def self.create(env = {})
|
14
16
|
env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
|
15
17
|
env["rack.request.cookie_hash"] ||= {}.with_indifferent_access
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "action_dispatch/testing/request_encoder"
|
2
4
|
|
3
5
|
module ActionDispatch
|
@@ -18,13 +20,31 @@ module ActionDispatch
|
|
18
20
|
end
|
19
21
|
|
20
22
|
# Was the response successful?
|
21
|
-
|
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
|
22
30
|
|
23
31
|
# Was the URL not found?
|
24
|
-
|
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
|
25
39
|
|
26
40
|
# Was there a server-side error?
|
27
|
-
|
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?
|
47
|
+
end
|
28
48
|
|
29
49
|
def parsed_body
|
30
50
|
@parsed_body ||= @response_parser.call(body)
|
data/lib/action_pack.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
#--
|
2
|
-
# Copyright (c) 2004-
|
4
|
+
# Copyright (c) 2004-2018 David Heinemeier Hansson
|
3
5
|
#
|
4
6
|
# Permission is hereby granted, free of charge, to any person obtaining
|
5
7
|
# a copy of this software and associated documentation files (the
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActionPack
|
2
4
|
# Returns the version of the currently loaded Action Pack as a <tt>Gem::Version</tt>
|
3
5
|
def self.gem_version
|
@@ -6,9 +8,9 @@ module ActionPack
|
|
6
8
|
|
7
9
|
module VERSION
|
8
10
|
MAJOR = 5
|
9
|
-
MINOR =
|
10
|
-
TINY =
|
11
|
-
PRE =
|
11
|
+
MINOR = 2
|
12
|
+
TINY = 4
|
13
|
+
PRE = "3"
|
12
14
|
|
13
15
|
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
|
14
16
|
end
|
data/lib/action_pack/version.rb
CHANGED
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.
|
4
|
+
version: 5.2.4.3
|
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:
|
11
|
+
date: 2020-05-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.
|
19
|
+
version: 5.2.4.3
|
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.
|
26
|
+
version: 5.2.4.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -31,6 +31,9 @@ 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
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,6 +41,9 @@ dependencies:
|
|
38
41
|
- - "~>"
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '2.0'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 2.0.8
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: rack-test
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,28 +98,28 @@ dependencies:
|
|
92
98
|
requirements:
|
93
99
|
- - '='
|
94
100
|
- !ruby/object:Gem::Version
|
95
|
-
version: 5.
|
101
|
+
version: 5.2.4.3
|
96
102
|
type: :runtime
|
97
103
|
prerelease: false
|
98
104
|
version_requirements: !ruby/object:Gem::Requirement
|
99
105
|
requirements:
|
100
106
|
- - '='
|
101
107
|
- !ruby/object:Gem::Version
|
102
|
-
version: 5.
|
108
|
+
version: 5.2.4.3
|
103
109
|
- !ruby/object:Gem::Dependency
|
104
110
|
name: activemodel
|
105
111
|
requirement: !ruby/object:Gem::Requirement
|
106
112
|
requirements:
|
107
113
|
- - '='
|
108
114
|
- !ruby/object:Gem::Version
|
109
|
-
version: 5.
|
115
|
+
version: 5.2.4.3
|
110
116
|
type: :development
|
111
117
|
prerelease: false
|
112
118
|
version_requirements: !ruby/object:Gem::Requirement
|
113
119
|
requirements:
|
114
120
|
- - '='
|
115
121
|
- !ruby/object:Gem::Version
|
116
|
-
version: 5.
|
122
|
+
version: 5.2.4.3
|
117
123
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
118
124
|
testing MVC web applications. Works with any Rack-compatible server.
|
119
125
|
email: david@loudthinking.com
|
@@ -148,6 +154,7 @@ files:
|
|
148
154
|
- lib/action_controller/metal.rb
|
149
155
|
- lib/action_controller/metal/basic_implicit_render.rb
|
150
156
|
- lib/action_controller/metal/conditional_get.rb
|
157
|
+
- lib/action_controller/metal/content_security_policy.rb
|
151
158
|
- lib/action_controller/metal/cookies.rb
|
152
159
|
- lib/action_controller/metal/data_streaming.rb
|
153
160
|
- lib/action_controller/metal/etag_with_flash.rb
|
@@ -180,6 +187,7 @@ files:
|
|
180
187
|
- lib/action_controller/test_case.rb
|
181
188
|
- lib/action_dispatch.rb
|
182
189
|
- lib/action_dispatch/http/cache.rb
|
190
|
+
- lib/action_dispatch/http/content_security_policy.rb
|
183
191
|
- lib/action_dispatch/http/filter_parameters.rb
|
184
192
|
- lib/action_dispatch/http/filter_redirect.rb
|
185
193
|
- lib/action_dispatch/http/headers.rb
|
@@ -243,6 +251,8 @@ files:
|
|
243
251
|
- lib/action_dispatch/middleware/templates/rescues/_trace.text.erb
|
244
252
|
- lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb
|
245
253
|
- lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb
|
254
|
+
- lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb
|
255
|
+
- lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb
|
246
256
|
- lib/action_dispatch/middleware/templates/rescues/layout.erb
|
247
257
|
- lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb
|
248
258
|
- lib/action_dispatch/middleware/templates/rescues/missing_template.text.erb
|
@@ -267,10 +277,12 @@ files:
|
|
267
277
|
- lib/action_dispatch/routing/routes_proxy.rb
|
268
278
|
- lib/action_dispatch/routing/url_for.rb
|
269
279
|
- lib/action_dispatch/system_test_case.rb
|
280
|
+
- lib/action_dispatch/system_testing/browser.rb
|
270
281
|
- lib/action_dispatch/system_testing/driver.rb
|
271
282
|
- lib/action_dispatch/system_testing/server.rb
|
272
283
|
- lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb
|
273
284
|
- lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb
|
285
|
+
- lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
|
274
286
|
- lib/action_dispatch/testing/assertion_response.rb
|
275
287
|
- lib/action_dispatch/testing/assertions.rb
|
276
288
|
- lib/action_dispatch/testing/assertions/response.rb
|
@@ -287,8 +299,8 @@ homepage: http://rubyonrails.org
|
|
287
299
|
licenses:
|
288
300
|
- MIT
|
289
301
|
metadata:
|
290
|
-
source_code_uri: https://github.com/rails/rails/tree/v5.
|
291
|
-
changelog_uri: https://github.com/rails/rails/blob/v5.
|
302
|
+
source_code_uri: https://github.com/rails/rails/tree/v5.2.4.3/actionpack
|
303
|
+
changelog_uri: https://github.com/rails/rails/blob/v5.2.4.3/actionpack/CHANGELOG.md
|
292
304
|
post_install_message:
|
293
305
|
rdoc_options: []
|
294
306
|
require_paths:
|
@@ -305,7 +317,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
305
317
|
version: '0'
|
306
318
|
requirements:
|
307
319
|
- none
|
308
|
-
rubygems_version: 3.
|
320
|
+
rubygems_version: 3.1.2
|
309
321
|
signing_key:
|
310
322
|
specification_version: 4
|
311
323
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|