##// END OF EJS Templates
change tabs to spaces in lib/redmine/version.rb....
Toshi MARUYAMA -
r5429:d1eb1fb07dd3
parent child
Show More
@@ -5,7 +5,7 module Redmine
5 5 MAJOR = 1
6 6 MINOR = 1
7 7 TINY = 2
8
8
9 9 # Branch values:
10 10 # * official release: nil
11 11 # * stable branch: stable
@@ -20,24 +20,25 module Redmine
20 20 f = File.open(entries_path, 'r')
21 21 entries = f.read
22 22 f.close
23 if entries.match(%r{^\d+})
24 revision = $1.to_i if entries.match(%r{^\d+\s+dir\s+(\d+)\s})
25 else
26 xml = REXML::Document.new(entries)
27 revision = xml.elements['wc-entries'].elements[1].attributes['revision'].to_i
28 end
29 rescue
30 # Could not find the current revision
31 end
32 end
33 revision
23 if entries.match(%r{^\d+})
24 revision = $1.to_i if entries.match(%r{^\d+\s+dir\s+(\d+)\s})
25 else
26 xml = REXML::Document.new(entries)
27 revision =
28 xml.elements['wc-entries'].elements[1].attributes['revision'].to_i
29 end
30 rescue
31 # Could not find the current revision
32 end
33 end
34 revision
34 35 end
35 36
36 37 REVISION = self.revision
37 ARRAY = [MAJOR, MINOR, TINY, BRANCH, REVISION].compact
38 STRING = ARRAY.join('.')
38 ARRAY = [MAJOR, MINOR, TINY, BRANCH, REVISION].compact
39 STRING = ARRAY.join('.')
39 40
40 def self.to_a; ARRAY end
41 def self.to_a; ARRAY end
41 42 def self.to_s; STRING end
42 43 end
43 44 end
General Comments 0
You need to be logged in to leave comments. Login now