Mercurial > hg > soundsoftware-site
comparison lib/redmine/version.rb @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | 0c939c159af4 |
children | 5e80956cc792 5f33065ddc4b |
comparison
equal
deleted
inserted
replaced
908:c6c2cbd0afee | 909:cbb26bc654de |
---|---|
1 require 'rexml/document' | 1 require 'rexml/document' |
2 | 2 |
3 module Redmine | 3 module Redmine |
4 module VERSION #:nodoc: | 4 module VERSION #:nodoc: |
5 MAJOR = 1 | 5 MAJOR = 1 |
6 MINOR = 2 | 6 MINOR = 3 |
7 TINY = 1 | 7 TINY = 1 |
8 | 8 |
9 # Branch values: | 9 # Branch values: |
10 # * official release: nil | 10 # * official release: nil |
11 # * stable branch: stable | 11 # * stable branch: stable |
12 # * trunk: devel | 12 # * trunk: devel |
13 BRANCH = 'stable' | 13 BRANCH = 'stable' |
14 | 14 |
15 def self.revision | 15 def self.revision |
16 revision = nil | 16 revision = nil |
17 entries_path = "#{RAILS_ROOT}/.svn/entries" | 17 entries_path = "#{Rails.root}/.svn/entries" |
18 if File.readable?(entries_path) | 18 if File.readable?(entries_path) |
19 begin | 19 begin |
20 f = File.open(entries_path, 'r') | 20 f = File.open(entries_path, 'r') |
21 entries = f.read | 21 entries = f.read |
22 f.close | 22 f.close |
35 end | 35 end |
36 | 36 |
37 REVISION = self.revision | 37 REVISION = self.revision |
38 ARRAY = [MAJOR, MINOR, TINY, BRANCH, REVISION].compact | 38 ARRAY = [MAJOR, MINOR, TINY, BRANCH, REVISION].compact |
39 STRING = ARRAY.join('.') | 39 STRING = ARRAY.join('.') |
40 | 40 |
41 def self.to_a; ARRAY end | 41 def self.to_a; ARRAY end |
42 def self.to_s; STRING end | 42 def self.to_s; STRING end |
43 end | 43 end |
44 end | 44 end |