DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Application Version Number And Cool Codename Based On Subversion Number

08.05.2006
| 6044 views |
  • submit to reddit
        // description of your code here

#codename generated from the dictionary
REVISION_NUMBER = `svn info`.split("\n")[4][/\d+/].to_i
APP_CODENAME  = IO.readlines("/usr/share/dict/words")[REVISION_NUMBER]