actionpack 6.0.0.rc1 → 6.0.0.rc2
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 +45 -1
- data/lib/action_controller/metal.rb +1 -1
- data/lib/action_controller/metal/mime_responds.rb +1 -1
- data/lib/action_controller/metal/renderers.rb +1 -1
- data/lib/action_controller/metal/rendering.rb +1 -1
- data/lib/action_controller/metal/strong_parameters.rb +5 -7
- data/lib/action_controller/template_assertions.rb +1 -1
- data/lib/action_dispatch/http/content_security_policy.rb +20 -9
- data/lib/action_dispatch/http/response.rb +17 -2
- data/lib/action_dispatch/journey/formatter.rb +1 -1
- data/lib/action_dispatch/journey/route.rb +5 -4
- data/lib/action_dispatch/middleware/debug_view.rb +8 -0
- data/lib/action_dispatch/middleware/stack.rb +13 -2
- data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +3 -1
- data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb +1 -1
- data/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb +1 -1
- data/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb +1 -1
- data/lib/action_dispatch/railtie.rb +2 -0
- data/lib/action_dispatch/routing/mapper.rb +7 -6
- data/lib/action_dispatch/system_test_case.rb +1 -0
- data/lib/action_dispatch/system_testing/browser.rb +23 -0
- data/lib/action_dispatch/system_testing/driver.rb +2 -0
- data/lib/action_dispatch/testing/assertions.rb +1 -1
- data/lib/action_dispatch/testing/test_response.rb +1 -1
- data/lib/action_pack/gem_version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26f4fec272345e80b305e73426e4663417440124270a5983ed336e1a9c42f557
|
4
|
+
data.tar.gz: 59685a9093f22dce01fc58fede17184c7574cb60a70e64ef594bef87ad6abadd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f68fa705893a264ffbda5af95e3ed0273f05db7daff281ebb9fafb123e8e42eca36f56a0e98a24a63b26856f2b528a3459ff8277df21e2a6282d329dd215a8cb
|
7
|
+
data.tar.gz: 3de347c592dd31a0c39216438ae0171f470e334ef6e357063130507630dc95ba78b158c544fda3fd24b2f16aebe77c0058bc534c725499cb85b2106794d28a67
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,47 @@
|
|
1
|
+
## Rails 6.0.0.rc2 (July 22, 2019) ##
|
2
|
+
|
3
|
+
* Add the ability to set the CSP nonce only to the specified directives.
|
4
|
+
|
5
|
+
Fixes #35137.
|
6
|
+
|
7
|
+
*Yuji Yaginuma*
|
8
|
+
|
9
|
+
* Keep part when scope option has value.
|
10
|
+
|
11
|
+
When a route was defined within an optional scope, if that route didn't
|
12
|
+
take parameters the scope was lost when using path helpers. This commit
|
13
|
+
ensures scope is kept both when the route takes parameters or when it
|
14
|
+
doesn't.
|
15
|
+
|
16
|
+
Fixes #33219
|
17
|
+
|
18
|
+
*Alberto Almagro*
|
19
|
+
|
20
|
+
* Change `ActionDispatch::Response#content_type` to return Content-Type header as it is.
|
21
|
+
|
22
|
+
Previously, `ActionDispatch::Response#content_type` returned value does NOT
|
23
|
+
contain charset part. This behavior changed to returned Content-Type header
|
24
|
+
containing charset part as it is.
|
25
|
+
|
26
|
+
If you want just MIME type, please use `ActionDispatch::Response#media_type`
|
27
|
+
instead.
|
28
|
+
|
29
|
+
Enable `action_dispatch.return_only_media_type_on_content_type` to use this change.
|
30
|
+
If not enabled, `ActionDispatch::Response#content_type` returns the same
|
31
|
+
value as before version, but its behavior is deprecate.
|
32
|
+
|
33
|
+
*Yuji Yaginuma*
|
34
|
+
|
35
|
+
* Calling `ActionController::Parameters#transform_keys/!` without a block now returns
|
36
|
+
an enumerator for the parameters instead of the underlying hash.
|
37
|
+
|
38
|
+
*Eugene Kenny*
|
39
|
+
|
40
|
+
* Fix a bug where DebugExceptions throws an error when malformed query parameters are provided
|
41
|
+
|
42
|
+
*Yuki Nishijima*, *Stan Lo*
|
43
|
+
|
44
|
+
|
1
45
|
## Rails 6.0.0.rc1 (April 24, 2019) ##
|
2
46
|
|
3
47
|
* Make system tests take a failed screenshot in a `before_teardown` hook
|
@@ -68,7 +112,7 @@
|
|
68
112
|
This is a new middleware that guards against DNS rebinding attacks by
|
69
113
|
explicitly permitting the hosts a request can be made to.
|
70
114
|
|
71
|
-
Each host is checked with the case operator (`#===`) to support `
|
115
|
+
Each host is checked with the case operator (`#===`) to support `Regexp`,
|
72
116
|
`Proc`, `IPAddr` and custom objects as host allowances.
|
73
117
|
|
74
118
|
*Genadi Samokovarov*
|
@@ -148,7 +148,7 @@ module ActionController
|
|
148
148
|
attr_internal :response, :request
|
149
149
|
delegate :session, to: "@_request"
|
150
150
|
delegate :headers, :status=, :location=, :content_type=,
|
151
|
-
:status, :location, :content_type, to: "@_response"
|
151
|
+
:status, :location, :content_type, :media_type, to: "@_response"
|
152
152
|
|
153
153
|
def initialize
|
154
154
|
@_request = nil
|
@@ -205,7 +205,7 @@ module ActionController #:nodoc:
|
|
205
205
|
yield collector if block_given?
|
206
206
|
|
207
207
|
if format = collector.negotiate_format(request)
|
208
|
-
if
|
208
|
+
if media_type && media_type != format
|
209
209
|
raise ActionController::RespondToMismatchError
|
210
210
|
end
|
211
211
|
_process_format(format)
|
@@ -157,7 +157,7 @@ module ActionController
|
|
157
157
|
json = json.to_json(options) unless json.kind_of?(String)
|
158
158
|
|
159
159
|
if options[:callback].present?
|
160
|
-
if
|
160
|
+
if media_type.nil? || media_type == Mime[:json]
|
161
161
|
self.content_type = Mime[:js]
|
162
162
|
end
|
163
163
|
|
@@ -673,18 +673,16 @@ module ActionController
|
|
673
673
|
# Returns a new <tt>ActionController::Parameters</tt> instance with the
|
674
674
|
# results of running +block+ once for every key. The values are unchanged.
|
675
675
|
def transform_keys(&block)
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
else
|
681
|
-
@parameters.transform_keys
|
682
|
-
end
|
676
|
+
return to_enum(:transform_keys) unless block_given?
|
677
|
+
new_instance_with_inherited_permitted_status(
|
678
|
+
@parameters.transform_keys(&block)
|
679
|
+
)
|
683
680
|
end
|
684
681
|
|
685
682
|
# Performs keys transformation and returns the altered
|
686
683
|
# <tt>ActionController::Parameters</tt> instance.
|
687
684
|
def transform_keys!(&block)
|
685
|
+
return to_enum(:transform_keys!) unless block_given?
|
688
686
|
@parameters.transform_keys!(&block)
|
689
687
|
self
|
690
688
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module ActionController
|
4
|
-
module TemplateAssertions
|
4
|
+
module TemplateAssertions # :nodoc:
|
5
5
|
def assert_template(options = {}, message = nil)
|
6
6
|
raise NoMethodError,
|
7
7
|
"assert_template has been extracted to a gem. To continue using it,
|
@@ -22,8 +22,9 @@ module ActionDispatch #:nodoc:
|
|
22
22
|
|
23
23
|
if policy = request.content_security_policy
|
24
24
|
nonce = request.content_security_policy_nonce
|
25
|
+
nonce_directives = request.content_security_policy_nonce_directives
|
25
26
|
context = request.controller_instance || request
|
26
|
-
headers[header_name(request)] = policy.build(context, nonce)
|
27
|
+
headers[header_name(request)] = policy.build(context, nonce, nonce_directives)
|
27
28
|
end
|
28
29
|
|
29
30
|
response
|
@@ -55,6 +56,7 @@ module ActionDispatch #:nodoc:
|
|
55
56
|
POLICY_REPORT_ONLY = "action_dispatch.content_security_policy_report_only"
|
56
57
|
NONCE_GENERATOR = "action_dispatch.content_security_policy_nonce_generator"
|
57
58
|
NONCE = "action_dispatch.content_security_policy_nonce"
|
59
|
+
NONCE_DIRECTIVES = "action_dispatch.content_security_policy_nonce_directives"
|
58
60
|
|
59
61
|
def content_security_policy
|
60
62
|
get_header(POLICY)
|
@@ -80,6 +82,14 @@ module ActionDispatch #:nodoc:
|
|
80
82
|
set_header(NONCE_GENERATOR, generator)
|
81
83
|
end
|
82
84
|
|
85
|
+
def content_security_policy_nonce_directives
|
86
|
+
get_header(NONCE_DIRECTIVES)
|
87
|
+
end
|
88
|
+
|
89
|
+
def content_security_policy_nonce_directives=(generator)
|
90
|
+
set_header(NONCE_DIRECTIVES, generator)
|
91
|
+
end
|
92
|
+
|
83
93
|
def content_security_policy_nonce
|
84
94
|
if content_security_policy_nonce_generator
|
85
95
|
if nonce = get_header(NONCE)
|
@@ -133,9 +143,9 @@ module ActionDispatch #:nodoc:
|
|
133
143
|
worker_src: "worker-src"
|
134
144
|
}.freeze
|
135
145
|
|
136
|
-
|
146
|
+
DEFAULT_NONCE_DIRECTIVES = %w[script-src style-src].freeze
|
137
147
|
|
138
|
-
private_constant :MAPPINGS, :DIRECTIVES, :
|
148
|
+
private_constant :MAPPINGS, :DIRECTIVES, :DEFAULT_NONCE_DIRECTIVES
|
139
149
|
|
140
150
|
attr_reader :directives
|
141
151
|
|
@@ -204,8 +214,9 @@ module ActionDispatch #:nodoc:
|
|
204
214
|
end
|
205
215
|
end
|
206
216
|
|
207
|
-
def build(context = nil, nonce = nil)
|
208
|
-
|
217
|
+
def build(context = nil, nonce = nil, nonce_directives = nil)
|
218
|
+
nonce_directives = DEFAULT_NONCE_DIRECTIVES if nonce_directives.nil?
|
219
|
+
build_directives(context, nonce, nonce_directives).compact.join("; ")
|
209
220
|
end
|
210
221
|
|
211
222
|
private
|
@@ -228,10 +239,10 @@ module ActionDispatch #:nodoc:
|
|
228
239
|
end
|
229
240
|
end
|
230
241
|
|
231
|
-
def build_directives(context, nonce)
|
242
|
+
def build_directives(context, nonce, nonce_directives)
|
232
243
|
@directives.map do |directive, sources|
|
233
244
|
if sources.is_a?(Array)
|
234
|
-
if nonce && nonce_directive?(directive)
|
245
|
+
if nonce && nonce_directive?(directive, nonce_directives)
|
235
246
|
"#{directive} #{build_directive(sources, context).join(' ')} 'nonce-#{nonce}'"
|
236
247
|
else
|
237
248
|
"#{directive} #{build_directive(sources, context).join(' ')}"
|
@@ -266,8 +277,8 @@ module ActionDispatch #:nodoc:
|
|
266
277
|
end
|
267
278
|
end
|
268
279
|
|
269
|
-
def nonce_directive?(directive)
|
270
|
-
|
280
|
+
def nonce_directive?(directive, nonce_directives)
|
281
|
+
nonce_directives.include?(directive)
|
271
282
|
end
|
272
283
|
end
|
273
284
|
end
|
@@ -86,6 +86,7 @@ module ActionDispatch # :nodoc:
|
|
86
86
|
|
87
87
|
cattr_accessor :default_charset, default: "utf-8"
|
88
88
|
cattr_accessor :default_headers
|
89
|
+
cattr_accessor :return_only_media_type_on_content_type, default: false
|
89
90
|
|
90
91
|
include Rack::Response::Helpers
|
91
92
|
# Aliasing these off because AD::Http::Cache::Response defines them.
|
@@ -243,8 +244,22 @@ module ActionDispatch # :nodoc:
|
|
243
244
|
end
|
244
245
|
|
245
246
|
# Content type of response.
|
246
|
-
# It returns just MIME type and does NOT contain charset part.
|
247
247
|
def content_type
|
248
|
+
if self.class.return_only_media_type_on_content_type
|
249
|
+
ActiveSupport::Deprecation.warn(
|
250
|
+
"Rails 6.1 will return Content-Type header without modification." \
|
251
|
+
" If you want just the MIME type, please use `#media_type` instead."
|
252
|
+
)
|
253
|
+
|
254
|
+
content_type = super
|
255
|
+
content_type ? content_type.split(/;\s*charset=/)[0].presence : content_type
|
256
|
+
else
|
257
|
+
super.presence
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
# Media type of response.
|
262
|
+
def media_type
|
248
263
|
parsed_content_type_header.mime_type
|
249
264
|
end
|
250
265
|
|
@@ -458,7 +473,7 @@ module ActionDispatch # :nodoc:
|
|
458
473
|
end
|
459
474
|
|
460
475
|
def assign_default_content_type_and_charset!
|
461
|
-
return if
|
476
|
+
return if media_type
|
462
477
|
|
463
478
|
ct = parsed_content_type_header
|
464
479
|
set_content_type(ct.mime_type || Mime[:html].to_s,
|
@@ -67,7 +67,7 @@ module ActionDispatch
|
|
67
67
|
parameterized_parts = recall.merge(options)
|
68
68
|
|
69
69
|
keys_to_keep = route.parts.reverse_each.drop_while { |part|
|
70
|
-
!options.key?(part) || (options[part] || recall[part]).nil?
|
70
|
+
!(options.key?(part) || route.scope_options.key?(part)) || (options[part] || recall[part]).nil?
|
71
71
|
} | route.required_parts
|
72
72
|
|
73
73
|
parameterized_parts.delete_if do |bad_key, _|
|
@@ -4,9 +4,9 @@ module ActionDispatch
|
|
4
4
|
# :stopdoc:
|
5
5
|
module Journey
|
6
6
|
class Route
|
7
|
-
attr_reader :app, :path, :defaults, :name, :precedence
|
7
|
+
attr_reader :app, :path, :defaults, :name, :precedence, :constraints,
|
8
|
+
:internal, :scope_options
|
8
9
|
|
9
|
-
attr_reader :constraints, :internal
|
10
10
|
alias :conditions :constraints
|
11
11
|
|
12
12
|
module VerbMatchers
|
@@ -51,13 +51,13 @@ module ActionDispatch
|
|
51
51
|
|
52
52
|
def self.build(name, app, path, constraints, required_defaults, defaults)
|
53
53
|
request_method_match = verb_matcher(constraints.delete(:request_method))
|
54
|
-
new name, app, path, constraints, required_defaults, defaults, request_method_match, 0
|
54
|
+
new name, app, path, constraints, required_defaults, defaults, request_method_match, 0, {}
|
55
55
|
end
|
56
56
|
|
57
57
|
##
|
58
58
|
# +path+ is a path constraint.
|
59
59
|
# +constraints+ is a hash of constraints to be applied to this route.
|
60
|
-
def initialize(name, app, path, constraints, required_defaults, defaults, request_method_match, precedence, internal = false)
|
60
|
+
def initialize(name, app, path, constraints, required_defaults, defaults, request_method_match, precedence, scope_options, internal = false)
|
61
61
|
@name = name
|
62
62
|
@app = app
|
63
63
|
@path = path
|
@@ -72,6 +72,7 @@ module ActionDispatch
|
|
72
72
|
@decorated_ast = nil
|
73
73
|
@precedence = precedence
|
74
74
|
@path_formatter = @path.build_formatter
|
75
|
+
@scope_options = scope_options
|
75
76
|
@internal = internal
|
76
77
|
end
|
77
78
|
|
@@ -34,7 +34,11 @@ module ActionDispatch
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def build(app)
|
37
|
-
|
37
|
+
klass.new(app, *args, &block)
|
38
|
+
end
|
39
|
+
|
40
|
+
def build_instrumented(app)
|
41
|
+
InstrumentationProxy.new(build(app), inspect)
|
38
42
|
end
|
39
43
|
end
|
40
44
|
|
@@ -119,7 +123,14 @@ module ActionDispatch
|
|
119
123
|
end
|
120
124
|
|
121
125
|
def build(app = nil, &block)
|
122
|
-
|
126
|
+
instrumenting = ActiveSupport::Notifications.notifier.listening?(InstrumentationProxy::EVENT_NAME)
|
127
|
+
middlewares.freeze.reverse.inject(app || block) do |a, e|
|
128
|
+
if instrumenting
|
129
|
+
e.build_instrumented(a)
|
130
|
+
else
|
131
|
+
e.build(a)
|
132
|
+
end
|
133
|
+
end
|
123
134
|
end
|
124
135
|
|
125
136
|
private
|
@@ -6,7 +6,9 @@
|
|
6
6
|
<% end %>
|
7
7
|
|
8
8
|
<h2 style="margin-top: 30px">Request</h2>
|
9
|
-
|
9
|
+
<% if params_valid? %>
|
10
|
+
<p><b>Parameters</b>:</p> <pre><%= debug_params(@request.filtered_parameters) %></pre>
|
11
|
+
<% end %>
|
10
12
|
|
11
13
|
<div class="details">
|
12
14
|
<div class="summary"><a href="#" onclick="return toggleSessionDump()">Toggle session dump</a></div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<header>
|
2
2
|
<h1>
|
3
3
|
<%= @exception.class.to_s %>
|
4
|
-
<% if @request.parameters['controller'] %>
|
4
|
+
<% if params_valid? && @request.parameters['controller'] %>
|
5
5
|
in <%= @request.parameters['controller'].camelize %>Controller<% if @request.parameters['action'] %>#<%= @request.parameters['action'] %><% end %>
|
6
6
|
<% end %>
|
7
7
|
</h1>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= @exception.class.to_s %><%
|
2
|
-
if @request.parameters['controller']
|
2
|
+
if params_valid? && @request.parameters['controller']
|
3
3
|
%> in <%= @request.parameters['controller'].camelize %>Controller<% if @request.parameters['action'] %>#<%= @request.parameters['action'] %><% end %>
|
4
4
|
<% end %>
|
5
5
|
|
@@ -23,6 +23,7 @@ module ActionDispatch
|
|
23
23
|
config.action_dispatch.use_authenticated_cookie_encryption = false
|
24
24
|
config.action_dispatch.use_cookies_with_metadata = false
|
25
25
|
config.action_dispatch.perform_deep_munge = true
|
26
|
+
config.action_dispatch.return_only_media_type_on_content_type = true
|
26
27
|
|
27
28
|
config.action_dispatch.default_headers = {
|
28
29
|
"X-Frame-Options" => "SAMEORIGIN",
|
@@ -43,6 +44,7 @@ module ActionDispatch
|
|
43
44
|
ActionDispatch::Request::Utils.perform_deep_munge = app.config.action_dispatch.perform_deep_munge
|
44
45
|
ActionDispatch::Response.default_charset = app.config.action_dispatch.default_charset || app.config.encoding
|
45
46
|
ActionDispatch::Response.default_headers = app.config.action_dispatch.default_headers
|
47
|
+
ActionDispatch::Response.return_only_media_type_on_content_type = app.config.action_dispatch.return_only_media_type_on_content_type
|
46
48
|
|
47
49
|
ActionDispatch::ExceptionWrapper.rescue_responses.merge!(config.action_dispatch.rescue_responses)
|
48
50
|
ActionDispatch::ExceptionWrapper.rescue_templates.merge!(config.action_dispatch.rescue_templates)
|
@@ -70,17 +70,17 @@ module ActionDispatch
|
|
70
70
|
ANCHOR_CHARACTERS_REGEX = %r{\A(\\A|\^)|(\\Z|\\z|\$)\Z}
|
71
71
|
OPTIONAL_FORMAT_REGEX = %r{(?:\(\.:format\)+|\.:format|/)\Z}
|
72
72
|
|
73
|
-
attr_reader :requirements, :defaults
|
74
|
-
|
75
|
-
attr_reader :required_defaults, :ast
|
73
|
+
attr_reader :requirements, :defaults, :to, :default_controller,
|
74
|
+
:default_action, :required_defaults, :ast, :scope_options
|
76
75
|
|
77
76
|
def self.build(scope, set, ast, controller, default_action, to, via, formatted, options_constraints, anchor, options)
|
78
77
|
options = scope[:options].merge(options) if scope[:options]
|
79
78
|
|
80
79
|
defaults = (scope[:defaults] || {}).dup
|
81
80
|
scope_constraints = scope[:constraints] || {}
|
81
|
+
scope_options = scope[:options] || {}
|
82
82
|
|
83
|
-
new set, ast, defaults, controller, default_action, scope[:module], to, formatted, scope_constraints, scope[:blocks] || [], via, options_constraints, anchor, options
|
83
|
+
new set, ast, defaults, controller, default_action, scope[:module], to, formatted, scope_constraints, scope_options, scope[:blocks] || [], via, options_constraints, anchor, options
|
84
84
|
end
|
85
85
|
|
86
86
|
def self.check_via(via)
|
@@ -111,7 +111,7 @@ module ActionDispatch
|
|
111
111
|
format != false && path !~ OPTIONAL_FORMAT_REGEX
|
112
112
|
end
|
113
113
|
|
114
|
-
def initialize(set, ast, defaults, controller, default_action, modyoule, to, formatted, scope_constraints, blocks, via, options_constraints, anchor, options)
|
114
|
+
def initialize(set, ast, defaults, controller, default_action, modyoule, to, formatted, scope_constraints, scope_options, blocks, via, options_constraints, anchor, options)
|
115
115
|
@defaults = defaults
|
116
116
|
@set = set
|
117
117
|
|
@@ -122,6 +122,7 @@ module ActionDispatch
|
|
122
122
|
@anchor = anchor
|
123
123
|
@via = via
|
124
124
|
@internal = options.delete(:internal)
|
125
|
+
@scope_options = scope_options
|
125
126
|
|
126
127
|
path_params = ast.find_all(&:symbol?).map(&:to_sym)
|
127
128
|
|
@@ -161,7 +162,7 @@ module ActionDispatch
|
|
161
162
|
|
162
163
|
def make_route(name, precedence)
|
163
164
|
Journey::Route.new(name, application, path, conditions, required_defaults,
|
164
|
-
defaults, request_method, precedence, @internal)
|
165
|
+
defaults, request_method, precedence, scope_options, @internal)
|
165
166
|
end
|
166
167
|
|
167
168
|
def application
|
@@ -39,6 +39,29 @@ module ActionDispatch
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
+
# driver_path can be configured as a proc. The webdrivers gem uses this
|
43
|
+
# proc to update web drivers. Running this proc early allows us to only
|
44
|
+
# update the webdriver once and avoid race conditions when using
|
45
|
+
# parallel tests.
|
46
|
+
def preload
|
47
|
+
case type
|
48
|
+
when :chrome
|
49
|
+
if ::Selenium::WebDriver::Service.respond_to? :driver_path=
|
50
|
+
::Selenium::WebDriver::Chrome::Service.driver_path.try(:call)
|
51
|
+
else
|
52
|
+
# Selenium <= v3.141.0
|
53
|
+
::Selenium::WebDriver::Chrome.driver_path
|
54
|
+
end
|
55
|
+
when :firefox
|
56
|
+
if ::Selenium::WebDriver::Service.respond_to? :driver_path=
|
57
|
+
::Selenium::WebDriver::Firefox::Service.driver_path.try(:call)
|
58
|
+
else
|
59
|
+
# Selenium <= v3.141.0
|
60
|
+
::Selenium::WebDriver::Firefox.driver_path
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
42
65
|
private
|
43
66
|
def headless_chrome_browser_options
|
44
67
|
capabilities.args << "--headless"
|
@@ -14,7 +14,7 @@ module ActionDispatch
|
|
14
14
|
include Rails::Dom::Testing::Assertions
|
15
15
|
|
16
16
|
def html_document
|
17
|
-
@html_document ||= if @response.
|
17
|
+
@html_document ||= if @response.media_type.to_s.end_with?("xml")
|
18
18
|
Nokogiri::XML::Document.parse(@response.body)
|
19
19
|
else
|
20
20
|
Nokogiri::HTML::Document.parse(@response.body)
|
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: 6.0.0.
|
4
|
+
version: 6.0.0.rc2
|
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-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 6.0.0.
|
19
|
+
version: 6.0.0.rc2
|
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: 6.0.0.
|
26
|
+
version: 6.0.0.rc2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,28 +92,28 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - '='
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 6.0.0.
|
95
|
+
version: 6.0.0.rc2
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - '='
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 6.0.0.
|
102
|
+
version: 6.0.0.rc2
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: activemodel
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - '='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 6.0.0.
|
109
|
+
version: 6.0.0.rc2
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - '='
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 6.0.0.
|
116
|
+
version: 6.0.0.rc2
|
117
117
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
118
118
|
testing MVC web applications. Works with any Rack-compatible server.
|
119
119
|
email: david@loudthinking.com
|
@@ -304,8 +304,8 @@ homepage: https://rubyonrails.org
|
|
304
304
|
licenses:
|
305
305
|
- MIT
|
306
306
|
metadata:
|
307
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.0.0.
|
308
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.0.0.
|
307
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.0.0.rc2/actionpack
|
308
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.0.0.rc2/actionpack/CHANGELOG.md
|
309
309
|
post_install_message:
|
310
310
|
rdoc_options: []
|
311
311
|
require_paths:
|