Skip to content

Commit 94e0ed0

Browse files
committed
Merge remote-tracking branch 'upstream/trunk' into dotnet-revisit-ignored-tests
2 parents f4e4da5 + 098b41b commit 94e0ed0

File tree

15 files changed

+46
-34
lines changed

15 files changed

+46
-34
lines changed

.github/workflows/bazel.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
name: ${{ inputs.cache-key }}
133133
manifest:
134134
crates: rust/Cargo.Bazel.lock
135-
rules_ruby~~ruby~ruby: ${{ inputs.os == 'windows' && 'false' || 'rb/.ruby-version' }}
135+
rules_ruby++ruby+ruby: ${{ inputs.os == 'windows' && 'false' || 'rb/.ruby-version' }}
136136
repository-cache: true
137137
- name: Setup Bazel without caching
138138
if: inputs.caching == false

MODULE.bazel

+6-5
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ ruby.bundle_fetch(
276276
"connection_pool-2.5.0": "233b92f8d38e038c1349ccea65dd3772727d669d6d2e71f9897c8bf5cd53ebfc",
277277
"crack-1.0.0": "c83aefdb428cdc7b66c7f287e488c796f055c0839e6e545fec2c7047743c4a49",
278278
"csv-3.3.2": "6ff0c135e65e485d1864dde6c1703b60d34cc9e19bed8452834a0b28a519bd4e",
279-
"curb-1.0.8": "e23ab9225fb2fc02c083e0588d5b918b5533f0d01cdd0aa70414829ba9e92962",
279+
"curb-1.0.9": "07e5b74a4836103ce186827528f76a22d3991a9b7c45f5c10ee18ee7b03feb0d",
280280
"date-3.4.1": "bf268e14ef7158009bfeaec40b5fa3c7271906e88b196d958a89d4b408abe64f",
281281
"date-3.4.1-java": "74740d914c65a922a15657c25ff0e203c16f1d0f7aa910a9ebed712afe9819c4",
282282
"debug-1.10.0": "11e28ca74875979e612444104f3972bd5ffb9e79179907d7ad46dba44bd2e7a4",
@@ -299,6 +299,7 @@ ruby.bundle_fetch(
299299
"json-2.10.1": "ddc88ad91a1baf3f0038c174f253af3b086d30dc74db17ca4259bbde982f94dc",
300300
"json-2.10.1-java": "de07233fb74113af2186eb9342f8207c9be0faf289a1e2623c9b0acb8b0b0ee1",
301301
"language_server-protocol-3.17.0.4": "c484626478664fd13482d8180947c50a8590484b1258b99b7aedb3b69df89669",
302+
"lint_roller-1.1.0": "2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87",
302303
"listen-3.9.0": "db9e4424e0e5834480385197c139cb6b0ae0ef28cc13310cfd1ca78377d59c67",
303304
"logger-1.6.6": "dd618d24e637715472732e7eed02e33cfbdf56deaad225edd0f1f89d38024017",
304305
"minitest-5.25.4": "9cf2cae25ac4dfc90c988ebc3b917f53c054978b673273da1bd20bcb0778f947",
@@ -321,25 +322,25 @@ ruby.bundle_fetch(
321322
"rdoc-6.12.0": "7d6f706e070bffa5d18a448f24076cbfb34923a99c1eab842aa18e6ca69f56e0",
322323
"regexp_parser-2.10.0": "cb6f0ddde88772cd64bff1dbbf68df66d376043fe2e66a9ef77fcb1b0c548c61",
323324
"reline-0.6.0": "57620375dcbe56ec09bac7192bfb7460c716bbf0054dc94345ecaa5438e539d2",
324-
"rexml-3.4.0": "efbea1efba7fa151158e0ee1e643525834da2d8eb4cf744aa68f6480bc9804b2",
325+
"rexml-3.4.1": "c74527a9a0a04b4ec31dbe0dc4ed6004b960af943d8db42e539edde3a871abca",
325326
"rspec-3.13.0": "d490914ac1d5a5a64a0e1400c1d54ddd2a501324d703b8cfe83f458337bab993",
326327
"rspec-core-3.13.3": "25136507f4f9cf2e8977a2851e64e438b4331646054e345998714108745cdfe4",
327328
"rspec-expectations-3.13.3": "0e6b5af59b900147698ea0ff80456c4f2e69cac4394fbd392fbd1ca561f66c58",
328329
"rspec-mocks-3.13.2": "2327335def0e1665325a9b617e3af9ae20272741d80ac550336309a7c59abdef",
329330
"rspec-support-3.13.2": "cea3a2463fd9b84b9dcc9685efd80ea701aa8f7b3decb3b3ce795ed67737dbec",
330-
"rubocop-1.71.2": "9a7b7501aac661a338ed7ff2a5eba78e581759e1f0d3c82362b2ca217ed3f97f",
331+
"rubocop-1.72.2": "0259a32d89fee60882bf4c4d8847e696357719c9db4971839da742bf053ae96b",
331332
"rubocop-ast-1.38.0": "4fdf6792fe443a9a18acb12dbc8225d0d64cd1654e41fedb30e79c18edbb26ae",
332333
"rubocop-capybara-2.21.0": "5d264efdd8b6c7081a3d4889decf1451a1cfaaec204d81534e236bc825b280ab",
333334
"rubocop-factory_bot-2.26.1": "8de13cd4edcee5ca800f255188167ecef8dbfc3d1fae9f15734e9d2e755392aa",
334-
"rubocop-performance-1.23.1": "f22f86a795f5e6a6180aac2c6fc172534b173a068d6ed3396d6460523e051b82",
335+
"rubocop-performance-1.24.0": "e5bd39ff3e368395b9af886927cc37f5892f43db4bd6c8526594352d5b4440b5",
335336
"rubocop-rake-0.6.0": "56b6f22189af4b33d4f4e490a555c09f1281b02f4d48c3a61f6e8fe5f401d8db",
336337
"rubocop-rspec-2.31.0": "2bae19388d78e1ceace44cd95fd34f3209f4ef20cac1b168d0a1325cbba3d672",
337338
"rubocop-rspec_rails-2.29.1": "4ae95abbe9ca5a9b6d8be14e50d230fb5b6ba033b05d4c0981b5b76fc44988e4",
338339
"ruby-progressbar-1.13.0": "80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33",
339340
"rubyzip-2.4.1": "8577c88edc1fde8935eb91064c5cb1aef9ad5494b940cf19c775ee833e075615",
340341
"securerandom-0.4.1": "cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1",
341342
"steep-1.5.3": "7c6302a4d5932d0a46176ebc79766e52b853c223a85525aa2f8911e345123b85",
342-
"stringio-3.1.2": "204f1828f85cdb39d57cac4abc6dc44b04505a223f131587f2e20ae3729ba131",
343+
"stringio-3.1.4": "7dd68f6f1a88610817c21f6d926dbf36e1fc585d3869fcd4a56c1f3210591d70",
343344
"strscan-3.1.2": "5529ff36c95fe752b8489f2e6c7f4f230fd9904e0b24fdc6e0833436c63ee2e3",
344345
"strscan-3.1.2-java": "4e9379df974b1af28d1bc1bc845ebb7e2bb21a7f9948ac99e1a8c5479881ecec",
345346
"terminal-table-3.0.2": "f951b6af5f3e00203fb290a669e0a85c5dd5b051b3b023392ccfd67ba5abae91",

rb/.rubocop.yml

+6
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ Metrics/PerceivedComplexity:
7575
- 'lib/selenium/webdriver/common/local_driver.rb'
7676
- 'lib/selenium/webdriver/common/logger.rb'
7777

78+
Naming/BlockForwarding:
79+
EnforcedStyle: explicit
80+
7881
Naming/FileName:
7982
Exclude:
8083
- 'lib/selenium-webdriver.rb'
@@ -148,3 +151,6 @@ Lint/Debugger:
148151
DebuggerMethods:
149152
Capybara:
150153
- save_screenshot: ~
154+
155+
Lint/UselessConstantScoping:
156+
Enabled: false

rb/CHANGES

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
4.29.1 (2025-02-22)
2+
=========================
3+
* [rb] Fix "no anonymous block parameter" in ruby 3.1 (#15315)
4+
15
4.29.0 (2025-02-17)
26
=========================
37
* Add CDP for Chrome 133 and remove 130

rb/Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Dir["#{__dir__}/*.gemspec"].each do |spec|
55
gemspec name: File.basename(spec, '.gemspec')
66
end
77

8+
# ActiveSupport 8.x requires Ruby 3.2+ (dependency of Steep)
9+
gem 'activesupport', '~> 7.0', require: false, platforms: %i[mri mingw x64_mingw]
810
gem 'curb', '~> 1.0.5', require: false, platforms: %i[mri mingw x64_mingw]
911
gem 'debug', '~> 1.7', require: false, platforms: %i[mri mingw x64_mingw]
1012
gem 'steep', '~> 1.5.0', require: false, platforms: %i[mri mingw x64_mingw]

rb/Gemfile.lock

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ PATH
1313
GEM
1414
remote: https://rubygems.org/
1515
specs:
16-
activesupport (8.0.1)
16+
activesupport (7.2.2.1)
1717
base64
1818
benchmark (>= 0.3)
1919
bigdecimal
@@ -25,7 +25,6 @@ GEM
2525
minitest (>= 5.1)
2626
securerandom (>= 0.3)
2727
tzinfo (~> 2.0, >= 2.0.5)
28-
uri (>= 0.13.1)
2928
addressable (2.8.7)
3029
public_suffix (>= 2.0.2, < 7.0)
3130
ast (2.4.2)
@@ -176,7 +175,6 @@ GEM
176175
tzinfo (2.0.6)
177176
concurrent-ruby (~> 1.0)
178177
unicode-display_width (2.6.0)
179-
uri (1.0.2)
180178
webmock (3.25.0)
181179
addressable (>= 2.8.0)
182180
crack (>= 0.3.2)
@@ -200,6 +198,7 @@ PLATFORMS
200198
x86_64-linux
201199

202200
DEPENDENCIES
201+
activesupport (~> 7.0)
203202
curb (~> 1.0.5)
204203
debug (~> 1.7)
205204
git (~> 1.19)

rb/lib/selenium/server.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,15 @@ def available_assets
122122
end
123123
end
124124

125-
def net_http_start(address, &)
125+
def net_http_start(address, &block)
126126
http_proxy = ENV.fetch('http_proxy', nil) || ENV.fetch('HTTP_PROXY', nil)
127127
if http_proxy
128128
http_proxy = "http://#{http_proxy}" unless http_proxy.start_with?('http://')
129129
uri = URI.parse(http_proxy)
130130

131-
Net::HTTP.start(address, nil, uri.host, uri.port, &)
131+
Net::HTTP.start(address, nil, uri.host, uri.port, &block)
132132
else
133-
Net::HTTP.start(address, use_ssl: true, &)
133+
Net::HTTP.start(address, use_ssl: true, &block)
134134
end
135135
end
136136

rb/lib/selenium/webdriver/bidi.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def callbacks
4343
@ws.callbacks
4444
end
4545

46-
def add_callback(event, &)
47-
@ws.add_callback(event, &)
46+
def add_callback(event, &block)
47+
@ws.add_callback(event, &block)
4848
end
4949

5050
def remove_callback(event, id)

rb/lib/selenium/webdriver/bidi/log_inspector.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def on_javascript_exception(&block)
7979
end
8080
end
8181

82-
def on_log(filter_by = nil, &)
82+
def on_log(filter_by = nil, &block)
8383
unless filter_by.nil?
8484
check_valid_filter(filter_by)
8585

@@ -89,14 +89,14 @@ def on_log(filter_by = nil, &)
8989
return
9090
end
9191

92-
on(:entry_added, &)
92+
on(:entry_added, &block)
9393
end
9494

9595
private
9696

97-
def on(event, &)
97+
def on(event, &block)
9898
event = EVENTS[event] if event.is_a?(Symbol)
99-
@bidi.add_callback("log.#{event}", &)
99+
@bidi.add_callback("log.#{event}", &block)
100100
end
101101

102102
def check_valid_filter(filter_by)

rb/lib/selenium/webdriver/bidi/network.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ def set_cache_behavior(behavior, *contexts)
128128
@bidi.send_cmd('network.setCacheBehavior', cacheBehavior: behavior, contexts: contexts)
129129
end
130130

131-
def on(event, &)
131+
def on(event, &block)
132132
event = EVENTS[event] if event.is_a?(Symbol)
133-
@bidi.add_callback(event, &)
133+
@bidi.add_callback(event, &block)
134134
@bidi.session.subscribe(event)
135135
end
136136
end # Network

rb/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module HasNetworkInterception
5959
# @yieldparam [Proc] continue block which proceeds with the request and optionally yields response
6060
#
6161

62-
def intercept(&)
62+
def intercept(&block)
6363
if browser == :firefox
6464
WebDriver.logger.deprecate(
6565
'Driver#intercept on Firefox',
@@ -68,7 +68,7 @@ def intercept(&)
6868
)
6969
end
7070
@interceptor ||= DevTools::NetworkInterceptor.new(devtools)
71-
@interceptor.intercept(&)
71+
@interceptor.intercept(&block)
7272
end
7373
end # HasNetworkInterception
7474
end # DriverExtensions

rb/lib/selenium/webdriver/common/network.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,25 @@ def add_authentication_handler(username = nil, password = nil, *filter, pattern_
6262
)
6363
end
6464

65-
def add_request_handler(*filter, pattern_type: nil, &)
65+
def add_request_handler(*filter, pattern_type: nil, &block)
6666
add_handler(
6767
:before_request,
6868
BiDi::Network::PHASES[:before_request],
6969
BiDi::InterceptedRequest,
7070
filter,
7171
pattern_type: pattern_type,
72-
&
72+
&block
7373
)
7474
end
7575

76-
def add_response_handler(*filter, pattern_type: nil, &)
76+
def add_response_handler(*filter, pattern_type: nil, &block)
7777
add_handler(
7878
:response_started,
7979
BiDi::Network::PHASES[:response_started],
8080
BiDi::InterceptedResponse,
8181
filter,
8282
pattern_type: pattern_type,
83-
&
83+
&block
8484
)
8585
end
8686

rb/lib/selenium/webdriver/common/script.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ def initialize(bridge)
2525
end
2626

2727
# @return [int] id of the handler
28-
def add_console_message_handler(&)
29-
@log_handler.add_message_handler('console', &)
28+
def add_console_message_handler(&block)
29+
@log_handler.add_message_handler('console', &block)
3030
end
3131

3232
# @return [int] id of the handler
33-
def add_javascript_error_handler(&)
34-
@log_handler.add_message_handler('javascript', &)
33+
def add_javascript_error_handler(&block)
34+
@log_handler.add_message_handler('javascript', &block)
3535
end
3636

3737
# @param [int] id of the handler previously added

rb/lib/selenium/webdriver/remote/bridge.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ class << self
3535
attr_reader :extra_commands
3636
attr_writer :element_class, :locator_converter
3737

38-
def add_command(name, verb, url, &)
38+
def add_command(name, verb, url, &block)
3939
@extra_commands ||= {}
4040
@extra_commands[name] = [verb, url]
41-
define_method(name, &)
41+
define_method(name, &block)
4242
end
4343

4444
def locator_converter

rb/lib/selenium/webdriver/support/guards.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def initialize(example, bug_tracker: '', conditions: nil)
3737
@messages = {}
3838
end
3939

40-
def add_condition(name, condition = nil, &)
41-
@guard_conditions << GuardCondition.new(name, condition, &)
40+
def add_condition(name, condition = nil, &block)
41+
@guard_conditions << GuardCondition.new(name, condition, &block)
4242
end
4343

4444
def add_message(name, message)

0 commit comments

Comments
 (0)