dev 1.0.192 → 1.0.193
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/dev/Dep.rb +1 -1
- data/lib/dev/Deps.rb +13 -1
- metadata +1 -1
data/lib/dev/Dep.rb
CHANGED
@@ -25,7 +25,7 @@ class Dep < Hash
|
|
25
25
|
def initialize(hash)
|
26
26
|
hash.each { |name,value| self[name]=value }
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
def get_rel_dir
|
30
30
|
return Dev::Environment.expand_string_variables(self[:dir]) unless self[:dir].nil?
|
31
31
|
uri=Dev::Environment.expand_string_variables(self[:uri])
|
data/lib/dev/Deps.rb
CHANGED
@@ -6,6 +6,7 @@ class Deps < Hash
|
|
6
6
|
if !v.nil? && v.kind_of?(Hash)
|
7
7
|
v[:dir]=get_dir(v) if !v.has_key?(:dir)
|
8
8
|
v[:rev]=get_rev(v) if !v.has_key?(:rev) && !get_rev(v).nil?
|
9
|
+
v[:uri]=get_uri(v)
|
9
10
|
end
|
10
11
|
}
|
11
12
|
end
|
@@ -20,11 +21,22 @@ class Deps < Hash
|
|
20
21
|
end
|
21
22
|
|
22
23
|
def get_rev(h)
|
23
|
-
if(h.has_key?(:uri) && h[:uri].include?('@'))
|
24
|
+
if(h.has_key?(:uri) && h[:uri].include?('@') && !h[:uri].include?("@REV"))
|
24
25
|
return h[:uri].split('@')[1]
|
25
26
|
end
|
27
|
+
if(h.has_key?(:dir) && h[:dir].include?('@') && !h[:dir].include?("@REV"))
|
28
|
+
return h[:dir].split('@')[1]
|
29
|
+
end
|
26
30
|
nil
|
27
31
|
end
|
28
32
|
|
33
|
+
def get_uri(h)
|
34
|
+
uri=h[:uri]
|
35
|
+
if(uri.include?("@REV") && h.has_key?(:rev) && !h[:rev].nil?)
|
36
|
+
uri=uri.gsub("@REV","@#{h[:rev]}")
|
37
|
+
end
|
38
|
+
return uri
|
39
|
+
end
|
40
|
+
|
29
41
|
end # class Deps
|
30
42
|
end # module Dev
|