Last modified: 2014-01-03 14:53:00 UTC
Methods in Ruby code should use snake_case for methods and variables. That follows advice from Github Ruby Styleguide[1], Naming section: "Use snake_case for methods and variables." The most occurrences of CamelCase are in Wikibase repository, example from alias_module.rb[2]: div(:aliasesDiv, class: "wb-aliases") it should be: div(:aliases_div, class: "wb-aliases") 1. https://github.com/styleguide/ruby 2: https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/master/selenium_cuc/features/support/modules/alias_module.rb#L12
This is similar to bug #57597.
What needs to be done? #1 clone repositories listed here: https://github.com/wikimedia/mediawiki-selenium#links (use "Gerrit" link, not "GitHub" link) #2 inspect all Ruby files (.rb) in the repository #3 replace CamelCase with snake_case If you have any questions, ask.
Leo Xiong, Google Code-in student has claimed the task: https://www.google-melange.com/gci/task/view/google/gci2013/5259991820795904
After you make the change, check syntax of all Ruby files in a repository with this (if you are on Mac/Linux): find . -name "*.rb" -exec ruby -wc {} \;
CamelCase should still be used for classes and modules, do not change those. For example, this should not be changed (from alias_module.rb[1]): module AliasPage include PageObject ... end end If you have any questions, please ask here (leave a comment) at #wikimedia-qa freenode IRC channel, or at QA mailing list[2]. 1: https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/master/selenium_cuc/features/support/modules/alias_module.rb#L9-L10 2: https://lists.wikimedia.org/mailman/listinfo/qa
If you need more information (and you probably do), feel free to ask questions here, at #wikimedia-qa freenode IRC channel or at QA mailing list: https://lists.wikimedia.org/mailman/listinfo/qa
Change 101054 had a related patch set uploaded by Aaron1011: Use snake_case in Aliases https://gerrit.wikimedia.org/r/101054
Change 101054 abandoned by Zfilipin: Use snake_case in Aliases Reason: Changes made to files in /selenium folder are out of scope for this Google Code-in task. I have made a few changes to this commit, that is in scope for the task: https://gerrit.wikimedia.org/r/#/c/100209/ https://gerrit.wikimedia.org/r/101054
Change 100209 had a related patch set uploaded by Zfilipin: Use snake case https://gerrit.wikimedia.org/r/100209