Skip to content

Commit

Permalink
[rb] bundle and rubocop updates
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Dec 26, 2023
1 parent 4ff1f62 commit fc86c86
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 35 deletions.
48 changes: 24 additions & 24 deletions rb/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PATH
GEM
remote: https://rubygems.org/
specs:
abbrev (0.1.1)
abbrev (0.1.2)
activesupport (7.1.2)
base64
bigdecimal
Expand All @@ -22,46 +22,46 @@ GEM
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.5)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.4)
bigdecimal (3.1.5)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
crack (0.4.5)
rexml
csv (3.2.8)
debug (1.8.0)
irb (>= 1.5.0)
reline (>= 0.3.1)
debug (1.9.1)
irb (~> 1.10)
reline (>= 0.3.8)
diff-lcs (1.5.0)
drb (2.2.0)
ruby2_keywords
ffi (1.16.3)
ffi (1.16.3-x64-mingw32)
fileutils (1.7.2)
hashdiff (1.0.1)
hashdiff (1.1.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
irb (1.9.0)
io-console (0.7.1)
irb (1.11.0)
rdoc
reline (>= 0.3.8)
json (2.6.3)
json (2.6.3-java)
json (2.7.1)
json (2.7.1-java)
language_server-protocol (3.17.0.3)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.0)
minitest (5.20.0)
mutex_m (0.2.0)
parallel (1.23.0)
parallel (1.24.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
psych (5.1.1.1)
psych (5.1.2)
stringio
public_suffix (5.0.4)
racc (1.7.3)
Expand All @@ -72,12 +72,12 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbs (3.3.2)
rbs (3.4.1)
abbrev
rdoc (6.6.0)
rdoc (6.6.2)
psych (>= 4.0.0)
regexp_parser (2.8.2)
reline (0.4.0)
regexp_parser (2.8.3)
reline (0.4.1)
io-console (~> 0.5)
rexml (3.2.6)
rspec (3.12.0)
Expand All @@ -93,15 +93,15 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (1.57.2)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
Expand All @@ -110,17 +110,17 @@ GEM
rubocop (~> 1.41)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-performance (1.20.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rspec (2.25.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
securerandom (0.3.0)
securerandom (0.3.1)
steep (1.5.3)
activesupport (>= 5.1)
concurrent-ruby (>= 1.1.10)
Expand All @@ -136,7 +136,7 @@ GEM
securerandom (>= 0.1)
strscan (>= 1.0.0)
terminal-table (>= 2, < 4)
stringio (3.0.9)
stringio (3.1.0)
strscan (3.0.7)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def on_log_event(kind, &block)
return if enabled

devtools.runtime.enable
__send__("log_#{kind}_events")
__send__(:"log_#{kind}_events")
end

private
Expand Down
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/common/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def self.for_error(error)
return if error.nil?

klass_name = error.split.map(&:capitalize).join.sub(/Error$/, '')
const_get("#{klass_name}Error", false)
const_get(:"#{klass_name}Error", false)
rescue NameError
WebDriverError
end
Expand Down
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/common/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def set_capabilities
@options[key]
end

define_method "#{key}=" do |value|
define_method :"#{key}=" do |value|
@options[key] = value
end
end
Expand Down
4 changes: 2 additions & 2 deletions rb/lib/selenium/webdriver/common/proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def self.json_create(data)
proxy = new

ALLOWED.each do |k, v|
proxy.send("#{k}=", data[v]) if data.key?(v)
proxy.send(:"#{k}=", data[v]) if data.key?(v)
end

proxy
Expand All @@ -60,7 +60,7 @@ def initialize(opts = {})

opts.each do |k, v|
if ALLOWED.key?(k)
send("#{k}=", v)
send(:"#{k}=", v)
else
not_allowed << k
end
Expand Down
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/remote/capabilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Capabilities
@capabilities[key]
end

define_method "#{key}=" do |value|
define_method :"#{key}=" do |value|
@capabilities[key] = value
end
end
Expand Down
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/remote/features.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def upload(local_file)
end

def upload_if_necessary(keys)
local_files = keys.first&.split("\n")&.map { |key| @file_detector.call(Array(key)) }&.compact
local_files = keys.first&.split("\n")&.filter_map { |key| @file_detector.call(Array(key)) }
return keys unless local_files&.any?

keys = local_files.map { |local_file| upload(local_file) }
Expand Down
4 changes: 2 additions & 2 deletions rb/lib/selenium/webdriver/support/event_firing_bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def driver
end

def dispatch(name, *args)
@listener.__send__("before_#{name}", *args)
@listener.__send__(:"before_#{name}", *args)
returned = yield
@listener.__send__("after_#{name}", *args)
@listener.__send__(:"after_#{name}", *args)

returned
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def root
def create_driver!(listener: nil, **opts, &block)
check_for_previous_error

method = "#{driver}_driver".to_sym
method = :"#{driver}_driver"
instance = if private_methods.include?(method)
send(method, listener: listener, options: build_options(**opts))
else
Expand All @@ -167,7 +167,7 @@ def create_driver!(listener: nil, **opts, &block)
private

def build_options(**opts)
options_method = "#{browser}_options".to_sym
options_method = :"#{browser}_options"
if private_methods.include?(options_method)
send(options_method, **opts)
else
Expand Down

0 comments on commit fc86c86

Please sign in to comment.