actionpack 7.0.8.2 → 7.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +320 -398
- data/MIT-LICENSE +1 -1
- data/README.rdoc +2 -2
- data/lib/abstract_controller/base.rb +19 -10
- data/lib/abstract_controller/caching/fragments.rb +2 -0
- data/lib/abstract_controller/callbacks.rb +31 -6
- data/lib/abstract_controller/deprecator.rb +7 -0
- data/lib/abstract_controller/helpers.rb +61 -18
- data/lib/abstract_controller/railties/routes_helpers.rb +1 -16
- data/lib/abstract_controller/rendering.rb +3 -3
- data/lib/abstract_controller/translation.rb +1 -27
- data/lib/abstract_controller/url_for.rb +2 -0
- data/lib/abstract_controller.rb +6 -0
- data/lib/action_controller/api.rb +5 -3
- data/lib/action_controller/base.rb +3 -17
- data/lib/action_controller/caching.rb +2 -0
- data/lib/action_controller/deprecator.rb +7 -0
- data/lib/action_controller/form_builder.rb +2 -0
- data/lib/action_controller/log_subscriber.rb +16 -4
- data/lib/action_controller/metal/content_security_policy.rb +1 -1
- data/lib/action_controller/metal/data_streaming.rb +2 -0
- data/lib/action_controller/metal/default_headers.rb +2 -0
- data/lib/action_controller/metal/etag_with_flash.rb +2 -0
- data/lib/action_controller/metal/etag_with_template_digest.rb +2 -0
- data/lib/action_controller/metal/exceptions.rb +8 -0
- data/lib/action_controller/metal/head.rb +8 -6
- data/lib/action_controller/metal/helpers.rb +3 -14
- data/lib/action_controller/metal/http_authentication.rb +11 -4
- data/lib/action_controller/metal/implicit_render.rb +5 -3
- data/lib/action_controller/metal/instrumentation.rb +8 -1
- data/lib/action_controller/metal/live.rb +24 -0
- data/lib/action_controller/metal/mime_responds.rb +2 -2
- data/lib/action_controller/metal/params_wrapper.rb +3 -1
- data/lib/action_controller/metal/permissions_policy.rb +1 -1
- data/lib/action_controller/metal/redirecting.rb +6 -6
- data/lib/action_controller/metal/renderers.rb +2 -2
- data/lib/action_controller/metal/rendering.rb +0 -7
- data/lib/action_controller/metal/request_forgery_protection.rb +138 -50
- data/lib/action_controller/metal/rescue.rb +2 -0
- data/lib/action_controller/metal/streaming.rb +70 -30
- data/lib/action_controller/metal/strong_parameters.rb +89 -50
- data/lib/action_controller/metal/url_for.rb +7 -0
- data/lib/action_controller/metal.rb +79 -21
- data/lib/action_controller/railtie.rb +22 -9
- data/lib/action_controller/renderer.rb +98 -65
- data/lib/action_controller/test_case.rb +15 -5
- data/lib/action_controller.rb +8 -1
- data/lib/action_dispatch/constants.rb +32 -0
- data/lib/action_dispatch/deprecator.rb +7 -0
- data/lib/action_dispatch/http/cache.rb +1 -3
- data/lib/action_dispatch/http/content_security_policy.rb +9 -8
- data/lib/action_dispatch/http/filter_parameters.rb +11 -5
- data/lib/action_dispatch/http/headers.rb +2 -0
- data/lib/action_dispatch/http/mime_negotiation.rb +21 -21
- data/lib/action_dispatch/http/mime_type.rb +35 -12
- data/lib/action_dispatch/http/mime_types.rb +3 -1
- data/lib/action_dispatch/http/parameters.rb +1 -1
- data/lib/action_dispatch/http/permissions_policy.rb +39 -17
- data/lib/action_dispatch/http/rack_cache.rb +2 -0
- data/lib/action_dispatch/http/request.rb +48 -14
- data/lib/action_dispatch/http/response.rb +78 -59
- data/lib/action_dispatch/http/upload.rb +2 -0
- data/lib/action_dispatch/journey/formatter.rb +8 -2
- data/lib/action_dispatch/journey/path/pattern.rb +14 -14
- data/lib/action_dispatch/journey/route.rb +3 -2
- data/lib/action_dispatch/journey/router.rb +5 -4
- data/lib/action_dispatch/journey/routes.rb +2 -2
- data/lib/action_dispatch/log_subscriber.rb +23 -0
- data/lib/action_dispatch/middleware/actionable_exceptions.rb +5 -6
- data/lib/action_dispatch/middleware/assume_ssl.rb +24 -0
- data/lib/action_dispatch/middleware/callbacks.rb +2 -0
- data/lib/action_dispatch/middleware/cookies.rb +81 -98
- data/lib/action_dispatch/middleware/debug_exceptions.rb +26 -25
- data/lib/action_dispatch/middleware/debug_locks.rb +4 -1
- data/lib/action_dispatch/middleware/debug_view.rb +7 -2
- data/lib/action_dispatch/middleware/exception_wrapper.rb +181 -27
- data/lib/action_dispatch/middleware/executor.rb +1 -1
- data/lib/action_dispatch/middleware/flash.rb +7 -0
- data/lib/action_dispatch/middleware/host_authorization.rb +6 -3
- data/lib/action_dispatch/middleware/public_exceptions.rb +5 -3
- data/lib/action_dispatch/middleware/reloader.rb +7 -5
- data/lib/action_dispatch/middleware/remote_ip.rb +17 -16
- data/lib/action_dispatch/middleware/request_id.rb +2 -0
- data/lib/action_dispatch/middleware/server_timing.rb +4 -4
- data/lib/action_dispatch/middleware/session/abstract_store.rb +5 -0
- data/lib/action_dispatch/middleware/session/cache_store.rb +2 -0
- data/lib/action_dispatch/middleware/session/cookie_store.rb +11 -5
- data/lib/action_dispatch/middleware/session/mem_cache_store.rb +3 -1
- data/lib/action_dispatch/middleware/show_exceptions.rb +19 -15
- data/lib/action_dispatch/middleware/ssl.rb +18 -6
- data/lib/action_dispatch/middleware/stack.rb +7 -2
- data/lib/action_dispatch/middleware/static.rb +12 -8
- data/lib/action_dispatch/middleware/templates/rescues/_actions.html.erb +2 -2
- data/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb +4 -4
- data/lib/action_dispatch/middleware/templates/rescues/_source.html.erb +8 -1
- data/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb +7 -7
- data/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb +2 -2
- data/lib/action_dispatch/middleware/templates/rescues/layout.erb +17 -0
- data/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb +16 -12
- data/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb +1 -1
- data/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb +3 -3
- data/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +4 -4
- data/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb +1 -1
- data/lib/action_dispatch/middleware/templates/rescues/unknown_action.text.erb +1 -1
- data/lib/action_dispatch/middleware/templates/routes/_route.html.erb +3 -0
- data/lib/action_dispatch/middleware/templates/routes/_table.html.erb +46 -37
- data/lib/action_dispatch/railtie.rb +14 -4
- data/lib/action_dispatch/request/session.rb +16 -6
- data/lib/action_dispatch/request/utils.rb +8 -3
- data/lib/action_dispatch/routing/inspector.rb +54 -6
- data/lib/action_dispatch/routing/mapper.rb +26 -14
- data/lib/action_dispatch/routing/polymorphic_routes.rb +2 -0
- data/lib/action_dispatch/routing/redirection.rb +15 -6
- data/lib/action_dispatch/routing/route_set.rb +52 -22
- data/lib/action_dispatch/routing/routes_proxy.rb +1 -1
- data/lib/action_dispatch/routing/url_for.rb +5 -1
- data/lib/action_dispatch/routing.rb +4 -4
- data/lib/action_dispatch/system_test_case.rb +3 -3
- data/lib/action_dispatch/system_testing/browser.rb +5 -6
- data/lib/action_dispatch/system_testing/driver.rb +13 -21
- data/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +27 -16
- data/lib/action_dispatch/testing/assertions/response.rb +13 -6
- data/lib/action_dispatch/testing/assertions/routing.rb +67 -28
- data/lib/action_dispatch/testing/assertions.rb +3 -1
- data/lib/action_dispatch/testing/integration.rb +27 -17
- data/lib/action_dispatch/testing/request_encoder.rb +4 -1
- data/lib/action_dispatch/testing/test_process.rb +4 -3
- data/lib/action_dispatch/testing/test_request.rb +1 -1
- data/lib/action_dispatch/testing/test_response.rb +23 -9
- data/lib/action_dispatch.rb +37 -4
- data/lib/action_pack/gem_version.rb +4 -4
- data/lib/action_pack/version.rb +1 -1
- data/lib/action_pack.rb +1 -1
- metadata +52 -30
@@ -3,7 +3,7 @@
|
|
3
3
|
require "stringio"
|
4
4
|
require "uri"
|
5
5
|
require "rack/test"
|
6
|
-
require "
|
6
|
+
require "active_support/test_case"
|
7
7
|
|
8
8
|
require "action_dispatch/testing/request_encoder"
|
9
9
|
|
@@ -58,7 +58,9 @@ module ActionDispatch
|
|
58
58
|
# the same HTTP verb will be used when redirecting, otherwise a GET request
|
59
59
|
# will be performed. Any arguments are passed to the
|
60
60
|
# underlying request.
|
61
|
-
|
61
|
+
#
|
62
|
+
# The HTTP_REFERER header will be set to the previous url.
|
63
|
+
def follow_redirect!(headers: {}, **args)
|
62
64
|
raise "not a redirect! #{status} #{status_message}" unless redirect?
|
63
65
|
|
64
66
|
method =
|
@@ -68,7 +70,11 @@ module ActionDispatch
|
|
68
70
|
:get
|
69
71
|
end
|
70
72
|
|
71
|
-
|
73
|
+
if [ :HTTP_REFERER, "HTTP_REFERER" ].none? { |key| headers.key? key }
|
74
|
+
headers["HTTP_REFERER"] = request.url
|
75
|
+
end
|
76
|
+
|
77
|
+
public_send(method, response.location, headers: headers, **args)
|
72
78
|
status
|
73
79
|
end
|
74
80
|
end
|
@@ -78,9 +84,8 @@ module ActionDispatch
|
|
78
84
|
# multiple sessions and run them side-by-side, you can also mimic (to some
|
79
85
|
# limited extent) multiple simultaneous users interacting with your system.
|
80
86
|
#
|
81
|
-
# Typically, you will instantiate a new session using
|
82
|
-
#
|
83
|
-
# Integration::Session directly.
|
87
|
+
# Typically, you will instantiate a new session using Runner#open_session,
|
88
|
+
# rather than instantiating a \Session directly.
|
84
89
|
class Session
|
85
90
|
DEFAULT_HOST = "www.example.com"
|
86
91
|
|
@@ -122,7 +127,7 @@ module ActionDispatch
|
|
122
127
|
|
123
128
|
include ActionDispatch::Routing::UrlFor
|
124
129
|
|
125
|
-
# Create and initialize a new Session instance.
|
130
|
+
# Create and initialize a new \Session instance.
|
126
131
|
def initialize(app)
|
127
132
|
super()
|
128
133
|
@app = app
|
@@ -206,9 +211,10 @@ module ActionDispatch
|
|
206
211
|
# Supports +:json+ by default and will set the appropriate request headers.
|
207
212
|
# The headers will be merged into the Rack env hash.
|
208
213
|
#
|
209
|
-
# This method is rarely used directly. Use
|
210
|
-
# HTTP methods in integration
|
211
|
-
#
|
214
|
+
# This method is rarely used directly. Use RequestHelpers#get,
|
215
|
+
# RequestHelpers#post, or other standard HTTP methods in integration
|
216
|
+
# tests. +#process+ is only required when using a request method that
|
217
|
+
# doesn't have a method defined in the integration tests.
|
212
218
|
#
|
213
219
|
# This method returns the response status, after performing the request.
|
214
220
|
# Furthermore, if this method was called from an ActionDispatch::IntegrationTest object,
|
@@ -226,7 +232,7 @@ module ActionDispatch
|
|
226
232
|
method = :post
|
227
233
|
end
|
228
234
|
|
229
|
-
if
|
235
|
+
if path.include?("://")
|
230
236
|
path = build_expanded_path(path) do |location|
|
231
237
|
https! URI::HTTPS === location if location.scheme
|
232
238
|
|
@@ -252,10 +258,13 @@ module ActionDispatch
|
|
252
258
|
"REQUEST_URI" => path,
|
253
259
|
"HTTP_HOST" => host,
|
254
260
|
"REMOTE_ADDR" => remote_addr,
|
255
|
-
"CONTENT_TYPE" => request_encoder.content_type,
|
256
261
|
"HTTP_ACCEPT" => request_encoder.accept_header || accept
|
257
262
|
}
|
258
263
|
|
264
|
+
if request_encoder.content_type
|
265
|
+
request_env["CONTENT_TYPE"] = request_encoder.content_type
|
266
|
+
end
|
267
|
+
|
259
268
|
wrapped_headers = Http::Headers.from_hash({})
|
260
269
|
wrapped_headers.merge!(headers) if headers
|
261
270
|
|
@@ -440,8 +449,9 @@ module ActionDispatch
|
|
440
449
|
# more completely than either unit or functional tests do, exercising the
|
441
450
|
# entire stack, from the dispatcher to the database.
|
442
451
|
#
|
443
|
-
# At its simplest, you simply extend <tt>IntegrationTest</tt> and write your
|
444
|
-
# using the get/
|
452
|
+
# At its simplest, you simply extend <tt>IntegrationTest</tt> and write your
|
453
|
+
# tests using the Integration::RequestHelpers#get and/or
|
454
|
+
# Integration::RequestHelpers#post methods:
|
445
455
|
#
|
446
456
|
# require "test_helper"
|
447
457
|
#
|
@@ -612,7 +622,7 @@ module ActionDispatch
|
|
612
622
|
# the request format to JSON unless overridden), sets the content type to
|
613
623
|
# "application/json" and encodes the parameters as JSON.
|
614
624
|
#
|
615
|
-
# Calling
|
625
|
+
# Calling TestResponse#parsed_body on the response parses the response body based on the
|
616
626
|
# last response MIME type.
|
617
627
|
#
|
618
628
|
# Out of the box, only <tt>:json</tt> is supported. But for any custom MIME
|
@@ -624,9 +634,9 @@ module ActionDispatch
|
|
624
634
|
#
|
625
635
|
# Where +param_encoder+ defines how the params should be encoded and
|
626
636
|
# +response_parser+ defines how the response body should be parsed through
|
627
|
-
#
|
637
|
+
# TestResponse#parsed_body.
|
628
638
|
#
|
629
|
-
# Consult the Rails Testing Guide for more.
|
639
|
+
# Consult the {Rails Testing Guide}[https://guides.rubyonrails.org/testing.html] for more.
|
630
640
|
|
631
641
|
class IntegrationTest < ActiveSupport::TestCase
|
632
642
|
include TestProcess::FixtureFile
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "nokogiri"
|
4
|
+
|
3
5
|
module ActionDispatch
|
4
6
|
class RequestEncoder # :nodoc:
|
5
7
|
class IdentityEncoder
|
@@ -50,6 +52,7 @@ module ActionDispatch
|
|
50
52
|
@encoders[mime_name] = new(mime_name, param_encoder, response_parser)
|
51
53
|
end
|
52
54
|
|
53
|
-
register_encoder :
|
55
|
+
register_encoder :html, response_parser: -> body { Rails::Dom::Testing.html_document.parse(body) }
|
56
|
+
register_encoder :json, response_parser: -> body { JSON.parse(body, object_class: ActiveSupport::HashWithIndifferentAccess) }
|
54
57
|
end
|
55
58
|
end
|
@@ -8,21 +8,22 @@ module ActionDispatch
|
|
8
8
|
module FixtureFile
|
9
9
|
# Shortcut for <tt>Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_fixture_path, path), type)</tt>:
|
10
10
|
#
|
11
|
-
# post :change_avatar, params: { avatar:
|
11
|
+
# post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') }
|
12
12
|
#
|
13
13
|
# Default fixture files location is <tt>test/fixtures/files</tt>.
|
14
14
|
#
|
15
15
|
# To upload binary files on Windows, pass <tt>:binary</tt> as the last parameter.
|
16
16
|
# This will not affect other platforms:
|
17
17
|
#
|
18
|
-
# post :change_avatar, params: { avatar:
|
19
|
-
def
|
18
|
+
# post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) }
|
19
|
+
def file_fixture_upload(path, mime_type = nil, binary = false)
|
20
20
|
if self.class.file_fixture_path && !File.exist?(path)
|
21
21
|
path = file_fixture(path)
|
22
22
|
end
|
23
23
|
|
24
24
|
Rack::Test::UploadedFile.new(path, mime_type, binary)
|
25
25
|
end
|
26
|
+
alias_method :fixture_file_upload, :file_fixture_upload
|
26
27
|
end
|
27
28
|
|
28
29
|
include FixtureFile
|
@@ -19,19 +19,33 @@ module ActionDispatch
|
|
19
19
|
#
|
20
20
|
# ==== Examples
|
21
21
|
# get "/posts"
|
22
|
-
# response.content_type
|
23
|
-
# response.parsed_body.class
|
24
|
-
# response.parsed_body
|
22
|
+
# response.content_type # => "text/html; charset=utf-8"
|
23
|
+
# response.parsed_body.class # => Nokogiri::HTML5::Document
|
24
|
+
# response.parsed_body.to_html # => "<!DOCTYPE html>\n<html>\n..."
|
25
|
+
#
|
26
|
+
# assert_pattern { response.parsed_body.at("main") => { content: "Hello, world" } }
|
27
|
+
#
|
28
|
+
# response.parsed_body.at("main") => {name:, content:}
|
29
|
+
# assert_equal "main", name
|
30
|
+
# assert_equal "Some main content", content
|
25
31
|
#
|
26
32
|
# get "/posts.json"
|
27
|
-
# response.content_type
|
28
|
-
# response.parsed_body.class
|
29
|
-
# response.parsed_body
|
33
|
+
# response.content_type # => "application/json; charset=utf-8"
|
34
|
+
# response.parsed_body.class # => Array
|
35
|
+
# response.parsed_body # => [{"id"=>42, "title"=>"Title"},...
|
36
|
+
#
|
37
|
+
# assert_pattern { response.parsed_body => [{ id: 42 }] }
|
30
38
|
#
|
31
39
|
# get "/posts/42.json"
|
32
|
-
# response.content_type
|
33
|
-
# response.parsed_body.class
|
34
|
-
# response.parsed_body
|
40
|
+
# response.content_type # => "application/json; charset=utf-8"
|
41
|
+
# response.parsed_body.class # => ActiveSupport::HashWithIndifferentAccess
|
42
|
+
# response.parsed_body # => {"id"=>42, "title"=>"Title"}
|
43
|
+
#
|
44
|
+
# assert_pattern { response.parsed_body => [{ title: /title/i }] }
|
45
|
+
#
|
46
|
+
# response.parsed_body => {id:, title:}
|
47
|
+
# assert_equal 42, id
|
48
|
+
# assert_equal "Title", title
|
35
49
|
def parsed_body
|
36
50
|
@parsed_body ||= response_parser.call(body)
|
37
51
|
end
|
data/lib/action_dispatch.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) 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
|
@@ -29,16 +29,29 @@ require "active_support/core_ext/module/attribute_accessors"
|
|
29
29
|
|
30
30
|
require "action_pack"
|
31
31
|
require "rack"
|
32
|
+
require "action_dispatch/deprecator"
|
32
33
|
|
33
|
-
module Rack
|
34
|
+
module Rack # :nodoc:
|
34
35
|
autoload :Test, "rack/test"
|
35
36
|
end
|
36
37
|
|
38
|
+
# = Action Dispatch
|
39
|
+
#
|
40
|
+
# Action Dispatch is a module of Action Pack.
|
41
|
+
#
|
42
|
+
# Action Dispatch parses information about the web request, handles
|
43
|
+
# routing as defined by the user, and does advanced processing related to HTTP
|
44
|
+
# such as MIME-type negotiation, decoding parameters in POST, PATCH, or PUT
|
45
|
+
# bodies, handling HTTP caching logic, cookies and sessions.
|
37
46
|
module ActionDispatch
|
47
|
+
include ActiveSupport::Deprecation::DeprecatedConstantAccessor
|
38
48
|
extend ActiveSupport::Autoload
|
39
49
|
|
40
|
-
class
|
50
|
+
class DeprecatedIllegalStateError < StandardError
|
41
51
|
end
|
52
|
+
deprecate_constant "IllegalStateError", "ActionDispatch::DeprecatedIllegalStateError",
|
53
|
+
message: "ActionDispatch::IllegalStateError is deprecated without replacement.",
|
54
|
+
deprecator: ActionDispatch.deprecator
|
42
55
|
|
43
56
|
class MissingController < NameError
|
44
57
|
end
|
@@ -53,6 +66,7 @@ module ActionDispatch
|
|
53
66
|
end
|
54
67
|
|
55
68
|
autoload_under "middleware" do
|
69
|
+
autoload :AssumeSSL
|
56
70
|
autoload :HostAuthorization
|
57
71
|
autoload :RequestId
|
58
72
|
autoload :Callbacks
|
@@ -73,6 +87,7 @@ module ActionDispatch
|
|
73
87
|
autoload :Static
|
74
88
|
end
|
75
89
|
|
90
|
+
autoload :Constants
|
76
91
|
autoload :Journey
|
77
92
|
autoload :MiddlewareStack, "action_dispatch/middleware/stack"
|
78
93
|
autoload :Routing
|
@@ -94,6 +109,19 @@ module ActionDispatch
|
|
94
109
|
autoload :CookieStore, "action_dispatch/middleware/session/cookie_store"
|
95
110
|
autoload :MemCacheStore, "action_dispatch/middleware/session/mem_cache_store"
|
96
111
|
autoload :CacheStore, "action_dispatch/middleware/session/cache_store"
|
112
|
+
|
113
|
+
def self.resolve_store(session_store) # :nodoc:
|
114
|
+
self.const_get(session_store.to_s.camelize)
|
115
|
+
rescue NameError
|
116
|
+
raise <<~ERROR
|
117
|
+
Unable to resolve session store #{session_store.inspect}.
|
118
|
+
|
119
|
+
#{session_store.inspect} resolves to ActionDispatch::Session::#{session_store.to_s.camelize},
|
120
|
+
but that class is undefined.
|
121
|
+
|
122
|
+
Is #{session_store.inspect} spelled correctly, and are any necessary gems installed?
|
123
|
+
ERROR
|
124
|
+
end
|
97
125
|
end
|
98
126
|
|
99
127
|
mattr_accessor :test_app
|
@@ -109,12 +137,17 @@ module ActionDispatch
|
|
109
137
|
end
|
110
138
|
|
111
139
|
autoload :SystemTestCase, "action_dispatch/system_test_case"
|
140
|
+
|
141
|
+
def eager_load!
|
142
|
+
super
|
143
|
+
Routing.eager_load!
|
144
|
+
end
|
112
145
|
end
|
113
146
|
|
114
147
|
autoload :Mime, "action_dispatch/http/mime_type"
|
115
148
|
|
116
149
|
ActiveSupport.on_load(:action_view) do
|
117
150
|
ActionView::Base.default_formats ||= Mime::SET.symbols
|
118
|
-
ActionView::Template
|
151
|
+
ActionView::Template.mime_types_implementation = Mime
|
119
152
|
ActionView::LookupContext::DetailsKey.clear
|
120
153
|
end
|
@@ -1,16 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module ActionPack
|
4
|
-
# Returns the currently loaded version of Action Pack as a
|
4
|
+
# Returns the currently loaded version of Action Pack as a +Gem::Version+.
|
5
5
|
def self.gem_version
|
6
6
|
Gem::Version.new VERSION::STRING
|
7
7
|
end
|
8
8
|
|
9
9
|
module VERSION
|
10
10
|
MAJOR = 7
|
11
|
-
MINOR =
|
12
|
-
TINY =
|
13
|
-
PRE = "
|
11
|
+
MINOR = 1
|
12
|
+
TINY = 0
|
13
|
+
PRE = "beta1"
|
14
14
|
|
15
15
|
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
|
16
16
|
end
|
data/lib/action_pack/version.rb
CHANGED
data/lib/action_pack.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) 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: 7.0.
|
4
|
+
version: 7.1.0.beta1
|
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: 2023-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,21 +16,32 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 7.0.
|
19
|
+
version: 7.1.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: 7.0.
|
26
|
+
version: 7.1.0.beta1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.8.5
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
32
39
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
40
|
+
version: 1.8.5
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rack
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
34
45
|
- - ">="
|
35
46
|
- !ruby/object:Gem::Version
|
36
47
|
version: 2.2.4
|
@@ -38,12 +49,23 @@ dependencies:
|
|
38
49
|
prerelease: false
|
39
50
|
version_requirements: !ruby/object:Gem::Requirement
|
40
51
|
requirements:
|
41
|
-
- - "~>"
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: '2.0'
|
44
52
|
- - ">="
|
45
53
|
- !ruby/object:Gem::Version
|
46
54
|
version: 2.2.4
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rack-session
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.0.1
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.0.1
|
47
69
|
- !ruby/object:Gem::Dependency
|
48
70
|
name: rack-test
|
49
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,62 +86,56 @@ dependencies:
|
|
64
86
|
requirements:
|
65
87
|
- - "~>"
|
66
88
|
- !ruby/object:Gem::Version
|
67
|
-
version: '1.
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: 1.2.0
|
89
|
+
version: '1.6'
|
71
90
|
type: :runtime
|
72
91
|
prerelease: false
|
73
92
|
version_requirements: !ruby/object:Gem::Requirement
|
74
93
|
requirements:
|
75
94
|
- - "~>"
|
76
95
|
- !ruby/object:Gem::Version
|
77
|
-
version: '1.
|
78
|
-
- - ">="
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: 1.2.0
|
96
|
+
version: '1.6'
|
81
97
|
- !ruby/object:Gem::Dependency
|
82
98
|
name: rails-dom-testing
|
83
99
|
requirement: !ruby/object:Gem::Requirement
|
84
100
|
requirements:
|
85
101
|
- - "~>"
|
86
102
|
- !ruby/object:Gem::Version
|
87
|
-
version: '2.
|
103
|
+
version: '2.2'
|
88
104
|
type: :runtime
|
89
105
|
prerelease: false
|
90
106
|
version_requirements: !ruby/object:Gem::Requirement
|
91
107
|
requirements:
|
92
108
|
- - "~>"
|
93
109
|
- !ruby/object:Gem::Version
|
94
|
-
version: '2.
|
110
|
+
version: '2.2'
|
95
111
|
- !ruby/object:Gem::Dependency
|
96
112
|
name: actionview
|
97
113
|
requirement: !ruby/object:Gem::Requirement
|
98
114
|
requirements:
|
99
115
|
- - '='
|
100
116
|
- !ruby/object:Gem::Version
|
101
|
-
version: 7.0.
|
117
|
+
version: 7.1.0.beta1
|
102
118
|
type: :runtime
|
103
119
|
prerelease: false
|
104
120
|
version_requirements: !ruby/object:Gem::Requirement
|
105
121
|
requirements:
|
106
122
|
- - '='
|
107
123
|
- !ruby/object:Gem::Version
|
108
|
-
version: 7.0.
|
124
|
+
version: 7.1.0.beta1
|
109
125
|
- !ruby/object:Gem::Dependency
|
110
126
|
name: activemodel
|
111
127
|
requirement: !ruby/object:Gem::Requirement
|
112
128
|
requirements:
|
113
129
|
- - '='
|
114
130
|
- !ruby/object:Gem::Version
|
115
|
-
version: 7.0.
|
131
|
+
version: 7.1.0.beta1
|
116
132
|
type: :development
|
117
133
|
prerelease: false
|
118
134
|
version_requirements: !ruby/object:Gem::Requirement
|
119
135
|
requirements:
|
120
136
|
- - '='
|
121
137
|
- !ruby/object:Gem::Version
|
122
|
-
version: 7.0.
|
138
|
+
version: 7.1.0.beta1
|
123
139
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
124
140
|
testing MVC web applications. Works with any Rack-compatible server.
|
125
141
|
email: david@loudthinking.com
|
@@ -137,6 +153,7 @@ files:
|
|
137
153
|
- lib/abstract_controller/caching/fragments.rb
|
138
154
|
- lib/abstract_controller/callbacks.rb
|
139
155
|
- lib/abstract_controller/collector.rb
|
156
|
+
- lib/abstract_controller/deprecator.rb
|
140
157
|
- lib/abstract_controller/error.rb
|
141
158
|
- lib/abstract_controller/helpers.rb
|
142
159
|
- lib/abstract_controller/logger.rb
|
@@ -149,6 +166,7 @@ files:
|
|
149
166
|
- lib/action_controller/api/api_rendering.rb
|
150
167
|
- lib/action_controller/base.rb
|
151
168
|
- lib/action_controller/caching.rb
|
169
|
+
- lib/action_controller/deprecator.rb
|
152
170
|
- lib/action_controller/form_builder.rb
|
153
171
|
- lib/action_controller/log_subscriber.rb
|
154
172
|
- lib/action_controller/metal.rb
|
@@ -188,6 +206,8 @@ files:
|
|
188
206
|
- lib/action_controller/template_assertions.rb
|
189
207
|
- lib/action_controller/test_case.rb
|
190
208
|
- lib/action_dispatch.rb
|
209
|
+
- lib/action_dispatch/constants.rb
|
210
|
+
- lib/action_dispatch/deprecator.rb
|
191
211
|
- lib/action_dispatch/http/cache.rb
|
192
212
|
- lib/action_dispatch/http/content_disposition.rb
|
193
213
|
- lib/action_dispatch/http/content_security_policy.rb
|
@@ -224,7 +244,9 @@ files:
|
|
224
244
|
- lib/action_dispatch/journey/visualizer/fsm.css
|
225
245
|
- lib/action_dispatch/journey/visualizer/fsm.js
|
226
246
|
- lib/action_dispatch/journey/visualizer/index.html.erb
|
247
|
+
- lib/action_dispatch/log_subscriber.rb
|
227
248
|
- lib/action_dispatch/middleware/actionable_exceptions.rb
|
249
|
+
- lib/action_dispatch/middleware/assume_ssl.rb
|
228
250
|
- lib/action_dispatch/middleware/callbacks.rb
|
229
251
|
- lib/action_dispatch/middleware/cookies.rb
|
230
252
|
- lib/action_dispatch/middleware/debug_exceptions.rb
|
@@ -310,10 +332,10 @@ licenses:
|
|
310
332
|
- MIT
|
311
333
|
metadata:
|
312
334
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
313
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.0.
|
314
|
-
documentation_uri: https://api.rubyonrails.org/v7.0.
|
335
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.1.0.beta1/actionpack/CHANGELOG.md
|
336
|
+
documentation_uri: https://api.rubyonrails.org/v7.1.0.beta1/
|
315
337
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
316
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.0.
|
338
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.1.0.beta1/actionpack
|
317
339
|
rubygems_mfa_required: 'true'
|
318
340
|
post_install_message:
|
319
341
|
rdoc_options: []
|
@@ -326,12 +348,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
326
348
|
version: 2.7.0
|
327
349
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
328
350
|
requirements:
|
329
|
-
- - "
|
351
|
+
- - ">"
|
330
352
|
- !ruby/object:Gem::Version
|
331
|
-
version:
|
353
|
+
version: 1.3.1
|
332
354
|
requirements:
|
333
355
|
- none
|
334
|
-
rubygems_version: 3.
|
356
|
+
rubygems_version: 3.4.18
|
335
357
|
signing_key:
|
336
358
|
specification_version: 4
|
337
359
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|