actionpack 4.2.10 → 6.1.3.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 (187) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +291 -479
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +9 -9
  5. data/lib/abstract_controller/asset_paths.rb +2 -0
  6. data/lib/abstract_controller/base.rb +81 -51
  7. data/lib/{action_controller → abstract_controller}/caching/fragments.rb +64 -17
  8. data/lib/abstract_controller/caching.rb +66 -0
  9. data/lib/abstract_controller/callbacks.rb +61 -33
  10. data/lib/abstract_controller/collector.rb +9 -13
  11. data/lib/abstract_controller/error.rb +6 -0
  12. data/lib/abstract_controller/helpers.rb +115 -99
  13. data/lib/abstract_controller/logger.rb +2 -0
  14. data/lib/abstract_controller/railties/routes_helpers.rb +21 -3
  15. data/lib/abstract_controller/rendering.rb +48 -47
  16. data/lib/abstract_controller/translation.rb +17 -8
  17. data/lib/abstract_controller/url_for.rb +2 -0
  18. data/lib/abstract_controller.rb +13 -5
  19. data/lib/action_controller/api/api_rendering.rb +16 -0
  20. data/lib/action_controller/api.rb +150 -0
  21. data/lib/action_controller/base.rb +29 -24
  22. data/lib/action_controller/caching.rb +12 -57
  23. data/lib/action_controller/form_builder.rb +50 -0
  24. data/lib/action_controller/log_subscriber.rb +17 -19
  25. data/lib/action_controller/metal/basic_implicit_render.rb +13 -0
  26. data/lib/action_controller/metal/conditional_get.rb +134 -46
  27. data/lib/action_controller/metal/content_security_policy.rb +51 -0
  28. data/lib/action_controller/metal/cookies.rb +6 -4
  29. data/lib/action_controller/metal/data_streaming.rb +30 -50
  30. data/lib/action_controller/metal/default_headers.rb +17 -0
  31. data/lib/action_controller/metal/etag_with_flash.rb +18 -0
  32. data/lib/action_controller/metal/etag_with_template_digest.rb +21 -16
  33. data/lib/action_controller/metal/exceptions.rb +63 -15
  34. data/lib/action_controller/metal/flash.rb +9 -8
  35. data/lib/action_controller/metal/head.rb +26 -21
  36. data/lib/action_controller/metal/helpers.rb +37 -18
  37. data/lib/action_controller/metal/http_authentication.rb +81 -73
  38. data/lib/action_controller/metal/implicit_render.rb +53 -9
  39. data/lib/action_controller/metal/instrumentation.rb +32 -35
  40. data/lib/action_controller/metal/live.rb +102 -120
  41. data/lib/action_controller/metal/logging.rb +20 -0
  42. data/lib/action_controller/metal/mime_responds.rb +49 -47
  43. data/lib/action_controller/metal/parameter_encoding.rb +82 -0
  44. data/lib/action_controller/metal/params_wrapper.rb +83 -66
  45. data/lib/action_controller/metal/permissions_policy.rb +46 -0
  46. data/lib/action_controller/metal/redirecting.rb +53 -32
  47. data/lib/action_controller/metal/renderers.rb +87 -44
  48. data/lib/action_controller/metal/rendering.rb +77 -50
  49. data/lib/action_controller/metal/request_forgery_protection.rb +267 -103
  50. data/lib/action_controller/metal/rescue.rb +10 -17
  51. data/lib/action_controller/metal/streaming.rb +12 -11
  52. data/lib/action_controller/metal/strong_parameters.rb +714 -186
  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/metal.rb +104 -87
  56. data/lib/action_controller/railtie.rb +28 -10
  57. data/lib/action_controller/railties/helpers.rb +3 -1
  58. data/lib/action_controller/renderer.rb +141 -0
  59. data/lib/action_controller/template_assertions.rb +11 -0
  60. data/lib/action_controller/test_case.rb +296 -422
  61. data/lib/action_controller.rb +34 -23
  62. data/lib/action_dispatch/http/cache.rb +107 -56
  63. data/lib/action_dispatch/http/content_disposition.rb +45 -0
  64. data/lib/action_dispatch/http/content_security_policy.rb +286 -0
  65. data/lib/action_dispatch/http/filter_parameters.rb +32 -25
  66. data/lib/action_dispatch/http/filter_redirect.rb +10 -12
  67. data/lib/action_dispatch/http/headers.rb +55 -22
  68. data/lib/action_dispatch/http/mime_negotiation.rb +82 -50
  69. data/lib/action_dispatch/http/mime_type.rb +153 -121
  70. data/lib/action_dispatch/http/mime_types.rb +20 -6
  71. data/lib/action_dispatch/http/parameters.rb +90 -40
  72. data/lib/action_dispatch/http/permissions_policy.rb +173 -0
  73. data/lib/action_dispatch/http/rack_cache.rb +2 -0
  74. data/lib/action_dispatch/http/request.rb +226 -121
  75. data/lib/action_dispatch/http/response.rb +248 -113
  76. data/lib/action_dispatch/http/upload.rb +21 -7
  77. data/lib/action_dispatch/http/url.rb +182 -100
  78. data/lib/action_dispatch/journey/formatter.rb +90 -43
  79. data/lib/action_dispatch/journey/gtg/builder.rb +28 -41
  80. data/lib/action_dispatch/journey/gtg/simulator.rb +11 -16
  81. data/lib/action_dispatch/journey/gtg/transition_table.rb +23 -21
  82. data/lib/action_dispatch/journey/nfa/dot.rb +3 -14
  83. data/lib/action_dispatch/journey/nodes/node.rb +29 -15
  84. data/lib/action_dispatch/journey/parser.rb +17 -16
  85. data/lib/action_dispatch/journey/parser.y +4 -3
  86. data/lib/action_dispatch/journey/parser_extras.rb +12 -4
  87. data/lib/action_dispatch/journey/path/pattern.rb +58 -54
  88. data/lib/action_dispatch/journey/route.rb +100 -32
  89. data/lib/action_dispatch/journey/router/utils.rb +29 -18
  90. data/lib/action_dispatch/journey/router.rb +55 -51
  91. data/lib/action_dispatch/journey/routes.rb +17 -17
  92. data/lib/action_dispatch/journey/scanner.rb +26 -17
  93. data/lib/action_dispatch/journey/visitors.rb +98 -54
  94. data/lib/action_dispatch/journey.rb +5 -5
  95. data/lib/action_dispatch/middleware/actionable_exceptions.rb +46 -0
  96. data/lib/action_dispatch/middleware/callbacks.rb +3 -6
  97. data/lib/action_dispatch/middleware/cookies.rb +347 -217
  98. data/lib/action_dispatch/middleware/debug_exceptions.rb +135 -63
  99. data/lib/action_dispatch/middleware/debug_locks.rb +124 -0
  100. data/lib/action_dispatch/middleware/debug_view.rb +66 -0
  101. data/lib/action_dispatch/middleware/exception_wrapper.rb +115 -71
  102. data/lib/action_dispatch/middleware/executor.rb +21 -0
  103. data/lib/action_dispatch/middleware/flash.rb +78 -54
  104. data/lib/action_dispatch/middleware/host_authorization.rb +130 -0
  105. data/lib/action_dispatch/middleware/public_exceptions.rb +32 -27
  106. data/lib/action_dispatch/middleware/reloader.rb +5 -91
  107. data/lib/action_dispatch/middleware/remote_ip.rb +53 -45
  108. data/lib/action_dispatch/middleware/request_id.rb +17 -10
  109. data/lib/action_dispatch/middleware/session/abstract_store.rb +41 -26
  110. data/lib/action_dispatch/middleware/session/cache_store.rb +24 -14
  111. data/lib/action_dispatch/middleware/session/cookie_store.rb +74 -75
  112. data/lib/action_dispatch/middleware/session/mem_cache_store.rb +8 -2
  113. data/lib/action_dispatch/middleware/show_exceptions.rb +28 -23
  114. data/lib/action_dispatch/middleware/ssl.rb +118 -35
  115. data/lib/action_dispatch/middleware/stack.rb +82 -41
  116. data/lib/action_dispatch/middleware/static.rb +156 -89
  117. data/lib/action_dispatch/middleware/templates/rescues/_actions.html.erb +13 -0
  118. data/lib/action_dispatch/middleware/templates/rescues/_actions.text.erb +0 -0
  119. data/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb +22 -0
  120. data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +4 -14
  121. data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb +1 -1
  122. data/lib/action_dispatch/middleware/templates/rescues/{_source.erb → _source.html.erb} +4 -2
  123. data/lib/action_dispatch/middleware/templates/rescues/_source.text.erb +8 -0
  124. data/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb +45 -35
  125. data/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb +7 -0
  126. data/lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb +5 -0
  127. data/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb +23 -4
  128. data/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb +1 -1
  129. data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb +24 -0
  130. data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb +15 -0
  131. data/lib/action_dispatch/middleware/templates/rescues/layout.erb +105 -8
  132. data/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb +19 -0
  133. data/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.text.erb +3 -0
  134. data/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb +2 -2
  135. data/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb +1 -1
  136. data/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +3 -3
  137. data/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb +1 -1
  138. data/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb +1 -1
  139. data/lib/action_dispatch/middleware/templates/routes/_route.html.erb +4 -4
  140. data/lib/action_dispatch/middleware/templates/routes/_table.html.erb +87 -64
  141. data/lib/action_dispatch/railtie.rb +27 -13
  142. data/lib/action_dispatch/request/session.rb +109 -61
  143. data/lib/action_dispatch/request/utils.rb +90 -23
  144. data/lib/action_dispatch/routing/endpoint.rb +9 -2
  145. data/lib/action_dispatch/routing/inspector.rb +141 -102
  146. data/lib/action_dispatch/routing/mapper.rb +811 -473
  147. data/lib/action_dispatch/routing/polymorphic_routes.rb +167 -143
  148. data/lib/action_dispatch/routing/redirection.rb +37 -27
  149. data/lib/action_dispatch/routing/route_set.rb +363 -331
  150. data/lib/action_dispatch/routing/routes_proxy.rb +32 -5
  151. data/lib/action_dispatch/routing/url_for.rb +66 -26
  152. data/lib/action_dispatch/routing.rb +36 -36
  153. data/lib/action_dispatch/system_test_case.rb +190 -0
  154. data/lib/action_dispatch/system_testing/browser.rb +86 -0
  155. data/lib/action_dispatch/system_testing/driver.rb +67 -0
  156. data/lib/action_dispatch/system_testing/server.rb +31 -0
  157. data/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +138 -0
  158. data/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +29 -0
  159. data/lib/action_dispatch/testing/assertion_response.rb +46 -0
  160. data/lib/action_dispatch/testing/assertions/response.rb +44 -22
  161. data/lib/action_dispatch/testing/assertions/routing.rb +47 -31
  162. data/lib/action_dispatch/testing/assertions.rb +6 -4
  163. data/lib/action_dispatch/testing/integration.rb +391 -220
  164. data/lib/action_dispatch/testing/request_encoder.rb +55 -0
  165. data/lib/action_dispatch/testing/test_process.rb +53 -22
  166. data/lib/action_dispatch/testing/test_request.rb +27 -34
  167. data/lib/action_dispatch/testing/test_response.rb +11 -11
  168. data/lib/action_dispatch.rb +35 -21
  169. data/lib/action_pack/gem_version.rb +6 -4
  170. data/lib/action_pack/version.rb +3 -1
  171. data/lib/action_pack.rb +4 -2
  172. metadata +78 -49
  173. data/lib/action_controller/metal/force_ssl.rb +0 -97
  174. data/lib/action_controller/metal/hide_actions.rb +0 -40
  175. data/lib/action_controller/metal/rack_delegation.rb +0 -32
  176. data/lib/action_controller/middleware.rb +0 -39
  177. data/lib/action_controller/model_naming.rb +0 -12
  178. data/lib/action_dispatch/http/parameter_filter.rb +0 -72
  179. data/lib/action_dispatch/journey/backwards.rb +0 -5
  180. data/lib/action_dispatch/journey/nfa/builder.rb +0 -76
  181. data/lib/action_dispatch/journey/nfa/simulator.rb +0 -47
  182. data/lib/action_dispatch/journey/nfa/transition_table.rb +0 -163
  183. data/lib/action_dispatch/journey/router/strexp.rb +0 -27
  184. data/lib/action_dispatch/middleware/params_parser.rb +0 -60
  185. data/lib/action_dispatch/testing/assertions/dom.rb +0 -3
  186. data/lib/action_dispatch/testing/assertions/selector.rb +0 -3
  187. data/lib/action_dispatch/testing/assertions/tag.rb +0 -3
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.10
4
+ version: 6.1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-27 00:00:00.000000000 Z
11
+ date: 2021-05-05 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.10
19
+ version: 6.1.3.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.10
26
+ version: 6.1.3.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.9
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.9
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
@@ -61,7 +67,7 @@ dependencies:
61
67
  version: '1.0'
62
68
  - - ">="
63
69
  - !ruby/object:Gem::Version
64
- version: 1.0.2
70
+ version: 1.2.0
65
71
  type: :runtime
66
72
  prerelease: false
67
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -71,55 +77,49 @@ dependencies:
71
77
  version: '1.0'
72
78
  - - ">="
73
79
  - !ruby/object:Gem::Version
74
- version: 1.0.2
80
+ version: 1.2.0
75
81
  - !ruby/object:Gem::Dependency
76
82
  name: rails-dom-testing
77
83
  requirement: !ruby/object:Gem::Requirement
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.10
101
+ version: 6.1.3.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.10
108
+ version: 6.1.3.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.10
115
+ version: 6.1.3.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.10
122
+ version: 6.1.3.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,34 @@ 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/default_headers.rb
161
+ - lib/action_controller/metal/etag_with_flash.rb
153
162
  - lib/action_controller/metal/etag_with_template_digest.rb
154
163
  - lib/action_controller/metal/exceptions.rb
155
164
  - lib/action_controller/metal/flash.rb
156
- - 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
171
+ - lib/action_controller/metal/logging.rb
164
172
  - lib/action_controller/metal/mime_responds.rb
173
+ - lib/action_controller/metal/parameter_encoding.rb
165
174
  - lib/action_controller/metal/params_wrapper.rb
166
- - lib/action_controller/metal/rack_delegation.rb
175
+ - lib/action_controller/metal/permissions_policy.rb
167
176
  - lib/action_controller/metal/redirecting.rb
168
177
  - lib/action_controller/metal/renderers.rb
169
178
  - lib/action_controller/metal/rendering.rb
@@ -173,36 +182,34 @@ files:
173
182
  - lib/action_controller/metal/strong_parameters.rb
174
183
  - lib/action_controller/metal/testing.rb
175
184
  - lib/action_controller/metal/url_for.rb
176
- - lib/action_controller/middleware.rb
177
- - lib/action_controller/model_naming.rb
178
185
  - lib/action_controller/railtie.rb
179
186
  - lib/action_controller/railties/helpers.rb
187
+ - lib/action_controller/renderer.rb
188
+ - lib/action_controller/template_assertions.rb
180
189
  - lib/action_controller/test_case.rb
181
190
  - lib/action_dispatch.rb
182
191
  - lib/action_dispatch/http/cache.rb
192
+ - lib/action_dispatch/http/content_disposition.rb
193
+ - lib/action_dispatch/http/content_security_policy.rb
183
194
  - lib/action_dispatch/http/filter_parameters.rb
184
195
  - lib/action_dispatch/http/filter_redirect.rb
185
196
  - lib/action_dispatch/http/headers.rb
186
197
  - lib/action_dispatch/http/mime_negotiation.rb
187
198
  - lib/action_dispatch/http/mime_type.rb
188
199
  - lib/action_dispatch/http/mime_types.rb
189
- - lib/action_dispatch/http/parameter_filter.rb
190
200
  - lib/action_dispatch/http/parameters.rb
201
+ - lib/action_dispatch/http/permissions_policy.rb
191
202
  - lib/action_dispatch/http/rack_cache.rb
192
203
  - lib/action_dispatch/http/request.rb
193
204
  - lib/action_dispatch/http/response.rb
194
205
  - lib/action_dispatch/http/upload.rb
195
206
  - lib/action_dispatch/http/url.rb
196
207
  - lib/action_dispatch/journey.rb
197
- - lib/action_dispatch/journey/backwards.rb
198
208
  - lib/action_dispatch/journey/formatter.rb
199
209
  - lib/action_dispatch/journey/gtg/builder.rb
200
210
  - lib/action_dispatch/journey/gtg/simulator.rb
201
211
  - lib/action_dispatch/journey/gtg/transition_table.rb
202
- - lib/action_dispatch/journey/nfa/builder.rb
203
212
  - lib/action_dispatch/journey/nfa/dot.rb
204
- - lib/action_dispatch/journey/nfa/simulator.rb
205
- - lib/action_dispatch/journey/nfa/transition_table.rb
206
213
  - lib/action_dispatch/journey/nodes/node.rb
207
214
  - lib/action_dispatch/journey/parser.rb
208
215
  - lib/action_dispatch/journey/parser.y
@@ -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
@@ -218,12 +224,16 @@ files:
218
224
  - lib/action_dispatch/journey/visualizer/fsm.css
219
225
  - lib/action_dispatch/journey/visualizer/fsm.js
220
226
  - lib/action_dispatch/journey/visualizer/index.html.erb
227
+ - lib/action_dispatch/middleware/actionable_exceptions.rb
221
228
  - lib/action_dispatch/middleware/callbacks.rb
222
229
  - lib/action_dispatch/middleware/cookies.rb
223
230
  - lib/action_dispatch/middleware/debug_exceptions.rb
231
+ - lib/action_dispatch/middleware/debug_locks.rb
232
+ - lib/action_dispatch/middleware/debug_view.rb
224
233
  - lib/action_dispatch/middleware/exception_wrapper.rb
234
+ - lib/action_dispatch/middleware/executor.rb
225
235
  - lib/action_dispatch/middleware/flash.rb
226
- - lib/action_dispatch/middleware/params_parser.rb
236
+ - lib/action_dispatch/middleware/host_authorization.rb
227
237
  - lib/action_dispatch/middleware/public_exceptions.rb
228
238
  - lib/action_dispatch/middleware/reloader.rb
229
239
  - lib/action_dispatch/middleware/remote_ip.rb
@@ -236,14 +246,24 @@ files:
236
246
  - lib/action_dispatch/middleware/ssl.rb
237
247
  - lib/action_dispatch/middleware/stack.rb
238
248
  - lib/action_dispatch/middleware/static.rb
249
+ - lib/action_dispatch/middleware/templates/rescues/_actions.html.erb
250
+ - lib/action_dispatch/middleware/templates/rescues/_actions.text.erb
251
+ - lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
239
252
  - lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
240
253
  - lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb
241
- - lib/action_dispatch/middleware/templates/rescues/_source.erb
254
+ - lib/action_dispatch/middleware/templates/rescues/_source.html.erb
255
+ - lib/action_dispatch/middleware/templates/rescues/_source.text.erb
242
256
  - lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
243
257
  - lib/action_dispatch/middleware/templates/rescues/_trace.text.erb
258
+ - lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb
259
+ - lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb
244
260
  - lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb
245
261
  - lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb
262
+ - lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb
263
+ - lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb
246
264
  - lib/action_dispatch/middleware/templates/rescues/layout.erb
265
+ - lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb
266
+ - lib/action_dispatch/middleware/templates/rescues/missing_exact_template.text.erb
247
267
  - lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb
248
268
  - lib/action_dispatch/middleware/templates/rescues/missing_template.text.erb
249
269
  - lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb
@@ -266,24 +286,34 @@ files:
266
286
  - lib/action_dispatch/routing/route_set.rb
267
287
  - lib/action_dispatch/routing/routes_proxy.rb
268
288
  - lib/action_dispatch/routing/url_for.rb
289
+ - lib/action_dispatch/system_test_case.rb
290
+ - lib/action_dispatch/system_testing/browser.rb
291
+ - lib/action_dispatch/system_testing/driver.rb
292
+ - lib/action_dispatch/system_testing/server.rb
293
+ - lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb
294
+ - lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb
295
+ - lib/action_dispatch/testing/assertion_response.rb
269
296
  - lib/action_dispatch/testing/assertions.rb
270
- - lib/action_dispatch/testing/assertions/dom.rb
271
297
  - lib/action_dispatch/testing/assertions/response.rb
272
298
  - lib/action_dispatch/testing/assertions/routing.rb
273
- - lib/action_dispatch/testing/assertions/selector.rb
274
- - lib/action_dispatch/testing/assertions/tag.rb
275
299
  - lib/action_dispatch/testing/integration.rb
300
+ - lib/action_dispatch/testing/request_encoder.rb
276
301
  - lib/action_dispatch/testing/test_process.rb
277
302
  - lib/action_dispatch/testing/test_request.rb
278
303
  - lib/action_dispatch/testing/test_response.rb
279
304
  - lib/action_pack.rb
280
305
  - lib/action_pack/gem_version.rb
281
306
  - lib/action_pack/version.rb
282
- homepage: http://www.rubyonrails.org
307
+ homepage: https://rubyonrails.org
283
308
  licenses:
284
309
  - MIT
285
- metadata: {}
286
- post_install_message:
310
+ metadata:
311
+ bug_tracker_uri: https://github.com/rails/rails/issues
312
+ changelog_uri: https://github.com/rails/rails/blob/v6.1.3.2/actionpack/CHANGELOG.md
313
+ documentation_uri: https://api.rubyonrails.org/v6.1.3.2/
314
+ mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
315
+ source_code_uri: https://github.com/rails/rails/tree/v6.1.3.2/actionpack
316
+ post_install_message:
287
317
  rdoc_options: []
288
318
  require_paths:
289
319
  - lib
@@ -291,7 +321,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
291
321
  requirements:
292
322
  - - ">="
293
323
  - !ruby/object:Gem::Version
294
- version: 1.9.3
324
+ version: 2.5.0
295
325
  required_rubygems_version: !ruby/object:Gem::Requirement
296
326
  requirements:
297
327
  - - ">="
@@ -299,9 +329,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
299
329
  version: '0'
300
330
  requirements:
301
331
  - none
302
- rubyforge_project:
303
- rubygems_version: 2.5.2
304
- signing_key:
332
+ rubygems_version: 3.1.2
333
+ signing_key:
305
334
  specification_version: 4
306
335
  summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
307
336
  test_files: []
@@ -1,97 +0,0 @@
1
- require 'active_support/core_ext/hash/except'
2
- require 'active_support/core_ext/hash/slice'
3
-
4
- module ActionController
5
- # This module provides a method which will redirect browser to use HTTPS
6
- # protocol. This will ensure that user's sensitive information will be
7
- # transferred safely over the internet. You _should_ always force browser
8
- # to use HTTPS when you're transferring sensitive information such as
9
- # user authentication, account information, or credit card information.
10
- #
11
- # Note that if you are really concerned about your application security,
12
- # you might consider using +config.force_ssl+ in your config file instead.
13
- # That will ensure all the data transferred via HTTPS protocol and prevent
14
- # user from getting session hijacked when accessing the site under unsecured
15
- # HTTP protocol.
16
- module ForceSSL
17
- extend ActiveSupport::Concern
18
- include AbstractController::Callbacks
19
-
20
- ACTION_OPTIONS = [:only, :except, :if, :unless]
21
- URL_OPTIONS = [:protocol, :host, :domain, :subdomain, :port, :path]
22
- REDIRECT_OPTIONS = [:status, :flash, :alert, :notice]
23
-
24
- module ClassMethods
25
- # Force the request to this particular controller or specified actions to be
26
- # under HTTPS protocol.
27
- #
28
- # If you need to disable this for any reason (e.g. development) then you can use
29
- # an +:if+ or +:unless+ condition.
30
- #
31
- # class AccountsController < ApplicationController
32
- # force_ssl if: :ssl_configured?
33
- #
34
- # def ssl_configured?
35
- # !Rails.env.development?
36
- # end
37
- # end
38
- #
39
- # ==== URL Options
40
- # You can pass any of the following options to affect the redirect url
41
- # * <tt>host</tt> - Redirect to a different host name
42
- # * <tt>subdomain</tt> - Redirect to a different subdomain
43
- # * <tt>domain</tt> - Redirect to a different domain
44
- # * <tt>port</tt> - Redirect to a non-standard port
45
- # * <tt>path</tt> - Redirect to a different path
46
- #
47
- # ==== Redirect Options
48
- # You can pass any of the following options to affect the redirect status and response
49
- # * <tt>status</tt> - Redirect with a custom status (default is 301 Moved Permanently)
50
- # * <tt>flash</tt> - Set a flash message when redirecting
51
- # * <tt>alert</tt> - Set an alert message when redirecting
52
- # * <tt>notice</tt> - Set a notice message when redirecting
53
- #
54
- # ==== Action Options
55
- # You can pass any of the following options to affect the before_action callback
56
- # * <tt>only</tt> - The callback should be run only for this action
57
- # * <tt>except</tt> - The callback should be run for all actions except this action
58
- # * <tt>if</tt> - A symbol naming an instance method or a proc; the callback
59
- # will be called only when it returns a true value.
60
- # * <tt>unless</tt> - A symbol naming an instance method or a proc; the callback
61
- # will be called only when it returns a false value.
62
- def force_ssl(options = {})
63
- action_options = options.slice(*ACTION_OPTIONS)
64
- redirect_options = options.except(*ACTION_OPTIONS)
65
- before_action(action_options) do
66
- force_ssl_redirect(redirect_options)
67
- end
68
- end
69
- end
70
-
71
- # Redirect the existing request to use the HTTPS protocol.
72
- #
73
- # ==== Parameters
74
- # * <tt>host_or_options</tt> - Either a host name or any of the url & redirect options
75
- # available to the <tt>force_ssl</tt> method.
76
- def force_ssl_redirect(host_or_options = nil)
77
- unless request.ssl?
78
- options = {
79
- :protocol => 'https://',
80
- :host => request.host,
81
- :path => request.fullpath,
82
- :status => :moved_permanently
83
- }
84
-
85
- if host_or_options.is_a?(Hash)
86
- options.merge!(host_or_options)
87
- elsif host_or_options
88
- options[:host] = host_or_options
89
- end
90
-
91
- secure_url = ActionDispatch::Http::URL.url_for(options.slice(*URL_OPTIONS))
92
- flash.keep if respond_to?(:flash)
93
- redirect_to secure_url, options.slice(*REDIRECT_OPTIONS)
94
- end
95
- end
96
- end
97
- end
@@ -1,40 +0,0 @@
1
-
2
- module ActionController
3
- # Adds the ability to prevent public methods on a controller to be called as actions.
4
- module HideActions
5
- extend ActiveSupport::Concern
6
-
7
- included do
8
- class_attribute :hidden_actions
9
- self.hidden_actions = Set.new.freeze
10
- end
11
-
12
- private
13
-
14
- # Overrides AbstractController::Base#action_method? to return false if the
15
- # action name is in the list of hidden actions.
16
- def method_for_action(action_name)
17
- self.class.visible_action?(action_name) && super
18
- end
19
-
20
- module ClassMethods
21
- # Sets all of the actions passed in as hidden actions.
22
- #
23
- # ==== Parameters
24
- # * <tt>args</tt> - A list of actions
25
- def hide_action(*args)
26
- self.hidden_actions = hidden_actions.dup.merge(args.map(&:to_s)).freeze
27
- end
28
-
29
- def visible_action?(action_name)
30
- not hidden_actions.include?(action_name)
31
- end
32
-
33
- # Overrides AbstractController::Base#action_methods to remove any methods
34
- # that are listed as hidden methods.
35
- def action_methods
36
- @action_methods ||= Set.new(super.reject { |name| hidden_actions.include?(name) }).freeze
37
- end
38
- end
39
- end
40
- end
@@ -1,32 +0,0 @@
1
- require 'action_dispatch/http/request'
2
- require 'action_dispatch/http/response'
3
-
4
- module ActionController
5
- module RackDelegation
6
- extend ActiveSupport::Concern
7
-
8
- delegate :headers, :status=, :location=, :content_type=,
9
- :status, :location, :content_type, :response_code, :to => "@_response"
10
-
11
- def dispatch(action, request)
12
- set_response!(request)
13
- super(action, request)
14
- end
15
-
16
- def response_body=(body)
17
- response.body = body if response
18
- super
19
- end
20
-
21
- def reset_session
22
- @_request.reset_session
23
- end
24
-
25
- private
26
-
27
- def set_response!(request)
28
- @_response = ActionDispatch::Response.new
29
- @_response.request = request
30
- end
31
- end
32
- end
@@ -1,39 +0,0 @@
1
- module ActionController
2
- class Middleware < Metal
3
- class ActionMiddleware
4
- def initialize(controller, app)
5
- @controller, @app = controller, app
6
- end
7
-
8
- def call(env)
9
- request = ActionDispatch::Request.new(env)
10
- @controller.build(@app).dispatch(:index, request)
11
- end
12
- end
13
-
14
- class << self
15
- alias build new
16
-
17
- def new(app)
18
- ActionMiddleware.new(self, app)
19
- end
20
- end
21
-
22
- attr_internal :app
23
-
24
- def process(action)
25
- response = super
26
- self.status, self.headers, self.response_body = response if response.is_a?(Array)
27
- response
28
- end
29
-
30
- def initialize(app)
31
- super()
32
- @_app = app
33
- end
34
-
35
- def index
36
- call(env)
37
- end
38
- end
39
- end
@@ -1,12 +0,0 @@
1
- module ActionController
2
- module ModelNaming
3
- # Converts the given object to an ActiveModel compliant one.
4
- def convert_to_model(object)
5
- object.respond_to?(:to_model) ? object.to_model : object
6
- end
7
-
8
- def model_name_from_record_or_class(record_or_class)
9
- convert_to_model(record_or_class).model_name
10
- end
11
- end
12
- end
@@ -1,72 +0,0 @@
1
- module ActionDispatch
2
- module Http
3
- class ParameterFilter
4
- FILTERED = '[FILTERED]'.freeze # :nodoc:
5
-
6
- def initialize(filters = [])
7
- @filters = filters
8
- end
9
-
10
- def filter(params)
11
- compiled_filter.call(params)
12
- end
13
-
14
- private
15
-
16
- def compiled_filter
17
- @compiled_filter ||= CompiledFilter.compile(@filters)
18
- end
19
-
20
- class CompiledFilter # :nodoc:
21
- def self.compile(filters)
22
- return lambda { |params| params.dup } if filters.empty?
23
-
24
- strings, regexps, blocks = [], [], []
25
-
26
- filters.each do |item|
27
- case item
28
- when Proc
29
- blocks << item
30
- when Regexp
31
- regexps << item
32
- else
33
- strings << item.to_s
34
- end
35
- end
36
-
37
- regexps << Regexp.new(strings.join('|'), true) unless strings.empty?
38
- new regexps, blocks
39
- end
40
-
41
- attr_reader :regexps, :blocks
42
-
43
- def initialize(regexps, blocks)
44
- @regexps = regexps
45
- @blocks = blocks
46
- end
47
-
48
- def call(original_params)
49
- filtered_params = {}
50
-
51
- original_params.each do |key, value|
52
- if regexps.any? { |r| key =~ r }
53
- value = FILTERED
54
- elsif value.is_a?(Hash)
55
- value = call(value)
56
- elsif value.is_a?(Array)
57
- value = value.map { |v| v.is_a?(Hash) ? call(v) : v }
58
- elsif blocks.any?
59
- key = key.dup if key.duplicable?
60
- value = value.dup if value.duplicable?
61
- blocks.each { |b| b.call(key, value) }
62
- end
63
-
64
- filtered_params[key] = value
65
- end
66
-
67
- filtered_params
68
- end
69
- end
70
- end
71
- end
72
- end
@@ -1,5 +0,0 @@
1
- module Rack # :nodoc:
2
- Mount = ActionDispatch::Journey::Router
3
- Mount::RouteSet = ActionDispatch::Journey::Router
4
- Mount::RegexpWithNamedGroups = ActionDispatch::Journey::Path::Pattern
5
- end