Zfilipin has uploaded a new change for review.

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

Change subject: Fixed Style/StringLiterals RuboCop offense
......................................................................

Fixed Style/StringLiterals RuboCop offense

$ bundle exec rubocop --auto-correct
Inspecting 25 files
CC....C.......CCCCCCCCC.C

Offenses:

Gemfile:4:8: C: [Corrected] Prefer single-quoted strings when you don't
need string interpolation or special symbols.
source "https://rubygems.org";
^^^^^^^^^^^^^^^^^^^^^^
…
25 files inspected, 81 offenses detected, 81 offenses corrected

Bug: T91485
Change-Id: Ic6f1337fa465e8c90e5aa7ea3540eb6bfad15af8
---
M .rubocop.yml
D .rubocop_todo.yml
M Gemfile
M maintenance/jsduck/custom_tags.rb
M tests/browser/features/step_definitions/login_steps.rb
M tests/browser/features/support/pages/create_account_page.rb
M tests/browser/features/support/pages/edit_page.rb
M tests/browser/features/support/pages/file_does_not_exist_page.rb
M tests/browser/features/support/pages/login_error_page.rb
M tests/browser/features/support/pages/main_page.rb
M tests/browser/features/support/pages/preferences_appearance_page.rb
M tests/browser/features/support/pages/preferences_editing_page.rb
M tests/browser/features/support/pages/preferences_page.rb
M tests/browser/features/support/pages/preferences_user_profile_page.rb
M tests/browser/features/support/pages/ztargetpage.rb
15 files changed, 79 insertions(+), 93 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/197682/1

diff --git a/.rubocop.yml b/.rubocop.yml
index 3f1af39..070a422 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,5 +1,3 @@
-inherit_from: .rubocop_todo.yml
-
 AllCops:
     Exclude:
         - 'extensions/**/*'
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
deleted file mode 100644
index 5b8c965..0000000
--- a/.rubocop_todo.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-# This configuration was generated by `rubocop --auto-gen-config`
-# on 2015-03-06 17:05:39 +0100 using RuboCop version 0.29.1.
-# The point is for the user to remove these configuration records
-# one by one as the offenses are removed from the code base.
-# Note that changes in the inspected code, or installation of new
-# versions of RuboCop, may require this file to be generated again.
-
-# Offense count: 81
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-Style/StringLiterals:
-  Enabled: false
diff --git a/Gemfile b/Gemfile
index 4373b7f..6f9c053 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,7 @@
 # ruby=ruby-2.1.2
 # ruby-gemset=core
 
-source "https://rubygems.org";
+source 'https://rubygems.org'
 
-gem "mediawiki_selenium", "~> 1.0.1"
-gem "rubocop", require: false
+gem 'mediawiki_selenium', '~> 1.0.1'
+gem 'rubocop', require: false
diff --git a/maintenance/jsduck/custom_tags.rb 
b/maintenance/jsduck/custom_tags.rb
index a5da3b0..6821d01 100644
--- a/maintenance/jsduck/custom_tags.rb
+++ b/maintenance/jsduck/custom_tags.rb
@@ -34,7 +34,7 @@
 class SourceTag < CommonTag
   def initialize
     @tagname = :source
-    @pattern = "source"
+    @pattern = 'source'
     super
   end
 
@@ -51,7 +51,7 @@
 class SeeTag < CommonTag
   def initialize
     @tagname = :see
-    @pattern = "see"
+    @pattern = 'see'
     super
   end
 
diff --git a/tests/browser/features/step_definitions/login_steps.rb 
b/tests/browser/features/step_definitions/login_steps.rb
index f528eba..67adb36 100644
--- a/tests/browser/features/step_definitions/login_steps.rb
+++ b/tests/browser/features/step_definitions/login_steps.rb
@@ -14,19 +14,19 @@
 end
 
 When(/^I log in with incorrect password$/) do
-  on(LoginPage).login_with(user, "incorrect password", false)
+  on(LoginPage).login_with(user, 'incorrect password', false)
 end
 
 When(/^I log in with incorrect username$/) do
-  on(LoginPage).login_with("incorrect username", password, false)
+  on(LoginPage).login_with('incorrect username', password, false)
 end
 
 When(/^I log in without entering credentials$/) do
-  on(LoginPage).login_with("", "", false)
+  on(LoginPage).login_with('', '', false)
 end
 
 When(/^I log in without entering password$/) do
-  on(LoginPage).login_with(user, "", false)
+  on(LoginPage).login_with(user, '', false)
 end
 
 Then(/^error box should be visible$/) do
diff --git a/tests/browser/features/support/pages/create_account_page.rb 
b/tests/browser/features/support/pages/create_account_page.rb
index 6a8ca69..98b893a 100644
--- a/tests/browser/features/support/pages/create_account_page.rb
+++ b/tests/browser/features/support/pages/create_account_page.rb
@@ -12,7 +12,7 @@
 class CreateAccountPage
   include PageObject
 
-  page_url "<%=params[:page_title]%>"
+  page_url '<%=params[:page_title]%>'
 
-  button(:create_account, id: "wpCreateaccount")
+  button(:create_account, id: 'wpCreateaccount')
 end
diff --git a/tests/browser/features/support/pages/edit_page.rb 
b/tests/browser/features/support/pages/edit_page.rb
index 237441e..b0f6bff 100644
--- a/tests/browser/features/support/pages/edit_page.rb
+++ b/tests/browser/features/support/pages/edit_page.rb
@@ -1,8 +1,8 @@
 class EditPage
   include PageObject
 
-  text_area(:edit_page_content, id: "wpTextbox1")
-  button(:preview_button, id: "wpPreview")
-  button(:show_changes_button, id: "wpDiff")
-  button(:save_button, id: "wpSave")
+  text_area(:edit_page_content, id: 'wpTextbox1')
+  button(:preview_button, id: 'wpPreview')
+  button(:show_changes_button, id: 'wpDiff')
+  button(:save_button, id: 'wpSave')
 end
diff --git a/tests/browser/features/support/pages/file_does_not_exist_page.rb 
b/tests/browser/features/support/pages/file_does_not_exist_page.rb
index 9aa34d3..90762d2 100644
--- a/tests/browser/features/support/pages/file_does_not_exist_page.rb
+++ b/tests/browser/features/support/pages/file_does_not_exist_page.rb
@@ -12,7 +12,7 @@
 class FileDoesNotExistPage
   include PageObject
 
-  page_url "File:<%=params[:page_name]%>"
+  page_url 'File:<%=params[:page_name]%>'
 
-  div(:file_does_not_exist_message, id: "mw-imagepage-nofile")
+  div(:file_does_not_exist_message, id: 'mw-imagepage-nofile')
 end
diff --git a/tests/browser/features/support/pages/login_error_page.rb 
b/tests/browser/features/support/pages/login_error_page.rb
index fd000e6..9a1805f 100644
--- a/tests/browser/features/support/pages/login_error_page.rb
+++ b/tests/browser/features/support/pages/login_error_page.rb
@@ -1,5 +1,5 @@
 class LoginErrorPage
   include PageObject
 
-  div(:error_box, class: "errorbox")
+  div(:error_box, class: 'errorbox')
 end
diff --git a/tests/browser/features/support/pages/main_page.rb 
b/tests/browser/features/support/pages/main_page.rb
index ef58d91..6d76b01 100644
--- a/tests/browser/features/support/pages/main_page.rb
+++ b/tests/browser/features/support/pages/main_page.rb
@@ -1,18 +1,18 @@
 class MainPage
   include PageObject
 
-  page_url ""
+  page_url ''
 
   a(:edit_link, href: /action=edit/)
-  li(:help_link, id: "n-help")
-  div(:page_content, id: "content")
-  li(:page_information_link, id: "t-info")
-  li(:permanent_link_link, id: "t-permalink")
+  li(:help_link, id: 'n-help')
+  div(:page_content, id: 'content')
+  li(:page_information_link, id: 't-info')
+  li(:permanent_link_link, id: 't-permalink')
   a(:printable_version_link, href: /printable=yes/)
-  li(:random_page_link, id: "n-randompage")
-  li(:recent_changes_link, id: "n-recentchanges")
-  li(:related_changes_link, id: "t-recentchangeslinked")
-  li(:special_pages_link, id: "t-specialpages")
+  li(:random_page_link, id: 'n-randompage')
+  li(:recent_changes_link, id: 'n-recentchanges')
+  li(:related_changes_link, id: 't-recentchangeslinked')
+  li(:special_pages_link, id: 't-specialpages')
   a(:view_history_link, href: /action=history/)
-  li(:what_links_here_link, id: "t-whatlinkshere")
+  li(:what_links_here_link, id: 't-whatlinkshere')
 end
diff --git 
a/tests/browser/features/support/pages/preferences_appearance_page.rb 
b/tests/browser/features/support/pages/preferences_appearance_page.rb
index 0644f4c..83c3952 100644
--- a/tests/browser/features/support/pages/preferences_appearance_page.rb
+++ b/tests/browser/features/support/pages/preferences_appearance_page.rb
@@ -12,28 +12,28 @@
 class PreferencesAppearancePage
   include PageObject
 
-  page_url "Special:Preferences#mw-prefsection-rendering"
+  page_url 'Special:Preferences#mw-prefsection-rendering'
 
-  checkbox(:auto_number_check, id: "mw-input-wpnumberheadings")
-  radio_button(:cologne_blue, id: "mw-input-wpskin-cologneblue")
-  radio_button(:day_mo_year_radio, id: "mw-input-wpdate-dmy")
-  checkbox(:dont_show_aft_check, id: "mw-input-wparticlefeedback-disable")
-  checkbox(:exclude_from_experiments_check, id: 
"mw-input-wpvector-noexperiments")
-  checkbox(:hidden_categories_check, id: "mw-input-wpshowhiddencats")
-  radio_button(:iso_8601_radio, id: "mw-input-wpdate-ISO_8601")
-  span(:local_time_span, id: "wpLocalTime")
-  radio_button(:mo_day_year_radio, id: "mw-input-wpdate-mdy")
-  radio_button(:modern, id: "mw-input-wpskin-modern")
-  radio_button(:monobook, id: "mw-input-wpskin-monobook")
-  radio_button(:no_preference_radio, id: "mw-input-wpdate-default")
-  text_field(:other_offset, id: "mw-input-wptimecorrection-other")
+  checkbox(:auto_number_check, id: 'mw-input-wpnumberheadings')
+  radio_button(:cologne_blue, id: 'mw-input-wpskin-cologneblue')
+  radio_button(:day_mo_year_radio, id: 'mw-input-wpdate-dmy')
+  checkbox(:dont_show_aft_check, id: 'mw-input-wparticlefeedback-disable')
+  checkbox(:exclude_from_experiments_check, id: 
'mw-input-wpvector-noexperiments')
+  checkbox(:hidden_categories_check, id: 'mw-input-wpshowhiddencats')
+  radio_button(:iso_8601_radio, id: 'mw-input-wpdate-ISO_8601')
+  span(:local_time_span, id: 'wpLocalTime')
+  radio_button(:mo_day_year_radio, id: 'mw-input-wpdate-mdy')
+  radio_button(:modern, id: 'mw-input-wpskin-modern')
+  radio_button(:monobook, id: 'mw-input-wpskin-monobook')
+  radio_button(:no_preference_radio, id: 'mw-input-wpdate-default')
+  text_field(:other_offset, id: 'mw-input-wptimecorrection-other')
   a(:restore_default_link, href: /reset/)
-  select_list(:size_select, id: "mw-input-wpimagesize")
-  select_list(:threshold_select, id: "mw-input-wpstubthreshold")
-  select_list(:time_offset_select, id: "mw-input-wptimecorrection")
-  table(:time_offset_table, id: "mw-htmlform-timeoffset")
-  select_list(:thumb_select, id: "mw-input-wpthumbsize")
-  select_list(:underline_select, id: "mw-input-wpunderline")
-  radio_button(:vector, id: "mw-input-wpskin-vector")
-  radio_button(:year_mo_day_radio, id: "mw-input-wpdate-ymd")
+  select_list(:size_select, id: 'mw-input-wpimagesize')
+  select_list(:threshold_select, id: 'mw-input-wpstubthreshold')
+  select_list(:time_offset_select, id: 'mw-input-wptimecorrection')
+  table(:time_offset_table, id: 'mw-htmlform-timeoffset')
+  select_list(:thumb_select, id: 'mw-input-wpthumbsize')
+  select_list(:underline_select, id: 'mw-input-wpunderline')
+  radio_button(:vector, id: 'mw-input-wpskin-vector')
+  radio_button(:year_mo_day_radio, id: 'mw-input-wpdate-ymd')
 end
diff --git a/tests/browser/features/support/pages/preferences_editing_page.rb 
b/tests/browser/features/support/pages/preferences_editing_page.rb
index e8dcfae..25c384f 100644
--- a/tests/browser/features/support/pages/preferences_editing_page.rb
+++ b/tests/browser/features/support/pages/preferences_editing_page.rb
@@ -12,16 +12,16 @@
 class PreferencesEditingPage
   include PageObject
 
-  page_url "Special:Preferences#mw-prefsection-rendering"
+  page_url 'Special:Preferences#mw-prefsection-rendering'
 
-  select_list(:edit_area_font_style_select, id: "mw-input-wpeditfont")
-  checkbox(:edit_section_double_click_check, id: "mw-input-wpeditondblclick")
-  checkbox(:edit_section_edit_link, id: "mw-input-wpeditsectiononrightclick")
-  checkbox(:edit_section_right_click_check, id: 
"mw-input-wpeditsectiononrightclick")
-  checkbox(:forced_edit_summary_check, id: "mw-input-wpforceeditsummary")
-  checkbox(:live_preview_check, id: "mw-input-wpuselivepreview")
-  checkbox(:preview_on_first_check, id: "mw-input-wppreviewonfirst")
-  checkbox(:preview_on_top_check, id: "mw-input-wppreviewontop")
-  checkbox(:show_edit_toolbar_check, id: "mw-input-wpshowtoolbar")
-  checkbox(:unsaved_changes_check, id: "mw-input-wpuseeditwarning")
+  select_list(:edit_area_font_style_select, id: 'mw-input-wpeditfont')
+  checkbox(:edit_section_double_click_check, id: 'mw-input-wpeditondblclick')
+  checkbox(:edit_section_edit_link, id: 'mw-input-wpeditsectiononrightclick')
+  checkbox(:edit_section_right_click_check, id: 
'mw-input-wpeditsectiononrightclick')
+  checkbox(:forced_edit_summary_check, id: 'mw-input-wpforceeditsummary')
+  checkbox(:live_preview_check, id: 'mw-input-wpuselivepreview')
+  checkbox(:preview_on_first_check, id: 'mw-input-wppreviewonfirst')
+  checkbox(:preview_on_top_check, id: 'mw-input-wppreviewontop')
+  checkbox(:show_edit_toolbar_check, id: 'mw-input-wpshowtoolbar')
+  checkbox(:unsaved_changes_check, id: 'mw-input-wpuseeditwarning')
 end
diff --git a/tests/browser/features/support/pages/preferences_page.rb 
b/tests/browser/features/support/pages/preferences_page.rb
index aa6848c..b305ee2 100644
--- a/tests/browser/features/support/pages/preferences_page.rb
+++ b/tests/browser/features/support/pages/preferences_page.rb
@@ -12,10 +12,10 @@
 class PreferencesPage
   include PageObject
 
-  page_url "Special:Preferences"
+  page_url 'Special:Preferences'
 
-  a(:appearance_link, id: "preftab-rendering")
-  a(:editing_link, id: "preftab-editing")
-  a(:user_profile_link, id: "preftab-personal")
-  button(:save_button, id: "prefcontrol")
+  a(:appearance_link, id: 'preftab-rendering')
+  a(:editing_link, id: 'preftab-editing')
+  a(:user_profile_link, id: 'preftab-personal')
+  button(:save_button, id: 'prefcontrol')
 end
diff --git 
a/tests/browser/features/support/pages/preferences_user_profile_page.rb 
b/tests/browser/features/support/pages/preferences_user_profile_page.rb
index 7688bba..9e95eb5 100644
--- a/tests/browser/features/support/pages/preferences_user_profile_page.rb
+++ b/tests/browser/features/support/pages/preferences_user_profile_page.rb
@@ -12,16 +12,16 @@
 class PreferencesUserProfilePage
   include PageObject
 
-  page_url "Special:Preferences#mw-prefsection-personal"
+  page_url 'Special:Preferences#mw-prefsection-personal'
 
-  table(:basic_info_table, id: "mw-htmlform-info")
-  link(:change_password_link, text: "Change password")
-  table(:email_table, id: "mw-htmlform-email")
-  radio_button(:gender_female_radio, id: "mw-input-wpgender-male")
-  radio_button(:gender_male_radio, id: "mw-input-wpgender-female")
-  radio_button(:gender_undefined_radio, id: "mw-input-wpgender-unknown")
-  select_list(:lang_select, id: "mw-input-wplanguage")
-  checkbox(:remember_password_check, id: "mw-input-wprememberpassword")
-  text_field(:signature_field, id: "mw-input-wpnickname")
-  table(:signature_table, id: "mw-htmlform-signature")
+  table(:basic_info_table, id: 'mw-htmlform-info')
+  link(:change_password_link, text: 'Change password')
+  table(:email_table, id: 'mw-htmlform-email')
+  radio_button(:gender_female_radio, id: 'mw-input-wpgender-male')
+  radio_button(:gender_male_radio, id: 'mw-input-wpgender-female')
+  radio_button(:gender_undefined_radio, id: 'mw-input-wpgender-unknown')
+  select_list(:lang_select, id: 'mw-input-wplanguage')
+  checkbox(:remember_password_check, id: 'mw-input-wprememberpassword')
+  text_field(:signature_field, id: 'mw-input-wpnickname')
+  table(:signature_table, id: 'mw-htmlform-signature')
 end
diff --git a/tests/browser/features/support/pages/ztargetpage.rb 
b/tests/browser/features/support/pages/ztargetpage.rb
index 1e21b9e..da789e5 100644
--- a/tests/browser/features/support/pages/ztargetpage.rb
+++ b/tests/browser/features/support/pages/ztargetpage.rb
@@ -1,7 +1,7 @@
 class ZtargetPage < MainPage
   include PageObject
 
-  page_url "<%=params[:article_name]%>"
+  page_url '<%=params[:article_name]%>'
 
-  a(:link_target_page_link, text: "link to the test target page")
+  a(:link_target_page_link, text: 'link to the test target page')
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6f1337fa465e8c90e5aa7ea3540eb6bfad15af8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Zfilipin <[email protected]>

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

Reply via email to