actionpack 4.2.8 → 5.2.4.2

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 (166) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +285 -444
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +6 -7
  5. data/lib/abstract_controller.rb +12 -5
  6. data/lib/abstract_controller/asset_paths.rb +2 -0
  7. data/lib/abstract_controller/base.rb +45 -49
  8. data/lib/abstract_controller/caching.rb +66 -0
  9. data/lib/{action_controller → abstract_controller}/caching/fragments.rb +78 -15
  10. data/lib/abstract_controller/callbacks.rb +47 -31
  11. data/lib/abstract_controller/collector.rb +8 -11
  12. data/lib/abstract_controller/error.rb +6 -0
  13. data/lib/abstract_controller/helpers.rb +25 -25
  14. data/lib/abstract_controller/logger.rb +2 -0
  15. data/lib/abstract_controller/railties/routes_helpers.rb +4 -2
  16. data/lib/abstract_controller/rendering.rb +42 -41
  17. data/lib/abstract_controller/translation.rb +10 -7
  18. data/lib/abstract_controller/url_for.rb +2 -0
  19. data/lib/action_controller.rb +29 -21
  20. data/lib/action_controller/api.rb +149 -0
  21. data/lib/action_controller/api/api_rendering.rb +16 -0
  22. data/lib/action_controller/base.rb +27 -19
  23. data/lib/action_controller/caching.rb +14 -57
  24. data/lib/action_controller/form_builder.rb +50 -0
  25. data/lib/action_controller/log_subscriber.rb +10 -15
  26. data/lib/action_controller/metal.rb +98 -83
  27. data/lib/action_controller/metal/basic_implicit_render.rb +13 -0
  28. data/lib/action_controller/metal/conditional_get.rb +118 -44
  29. data/lib/action_controller/metal/content_security_policy.rb +52 -0
  30. data/lib/action_controller/metal/cookies.rb +3 -3
  31. data/lib/action_controller/metal/data_streaming.rb +27 -46
  32. data/lib/action_controller/metal/etag_with_flash.rb +18 -0
  33. data/lib/action_controller/metal/etag_with_template_digest.rb +20 -13
  34. data/lib/action_controller/metal/exceptions.rb +8 -14
  35. data/lib/action_controller/metal/flash.rb +4 -3
  36. data/lib/action_controller/metal/force_ssl.rb +23 -21
  37. data/lib/action_controller/metal/head.rb +21 -19
  38. data/lib/action_controller/metal/helpers.rb +24 -14
  39. data/lib/action_controller/metal/http_authentication.rb +64 -57
  40. data/lib/action_controller/metal/implicit_render.rb +62 -8
  41. data/lib/action_controller/metal/instrumentation.rb +19 -21
  42. data/lib/action_controller/metal/live.rb +90 -106
  43. data/lib/action_controller/metal/mime_responds.rb +33 -46
  44. data/lib/action_controller/metal/parameter_encoding.rb +51 -0
  45. data/lib/action_controller/metal/params_wrapper.rb +61 -53
  46. data/lib/action_controller/metal/redirecting.rb +49 -28
  47. data/lib/action_controller/metal/renderers.rb +87 -44
  48. data/lib/action_controller/metal/rendering.rb +72 -50
  49. data/lib/action_controller/metal/request_forgery_protection.rb +203 -92
  50. data/lib/action_controller/metal/rescue.rb +9 -16
  51. data/lib/action_controller/metal/streaming.rb +12 -10
  52. data/lib/action_controller/metal/strong_parameters.rb +582 -165
  53. data/lib/action_controller/metal/testing.rb +2 -17
  54. data/lib/action_controller/metal/url_for.rb +19 -10
  55. data/lib/action_controller/railtie.rb +28 -10
  56. data/lib/action_controller/railties/helpers.rb +2 -0
  57. data/lib/action_controller/renderer.rb +117 -0
  58. data/lib/action_controller/template_assertions.rb +11 -0
  59. data/lib/action_controller/test_case.rb +280 -411
  60. data/lib/action_dispatch.rb +27 -19
  61. data/lib/action_dispatch/http/cache.rb +93 -47
  62. data/lib/action_dispatch/http/content_security_policy.rb +272 -0
  63. data/lib/action_dispatch/http/filter_parameters.rb +26 -20
  64. data/lib/action_dispatch/http/filter_redirect.rb +10 -11
  65. data/lib/action_dispatch/http/headers.rb +55 -22
  66. data/lib/action_dispatch/http/mime_negotiation.rb +60 -41
  67. data/lib/action_dispatch/http/mime_type.rb +134 -121
  68. data/lib/action_dispatch/http/mime_types.rb +20 -6
  69. data/lib/action_dispatch/http/parameter_filter.rb +25 -11
  70. data/lib/action_dispatch/http/parameters.rb +98 -39
  71. data/lib/action_dispatch/http/rack_cache.rb +2 -0
  72. data/lib/action_dispatch/http/request.rb +200 -118
  73. data/lib/action_dispatch/http/response.rb +225 -110
  74. data/lib/action_dispatch/http/upload.rb +12 -6
  75. data/lib/action_dispatch/http/url.rb +110 -28
  76. data/lib/action_dispatch/journey.rb +7 -5
  77. data/lib/action_dispatch/journey/formatter.rb +55 -32
  78. data/lib/action_dispatch/journey/gtg/builder.rb +7 -5
  79. data/lib/action_dispatch/journey/gtg/simulator.rb +3 -9
  80. data/lib/action_dispatch/journey/gtg/transition_table.rb +17 -16
  81. data/lib/action_dispatch/journey/nfa/builder.rb +5 -3
  82. data/lib/action_dispatch/journey/nfa/dot.rb +13 -13
  83. data/lib/action_dispatch/journey/nfa/simulator.rb +3 -1
  84. data/lib/action_dispatch/journey/nfa/transition_table.rb +5 -48
  85. data/lib/action_dispatch/journey/nodes/node.rb +18 -6
  86. data/lib/action_dispatch/journey/parser.rb +23 -22
  87. data/lib/action_dispatch/journey/parser.y +3 -2
  88. data/lib/action_dispatch/journey/parser_extras.rb +12 -4
  89. data/lib/action_dispatch/journey/path/pattern.rb +50 -44
  90. data/lib/action_dispatch/journey/route.rb +106 -28
  91. data/lib/action_dispatch/journey/router.rb +35 -23
  92. data/lib/action_dispatch/journey/router/utils.rb +20 -11
  93. data/lib/action_dispatch/journey/routes.rb +18 -16
  94. data/lib/action_dispatch/journey/scanner.rb +18 -15
  95. data/lib/action_dispatch/journey/visitors.rb +99 -52
  96. data/lib/action_dispatch/middleware/callbacks.rb +1 -2
  97. data/lib/action_dispatch/middleware/cookies.rb +304 -193
  98. data/lib/action_dispatch/middleware/debug_exceptions.rb +152 -57
  99. data/lib/action_dispatch/middleware/debug_locks.rb +124 -0
  100. data/lib/action_dispatch/middleware/exception_wrapper.rb +68 -69
  101. data/lib/action_dispatch/middleware/executor.rb +21 -0
  102. data/lib/action_dispatch/middleware/flash.rb +78 -54
  103. data/lib/action_dispatch/middleware/public_exceptions.rb +27 -25
  104. data/lib/action_dispatch/middleware/reloader.rb +5 -91
  105. data/lib/action_dispatch/middleware/remote_ip.rb +41 -31
  106. data/lib/action_dispatch/middleware/request_id.rb +17 -9
  107. data/lib/action_dispatch/middleware/session/abstract_store.rb +41 -25
  108. data/lib/action_dispatch/middleware/session/cache_store.rb +24 -14
  109. data/lib/action_dispatch/middleware/session/cookie_store.rb +72 -67
  110. data/lib/action_dispatch/middleware/session/mem_cache_store.rb +8 -2
  111. data/lib/action_dispatch/middleware/show_exceptions.rb +26 -22
  112. data/lib/action_dispatch/middleware/ssl.rb +114 -36
  113. data/lib/action_dispatch/middleware/stack.rb +31 -44
  114. data/lib/action_dispatch/middleware/static.rb +57 -50
  115. data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +2 -14
  116. data/lib/action_dispatch/middleware/templates/rescues/{_source.erb → _source.html.erb} +0 -0
  117. data/lib/action_dispatch/middleware/templates/rescues/_source.text.erb +8 -0
  118. data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb +21 -0
  119. data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb +13 -0
  120. data/lib/action_dispatch/middleware/templates/rescues/layout.erb +1 -0
  121. data/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +1 -1
  122. data/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb +1 -1
  123. data/lib/action_dispatch/middleware/templates/routes/_route.html.erb +4 -4
  124. data/lib/action_dispatch/middleware/templates/routes/_table.html.erb +64 -64
  125. data/lib/action_dispatch/railtie.rb +19 -11
  126. data/lib/action_dispatch/request/session.rb +106 -59
  127. data/lib/action_dispatch/request/utils.rb +67 -24
  128. data/lib/action_dispatch/routing.rb +17 -18
  129. data/lib/action_dispatch/routing/endpoint.rb +9 -2
  130. data/lib/action_dispatch/routing/inspector.rb +58 -67
  131. data/lib/action_dispatch/routing/mapper.rb +734 -447
  132. data/lib/action_dispatch/routing/polymorphic_routes.rb +161 -139
  133. data/lib/action_dispatch/routing/redirection.rb +36 -26
  134. data/lib/action_dispatch/routing/route_set.rb +321 -291
  135. data/lib/action_dispatch/routing/routes_proxy.rb +32 -5
  136. data/lib/action_dispatch/routing/url_for.rb +65 -25
  137. data/lib/action_dispatch/system_test_case.rb +147 -0
  138. data/lib/action_dispatch/system_testing/browser.rb +49 -0
  139. data/lib/action_dispatch/system_testing/driver.rb +59 -0
  140. data/lib/action_dispatch/system_testing/server.rb +31 -0
  141. data/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +96 -0
  142. data/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +31 -0
  143. data/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb +26 -0
  144. data/lib/action_dispatch/testing/assertion_response.rb +47 -0
  145. data/lib/action_dispatch/testing/assertions.rb +6 -4
  146. data/lib/action_dispatch/testing/assertions/response.rb +45 -20
  147. data/lib/action_dispatch/testing/assertions/routing.rb +30 -26
  148. data/lib/action_dispatch/testing/integration.rb +347 -209
  149. data/lib/action_dispatch/testing/request_encoder.rb +55 -0
  150. data/lib/action_dispatch/testing/test_process.rb +28 -22
  151. data/lib/action_dispatch/testing/test_request.rb +27 -34
  152. data/lib/action_dispatch/testing/test_response.rb +35 -7
  153. data/lib/action_pack.rb +4 -2
  154. data/lib/action_pack/gem_version.rb +5 -3
  155. data/lib/action_pack/version.rb +3 -1
  156. metadata +56 -39
  157. data/lib/action_controller/metal/hide_actions.rb +0 -40
  158. data/lib/action_controller/metal/rack_delegation.rb +0 -32
  159. data/lib/action_controller/middleware.rb +0 -39
  160. data/lib/action_controller/model_naming.rb +0 -12
  161. data/lib/action_dispatch/journey/backwards.rb +0 -5
  162. data/lib/action_dispatch/journey/router/strexp.rb +0 -27
  163. data/lib/action_dispatch/middleware/params_parser.rb +0 -60
  164. data/lib/action_dispatch/testing/assertions/dom.rb +0 -3
  165. data/lib/action_dispatch/testing/assertions/selector.rb +0 -3
  166. data/lib/action_dispatch/testing/assertions/tag.rb +0 -3
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActionDispatch
4
+ class RequestEncoder # :nodoc:
5
+ class IdentityEncoder
6
+ def content_type; end
7
+ def accept_header; end
8
+ def encode_params(params); params; end
9
+ def response_parser; -> body { body }; end
10
+ end
11
+
12
+ @encoders = { identity: IdentityEncoder.new }
13
+
14
+ attr_reader :response_parser
15
+
16
+ def initialize(mime_name, param_encoder, response_parser)
17
+ @mime = Mime[mime_name]
18
+
19
+ unless @mime
20
+ raise ArgumentError, "Can't register a request encoder for " \
21
+ "unregistered MIME Type: #{mime_name}. See `Mime::Type.register`."
22
+ end
23
+
24
+ @response_parser = response_parser || -> body { body }
25
+ @param_encoder = param_encoder || :"to_#{@mime.symbol}".to_proc
26
+ end
27
+
28
+ def content_type
29
+ @mime.to_s
30
+ end
31
+
32
+ def accept_header
33
+ @mime.to_s
34
+ end
35
+
36
+ def encode_params(params)
37
+ @param_encoder.call(params) if params
38
+ end
39
+
40
+ def self.parser(content_type)
41
+ mime = Mime::Type.lookup(content_type)
42
+ encoder(mime ? mime.ref : nil).response_parser
43
+ end
44
+
45
+ def self.encoder(name)
46
+ @encoders[name] || @encoders[:identity]
47
+ end
48
+
49
+ def self.register_encoder(mime_name, param_encoder: nil, response_parser: nil)
50
+ @encoders[mime_name] = new(mime_name, param_encoder, response_parser)
51
+ end
52
+
53
+ register_encoder :json, response_parser: -> body { JSON.parse(body) }
54
+ end
55
+ end
@@ -1,13 +1,34 @@
1
- require 'action_dispatch/middleware/cookies'
2
- require 'action_dispatch/middleware/flash'
3
- require 'active_support/core_ext/hash/indifferent_access'
1
+ # frozen_string_literal: true
2
+
3
+ require "action_dispatch/middleware/cookies"
4
+ require "action_dispatch/middleware/flash"
4
5
 
5
6
  module ActionDispatch
6
7
  module TestProcess
8
+ module FixtureFile
9
+ # Shortcut for <tt>Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.fixture_path, path), type)</tt>:
10
+ #
11
+ # post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png')
12
+ #
13
+ # To upload binary files on Windows, pass <tt>:binary</tt> as the last parameter.
14
+ # This will not affect other platforms:
15
+ #
16
+ # post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png', :binary)
17
+ def fixture_file_upload(path, mime_type = nil, binary = false)
18
+ if self.class.respond_to?(:fixture_path) && self.class.fixture_path &&
19
+ !File.exist?(path)
20
+ path = File.join(self.class.fixture_path, path)
21
+ end
22
+ Rack::Test::UploadedFile.new(path, mime_type, binary)
23
+ end
24
+ end
25
+
26
+ include FixtureFile
27
+
7
28
  def assigns(key = nil)
8
- assigns = {}.with_indifferent_access
9
- @controller.view_assigns.each { |k, v| assigns.regular_writer(k, v) }
10
- key.nil? ? assigns : assigns[key]
29
+ raise NoMethodError,
30
+ "assigns has been extracted to a gem. To continue using it,
31
+ add `gem 'rails-controller-testing'` to your Gemfile."
11
32
  end
12
33
 
13
34
  def session
@@ -19,26 +40,11 @@ module ActionDispatch
19
40
  end
20
41
 
21
42
  def cookies
22
- @request.cookie_jar
43
+ @cookie_jar ||= Cookies::CookieJar.build(@request, @request.cookies)
23
44
  end
24
45
 
25
46
  def redirect_to_url
26
47
  @response.redirect_url
27
48
  end
28
-
29
- # Shortcut for <tt>Rack::Test::UploadedFile.new(File.join(ActionController::TestCase.fixture_path, path), type)</tt>:
30
- #
31
- # post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png')
32
- #
33
- # To upload binary files on Windows, pass <tt>:binary</tt> as the last parameter.
34
- # This will not affect other platforms:
35
- #
36
- # post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png', :binary)
37
- def fixture_file_upload(path, mime_type = nil, binary = false)
38
- if self.class.respond_to?(:fixture_path) && self.class.fixture_path
39
- path = File.join(self.class.fixture_path, path)
40
- end
41
- Rack::Test::UploadedFile.new(path, mime_type, binary)
42
- end
43
49
  end
44
50
  end
@@ -1,41 +1,46 @@
1
- require 'active_support/core_ext/hash/indifferent_access'
2
- require 'rack/utils'
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/core_ext/hash/indifferent_access"
4
+ require "rack/utils"
3
5
 
4
6
  module ActionDispatch
5
7
  class TestRequest < Request
6
- DEFAULT_ENV = Rack::MockRequest.env_for('/',
7
- 'HTTP_HOST' => 'test.host',
8
- 'REMOTE_ADDR' => '0.0.0.0',
9
- 'HTTP_USER_AGENT' => 'Rails Testing'
8
+ DEFAULT_ENV = Rack::MockRequest.env_for("/",
9
+ "HTTP_HOST" => "test.host",
10
+ "REMOTE_ADDR" => "0.0.0.0",
11
+ "HTTP_USER_AGENT" => "Rails Testing",
10
12
  )
11
13
 
12
- def self.new(env = {})
13
- super
14
+ # Create a new test request with default +env+ values.
15
+ def self.create(env = {})
16
+ env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
17
+ env["rack.request.cookie_hash"] ||= {}.with_indifferent_access
18
+ new(default_env.merge(env))
14
19
  end
15
20
 
16
- def initialize(env = {})
17
- env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
18
- super(default_env.merge(env))
21
+ def self.default_env
22
+ DEFAULT_ENV
19
23
  end
24
+ private_class_method :default_env
20
25
 
21
26
  def request_method=(method)
22
- @env['REQUEST_METHOD'] = method.to_s.upcase
27
+ super(method.to_s.upcase)
23
28
  end
24
29
 
25
30
  def host=(host)
26
- @env['HTTP_HOST'] = host
31
+ set_header("HTTP_HOST", host)
27
32
  end
28
33
 
29
34
  def port=(number)
30
- @env['SERVER_PORT'] = number.to_i
35
+ set_header("SERVER_PORT", number.to_i)
31
36
  end
32
37
 
33
38
  def request_uri=(uri)
34
- @env['REQUEST_URI'] = uri
39
+ set_header("REQUEST_URI", uri)
35
40
  end
36
41
 
37
42
  def path=(path)
38
- @env['PATH_INFO'] = path
43
+ set_header("PATH_INFO", path)
39
44
  end
40
45
 
41
46
  def action=(action_name)
@@ -43,36 +48,24 @@ module ActionDispatch
43
48
  end
44
49
 
45
50
  def if_modified_since=(last_modified)
46
- @env['HTTP_IF_MODIFIED_SINCE'] = last_modified
51
+ set_header("HTTP_IF_MODIFIED_SINCE", last_modified)
47
52
  end
48
53
 
49
54
  def if_none_match=(etag)
50
- @env['HTTP_IF_NONE_MATCH'] = etag
55
+ set_header("HTTP_IF_NONE_MATCH", etag)
51
56
  end
52
57
 
53
58
  def remote_addr=(addr)
54
- @env['REMOTE_ADDR'] = addr
59
+ set_header("REMOTE_ADDR", addr)
55
60
  end
56
61
 
57
62
  def user_agent=(user_agent)
58
- @env['HTTP_USER_AGENT'] = user_agent
63
+ set_header("HTTP_USER_AGENT", user_agent)
59
64
  end
60
65
 
61
66
  def accept=(mime_types)
62
- @env.delete('action_dispatch.request.accepts')
63
- @env['HTTP_ACCEPT'] = Array(mime_types).collect { |mime_type| mime_type.to_s }.join(",")
64
- end
65
-
66
- alias :rack_cookies :cookies
67
-
68
- def cookies
69
- @cookies ||= {}.with_indifferent_access
70
- end
71
-
72
- private
73
-
74
- def default_env
75
- DEFAULT_ENV
67
+ delete_header("action_dispatch.request.accepts")
68
+ set_header("HTTP_ACCEPT", Array(mime_types).collect(&:to_s).join(","))
76
69
  end
77
70
  end
78
71
  end
@@ -1,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "action_dispatch/testing/request_encoder"
4
+
1
5
  module ActionDispatch
2
6
  # Integration test methods such as ActionDispatch::Integration::Session#get
3
7
  # and ActionDispatch::Integration::Session#post return objects of class
@@ -7,19 +11,43 @@ module ActionDispatch
7
11
  # See Response for more information on controller response objects.
8
12
  class TestResponse < Response
9
13
  def self.from_response(response)
10
- new response.status, response.headers, response.body, default_headers: nil
14
+ new response.status, response.headers, response.body
15
+ end
16
+
17
+ def initialize(*) # :nodoc:
18
+ super
19
+ @response_parser = RequestEncoder.parser(content_type)
11
20
  end
12
21
 
13
22
  # Was the response successful?
14
- alias_method :success?, :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
15
30
 
16
31
  # Was the URL not found?
17
- alias_method :missing?, :not_found?
18
-
19
- # Were we redirected?
20
- alias_method :redirect?, :redirection?
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
21
39
 
22
40
  # Was there a server-side error?
23
- alias_method :error?, :server_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?
47
+ end
48
+
49
+ def parsed_body
50
+ @parsed_body ||= @response_parser.call(body)
51
+ end
24
52
  end
25
53
  end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
- # Copyright (c) 2004-2014 David Heinemeier Hansson
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
@@ -21,4 +23,4 @@
21
23
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
24
  #++
23
25
 
24
- require 'action_pack/version'
26
+ require "action_pack/version"
@@ -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
@@ -5,10 +7,10 @@ module ActionPack
5
7
  end
6
8
 
7
9
  module VERSION
8
- MAJOR = 4
10
+ MAJOR = 5
9
11
  MINOR = 2
10
- TINY = 8
11
- PRE = nil
12
+ TINY = 4
13
+ PRE = "2"
12
14
 
13
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
16
  end
@@ -1,4 +1,6 @@
1
- require_relative 'gem_version'
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "gem_version"
2
4
 
3
5
  module ActionPack
4
6
  # Returns the version of the currently loaded ActionPack as a <tt>Gem::Version</tt>
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: 4.2.8
4
+ version: 5.2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-21 00:00:00.000000000 Z
11
+ date: 2020-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,42 +16,48 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.8
19
+ version: 5.2.4.2
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: 4.2.8
26
+ version: 5.2.4.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.6'
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
37
40
  requirements:
38
41
  - - "~>"
39
42
  - !ruby/object:Gem::Version
40
- version: '1.6'
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
44
50
  requirements:
45
- - - "~>"
51
+ - - ">="
46
52
  - !ruby/object:Gem::Version
47
- version: 0.6.2
53
+ version: 0.6.3
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - "~>"
58
+ - - ">="
53
59
  - !ruby/object:Gem::Version
54
- version: 0.6.2
60
+ version: 0.6.3
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: rails-html-sanitizer
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -78,48 +84,42 @@ dependencies:
78
84
  requirements:
79
85
  - - "~>"
80
86
  - !ruby/object:Gem::Version
81
- version: '1.0'
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: 1.0.5
87
+ version: '2.0'
85
88
  type: :runtime
86
89
  prerelease: false
87
90
  version_requirements: !ruby/object:Gem::Requirement
88
91
  requirements:
89
92
  - - "~>"
90
93
  - !ruby/object:Gem::Version
91
- version: '1.0'
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: 1.0.5
94
+ version: '2.0'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: actionview
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
99
  - - '='
100
100
  - !ruby/object:Gem::Version
101
- version: 4.2.8
101
+ version: 5.2.4.2
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: 4.2.8
108
+ version: 5.2.4.2
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: 4.2.8
115
+ version: 5.2.4.2
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: 4.2.8
122
+ version: 5.2.4.2
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
@@ -133,8 +133,11 @@ files:
133
133
  - lib/abstract_controller.rb
134
134
  - lib/abstract_controller/asset_paths.rb
135
135
  - lib/abstract_controller/base.rb
136
+ - lib/abstract_controller/caching.rb
137
+ - lib/abstract_controller/caching/fragments.rb
136
138
  - lib/abstract_controller/callbacks.rb
137
139
  - lib/abstract_controller/collector.rb
140
+ - lib/abstract_controller/error.rb
138
141
  - lib/abstract_controller/helpers.rb
139
142
  - lib/abstract_controller/logger.rb
140
143
  - lib/abstract_controller/railties/routes_helpers.rb
@@ -142,28 +145,32 @@ files:
142
145
  - lib/abstract_controller/translation.rb
143
146
  - lib/abstract_controller/url_for.rb
144
147
  - lib/action_controller.rb
148
+ - lib/action_controller/api.rb
149
+ - lib/action_controller/api/api_rendering.rb
145
150
  - lib/action_controller/base.rb
146
151
  - lib/action_controller/caching.rb
147
- - lib/action_controller/caching/fragments.rb
152
+ - lib/action_controller/form_builder.rb
148
153
  - lib/action_controller/log_subscriber.rb
149
154
  - lib/action_controller/metal.rb
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
160
+ - lib/action_controller/metal/etag_with_flash.rb
153
161
  - lib/action_controller/metal/etag_with_template_digest.rb
154
162
  - lib/action_controller/metal/exceptions.rb
155
163
  - lib/action_controller/metal/flash.rb
156
164
  - lib/action_controller/metal/force_ssl.rb
157
165
  - lib/action_controller/metal/head.rb
158
166
  - lib/action_controller/metal/helpers.rb
159
- - lib/action_controller/metal/hide_actions.rb
160
167
  - lib/action_controller/metal/http_authentication.rb
161
168
  - lib/action_controller/metal/implicit_render.rb
162
169
  - lib/action_controller/metal/instrumentation.rb
163
170
  - lib/action_controller/metal/live.rb
164
171
  - lib/action_controller/metal/mime_responds.rb
172
+ - lib/action_controller/metal/parameter_encoding.rb
165
173
  - lib/action_controller/metal/params_wrapper.rb
166
- - lib/action_controller/metal/rack_delegation.rb
167
174
  - lib/action_controller/metal/redirecting.rb
168
175
  - lib/action_controller/metal/renderers.rb
169
176
  - lib/action_controller/metal/rendering.rb
@@ -173,13 +180,14 @@ files:
173
180
  - lib/action_controller/metal/strong_parameters.rb
174
181
  - lib/action_controller/metal/testing.rb
175
182
  - lib/action_controller/metal/url_for.rb
176
- - lib/action_controller/middleware.rb
177
- - lib/action_controller/model_naming.rb
178
183
  - lib/action_controller/railtie.rb
179
184
  - lib/action_controller/railties/helpers.rb
185
+ - lib/action_controller/renderer.rb
186
+ - lib/action_controller/template_assertions.rb
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
@@ -194,7 +202,6 @@ files:
194
202
  - lib/action_dispatch/http/upload.rb
195
203
  - lib/action_dispatch/http/url.rb
196
204
  - lib/action_dispatch/journey.rb
197
- - lib/action_dispatch/journey/backwards.rb
198
205
  - lib/action_dispatch/journey/formatter.rb
199
206
  - lib/action_dispatch/journey/gtg/builder.rb
200
207
  - lib/action_dispatch/journey/gtg/simulator.rb
@@ -210,7 +217,6 @@ files:
210
217
  - lib/action_dispatch/journey/path/pattern.rb
211
218
  - lib/action_dispatch/journey/route.rb
212
219
  - lib/action_dispatch/journey/router.rb
213
- - lib/action_dispatch/journey/router/strexp.rb
214
220
  - lib/action_dispatch/journey/router/utils.rb
215
221
  - lib/action_dispatch/journey/routes.rb
216
222
  - lib/action_dispatch/journey/scanner.rb
@@ -221,9 +227,10 @@ files:
221
227
  - lib/action_dispatch/middleware/callbacks.rb
222
228
  - lib/action_dispatch/middleware/cookies.rb
223
229
  - lib/action_dispatch/middleware/debug_exceptions.rb
230
+ - lib/action_dispatch/middleware/debug_locks.rb
224
231
  - lib/action_dispatch/middleware/exception_wrapper.rb
232
+ - lib/action_dispatch/middleware/executor.rb
225
233
  - lib/action_dispatch/middleware/flash.rb
226
- - lib/action_dispatch/middleware/params_parser.rb
227
234
  - lib/action_dispatch/middleware/public_exceptions.rb
228
235
  - lib/action_dispatch/middleware/reloader.rb
229
236
  - lib/action_dispatch/middleware/remote_ip.rb
@@ -238,11 +245,14 @@ files:
238
245
  - lib/action_dispatch/middleware/static.rb
239
246
  - lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
240
247
  - lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb
241
- - lib/action_dispatch/middleware/templates/rescues/_source.erb
248
+ - lib/action_dispatch/middleware/templates/rescues/_source.html.erb
249
+ - lib/action_dispatch/middleware/templates/rescues/_source.text.erb
242
250
  - lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
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
@@ -266,23 +276,31 @@ files:
266
276
  - lib/action_dispatch/routing/route_set.rb
267
277
  - lib/action_dispatch/routing/routes_proxy.rb
268
278
  - lib/action_dispatch/routing/url_for.rb
279
+ - lib/action_dispatch/system_test_case.rb
280
+ - lib/action_dispatch/system_testing/browser.rb
281
+ - lib/action_dispatch/system_testing/driver.rb
282
+ - lib/action_dispatch/system_testing/server.rb
283
+ - lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb
284
+ - lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb
285
+ - lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
286
+ - lib/action_dispatch/testing/assertion_response.rb
269
287
  - lib/action_dispatch/testing/assertions.rb
270
- - lib/action_dispatch/testing/assertions/dom.rb
271
288
  - lib/action_dispatch/testing/assertions/response.rb
272
289
  - lib/action_dispatch/testing/assertions/routing.rb
273
- - lib/action_dispatch/testing/assertions/selector.rb
274
- - lib/action_dispatch/testing/assertions/tag.rb
275
290
  - lib/action_dispatch/testing/integration.rb
291
+ - lib/action_dispatch/testing/request_encoder.rb
276
292
  - lib/action_dispatch/testing/test_process.rb
277
293
  - lib/action_dispatch/testing/test_request.rb
278
294
  - lib/action_dispatch/testing/test_response.rb
279
295
  - lib/action_pack.rb
280
296
  - lib/action_pack/gem_version.rb
281
297
  - lib/action_pack/version.rb
282
- homepage: http://www.rubyonrails.org
298
+ homepage: http://rubyonrails.org
283
299
  licenses:
284
300
  - MIT
285
- metadata: {}
301
+ metadata:
302
+ source_code_uri: https://github.com/rails/rails/tree/v5.2.4.2/actionpack
303
+ changelog_uri: https://github.com/rails/rails/blob/v5.2.4.2/actionpack/CHANGELOG.md
286
304
  post_install_message:
287
305
  rdoc_options: []
288
306
  require_paths:
@@ -291,7 +309,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
291
309
  requirements:
292
310
  - - ">="
293
311
  - !ruby/object:Gem::Version
294
- version: 1.9.3
312
+ version: 2.2.2
295
313
  required_rubygems_version: !ruby/object:Gem::Requirement
296
314
  requirements:
297
315
  - - ">="
@@ -299,8 +317,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
299
317
  version: '0'
300
318
  requirements:
301
319
  - none
302
- rubyforge_project:
303
- rubygems_version: 2.6.10
320
+ rubygems_version: 3.0.3
304
321
  signing_key:
305
322
  specification_version: 4
306
323
  summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).