Module: Redmine::VERSION

Defined in:
lib/redmine/version.rb

Constant Summary collapse

MAJOR =
6
MINOR =
0
TINY =
1
BRANCH =

Branch values:

  • official release: nil

  • stable branch: stable

  • trunk: devel

'devel'
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



36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/redmine/version.rb', line 36

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

.to_aObject



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

def self.to_a; ARRAY  end

.to_sObject



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

def self.to_s; STRING end