ruby-quilt 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/quilt.rb +7 -7
- metadata +1 -1
data/lib/quilt.rb
CHANGED
@@ -43,7 +43,7 @@ class Quilt
|
|
43
43
|
|
44
44
|
def get_module_name(filename)
|
45
45
|
return nil unless filename
|
46
|
-
matches = filename.match(/(^.*\/|^)(
|
46
|
+
matches = filename.match(/(^.*\/|^)([^\/]+)$/)
|
47
47
|
return nil unless matches && matches.length >= 3
|
48
48
|
matches[2]
|
49
49
|
end
|
@@ -127,14 +127,14 @@ class Quilt
|
|
127
127
|
end
|
128
128
|
if manifest[OPTIONAL_KEY] && manifest[OPTIONAL_KEY].is_a?(Hash)
|
129
129
|
manifest[OPTIONAL_KEY].each do |filename, dependancies|
|
130
|
-
|
131
|
-
if (
|
132
|
-
|
133
|
-
if (
|
130
|
+
tmp_module_name = get_module_name(filename)
|
131
|
+
if (tmp_module_name)
|
132
|
+
tmp_module = get_module(filename, dependancies, dir)
|
133
|
+
if (tmp_module)
|
134
134
|
new_version[prefix][:optional][tmp_module_name] = tmp_module
|
135
|
-
else
|
136
|
-
log_error(" Could not extract #{prefix.to_s} module name from: #{filename}")
|
137
135
|
end
|
136
|
+
else
|
137
|
+
log_error(" Could not extract #{prefix.to_s} module name from: #{filename}")
|
138
138
|
end
|
139
139
|
end
|
140
140
|
end
|