Class: Version

Inherits:
Object
  • Object
show all
Defined in:
lib/version.rb

Constant Summary collapse

MAJOR =

Rational Versioning Policy: docs.rubygems.org/read/chapter/7

0
MINOR =
9
PATCH =
1
STATE =

“dev”, “rc”, or “”

""
STATEVER =
1
STRING =
"%d.%d.%d%s" % [MAJOR, MINOR,PATCH,Version.state]
PROGRAM_NAME =
"Jota"
PROGRAM_NAMELC =
PROGRAM_NAME.downcase
YEARS =
"2008-2015"
AUTHOR =
"Derik van Zuetphen"
AUTHOR_EMAIL =
"[email protected]"
AUTHOR_WEBSITE =
"http://426.ch/jota"
LICENSE =
"
  Copyright (c) #{YEARS} #{AUTHOR} <#{AUTHOR_EMAIL}>
  All rights reserved.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:

  1. Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in the
     documentation and/or other materials provided with the distribution.
  3. The name of the author may not be used to endorse or promote products
     derived from this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
  THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"

Class Method Summary collapse

Class Method Details

.platformObject



19
20
21
# File 'lib/version.rb', line 19

def Version.platform
	return "#{RUBY_PLATFORM}"
end

.ruby_versionObject



15
16
17
# File 'lib/version.rb', line 15

def Version.ruby_version
	return "Ruby #{RUBY_VERSION}"
end

.stateObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/version.rb', line 4

def Version.state
	result = ""
	if STATE != "" then
		result = ".#{STATE}"
		if STATEVER > 0 then
			result += ("%d" % STATEVER)
		end
	end
	return result
end