diff --git a/MODULE.bazel b/MODULE.bazel index a0702cf771ad8..730afdda9f42a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -277,90 +277,93 @@ ruby.bundle_fetch( "//:rb/selenium-webdriver.gemspec", ], gem_checksums = { - "activesupport-7.2.2.2": "c54e84bb3d9027f1f372fb8f68203538fcfe0d5ff42801774c03974daa15bef0", - "addressable-2.8.7": "462986537cf3735ab5f3c0f557f14155d778f4b43ea4f485a9deb9c8f7c58232", + "activesupport-7.2.3": "5675c9770dac93e371412684249f9dc3c8cec104efd0624362a520ae685c7b10", + "addressable-2.8.8": "7c13b8f9536cf6364c03b9d417c19986019e28f7c00ac8132da4eb0fe393b057", "ast-2.4.3": "954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383", "base64-0.3.0": "27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b", - "benchmark-0.4.1": "d4ef40037bba27f03b28013e219b950b82bace296549ec15a78016552f8d2cce", - "bigdecimal-3.2.3": "ffd11d1ac67a0d3b2f44aec0a6487210b3f813f363dd11f1fcccf5ba00da4e1b", - "bigdecimal-3.2.3-java": "7293e87efd050feac875bff1c62335dd5e8ce65d86ad22d7a4a3b5ed4f0ab48d", + "benchmark-0.5.0": "465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c", + "bigdecimal-3.3.1": "eaa01e228be54c4f9f53bf3cc34fe3d5e845c31963e7fcc5bedb05a4e7d52218", + "bigdecimal-3.3.1-java": "ed496e9c075dd501d58a519707bf704dba82a0cef658c719c929789551ec7d85", "concurrent-ruby-1.3.5": "813b3e37aca6df2a21a3b9f1d497f8cbab24a2b94cab325bffe65ee0f6cbebc6", - "connection_pool-2.5.4": "e9e1922327416091f3f6542f5f4446c2a20745276b9aa796dd0bb2fd0ea1e70a", - "crack-1.0.0": "c83aefdb428cdc7b66c7f287e488c796f055c0839e6e545fec2c7047743c4a49", + "connection_pool-3.0.2": "33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a", + "crack-1.0.1": "ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e", "csv-3.3.5": "6e5134ac3383ef728b7f02725d9872934f523cb40b961479f69cf3afa6c8e73f", "curb-1.0.9": "07e5b74a4836103ce186827528f76a22d3991a9b7c45f5c10ee18ee7b03feb0d", - "date-3.4.1": "bf268e14ef7158009bfeaec40b5fa3c7271906e88b196d958a89d4b408abe64f", - "date-3.4.1-java": "74740d914c65a922a15657c25ff0e203c16f1d0f7aa910a9ebed712afe9819c4", + "date-3.5.0": "5e74fd6c04b0e65d97ad4f3bb5cb2d8efb37f386cc848f46310b4593ffc46ee5", + "date-3.5.0-java": "d6876651299185b935e1b834a353e3a1d1db054be478967e8104e30a9a8f1127", "debug-1.11.0": "1425db64cfa0130c952684e3dc974985be201dd62899bf4bbe3f8b5d6cf1aef2", "diff-lcs-1.6.2": "9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962", "drb-2.2.3": "0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373", - "erb-5.0.2": "d30f258143d4300fb4ecf430042ac12970c9bb4b33c974a545b8f58c1ec26c0f", - "erb-5.0.2-java": "d000d963afebc166ec7f2499b2b3198d526790cf962c37514d7a85843a60423c", + "erb-6.0.0": "2730893f9d8c9733f16cab315a4e4b71c1afa9cabc1a1e7ad1403feba8f52579", + "erb-6.0.0-java": "6537c84b596d889c4e20d87da41b38664e79bfe0af812ba7ea2a82a7ebf0ed62", "ffi-1.17.2": "297235842e5947cc3036ebe64077584bff583cd7a4e94e9a02fdec399ef46da6", "ffi-1.17.2-java": "94c8516d7c97b21915497b994e41f69e7e8e21d5fc085c498b68e52044e191ec", "ffi-1.17.2-x64-mingw-ucrt": "15d2da54ee578657a333a6059ed16eaba1cbd794ceecd15944825b65c8381ac0", "ffi-1.17.2-x86_64-darwin": "981f2d4e32ea03712beb26e55e972797c2c5a7b0257955d8667ba58f2da6440e", "ffi-1.17.2-x86_64-linux-gnu": "05d2026fc9dbb7cfd21a5934559f16293815b7ce0314846fee2ac8efbdb823ea", - "fileutils-1.7.3": "57271e854b694a87755d76f836f5c57b2c9538ebbaf4b2154bb66addf15eb5da", + "fileutils-1.8.0": "8c6b1df54e2540bdb2f39258f08af78853aa70bad52b4d394bbc6424593c6e02", "git-1.19.1": "b0a422d9f6517353c48a330d6114de4db9e0c82dbe7202964a1d9f1fbc827d70", "hashdiff-1.2.1": "9c079dbc513dfc8833ab59c0c2d8f230fa28499cc5efb4b8dd276cf931457cd1", "i18n-1.14.7": "ceba573f8138ff2c0915427f1fc5bdf4aa3ab8ae88c8ce255eb3ecf0a11a5d0f", "io-console-0.8.1": "1e15440a6b2f67b6ea496df7c474ed62c860ad11237f29b3bd187f054b925fcb", "io-console-0.8.1-java": "9457a61a7b23aab11e9e9ff67f71ae81d7f1a6a2e582bb5d65d754cbb546c06f", - "irb-1.15.2": "222f32952e278da34b58ffe45e8634bf4afc2dc7aa9da23fed67e581aa50fdba", + "irb-1.15.3": "4349edff1efa7ff7bfd34cb9df74a133a588ba88c2718098b3b4468b81184aaa", "jar-dependencies-0.5.5": "2972b9fcba4b014e6446a84b5c09674a3e8648b95b71768e729f0e8e40568059", - "json-2.15.1": "b1c1b2e7c116eb1903e0ce0c374783e6ead8747a0f9eca132d274018ebb80b89", - "json-2.15.1-java": "a6185eebe724a6937f60729e4998276d6b3de3ecc35be34f8e47c1eb40903ecf", + "json-2.17.1": "e0e4824541336a44915436f53e7ea74c687314fb8f88080fa1456f6a34ead92e", + "json-2.17.1-java": "4e570fb6f3f7888c8de7c121b6328a6971414601cb7e1d4ab8f28da42e3ef524", "language_server-protocol-3.17.0.5": "fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc", "lint_roller-1.1.0": "2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87", "listen-3.9.0": "db9e4424e0e5834480385197c139cb6b0ae0ef28cc13310cfd1ca78377d59c67", "logger-1.7.0": "196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203", - "minitest-5.25.5": "391b6c6cb43a4802bfb7c93af1ebe2ac66a210293f4a3fb7db36f2fc7dc2c756", + "minitest-5.26.2": "f021118a6185b9ba9f5af71f2ba103ad770c75afde9f2ab8da512677c550cde3", + "mutex_m-0.3.0": "cfcb04ac16b69c4813777022fdceda24e9f798e48092a2b817eb4c0a782b0751", "parallel-1.27.0": "4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130", - "parser-3.3.9.0": "94d6929354b1a6e3e1f89d79d4d302cc8f5aa814431a6c9c7e0623335d7687f2", - "pp-0.6.2": "947ec3120c6f92195f8ee8aa25a7b2c5297bb106d83b41baa02983686577b6ff", + "parser-3.3.10.0": "ce3587fa5cc55a88c4ba5b2b37621b3329aadf5728f9eafa36bbd121462aabd6", + "pp-0.6.3": "2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6", "prettyprint-0.2.0": "2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193", "prism-1.6.0": "bfc0281a81718c4872346bc858dc84abd3a60cae78336c65ad35c8fbff641c6b", "psych-5.2.6": "814328aa5dcb6d604d32126a20bc1cbcf05521a5b49dbb1a8b30a07e580f316e", "psych-5.2.6-java": "0a5f65d47ed1ae3475d062b254e7b2035a259eac578038016d62172dd4cfbd91", - "public_suffix-6.0.2": "bfa7cd5108066f8c9602e0d6d4114999a5df5839a63149d3e8b0f9c1d3558394", + "public_suffix-7.0.0": "f7090b5beb0e56f9f10d79eed4d5fbe551b3b425da65877e075dad47a6a1b095", "racc-1.8.1": "4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f", "racc-1.8.1-java": "54f2e6d1e1b91c154013277d986f52a90e5ececbe91465d29172e49342732b98", - "rack-2.2.17": "5fe02a1ca80d6fb2271dba00985ee2962d6f5620b6f46dfed89f5301ac4699dd", + "rack-2.2.21": "14e2f72f0765455fe424ff601588ac5ce84e95784f59e99251ffe1527152f739", "rainbow-3.1.1": "039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a", - "rake-13.3.0": "96f5092d786ff412c62fde76f793cc0541bd84d2eb579caa529aa8a059934493", + "rake-13.3.1": "8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c", "rb-fsevent-0.11.2": "43900b972e7301d6570f64b850a5aa67833ee7d87b458ee92805d56b7318aefe", "rb-inotify-0.11.1": "a0a700441239b0ff18eb65e3866236cd78613d6b9f78fea1f9ac47a85e47be6e", "rbs-3.9.5": "eabaaf60aee84e38cbf94839c6e1b9cd145c7295fc3cc0e88c92e4069b1119b0", "rchardet-1.10.0": "d5ea2ed61a720a220f1914778208e718a0c7ed2a484b6d357ba695aa7001390f", - "rdoc-6.14.2": "9fdd44df130f856ae70cc9a264dfd659b9b40de369b16581f4ab746e42439226", + "rdoc-6.16.1": "71357cc208e6da77ba0c4494e01ae870dd18b437c7c7d801dd73ee2f340b9f5c", "regexp_parser-2.11.3": "ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4", - "reline-0.6.2": "1dad26a6008872d59c8e05244b119347c9f2ddaf4a53dce97856cd5f30a02846", + "reline-0.6.3": "1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835", "rexml-3.4.4": "19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142", - "rspec-3.13.1": "b9f9a58fa915b8d94a1d6b3195fe6dd28c4c34836a6097015142c4a9ace72140", - "rspec-core-3.13.5": "ab3f682897c6131c67f9a17cfee5022a597f283aebe654d329a565f9937a4fa3", + "rspec-3.13.2": "206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587", + "rspec-core-3.13.6": "a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d", "rspec-expectations-3.13.5": "33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836", - "rspec-mocks-3.13.5": "e4338a6f285ada9fe56f5893f5457783af8194f5d08884d17a87321d5195ea81", + "rspec-mocks-3.13.7": "0979034e64b1d7a838aaaddf12bf065ea4dc40ef3d4c39f01f93ae2c66c62b1c", "rspec-support-3.13.6": "2e8de3702427eab064c9352fe74488cc12a1bfae887ad8b91cba480ec9f8afb2", - "rubocop-1.81.1": "352a9a6f314a4312f6c305f1f72bc466254d221c95445cd49e1b65d1f9411635", - "rubocop-ast-1.47.1": "592682017855408b046a8190689490763aecea175238232b1b526826349d01ae", - "rubocop-performance-1.26.0": "7bb0d9d9fb2ea122bf6f9a596dd7cf9dc93ab4950923d26c4ae4f328cef71ca9", + "rubocop-1.81.7": "6fb5cc298c731691e2a414fe0041a13eb1beed7bab23aec131da1bcc527af094", + "rubocop-ast-1.48.0": "22df9bbf3f7a6eccde0fad54e68547ae1e2a704bf8719e7c83813a99c05d2e76", + "rubocop-performance-1.26.1": "cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834", "rubocop-rake-0.7.1": "3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d", - "rubocop-rspec-3.7.0": "b7b214da112034db9c6d00f2d811a354847e870f7b6ed2482b29649c3d42058f", + "rubocop-rspec-3.8.0": "28440dccb3f223a9938ca1f946bd3438275b8c6c156dab909e2cb8bc424cab33", "ruby-progressbar-1.13.0": "80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33", - "rubyzip-3.1.1": "54c97dd156437018c6914d76df52d10560a3b7784de36b1551e4a0709f958273", + "rubyzip-3.2.2": "c0ed99385f0625415c8f05bcae33fe649ed2952894a95ff8b08f26ca57ea5b3c", "securerandom-0.4.1": "cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1", - "steep-1.5.3": "7c6302a4d5932d0a46176ebc79766e52b853c223a85525aa2f8911e345123b85", - "stringio-3.1.7": "5b78b7cb242a315fb4fca61a8255d62ec438f58da2b90be66048546ade4507fa", + "steep-1.10.0": "1b295b55f9aaff1b8d3ee42453ee55bc2a1078fda0268f288edb2dc014f4d7d1", + "stringio-3.1.9": "c111af13d3a73eab96a3bc2655ecf93788d13d28cb8e25c1dcbff89ace885121", "strscan-3.1.5": "f8413b90ea9395a69609a4414a8c88551bcda64337e234272c24fcd4c83e5947", "strscan-3.1.5-java": "84805eaad025f64854376608a6dbd49d4a22740ec3f21ba880434a6641621f1e", "terminal-table-3.0.2": "f951b6af5f3e00203fb290a669e0a85c5dd5b051b3b023392ccfd67ba5abae91", + "tsort-0.2.0": "9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f", "tzinfo-2.0.6": "8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b", "unicode-display_width-2.6.0": "12279874bba6d5e4d2728cef814b19197dbb10d7a7837a869bab65da943b7f5a", - "webmock-3.25.1": "ab9d5d9353bcbe6322c83e1c60a7103988efc7b67cd72ffb9012629c3d396323", - "webrick-1.9.1": "b42d3c94f166f3fb73d87e9b359def9b5836c426fc8beacf38f2184a21b2a989", + "uri-1.1.1": "379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6", + "webmock-3.26.1": "4f696fb57c90a827c20aadb2d4f9058bbff10f7f043bd0d4c3f58791143b1cd7", + "webrick-1.9.2": "beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131", "websocket-1.2.11": "b7e7a74e2410b5e85c25858b26b3322f29161e300935f70a0e0d3c35e0462737", - "yard-0.9.37": "a6e910399e78e613f80ba9add9ba7c394b1a935f083cccbef82903a3d2a26992", + "yard-0.9.38": "721fb82afb10532aa49860655f6cc2eaa7130889df291b052e1e6b268283010f", }, gemfile = "//:rb/Gemfile", gemfile_lock = "//:rb/Gemfile.lock", diff --git a/rb/Gemfile b/rb/Gemfile index 5c2c1d11f5954..dab19830e8a0c 100644 --- a/rb/Gemfile +++ b/rb/Gemfile @@ -9,4 +9,4 @@ end gem 'activesupport', '~> 7.0', require: false, platforms: %i[mri mingw x64_mingw] gem 'curb', '~> 1.0.5', require: false, platforms: %i[mri mingw x64_mingw] gem 'debug', '~> 1.7', require: false, platforms: %i[mri mingw x64_mingw] -gem 'steep', '~> 1.5.0', require: false, platforms: %i[mri mingw x64_mingw] +gem 'steep', '~> 1.10.0', require: false, platforms: %i[mri mingw x64_mingw] diff --git a/rb/Gemfile.lock b/rb/Gemfile.lock index 5ce3393ef37de..4fb1d6a7c8d0e 100644 --- a/rb/Gemfile.lock +++ b/rb/Gemfile.lock @@ -76,6 +76,7 @@ GEM rb-inotify (~> 0.9, >= 0.9.10) logger (1.7.0) minitest (5.26.2) + mutex_m (0.3.0) parallel (1.27.0) parser (3.3.10.0) ast (~> 2.4.1) @@ -150,21 +151,23 @@ GEM ruby-progressbar (1.13.0) rubyzip (3.2.2) securerandom (0.4.1) - steep (1.5.3) + steep (1.10.0) activesupport (>= 5.1) concurrent-ruby (>= 1.1.10) csv (>= 3.0.9) fileutils (>= 1.1.0) json (>= 2.1.0) - language_server-protocol (>= 3.15, < 4.0) + language_server-protocol (>= 3.17.0.4, < 4.0) listen (~> 3.0) logger (>= 1.3.0) + mutex_m (>= 0.3.0) parser (>= 3.1) rainbow (>= 2.2.2, < 4.0) - rbs (>= 3.1.0) + rbs (~> 3.9) securerandom (>= 0.1) strscan (>= 1.0.0) - terminal-table (>= 2, < 4) + terminal-table (>= 2, < 5) + uri (>= 0.12.0) stringio (3.1.9) strscan (3.1.5) strscan (3.1.5-java) @@ -174,6 +177,7 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.6.0) + uri (1.1.1) webmock (3.26.1) addressable (>= 2.8.0) crack (>= 0.3.2) @@ -210,7 +214,7 @@ DEPENDENCIES rubocop-rspec (~> 3.5) selenium-devtools! selenium-webdriver! - steep (~> 1.5.0) + steep (~> 1.10.0) webmock (~> 3.5) webrick (~> 1.7) yard (~> 0.9.11, >= 0.9.36) diff --git a/rb/Rakefile b/rb/Rakefile index 5a2a6282a7e45..d620034169849 100644 --- a/rb/Rakefile +++ b/rb/Rakefile @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'rspec/core/rake_task' +require 'steep/rake_task' desc 'Setup everything to run tests in RubyMine' task :update do @@ -23,3 +24,7 @@ desc 'Run all integration tests in chrome' task :spec do system 'bazel test --test_size_filters large //rb/...' end + +Steep::RakeTask.new do |t| + t.check.severity_level = :error # Only output errors, hide warnings +end diff --git a/rb/Steepfile b/rb/Steepfile index f12a1053cc887..f9a37b17c1ac2 100644 --- a/rb/Steepfile +++ b/rb/Steepfile @@ -4,8 +4,13 @@ target :lib do signature 'sig', '.gem_rbs_collection/rubyzip' # Signature directory check 'lib' # Directory name - # Total amount of errors ignore 66 in 31 files + + # Total amount of errors ignore 64 in 29 files ignore( + # Ignore all files in the bidi directory until we decide the implementation + 'lib/selenium/webdriver/bidi/**/*.rb', + # Ignore all spec files + 'spec/**/*.rb', # Ignore line 166 due to UDP RBS issue 'lib/selenium/webdriver/common/platform.rb', # Ignore due to webmock gem not having RBS signatures @@ -37,9 +42,7 @@ target :lib do 'lib/selenium/webdriver/common/child_process.rb', # Ignore due to Net::HTTP not being found on line 49 'lib/selenium/webdriver/chromium/driver.rb', - # Ignore due to error on line 37 with include? - 'lib/selenium/webdriver/support/guards/guard_condition.rb', - # Ignore due to positional argument error on line 69 + # Ignore due to positional argument error with TCPServer rescue on line 69 'lib/selenium/webdriver/common/socket_lock.rb', # Ignore due to is_a? bot error on line 70 'lib/selenium/webdriver/remote/driver.rb', @@ -49,8 +52,6 @@ target :lib do 'lib/selenium/webdriver/chromium/features.rb', # Ignore due to line 59 with the same URI & Net::HTTP issue 'lib/selenium/webdriver/firefox/driver.rb', - # Ignore due to line 27 with overloading issue - 'lib/selenium/webdriver/bidi/log/console_log_entry.rb', # Ignore due to line 89 with overloading issue 'lib/selenium/webdriver.rb', # Ignore due to line 37 with overloading issue @@ -59,12 +60,16 @@ target :lib do 'lib/selenium/webdriver/common/wait.rb', # Kwargs issue on line 74 'lib/selenium/webdriver/common/driver.rb', - # issue with the Zipper RBS library on line 54 - 'lib/selenium/webdriver/firefox/extension.rb', - # Ignored due to return of last match in line 57 and 59 + # Ignore due to Regexp.last_match(1) possibly returning nil on lines 57-59 'lib/selenium/webdriver/firefox/profiles_ini.rb', # Ignored due to error on line 100 of response being nillable - 'lib/selenium/webdriver/remote/http/default.rb' + 'lib/selenium/webdriver/remote/http/default.rb', + # Ignore due to Hash.new block type inference issues + 'lib/selenium/webdriver/common/file_reaper.rb', + # Ignore due to complex nil handling with && operator + 'lib/selenium/webdriver/common/manager.rb', + # Ignore due to def_delegators not being understood by Steep + 'lib/selenium/webdriver/common/network.rb' ) # Standard libraries used in the project diff --git a/rb/rbs_collection.lock.yaml b/rb/rbs_collection.lock.yaml index ce3878d164f4f..621140ca70026 100644 --- a/rb/rbs_collection.lock.yaml +++ b/rb/rbs_collection.lock.yaml @@ -25,6 +25,22 @@ gems: version: '0' source: type: stdlib +- name: diff-lcs + version: '1.5' + source: + type: git + name: ruby/gem_rbs_collection + revision: a5024cf78a908060c85ab750892d5545c409353b + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: digest + version: '0' + source: + type: stdlib +- name: erb + version: '0' + source: + type: stdlib - name: fileutils version: '0' source: @@ -49,6 +65,10 @@ gems: version: '0' source: type: stdlib +- name: openssl + version: '0' + source: + type: stdlib - name: optparse version: '0' source: @@ -69,6 +89,10 @@ gems: revision: 01361bb0fd6e2f3e2da2b11a733ffc938b9047c4 remote: https://github.com/ruby/gem_rbs_collection.git repo_dir: gems +- name: prism + version: 1.6.0 + source: + type: rubygems - name: rack version: '2.2' source: @@ -121,6 +145,18 @@ gems: revision: 01361bb0fd6e2f3e2da2b11a733ffc938b9047c4 remote: https://github.com/ruby/gem_rbs_collection.git repo_dir: gems +- name: singleton + version: '0' + source: + type: stdlib +- name: socket + version: '0' + source: + type: stdlib +- name: stringio + version: '0' + source: + type: stdlib - name: tempfile version: '0' source: @@ -129,6 +165,18 @@ gems: version: '0' source: type: stdlib +- name: webmock + version: '3.19' + source: + type: git + name: ruby/gem_rbs_collection + revision: a5024cf78a908060c85ab750892d5545c409353b + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: webrick + version: 1.9.2 + source: + type: rubygems - name: yard version: '0.9' source: diff --git a/rb/sig/gems/rubyzip/zip.rbs b/rb/sig/gems/rubyzip/zip.rbs new file mode 100644 index 0000000000000..26bf8a77c81b2 --- /dev/null +++ b/rb/sig/gems/rubyzip/zip.rbs @@ -0,0 +1,16 @@ +# Type signatures for rubyzip gem + +module Zip + VERSION: String + + class File + def self.open: (String path) { (File) -> void } -> void + + def each: () { (Entry) -> void } -> void + def extract: (Entry entry, String dest, ?destination_directory: String?) -> void + end + + class Entry + attr_reader name: String + end +end diff --git a/rb/sig/lib/selenium/webdriver/bidi/browser.rbs b/rb/sig/lib/selenium/webdriver/bidi/browser.rbs index a2e51e3d21004..69dca9259324f 100644 --- a/rb/sig/lib/selenium/webdriver/bidi/browser.rbs +++ b/rb/sig/lib/selenium/webdriver/bidi/browser.rbs @@ -2,7 +2,18 @@ module Selenium module WebDriver class BiDi class Browser - Window: Selenium::WebDriver::BiDi::Browser::Window + class Window + attr_accessor handle: String + attr_accessor active: bool + attr_accessor height: Integer + attr_accessor width: Integer + attr_accessor x: Integer + attr_accessor y: Integer + attr_accessor state: String + + def initialize: (handle: String, active: bool, height: Integer, width: Integer, x: Integer, y: Integer, state: String) -> void + def active?: () -> bool + end @bidi: BiDi @@ -13,6 +24,8 @@ module Selenium def user_contexts: () -> Array[Hash[String, String]] def remove_user_context: (String user_context) -> Hash[nil, nil] + + def windows: () -> Array[Window] end end end diff --git a/rb/sig/lib/selenium/webdriver/bidi/browsing_context.rbs b/rb/sig/lib/selenium/webdriver/bidi/browsing_context.rbs index 6179da3ce8fe7..6be2f44fe9dd7 100644 --- a/rb/sig/lib/selenium/webdriver/bidi/browsing_context.rbs +++ b/rb/sig/lib/selenium/webdriver/bidi/browsing_context.rbs @@ -12,15 +12,15 @@ module Selenium def activate: (String? context_id) -> Hash[nil, nil] - def navigate: (String url, String? context_id) -> void + def navigate: (String url, ?context_id: String?) -> void def set_viewport: (String context_id, Integer width, Integer height, Float device_pixel_ratio) -> Hash[nil, nil] - def traverse_history: (Integer delta, String? context_id) -> void + def traverse_history: (Integer delta, ?context_id: String?) -> void - def reload: (String? context_id, ?ignore_cache: bool) -> void + def reload: (?context_id: String?, ?ignore_cache: bool) -> void - def close: (String? context_id) -> void + def close: (?context_id: String?) -> void def create: (?type: Symbol | String | nil, ?context_id: String | nil) -> String end diff --git a/rb/sig/lib/selenium/webdriver/bidi/network.rbs b/rb/sig/lib/selenium/webdriver/bidi/network.rbs index bc286a14b245d..6d84a77724e2d 100644 --- a/rb/sig/lib/selenium/webdriver/bidi/network.rbs +++ b/rb/sig/lib/selenium/webdriver/bidi/network.rbs @@ -10,7 +10,7 @@ module Selenium def initialize: (BiDi bidi) -> void - def add_intercept: (?phases: Array[String], ?contexts: BrowsingContext?, ?url_patterns: String | Array[String]?) -> Hash[String, String] + def add_intercept: (?phases: Array[String], ?contexts: BrowsingContext?, ?url_patterns: String | Array[String]?, ?pattern_type: (Symbol | nil)) -> Hash[String, String] def cancel_auth: -> Hash[nil, nil] @@ -30,7 +30,7 @@ module Selenium def set_cache_behavior: (String behavior, Array[BrowsingContext]) -> Hash[nil, nil] - def on: (Symbol event) { (?) -> untyped } -> Hash[nil, nil] + def on: (Symbol event) { (?) -> untyped } -> Integer end end end diff --git a/rb/sig/lib/selenium/webdriver/bidi/network/intercepted_request.rbs b/rb/sig/lib/selenium/webdriver/bidi/network/intercepted_request.rbs index ad226a1922efa..92d82800760bd 100644 --- a/rb/sig/lib/selenium/webdriver/bidi/network/intercepted_request.rbs +++ b/rb/sig/lib/selenium/webdriver/bidi/network/intercepted_request.rbs @@ -2,21 +2,21 @@ module Selenium module WebDriver class BiDi class InterceptedRequest < InterceptedItem - @method: String? + @method: (String | nil) - @url: String? + @url: (String | nil) - @body: Hash[untyped, untyped]? + @body: (Hash[untyped, untyped] | nil) @headers: Hash[untyped, untyped]? @cookies: Hash[untyped, untyped]? - attr_accessor method: String + attr_accessor method: (String | nil) - attr_accessor url: String + attr_accessor url: (String | nil) - attr_reader body: Hash[untyped, untyped] + attr_reader body: (Hash[untyped, untyped] | nil) def initialize: (Network network, Hash[untyped, untyped] request) -> void diff --git a/rb/sig/lib/selenium/webdriver/bidi/network/intercepted_response.rbs b/rb/sig/lib/selenium/webdriver/bidi/network/intercepted_response.rbs index f087452867b7b..9624d5225ad0d 100644 --- a/rb/sig/lib/selenium/webdriver/bidi/network/intercepted_response.rbs +++ b/rb/sig/lib/selenium/webdriver/bidi/network/intercepted_response.rbs @@ -5,14 +5,14 @@ module Selenium @body: untyped @cookies: Hash[Symbol, String | Integer]? - @reason: String? + @reason: (String | nil) @credentials: untyped @headers: untyped attr_reader body: untyped - attr_accessor reason: String + attr_accessor reason: (String | nil) attr_accessor status: Integer? diff --git a/rb/sig/lib/selenium/webdriver/chromium/options.rbs b/rb/sig/lib/selenium/webdriver/chromium/options.rbs index 9d0262127ce75..bae271cc1913f 100644 --- a/rb/sig/lib/selenium/webdriver/chromium/options.rbs +++ b/rb/sig/lib/selenium/webdriver/chromium/options.rbs @@ -6,21 +6,21 @@ module Selenium @profile: untyped - @options: untyped + @options: Hash[String | Symbol, untyped] - @logging_prefs: untyped + @logging_prefs: Hash[Symbol | String, untyped] - @encoded_extensions: untyped + @encoded_extensions: Array[String] - @extensions: untyped + @extensions: Array[String] attr_accessor profile: untyped - attr_accessor logging_prefs: untyped + attr_accessor logging_prefs: Hash[Symbol | String, untyped] CAPABILITIES: Hash[Symbol, String] - attr_reader extensions: untyped + attr_reader extensions: Array[String] def initialize: (?profile: untyped?, **untyped opts) -> void diff --git a/rb/sig/lib/selenium/webdriver/chromium/profile.rbs b/rb/sig/lib/selenium/webdriver/chromium/profile.rbs index f74507161c993..893774aba5e00 100644 --- a/rb/sig/lib/selenium/webdriver/chromium/profile.rbs +++ b/rb/sig/lib/selenium/webdriver/chromium/profile.rbs @@ -10,7 +10,7 @@ module Selenium @directory: untyped - @prefs: untyped + @prefs: Hash[String, untyped]? include ProfileHelper @@ -34,9 +34,9 @@ module Selenium def write_prefs_to: (untyped dir) -> untyped - def prefs: () -> untyped + def prefs: () -> Hash[String, untyped] - def read_model_prefs: () -> (Hash[untyped, untyped] | untyped) + def read_model_prefs: () -> Hash[String, untyped] def prefs_file_for: (untyped dir) -> untyped end diff --git a/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_devtools.rbs b/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_devtools.rbs index 01c7994c57707..d6509e4224824 100644 --- a/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_devtools.rbs +++ b/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_devtools.rbs @@ -4,9 +4,9 @@ module Selenium module HasDevTools include _Driver - @devtools: untyped + @devtools: Hash[String, DevTools] - def devtools: () -> untyped + def devtools: (?target_type: String) -> DevTools end end end diff --git a/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rbs b/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rbs new file mode 100644 index 0000000000000..77fe49733c18e --- /dev/null +++ b/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rbs @@ -0,0 +1,19 @@ +module Selenium + module WebDriver + module DriverExtensions + module HasFedCmDialog + include _Bridge + + @fedcm_dialog: FedCM::Dialog? + + def enable_fedcm_delay=: (bool enable) -> void + + def reset_fedcm_cooldown: () -> void + + def fedcm_dialog: () -> FedCM::Dialog + + def wait_for_fedcm_dialog: (?timeout: Numeric, ?interval: Numeric, ?message: String?, ?ignore: untyped) -> (FedCM::Dialog | nil) + end + end + end +end diff --git a/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_log_events.rbs b/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_log_events.rbs index 2b3ffbb073208..94e019aac0bd2 100644 --- a/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_log_events.rbs +++ b/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_log_events.rbs @@ -5,6 +5,7 @@ module Selenium include _ExecuteScript include _FindElements include _DevTools + include _Driver @log_listeners: untyped diff --git a/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rbs b/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rbs index ed03f3d6bd504..72e4d97c9c0d2 100644 --- a/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rbs +++ b/rb/sig/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rbs @@ -3,6 +3,7 @@ module Selenium module DriverExtensions module HasNetworkInterception include _DevTools + include _Driver @interceptor: untyped diff --git a/rb/sig/lib/selenium/webdriver/common/error.rbs b/rb/sig/lib/selenium/webdriver/common/error.rbs index 224ee6ee29cee..40a52071f7049 100644 --- a/rb/sig/lib/selenium/webdriver/common/error.rbs +++ b/rb/sig/lib/selenium/webdriver/common/error.rbs @@ -45,6 +45,9 @@ module Selenium class NoSuchWindowError < WebDriverError end + class NoSuchTargetError < WebDriverError + end + class NoSuchShadowRootError < WebDriverError end diff --git a/rb/sig/lib/selenium/webdriver/common/file_reaper.rbs b/rb/sig/lib/selenium/webdriver/common/file_reaper.rbs index 2b23277ec6542..7487f0a361beb 100644 --- a/rb/sig/lib/selenium/webdriver/common/file_reaper.rbs +++ b/rb/sig/lib/selenium/webdriver/common/file_reaper.rbs @@ -1,15 +1,15 @@ module Selenium module WebDriver module FileReaper - self.@reap: untyped + self.@reap: (bool | nil) - self.@tmp_files: untyped + self.@tmp_files: (Hash[Integer, Array[String]] | nil) - attr_writer self.reap: untyped + attr_writer self.reap: (bool | nil) - def self.reap?: () -> untyped + def self.reap?: () -> (bool | nil) - def self.tmp_files: () -> untyped + def self.tmp_files: () -> Array[String] def self.<<: (untyped file) -> untyped diff --git a/rb/sig/lib/selenium/webdriver/common/local_driver.rbs b/rb/sig/lib/selenium/webdriver/common/local_driver.rbs index ef1ac98c8feb9..ae8e719f13813 100644 --- a/rb/sig/lib/selenium/webdriver/common/local_driver.rbs +++ b/rb/sig/lib/selenium/webdriver/common/local_driver.rbs @@ -3,7 +3,7 @@ module Selenium module LocalDriver include _Driver - def initialize_local_driver: (untyped options, untyped service, untyped url) -> Array[untyped] + def initialize_local_driver: (untyped options, untyped service, untyped url) ?{ (untyped, untyped) -> void } -> void def process_options: (untyped options, untyped service) -> untyped end diff --git a/rb/sig/lib/selenium/webdriver/common/manager.rbs b/rb/sig/lib/selenium/webdriver/common/manager.rbs index bb214a709a84b..33bc5de0bb619 100644 --- a/rb/sig/lib/selenium/webdriver/common/manager.rbs +++ b/rb/sig/lib/selenium/webdriver/common/manager.rbs @@ -27,11 +27,11 @@ module Selenium SECONDS_PER_DAY: Float - def datetime_at: (Integer int) -> Date + def datetime_at: (Integer | Numeric) -> Date def seconds_from: (Time | DateTime | Numeric obj) -> (Float | Numeric) - def strip_port: (String str) -> String? + def strip_port: (String) -> String? def convert_cookie: (String) -> (Hash[Symbol, untyped] | Error::NoSuchCookieError) end diff --git a/rb/sig/lib/selenium/webdriver/common/network.rbs b/rb/sig/lib/selenium/webdriver/common/network.rbs index 193e7385439af..b6f7f9fd2613b 100644 --- a/rb/sig/lib/selenium/webdriver/common/network.rbs +++ b/rb/sig/lib/selenium/webdriver/common/network.rbs @@ -3,29 +3,36 @@ module Selenium class Network @network: BiDi::Network - @callbacks: Hash[String, String] + @callbacks: Hash[Integer, Hash[String, String]] - attr_reader callbacks: Hash[String, String] + attr_reader callbacks: Hash[Integer, Hash[String, String]] attr_reader network: BiDi::Network alias bidi network + # Delegated methods from BiDi::Network + def continue_with_auth: (*untyped) -> untyped + + def continue_with_request: (*untyped) -> untyped + + def continue_with_response: (*untyped) -> untyped + def initialize: (Remote::Bridge bridge) -> void - def remove_handler: (Numeric id) -> untyped + def remove_handler: (Integer id) -> void - def clear_handlers: () -> untyped + def clear_handlers: () -> void - def add_authentication_handler: (?String? username, ?String? password, *String filter, ?pattern_type: Symbol?) { (?) -> untyped } -> untyped + def add_authentication_handler: (?String? username, ?String? password, *String filter, ?pattern_type: Symbol?) { (?) -> untyped } -> Integer - def add_request_handler: (*String filter, ?pattern_type: Symbol?) -> Hash[String, String] + def add_request_handler: (*String filter, ?pattern_type: Symbol?) ?{ (untyped) -> untyped } -> Integer - def add_response_handler: (*String filter, ?pattern_type: Symbol?) -> Hash[String, String] + def add_response_handler: (*String filter, ?pattern_type: Symbol?) ?{ (untyped) -> untyped } -> Integer private - def add_handler: (Symbol event_type, String phase, BiDi::InterceptedRequest | BiDi::InterceptedAuth | BiDi::InterceptedResponse intercept_type, Array[String] filter, ?pattern_type: Symbol?) { (untyped) -> untyped } -> untyped + def add_handler: (Symbol event_type, String phase, untyped intercept_type, Array[String] filter, ?pattern_type: Symbol?) { (untyped) -> untyped } -> Integer end end end diff --git a/rb/sig/lib/selenium/webdriver/common/print_options.rbs b/rb/sig/lib/selenium/webdriver/common/print_options.rbs new file mode 100644 index 0000000000000..be98823af7357 --- /dev/null +++ b/rb/sig/lib/selenium/webdriver/common/print_options.rbs @@ -0,0 +1,45 @@ +module Selenium + module WebDriver + class PrintOptions + DEFAULT_SCALE: Float + + DEFAULT_ORIENTATION: String + + DEFAULT_PAGE_SIZE: Hash[Symbol, Float] + + DEFAULT_MARGINS: Hash[Symbol, Float] + + @orientation: String + + @scale: Float + + @background: bool + + @page_ranges: untyped + + @page_size: Hash[Symbol, Float] + + @margins: Hash[Symbol, Float] + + attr_accessor orientation: String + + attr_accessor scale: Float + + attr_accessor background: bool + + attr_accessor page_ranges: untyped + + attr_accessor margins: Hash[Symbol, Float] + + def initialize: () -> void + + def to_h: () -> Hash[Symbol, untyped] + + def page_width: (Numeric width) -> void + + def page_height: (Numeric height) -> void + + def page_size=: (Hash[Symbol, Float] size) -> void + end + end +end diff --git a/rb/sig/selenium/web_driver/script.rbs b/rb/sig/lib/selenium/webdriver/common/script.rbs similarity index 100% rename from rb/sig/selenium/web_driver/script.rbs rename to rb/sig/lib/selenium/webdriver/common/script.rbs diff --git a/rb/sig/lib/selenium/webdriver/common/websocket_connection.rbs b/rb/sig/lib/selenium/webdriver/common/websocket_connection.rbs index acc3c7bfefaee..5d763fc23542c 100644 --- a/rb/sig/lib/selenium/webdriver/common/websocket_connection.rbs +++ b/rb/sig/lib/selenium/webdriver/common/websocket_connection.rbs @@ -35,9 +35,9 @@ module Selenium MAX_LOG_MESSAGE_SIZE: Integer - def initialize: (url: String, ?protocol?: Symbol) -> void + def initialize: (url: String) -> void - def add_callback: (untyped event) { () -> void } -> untyped + def add_callback: (untyped event) { () -> void } -> Integer def close: () -> untyped diff --git a/rb/sig/lib/selenium/webdriver/common/zipper.rbs b/rb/sig/lib/selenium/webdriver/common/zipper.rbs index 090f02a7d49f3..c82588928fb01 100644 --- a/rb/sig/lib/selenium/webdriver/common/zipper.rbs +++ b/rb/sig/lib/selenium/webdriver/common/zipper.rbs @@ -3,6 +3,8 @@ module Selenium module Zipper EXTENSIONS: Array[String] + RUBYZIP_V3: bool + def self.unzip: (untyped path) -> untyped def self.zip: (untyped path) -> untyped diff --git a/rb/sig/lib/selenium/webdriver/devtools.rbs b/rb/sig/lib/selenium/webdriver/devtools.rbs index 892e89bc4c8dd..3e09c433c109f 100644 --- a/rb/sig/lib/selenium/webdriver/devtools.rbs +++ b/rb/sig/lib/selenium/webdriver/devtools.rbs @@ -8,7 +8,7 @@ module Selenium @session_id: untyped - def initialize: (url: untyped) -> void + def initialize: (url: untyped, target_type: String) -> void def close: () -> nil @@ -22,7 +22,7 @@ module Selenium private - def start_session: () -> untyped + def start_session: (target_type: String) -> untyped def error_message: (Hash[untyped, untyped] error) -> String end diff --git a/rb/sig/lib/selenium/webdriver/firefox/service.rbs b/rb/sig/lib/selenium/webdriver/firefox/service.rbs index 64d996b973a04..356aeb58e4730 100644 --- a/rb/sig/lib/selenium/webdriver/firefox/service.rbs +++ b/rb/sig/lib/selenium/webdriver/firefox/service.rbs @@ -8,6 +8,8 @@ module Selenium EXECUTABLE: "geckodriver" SHUTDOWN_SUPPORTED: false + + def initialize: (?path: String?, ?port: Integer?, ?log: untyped?, ?args: Array[String]?) -> void end end end diff --git a/rb/sig/lib/selenium/webdriver/ie/driver.rbs b/rb/sig/lib/selenium/webdriver/ie/driver.rbs index 53e9dbec58810..29b8247beed03 100644 --- a/rb/sig/lib/selenium/webdriver/ie/driver.rbs +++ b/rb/sig/lib/selenium/webdriver/ie/driver.rbs @@ -2,7 +2,7 @@ module Selenium module WebDriver module IE class Driver < WebDriver::Driver - EXTENSIONS: Array[untyped] + EXTENSIONS: Array[String] include LocalDriver diff --git a/rb/sig/lib/selenium/webdriver/remote/bidi_bridge.rbs b/rb/sig/lib/selenium/webdriver/remote/bidi_bridge.rbs index aeec5854d18cf..b7b1b9470d854 100644 --- a/rb/sig/lib/selenium/webdriver/remote/bidi_bridge.rbs +++ b/rb/sig/lib/selenium/webdriver/remote/bidi_bridge.rbs @@ -1,7 +1,7 @@ module Selenium module WebDriver module Remote - class BiDiBridge + class BiDiBridge < Bridge @browsing_context: BiDi::BrowsingContext attr_reader bidi: BiDi diff --git a/rb/sig/lib/selenium/webdriver/remote/bridge.rbs b/rb/sig/lib/selenium/webdriver/remote/bridge.rbs index dfc248728e82e..5089913bfb60e 100644 --- a/rb/sig/lib/selenium/webdriver/remote/bridge.rbs +++ b/rb/sig/lib/selenium/webdriver/remote/bridge.rbs @@ -32,7 +32,7 @@ module Selenium def initialize: (url: String | URI, ?http_client: untyped?) -> void - def bidi: -> WebDriver::Error::WebDriverError + def bidi: -> BiDi def cancel_fedcm_dialog: -> nil diff --git a/rb/sig/lib/selenium/webdriver/remote/capabilities.rbs b/rb/sig/lib/selenium/webdriver/remote/capabilities.rbs index d562c1ee76dc1..44c52ec109d81 100644 --- a/rb/sig/lib/selenium/webdriver/remote/capabilities.rbs +++ b/rb/sig/lib/selenium/webdriver/remote/capabilities.rbs @@ -32,9 +32,9 @@ module Selenium def proxy=: (untyped proxy) -> untyped - def timeouts: () -> untyped + def timeouts: () -> Hash[Symbol, Integer] - def timeouts=: (untyped timeouts) -> untyped + def timeouts=: (Hash[Symbol, Integer] | untyped timeouts) -> untyped def implicit_timeout: () -> untyped diff --git a/rb/sig/lib/selenium/webdriver/remote/http/common.rbs b/rb/sig/lib/selenium/webdriver/remote/http/common.rbs index dfafbbf8456bf..ac400c63d6f11 100644 --- a/rb/sig/lib/selenium/webdriver/remote/http/common.rbs +++ b/rb/sig/lib/selenium/webdriver/remote/http/common.rbs @@ -9,6 +9,8 @@ module Selenium DEFAULT_HEADERS: Hash[String, untyped] + BINARY_ENCODINGS: Array[Encoding] + @common_headers: Hash[String, untyped] attr_accessor self.extra_headers: Hash[String, untyped] @@ -34,6 +36,10 @@ module Selenium def request: (*untyped) -> untyped def create_response: (Integer code, Hash[String, untyped] body, String content_type) -> Remote::Response + + def ensure_utf8_encoding: (untyped obj) -> untyped + + def encode_string_to_utf8: (String str) -> String end end end