Module: Redmine::VERSION

Defined in:
lib/redmine/version.rb

Overview

:nodoc:

Constant Summary collapse

MAJOR =
3
MINOR =
3
TINY =
9
BRANCH =

Branch values:

  • official release: nil

  • stable branch: stable

  • trunk: devel

'stable'
REVISION =
self.revision
ARRAY =
[MAJOR, MINOR, TINY, BRANCH, REVISION].compact
STRING =
ARRAY.join('.')

Class Method Summary collapse

Class Method Details

.revisionObject

Retrieves the revision from the working copy

Since:

  • 0.6.0



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/redmine/version.rb', line 16

def self.revision
  if File.directory?(File.join(Rails.root, '.svn'))
    begin
      path = Redmine::Scm::Adapters::AbstractAdapter.shell_quote(Rails.root.to_s)
      if `svn info --xml #{path}` =~ /revision="(\d+)"/
        return $1.to_i
      end
    rescue
      # Could not find the current revision
    end
  end
  nil
end

.to_aObject

Since:

  • 0.8.0



34
# File 'lib/redmine/version.rb', line 34

def self.to_a; ARRAY  end

.to_sObject

Since:

  • 0.4.2



35
# File 'lib/redmine/version.rb', line 35

def self.to_s; STRING end