Stan has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/176280

Change subject: update hash syntax per rubocop
......................................................................

update hash syntax per rubocop

Bug: T75898
Change-Id: Ibf78b4c4cda89eba2082e8fd4e42ce39d6a951f8
---
M .rubocop_todo.yml
M lib/mediawiki_selenium/support/env.rb
2 files changed, 10 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium 
refs/changes/80/176280/1

diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 7465f21..180695b 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -10,12 +10,6 @@
 Style/GlobalVars:
   Enabled: false
 
-# Offense count: 12
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-Style/HashSyntax:
-  Enabled: false
-
 # Offense count: 1
 # Cop supports --auto-correct.
 Style/IndentationWidth:
diff --git a/lib/mediawiki_selenium/support/env.rb 
b/lib/mediawiki_selenium/support/env.rb
index 98035c4..a63aa60 100644
--- a/lib/mediawiki_selenium/support/env.rb
+++ b/lib/mediawiki_selenium/support/env.rb
@@ -58,7 +58,7 @@
     profile = Selenium::WebDriver::Firefox::Profile.new
     profile['dom.max_script_run_time'] = timeout
     profile['dom.max_chrome_script_run_time'] = timeout
-    browser = Watir::Browser.new browser_name, :http_client => client, 
:profile => profile
+    browser = Watir::Browser.new browser_name, http_client: client, profile: 
profile
   elsif configuration && configuration[:language] && browser_name == :firefox
     profile = Selenium::WebDriver::Firefox::Profile.new
     profile['intl.accept_languages'] = configuration[:language]
@@ -85,12 +85,12 @@
 
 def sauce_api(json, session_id)
 RestClient::Request.execute(
-  :method => :put,
-  :url => 
"https://saucelabs.com/rest/v1/#{ENV['SAUCE_ONDEMAND_USERNAME']}/jobs/#{session_id}",
-  :user => ENV['SAUCE_ONDEMAND_USERNAME'],
-  :password => ENV['SAUCE_ONDEMAND_ACCESS_KEY'],
-  :headers => {:content_type => 'application/json'},
-  :payload => json
+  method: :put,
+  url: 
"https://saucelabs.com/rest/v1/#{ENV['SAUCE_ONDEMAND_USERNAME']}/jobs/#{session_id}",
+  user: ENV['SAUCE_ONDEMAND_USERNAME'],
+  password: ENV['SAUCE_ONDEMAND_ACCESS_KEY'],
+  headers: {content_type: 'application/json'},
+  payload: json
 )
 end
 
@@ -110,11 +110,11 @@
     profile = Selenium::WebDriver::Firefox::Profile.new
     profile['dom.max_script_run_time'] = timeout
     profile['dom.max_chrome_script_run_time'] = timeout
-    caps = WebDriver_Capabilities.firefox(:firefox_profile => profile)
+    caps = WebDriver_Capabilities.firefox(firefox_profile: profile)
   elsif configuration && configuration[:language] && ENV['BROWSER'] == 
'firefox'
     profile = Selenium::WebDriver::Firefox::Profile.new
     profile['intl.accept_languages'] = configuration[:language]
-    caps = WebDriver_Capabilities.firefox(:firefox_profile => profile)
+    caps = WebDriver_Capabilities.firefox(firefox_profile: profile)
   elsif configuration && configuration[:language] && ENV['BROWSER'] == 'chrome'
     profile = Selenium::WebDriver::Chrome::Profile.new
     profile['intl.accept_languages'] = configuration[:language]
@@ -122,7 +122,7 @@
   elsif configuration && configuration[:user_agent] && ENV['BROWSER'] == 
'firefox'
     profile = Selenium::WebDriver::Firefox::Profile.new
     profile['general.useragent.override'] = configuration[:user_agent]
-    caps = WebDriver_Capabilities.firefox(:firefox_profile => profile)
+    caps = WebDriver_Capabilities.firefox(firefox_profile: profile)
   else
     caps = WebDriver_Capabilities.send(ENV['BROWSER'])
   end

-- 
To view, visit https://gerrit.wikimedia.org/r/176280
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf78b4c4cda89eba2082e8fd4e42ce39d6a951f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Stan <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to