chriseppstein-compass 0.6.10 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/compass/version.rb +4 -12
- metadata +1 -1
data/lib/compass/version.rb
CHANGED
@@ -12,7 +12,6 @@ module Compass
|
|
12
12
|
return @version if defined?(@version)
|
13
13
|
|
14
14
|
read_version_file
|
15
|
-
parse_version
|
16
15
|
|
17
16
|
if r = revision
|
18
17
|
@version[:rev] = r
|
@@ -29,17 +28,10 @@ module Compass
|
|
29
28
|
end
|
30
29
|
|
31
30
|
def read_version_file
|
32
|
-
|
33
|
-
|
34
|
-
}
|
35
|
-
|
36
|
-
|
37
|
-
def parse_version
|
38
|
-
dotted_string, @version[:label] = @version[:string].split(/-/, 2)
|
39
|
-
numbers = dotted_string.split('.').map { |n| n.to_i }
|
40
|
-
[:major, :minor, :teeny].zip(numbers).each do |attr, value|
|
41
|
-
@version[attr] = value
|
42
|
-
end
|
31
|
+
require 'yaml'
|
32
|
+
@version = YAML::load(File.read(scope('VERSION.yml')))
|
33
|
+
@version[:string] = "#{@version[:major]}.#{@version[:minor]}.#{@version[:patch]}"
|
34
|
+
@version[:teeny] = @version[:patch]
|
43
35
|
end
|
44
36
|
|
45
37
|
def revision
|