actionpack 4.2.11.1 → 5.2.4
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 +279 -497
- data/MIT-LICENSE +1 -1
- data/README.rdoc +6 -7
- data/lib/abstract_controller/asset_paths.rb +2 -0
- data/lib/abstract_controller/base.rb +45 -49
- data/lib/{action_controller → abstract_controller}/caching/fragments.rb +78 -15
- data/lib/abstract_controller/caching.rb +66 -0
- data/lib/abstract_controller/callbacks.rb +47 -31
- data/lib/abstract_controller/collector.rb +8 -11
- data/lib/abstract_controller/error.rb +6 -0
- data/lib/abstract_controller/helpers.rb +25 -25
- data/lib/abstract_controller/logger.rb +2 -0
- data/lib/abstract_controller/railties/routes_helpers.rb +4 -2
- data/lib/abstract_controller/rendering.rb +42 -41
- data/lib/abstract_controller/translation.rb +10 -7
- data/lib/abstract_controller/url_for.rb +2 -0
- data/lib/abstract_controller.rb +12 -5
- data/lib/action_controller/api/api_rendering.rb +16 -0
- data/lib/action_controller/api.rb +149 -0
- data/lib/action_controller/base.rb +27 -19
- data/lib/action_controller/caching.rb +14 -57
- data/lib/action_controller/form_builder.rb +50 -0
- data/lib/action_controller/log_subscriber.rb +10 -15
- data/lib/action_controller/metal/basic_implicit_render.rb +13 -0
- data/lib/action_controller/metal/conditional_get.rb +118 -44
- data/lib/action_controller/metal/content_security_policy.rb +52 -0
- data/lib/action_controller/metal/cookies.rb +3 -3
- data/lib/action_controller/metal/data_streaming.rb +27 -46
- data/lib/action_controller/metal/etag_with_flash.rb +18 -0
- data/lib/action_controller/metal/etag_with_template_digest.rb +20 -13
- data/lib/action_controller/metal/exceptions.rb +8 -14
- data/lib/action_controller/metal/flash.rb +4 -3
- data/lib/action_controller/metal/force_ssl.rb +23 -21
- data/lib/action_controller/metal/head.rb +21 -19
- data/lib/action_controller/metal/helpers.rb +24 -14
- data/lib/action_controller/metal/http_authentication.rb +64 -57
- data/lib/action_controller/metal/implicit_render.rb +62 -8
- data/lib/action_controller/metal/instrumentation.rb +19 -21
- data/lib/action_controller/metal/live.rb +90 -106
- data/lib/action_controller/metal/mime_responds.rb +33 -46
- data/lib/action_controller/metal/parameter_encoding.rb +51 -0
- data/lib/action_controller/metal/params_wrapper.rb +61 -53
- data/lib/action_controller/metal/redirecting.rb +49 -28
- data/lib/action_controller/metal/renderers.rb +87 -44
- data/lib/action_controller/metal/rendering.rb +72 -50
- data/lib/action_controller/metal/request_forgery_protection.rb +203 -92
- data/lib/action_controller/metal/rescue.rb +9 -16
- data/lib/action_controller/metal/streaming.rb +12 -10
- data/lib/action_controller/metal/strong_parameters.rb +582 -165
- data/lib/action_controller/metal/testing.rb +2 -17
- data/lib/action_controller/metal/url_for.rb +19 -10
- data/lib/action_controller/metal.rb +98 -83
- data/lib/action_controller/railtie.rb +28 -10
- data/lib/action_controller/railties/helpers.rb +2 -0
- data/lib/action_controller/renderer.rb +117 -0
- data/lib/action_controller/template_assertions.rb +11 -0
- data/lib/action_controller/test_case.rb +280 -411
- data/lib/action_controller.rb +29 -21
- data/lib/action_dispatch/http/cache.rb +93 -47
- data/lib/action_dispatch/http/content_security_policy.rb +272 -0
- data/lib/action_dispatch/http/filter_parameters.rb +26 -20
- data/lib/action_dispatch/http/filter_redirect.rb +10 -11
- data/lib/action_dispatch/http/headers.rb +55 -22
- data/lib/action_dispatch/http/mime_negotiation.rb +56 -41
- data/lib/action_dispatch/http/mime_type.rb +134 -121
- data/lib/action_dispatch/http/mime_types.rb +20 -6
- data/lib/action_dispatch/http/parameter_filter.rb +25 -11
- data/lib/action_dispatch/http/parameters.rb +98 -39
- data/lib/action_dispatch/http/rack_cache.rb +2 -0
- data/lib/action_dispatch/http/request.rb +200 -118
- data/lib/action_dispatch/http/response.rb +225 -110
- data/lib/action_dispatch/http/upload.rb +12 -6
- data/lib/action_dispatch/http/url.rb +110 -28
- data/lib/action_dispatch/journey/formatter.rb +55 -32
- data/lib/action_dispatch/journey/gtg/builder.rb +7 -5
- data/lib/action_dispatch/journey/gtg/simulator.rb +3 -9
- data/lib/action_dispatch/journey/gtg/transition_table.rb +17 -16
- data/lib/action_dispatch/journey/nfa/builder.rb +5 -3
- data/lib/action_dispatch/journey/nfa/dot.rb +13 -13
- data/lib/action_dispatch/journey/nfa/simulator.rb +3 -1
- data/lib/action_dispatch/journey/nfa/transition_table.rb +5 -48
- data/lib/action_dispatch/journey/nodes/node.rb +18 -6
- data/lib/action_dispatch/journey/parser.rb +23 -22
- data/lib/action_dispatch/journey/parser.y +3 -2
- data/lib/action_dispatch/journey/parser_extras.rb +12 -4
- data/lib/action_dispatch/journey/path/pattern.rb +50 -44
- data/lib/action_dispatch/journey/route.rb +106 -28
- data/lib/action_dispatch/journey/router/utils.rb +20 -11
- data/lib/action_dispatch/journey/router.rb +35 -23
- data/lib/action_dispatch/journey/routes.rb +18 -16
- data/lib/action_dispatch/journey/scanner.rb +18 -15
- data/lib/action_dispatch/journey/visitors.rb +99 -52
- data/lib/action_dispatch/journey.rb +7 -5
- data/lib/action_dispatch/middleware/callbacks.rb +1 -2
- data/lib/action_dispatch/middleware/cookies.rb +304 -193
- data/lib/action_dispatch/middleware/debug_exceptions.rb +152 -57
- data/lib/action_dispatch/middleware/debug_locks.rb +124 -0
- data/lib/action_dispatch/middleware/exception_wrapper.rb +68 -69
- data/lib/action_dispatch/middleware/executor.rb +21 -0
- data/lib/action_dispatch/middleware/flash.rb +78 -54
- data/lib/action_dispatch/middleware/public_exceptions.rb +27 -25
- data/lib/action_dispatch/middleware/reloader.rb +5 -91
- data/lib/action_dispatch/middleware/remote_ip.rb +41 -31
- data/lib/action_dispatch/middleware/request_id.rb +17 -9
- data/lib/action_dispatch/middleware/session/abstract_store.rb +28 -26
- data/lib/action_dispatch/middleware/session/cache_store.rb +14 -9
- data/lib/action_dispatch/middleware/session/cookie_store.rb +62 -67
- data/lib/action_dispatch/middleware/session/mem_cache_store.rb +8 -2
- data/lib/action_dispatch/middleware/show_exceptions.rb +26 -22
- data/lib/action_dispatch/middleware/ssl.rb +114 -36
- data/lib/action_dispatch/middleware/stack.rb +31 -44
- data/lib/action_dispatch/middleware/static.rb +57 -50
- data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +2 -14
- data/lib/action_dispatch/middleware/templates/rescues/{_source.erb → _source.html.erb} +0 -0
- data/lib/action_dispatch/middleware/templates/rescues/_source.text.erb +8 -0
- data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb +21 -0
- data/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb +13 -0
- data/lib/action_dispatch/middleware/templates/rescues/layout.erb +1 -0
- data/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +1 -1
- data/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb +1 -1
- data/lib/action_dispatch/middleware/templates/routes/_route.html.erb +4 -4
- data/lib/action_dispatch/middleware/templates/routes/_table.html.erb +64 -64
- data/lib/action_dispatch/railtie.rb +19 -11
- data/lib/action_dispatch/request/session.rb +99 -58
- data/lib/action_dispatch/request/utils.rb +67 -24
- data/lib/action_dispatch/routing/endpoint.rb +9 -2
- data/lib/action_dispatch/routing/inspector.rb +58 -67
- data/lib/action_dispatch/routing/mapper.rb +733 -447
- data/lib/action_dispatch/routing/polymorphic_routes.rb +161 -139
- data/lib/action_dispatch/routing/redirection.rb +36 -26
- data/lib/action_dispatch/routing/route_set.rb +321 -291
- data/lib/action_dispatch/routing/routes_proxy.rb +32 -5
- data/lib/action_dispatch/routing/url_for.rb +65 -25
- data/lib/action_dispatch/routing.rb +17 -18
- data/lib/action_dispatch/system_test_case.rb +147 -0
- data/lib/action_dispatch/system_testing/browser.rb +49 -0
- data/lib/action_dispatch/system_testing/driver.rb +59 -0
- data/lib/action_dispatch/system_testing/server.rb +31 -0
- data/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +96 -0
- data/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +31 -0
- data/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb +26 -0
- data/lib/action_dispatch/testing/assertion_response.rb +47 -0
- data/lib/action_dispatch/testing/assertions/response.rb +45 -20
- data/lib/action_dispatch/testing/assertions/routing.rb +30 -26
- data/lib/action_dispatch/testing/assertions.rb +6 -4
- data/lib/action_dispatch/testing/integration.rb +347 -209
- data/lib/action_dispatch/testing/request_encoder.rb +55 -0
- data/lib/action_dispatch/testing/test_process.rb +28 -22
- data/lib/action_dispatch/testing/test_request.rb +27 -34
- data/lib/action_dispatch/testing/test_response.rb +35 -7
- data/lib/action_dispatch.rb +26 -19
- data/lib/action_pack/gem_version.rb +5 -3
- data/lib/action_pack/version.rb +3 -1
- data/lib/action_pack.rb +4 -2
- metadata +50 -38
- data/lib/action_controller/metal/hide_actions.rb +0 -40
- data/lib/action_controller/metal/rack_delegation.rb +0 -32
- data/lib/action_controller/middleware.rb +0 -39
- data/lib/action_controller/model_naming.rb +0 -12
- data/lib/action_dispatch/journey/backwards.rb +0 -5
- data/lib/action_dispatch/journey/router/strexp.rb +0 -27
- data/lib/action_dispatch/middleware/params_parser.rb +0 -60
- data/lib/action_dispatch/testing/assertions/dom.rb +0 -3
- data/lib/action_dispatch/testing/assertions/selector.rb +0 -3
- 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
|
+
version: 5.2.4
|
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: 2019-
|
11
|
+
date: 2019-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 5.2.4
|
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:
|
26
|
+
version: 5.2.4
|
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: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rack-test
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.6.
|
47
|
+
version: 0.6.3
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.6.
|
54
|
+
version: 0.6.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rails-html-sanitizer
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,48 +78,42 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
82
|
-
- - ">="
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: 1.0.5
|
81
|
+
version: '2.0'
|
85
82
|
type: :runtime
|
86
83
|
prerelease: false
|
87
84
|
version_requirements: !ruby/object:Gem::Requirement
|
88
85
|
requirements:
|
89
86
|
- - "~>"
|
90
87
|
- !ruby/object:Gem::Version
|
91
|
-
version: '
|
92
|
-
- - ">="
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: 1.0.5
|
88
|
+
version: '2.0'
|
95
89
|
- !ruby/object:Gem::Dependency
|
96
90
|
name: actionview
|
97
91
|
requirement: !ruby/object:Gem::Requirement
|
98
92
|
requirements:
|
99
93
|
- - '='
|
100
94
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
95
|
+
version: 5.2.4
|
102
96
|
type: :runtime
|
103
97
|
prerelease: false
|
104
98
|
version_requirements: !ruby/object:Gem::Requirement
|
105
99
|
requirements:
|
106
100
|
- - '='
|
107
101
|
- !ruby/object:Gem::Version
|
108
|
-
version:
|
102
|
+
version: 5.2.4
|
109
103
|
- !ruby/object:Gem::Dependency
|
110
104
|
name: activemodel
|
111
105
|
requirement: !ruby/object:Gem::Requirement
|
112
106
|
requirements:
|
113
107
|
- - '='
|
114
108
|
- !ruby/object:Gem::Version
|
115
|
-
version:
|
109
|
+
version: 5.2.4
|
116
110
|
type: :development
|
117
111
|
prerelease: false
|
118
112
|
version_requirements: !ruby/object:Gem::Requirement
|
119
113
|
requirements:
|
120
114
|
- - '='
|
121
115
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
116
|
+
version: 5.2.4
|
123
117
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
124
118
|
testing MVC web applications. Works with any Rack-compatible server.
|
125
119
|
email: david@loudthinking.com
|
@@ -133,8 +127,11 @@ files:
|
|
133
127
|
- lib/abstract_controller.rb
|
134
128
|
- lib/abstract_controller/asset_paths.rb
|
135
129
|
- lib/abstract_controller/base.rb
|
130
|
+
- lib/abstract_controller/caching.rb
|
131
|
+
- lib/abstract_controller/caching/fragments.rb
|
136
132
|
- lib/abstract_controller/callbacks.rb
|
137
133
|
- lib/abstract_controller/collector.rb
|
134
|
+
- lib/abstract_controller/error.rb
|
138
135
|
- lib/abstract_controller/helpers.rb
|
139
136
|
- lib/abstract_controller/logger.rb
|
140
137
|
- lib/abstract_controller/railties/routes_helpers.rb
|
@@ -142,28 +139,32 @@ files:
|
|
142
139
|
- lib/abstract_controller/translation.rb
|
143
140
|
- lib/abstract_controller/url_for.rb
|
144
141
|
- lib/action_controller.rb
|
142
|
+
- lib/action_controller/api.rb
|
143
|
+
- lib/action_controller/api/api_rendering.rb
|
145
144
|
- lib/action_controller/base.rb
|
146
145
|
- lib/action_controller/caching.rb
|
147
|
-
- lib/action_controller/
|
146
|
+
- lib/action_controller/form_builder.rb
|
148
147
|
- lib/action_controller/log_subscriber.rb
|
149
148
|
- lib/action_controller/metal.rb
|
149
|
+
- lib/action_controller/metal/basic_implicit_render.rb
|
150
150
|
- lib/action_controller/metal/conditional_get.rb
|
151
|
+
- lib/action_controller/metal/content_security_policy.rb
|
151
152
|
- lib/action_controller/metal/cookies.rb
|
152
153
|
- lib/action_controller/metal/data_streaming.rb
|
154
|
+
- lib/action_controller/metal/etag_with_flash.rb
|
153
155
|
- lib/action_controller/metal/etag_with_template_digest.rb
|
154
156
|
- lib/action_controller/metal/exceptions.rb
|
155
157
|
- lib/action_controller/metal/flash.rb
|
156
158
|
- lib/action_controller/metal/force_ssl.rb
|
157
159
|
- lib/action_controller/metal/head.rb
|
158
160
|
- lib/action_controller/metal/helpers.rb
|
159
|
-
- lib/action_controller/metal/hide_actions.rb
|
160
161
|
- lib/action_controller/metal/http_authentication.rb
|
161
162
|
- lib/action_controller/metal/implicit_render.rb
|
162
163
|
- lib/action_controller/metal/instrumentation.rb
|
163
164
|
- lib/action_controller/metal/live.rb
|
164
165
|
- lib/action_controller/metal/mime_responds.rb
|
166
|
+
- lib/action_controller/metal/parameter_encoding.rb
|
165
167
|
- lib/action_controller/metal/params_wrapper.rb
|
166
|
-
- lib/action_controller/metal/rack_delegation.rb
|
167
168
|
- lib/action_controller/metal/redirecting.rb
|
168
169
|
- lib/action_controller/metal/renderers.rb
|
169
170
|
- lib/action_controller/metal/rendering.rb
|
@@ -173,13 +174,14 @@ files:
|
|
173
174
|
- lib/action_controller/metal/strong_parameters.rb
|
174
175
|
- lib/action_controller/metal/testing.rb
|
175
176
|
- lib/action_controller/metal/url_for.rb
|
176
|
-
- lib/action_controller/middleware.rb
|
177
|
-
- lib/action_controller/model_naming.rb
|
178
177
|
- lib/action_controller/railtie.rb
|
179
178
|
- lib/action_controller/railties/helpers.rb
|
179
|
+
- lib/action_controller/renderer.rb
|
180
|
+
- lib/action_controller/template_assertions.rb
|
180
181
|
- lib/action_controller/test_case.rb
|
181
182
|
- lib/action_dispatch.rb
|
182
183
|
- lib/action_dispatch/http/cache.rb
|
184
|
+
- lib/action_dispatch/http/content_security_policy.rb
|
183
185
|
- lib/action_dispatch/http/filter_parameters.rb
|
184
186
|
- lib/action_dispatch/http/filter_redirect.rb
|
185
187
|
- lib/action_dispatch/http/headers.rb
|
@@ -194,7 +196,6 @@ files:
|
|
194
196
|
- lib/action_dispatch/http/upload.rb
|
195
197
|
- lib/action_dispatch/http/url.rb
|
196
198
|
- lib/action_dispatch/journey.rb
|
197
|
-
- lib/action_dispatch/journey/backwards.rb
|
198
199
|
- lib/action_dispatch/journey/formatter.rb
|
199
200
|
- lib/action_dispatch/journey/gtg/builder.rb
|
200
201
|
- lib/action_dispatch/journey/gtg/simulator.rb
|
@@ -210,7 +211,6 @@ files:
|
|
210
211
|
- lib/action_dispatch/journey/path/pattern.rb
|
211
212
|
- lib/action_dispatch/journey/route.rb
|
212
213
|
- lib/action_dispatch/journey/router.rb
|
213
|
-
- lib/action_dispatch/journey/router/strexp.rb
|
214
214
|
- lib/action_dispatch/journey/router/utils.rb
|
215
215
|
- lib/action_dispatch/journey/routes.rb
|
216
216
|
- lib/action_dispatch/journey/scanner.rb
|
@@ -221,9 +221,10 @@ files:
|
|
221
221
|
- lib/action_dispatch/middleware/callbacks.rb
|
222
222
|
- lib/action_dispatch/middleware/cookies.rb
|
223
223
|
- lib/action_dispatch/middleware/debug_exceptions.rb
|
224
|
+
- lib/action_dispatch/middleware/debug_locks.rb
|
224
225
|
- lib/action_dispatch/middleware/exception_wrapper.rb
|
226
|
+
- lib/action_dispatch/middleware/executor.rb
|
225
227
|
- lib/action_dispatch/middleware/flash.rb
|
226
|
-
- lib/action_dispatch/middleware/params_parser.rb
|
227
228
|
- lib/action_dispatch/middleware/public_exceptions.rb
|
228
229
|
- lib/action_dispatch/middleware/reloader.rb
|
229
230
|
- lib/action_dispatch/middleware/remote_ip.rb
|
@@ -238,11 +239,14 @@ files:
|
|
238
239
|
- lib/action_dispatch/middleware/static.rb
|
239
240
|
- lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
|
240
241
|
- lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb
|
241
|
-
- lib/action_dispatch/middleware/templates/rescues/_source.erb
|
242
|
+
- lib/action_dispatch/middleware/templates/rescues/_source.html.erb
|
243
|
+
- lib/action_dispatch/middleware/templates/rescues/_source.text.erb
|
242
244
|
- lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
|
243
245
|
- lib/action_dispatch/middleware/templates/rescues/_trace.text.erb
|
244
246
|
- lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb
|
245
247
|
- lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb
|
248
|
+
- lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb
|
249
|
+
- lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb
|
246
250
|
- lib/action_dispatch/middleware/templates/rescues/layout.erb
|
247
251
|
- lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb
|
248
252
|
- lib/action_dispatch/middleware/templates/rescues/missing_template.text.erb
|
@@ -266,23 +270,31 @@ files:
|
|
266
270
|
- lib/action_dispatch/routing/route_set.rb
|
267
271
|
- lib/action_dispatch/routing/routes_proxy.rb
|
268
272
|
- lib/action_dispatch/routing/url_for.rb
|
273
|
+
- lib/action_dispatch/system_test_case.rb
|
274
|
+
- lib/action_dispatch/system_testing/browser.rb
|
275
|
+
- lib/action_dispatch/system_testing/driver.rb
|
276
|
+
- lib/action_dispatch/system_testing/server.rb
|
277
|
+
- lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb
|
278
|
+
- lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb
|
279
|
+
- lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
|
280
|
+
- lib/action_dispatch/testing/assertion_response.rb
|
269
281
|
- lib/action_dispatch/testing/assertions.rb
|
270
|
-
- lib/action_dispatch/testing/assertions/dom.rb
|
271
282
|
- lib/action_dispatch/testing/assertions/response.rb
|
272
283
|
- lib/action_dispatch/testing/assertions/routing.rb
|
273
|
-
- lib/action_dispatch/testing/assertions/selector.rb
|
274
|
-
- lib/action_dispatch/testing/assertions/tag.rb
|
275
284
|
- lib/action_dispatch/testing/integration.rb
|
285
|
+
- lib/action_dispatch/testing/request_encoder.rb
|
276
286
|
- lib/action_dispatch/testing/test_process.rb
|
277
287
|
- lib/action_dispatch/testing/test_request.rb
|
278
288
|
- lib/action_dispatch/testing/test_response.rb
|
279
289
|
- lib/action_pack.rb
|
280
290
|
- lib/action_pack/gem_version.rb
|
281
291
|
- lib/action_pack/version.rb
|
282
|
-
homepage: http://
|
292
|
+
homepage: http://rubyonrails.org
|
283
293
|
licenses:
|
284
294
|
- MIT
|
285
|
-
metadata:
|
295
|
+
metadata:
|
296
|
+
source_code_uri: https://github.com/rails/rails/tree/v5.2.4/actionpack
|
297
|
+
changelog_uri: https://github.com/rails/rails/blob/v5.2.4/actionpack/CHANGELOG.md
|
286
298
|
post_install_message:
|
287
299
|
rdoc_options: []
|
288
300
|
require_paths:
|
@@ -291,7 +303,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
291
303
|
requirements:
|
292
304
|
- - ">="
|
293
305
|
- !ruby/object:Gem::Version
|
294
|
-
version:
|
306
|
+
version: 2.2.2
|
295
307
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
296
308
|
requirements:
|
297
309
|
- - ">="
|
@@ -299,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
299
311
|
version: '0'
|
300
312
|
requirements:
|
301
313
|
- none
|
302
|
-
rubygems_version: 3.0.
|
314
|
+
rubygems_version: 3.0.3
|
303
315
|
signing_key:
|
304
316
|
specification_version: 4
|
305
317
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|
@@ -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,27 +0,0 @@
|
|
1
|
-
module ActionDispatch
|
2
|
-
module Journey # :nodoc:
|
3
|
-
class Router # :nodoc:
|
4
|
-
class Strexp # :nodoc:
|
5
|
-
class << self
|
6
|
-
alias :compile :new
|
7
|
-
end
|
8
|
-
|
9
|
-
attr_reader :path, :requirements, :separators, :anchor, :ast
|
10
|
-
|
11
|
-
def self.build(path, requirements, separators, anchor = true)
|
12
|
-
parser = Journey::Parser.new
|
13
|
-
ast = parser.parse path
|
14
|
-
new ast, path, requirements, separators, anchor
|
15
|
-
end
|
16
|
-
|
17
|
-
def initialize(ast, path, requirements, separators, anchor = true)
|
18
|
-
@ast = ast
|
19
|
-
@path = path
|
20
|
-
@requirements = requirements
|
21
|
-
@separators = separators
|
22
|
-
@anchor = anchor
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
require 'active_support/core_ext/hash/conversions'
|
2
|
-
require 'action_dispatch/http/request'
|
3
|
-
require 'active_support/core_ext/hash/indifferent_access'
|
4
|
-
|
5
|
-
module ActionDispatch
|
6
|
-
class ParamsParser
|
7
|
-
class ParseError < StandardError
|
8
|
-
attr_reader :original_exception
|
9
|
-
|
10
|
-
def initialize(message, original_exception)
|
11
|
-
super(message)
|
12
|
-
@original_exception = original_exception
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
DEFAULT_PARSERS = { Mime::JSON => :json }
|
17
|
-
|
18
|
-
def initialize(app, parsers = {})
|
19
|
-
@app, @parsers = app, DEFAULT_PARSERS.merge(parsers)
|
20
|
-
end
|
21
|
-
|
22
|
-
def call(env)
|
23
|
-
if params = parse_formatted_parameters(env)
|
24
|
-
env["action_dispatch.request.request_parameters"] = params
|
25
|
-
end
|
26
|
-
|
27
|
-
@app.call(env)
|
28
|
-
end
|
29
|
-
|
30
|
-
private
|
31
|
-
def parse_formatted_parameters(env)
|
32
|
-
request = Request.new(env)
|
33
|
-
|
34
|
-
return false if request.content_length.zero?
|
35
|
-
|
36
|
-
strategy = @parsers[request.content_mime_type]
|
37
|
-
|
38
|
-
return false unless strategy
|
39
|
-
|
40
|
-
case strategy
|
41
|
-
when Proc
|
42
|
-
strategy.call(request.raw_post)
|
43
|
-
when :json
|
44
|
-
data = ActiveSupport::JSON.decode(request.raw_post)
|
45
|
-
data = {:_json => data} unless data.is_a?(Hash)
|
46
|
-
Request::Utils.deep_munge(data).with_indifferent_access
|
47
|
-
else
|
48
|
-
false
|
49
|
-
end
|
50
|
-
rescue => e # JSON or Ruby code block errors
|
51
|
-
logger(env).debug "Error occurred while parsing request parameters.\nContents:\n\n#{request.raw_post}"
|
52
|
-
|
53
|
-
raise ParseError.new(e.message, e)
|
54
|
-
end
|
55
|
-
|
56
|
-
def logger(env)
|
57
|
-
env['action_dispatch.logger'] || ActiveSupport::Logger.new($stderr)
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|