Last modified: 2014-01-05 17:43:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59597, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57597 - Prefer double-quoted strings in Ruby code
Prefer double-quoted strings in Ruby code
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Mayank Madan
https://www.google-melange.com/gci/ta...
gci2013 https://www.mediawiki.org/wik...
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-26 16:04 UTC by Željko Filipin
Modified: 2014-01-05 17:43 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Željko Filipin 2013-11-26 16:04:23 UTC
We should follow GitHub Ruby Styleguide.

Strings section says:

Prefer double-quoted strings. Interpolation and escaped characters will always work without a delimiter change, and ' is a lot more common than " in string literals.

  # bad
  name = 'Bozhidar'

  # good
  name = "Bozhidar"
Comment 1 Željko Filipin 2013-11-26 16:09:31 UTC
The style guide is here: https://github.com/styleguide/ruby
Comment 2 Željko Filipin 2013-11-26 16:10:30 UTC
List of repositories that contain Ruby code is here: https://github.com/wikimedia/mediawiki-selenium
Comment 3 Željko Filipin 2013-11-26 16:11:46 UTC
The first step is to clone all repositories (Gerrit link) and replace all double quotes with single quotes in all .rb and .feature files.
Comment 4 Gerrit Notification Bot 2013-11-26 17:35:28 UTC
Change 97756 had a related patch set uploaded by Mayankmadan:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97756
Comment 5 Gerrit Notification Bot 2013-11-26 18:04:33 UTC
Change 97761 had a related patch set uploaded by Mayankmadan:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97761
Comment 6 Željko Filipin 2013-11-26 18:05:57 UTC
Check syntax of all Ruby files in a repository:

 find . -name "*.rb" -exec ruby -wc {} \;
Comment 7 Gerrit Notification Bot 2013-11-26 18:16:47 UTC
Change 97762 had a related patch set uploaded by Mayankmadan:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97762
Comment 8 Gerrit Notification Bot 2013-11-26 18:51:17 UTC
Change 97765 had a related patch set uploaded by Mayankmadan:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97765
Comment 9 Gerrit Notification Bot 2013-11-26 19:14:20 UTC
Change 97769 had a related patch set uploaded by Mayankmadan:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97769
Comment 10 Gerrit Notification Bot 2013-11-26 19:27:18 UTC
Change 97773 had a related patch set uploaded by Mayankmadan:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97773
Comment 11 Gerrit Notification Bot 2013-11-26 19:52:34 UTC
Change 97781 had a related patch set uploaded by Mayankmadan:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97781
Comment 12 Gerrit Notification Bot 2013-11-26 20:15:38 UTC
Change 97788 had a related patch set uploaded by Mayankmadan:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97788
Comment 13 Gerrit Notification Bot 2013-11-26 21:22:17 UTC
Change 97842 had a related patch set uploaded by Mayankmadan:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97842
Comment 14 Marius Hoch 2013-11-26 21:54:11 UTC
You really prefer "{\"labels\":{\"en\":..." over '{"labels":{"en":...' ?
Comment 15 Gerrit Notification Bot 2013-11-26 21:55:18 UTC
Change 97849 had a related patch set uploaded by Mayankmadan:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97849
Comment 16 Gerrit Notification Bot 2013-11-27 10:25:00 UTC
Change 97773 merged by jenkins-bot:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97773
Comment 17 Gerrit Notification Bot 2013-11-27 10:51:50 UTC
Change 97769 merged by jenkins-bot:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97769
Comment 18 Gerrit Notification Bot 2013-11-27 19:40:01 UTC
Change 97761 merged by Manybubbles:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97761
Comment 19 Gerrit Notification Bot 2013-11-28 14:26:27 UTC
Change 97781 merged by jenkins-bot:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97781
Comment 20 Gerrit Notification Bot 2013-11-29 15:28:05 UTC
Change 97842 merged by Tobias Gritschacher:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97842
Comment 21 tobias.gritschacher 2013-11-29 15:48:09 UTC
I'm still not sure what to prefer - single or double quotes. Now, with double quotes everywhere, I get tons of warnings in RubyMine (so their default setting prefers single quotes it seems) telling "Double quoted string with no interpolation and special symbols".
Comment 22 Željko Filipin 2013-11-29 15:52:41 UTC
You can always revert the commit if you prefer single quotes. :) I thought following github ruby convention is a step forward.
Comment 23 Gerrit Notification Bot 2013-12-01 14:36:43 UTC
Change 97762 merged by jenkins-bot:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97762
Comment 24 Gerrit Notification Bot 2013-12-02 23:46:57 UTC
Change 97765 merged by jenkins-bot:
QA: prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97765
Comment 25 Gerrit Notification Bot 2013-12-04 12:17:03 UTC
Change 97788 merged by jenkins-bot:
[Browser tests] Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97788
Comment 26 Gerrit Notification Bot 2013-12-04 12:17:23 UTC
Change 97756 merged by jenkins-bot:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97756
Comment 27 Gerrit Notification Bot 2013-12-05 16:51:57 UTC
Change 97849 merged by jenkins-bot:
Prefer double-quoted strings in Ruby code

https://gerrit.wikimedia.org/r/97849
Comment 28 Gerrit Notification Bot 2013-12-17 18:40:51 UTC
Change 102198 had a related patch set uploaded by Zfilipin:
Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102198
Comment 29 Gerrit Notification Bot 2013-12-17 18:46:10 UTC
Change 102204 had a related patch set uploaded by Zfilipin:
Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102204
Comment 30 Gerrit Notification Bot 2013-12-17 18:48:19 UTC
Change 102207 had a related patch set uploaded by Zfilipin:
Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102207
Comment 31 Gerrit Notification Bot 2013-12-17 18:52:10 UTC
Change 102209 had a related patch set uploaded by Zfilipin:
Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102209
Comment 32 Gerrit Notification Bot 2013-12-17 18:54:25 UTC
Change 102211 had a related patch set uploaded by Zfilipin:
WIP Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102211
Comment 33 Gerrit Notification Bot 2013-12-17 18:56:41 UTC
Change 102213 had a related patch set uploaded by Zfilipin:
Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102213
Comment 34 Gerrit Notification Bot 2013-12-17 18:58:43 UTC
Change 102215 had a related patch set uploaded by Zfilipin:
[browser test] Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102215
Comment 35 Gerrit Notification Bot 2013-12-18 00:24:12 UTC
Change 102207 merged by jenkins-bot:
QA: Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102207
Comment 36 Gerrit Notification Bot 2013-12-18 09:11:53 UTC
Change 102213 merged by jenkins-bot:
Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102213
Comment 37 Gerrit Notification Bot 2013-12-18 09:32:03 UTC
Change 102211 merged by jenkins-bot:
Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102211
Comment 38 Gerrit Notification Bot 2013-12-18 22:37:11 UTC
Change 102204 merged by jenkins-bot:
Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102204
Comment 39 Gerrit Notification Bot 2013-12-19 14:31:28 UTC
Change 102198 merged by jenkins-bot:
Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102198
Comment 40 Gerrit Notification Bot 2013-12-19 17:08:12 UTC
Change 102215 abandoned by Cmcmahon:
[browser test] Replacing single quotes with double quotes

Reason:
abandoned in favor of https://gerrit.wikimedia.org/r/#/c/102710/

https://gerrit.wikimedia.org/r/102215
Comment 41 Gerrit Notification Bot 2013-12-30 15:45:30 UTC
Change 102209 merged by Cmcmahon:
Replacing single quotes with double quotes

https://gerrit.wikimedia.org/r/102209
Comment 42 Gerrit Notification Bot 2014-01-03 23:04:53 UTC
Change 105400 had a related patch set uploaded by Zfilipin:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105400
Comment 43 Gerrit Notification Bot 2014-01-03 23:08:36 UTC
Change 105400 merged by Cmcmahon:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105400
Comment 44 Gerrit Notification Bot 2014-01-03 23:09:46 UTC
Change 105401 had a related patch set uploaded by Zfilipin:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105401
Comment 45 Gerrit Notification Bot 2014-01-03 23:13:08 UTC
Change 105402 had a related patch set uploaded by Zfilipin:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105402
Comment 46 Gerrit Notification Bot 2014-01-03 23:16:25 UTC
Change 105403 had a related patch set uploaded by Zfilipin:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105403
Comment 47 Gerrit Notification Bot 2014-01-03 23:18:04 UTC
Change 105404 had a related patch set uploaded by Zfilipin:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105404
Comment 48 Gerrit Notification Bot 2014-01-03 23:24:53 UTC
Change 105407 had a related patch set uploaded by Zfilipin:
[browser test] Updated Ruby and RubyGems

https://gerrit.wikimedia.org/r/105407
Comment 49 Gerrit Notification Bot 2014-01-03 23:27:28 UTC
Change 105409 had a related patch set uploaded by Zfilipin:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105409
Comment 50 Gerrit Notification Bot 2014-01-03 23:29:17 UTC
Change 105410 had a related patch set uploaded by Zfilipin:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105410
Comment 51 Gerrit Notification Bot 2014-01-03 23:30:16 UTC
Change 105401 merged by Cmcmahon:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105401
Comment 52 Gerrit Notification Bot 2014-01-03 23:30:58 UTC
Change 105403 merged by Cmcmahon:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105403
Comment 53 Gerrit Notification Bot 2014-01-03 23:31:13 UTC
Change 105404 merged by Cmcmahon:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105404
Comment 54 Gerrit Notification Bot 2014-01-03 23:32:06 UTC
Change 105410 merged by Cmcmahon:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105410
Comment 55 Gerrit Notification Bot 2014-01-03 23:34:01 UTC
Change 105402 merged by jenkins-bot:
QA: Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105402
Comment 56 Gerrit Notification Bot 2014-01-03 23:40:05 UTC
Change 105409 merged by jenkins-bot:
Updated Ruby, RubyGems and Firefox

https://gerrit.wikimedia.org/r/105409
Comment 57 Gerrit Notification Bot 2014-01-05 17:43:32 UTC
Change 105407 merged by jenkins-bot:
[browser test] Updated Ruby and RubyGems

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links