Giter Site home page Giter Site logo

fancy_version's Introduction

FancyVersion

An attempt to add style to your application's version.

Idea

Alongside with the standard major.minor.revision format, generate a codename that will reflect the version. Like Ubuntu releases, each having a corresponding codename (Natty Narwhal, heh?).

For example, let's take the standard version string apart:

  • major version — this changes rarely and a noun represents it well. After all, another major release of a software project is a completely different being.
  • minor version — this is a variation of a major release and could serve as indication of its maturity, so let's go with an adjective describing age, i.e. "newborn", "young", "adolescent", "adult", "elderly" etc.
  • revision number — this is a variation of a variation and could represent anything depending on the development/deployment process. For the example here, let's go with another adjective, like quality, i.e. "silly", "grumpy", "horrible".

So, according to this scheme, version number 1.2.3 may be translated to something like 'Ape'.'Young'.'Horrible', or according to English grammar: Horrible Young Ape. Cool, huh?

Another good idea is to use words starting with 'A' to represent number 1, 'B' - number 2 and so on. That's completely unnecessary, but adds some more coolness in my humble opinion.

Installation

Add this line to your application's Gemfile:

gem 'fancy_version'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fancy_version

Usage

This usually goes into your lib/my_app_name/version.rb:

require "fancy_version"

module MyAppName
  VERSION = "1.2.3"
  VERSION_CODENAME = FancyVersion.codename( VERSION ) # => "Horrible Young Ape"
end

TODO:

  • write comprehensive docs
  • add complete dictionary (or dictionaries)
  • provide methods/options to deal with versions starting with 0 (vs 1)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

fancy_version's People

Contributors

kukushkin avatar

Stargazers

Cristian Giambruni avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.