lib/mortar/project.rb in mortar-0.15.40 vs lib/mortar/project.rb in mortar-0.15.41
- old
+ new
@@ -157,9 +157,10 @@
file_paths = Dir[File.join(@path, "**", "*#{@filename_extension}")]
scripts = file_paths.collect{|element_path| [element_name(element_path), element(element_name(element_path), element_path)]}
#Check for duplicates.
name_groups = scripts.group_by{ |x| x[0] }
+ name_groups.delete("__init__")
duplicates = name_groups.find_all{ |k,v| v.length > 1 }
if duplicates.length > 0
raise ProjectError, "Multiple scripts found with the same name. Each script must have a unique name regardless of what directory it is in. Duplicate script names found: #{duplicates.collect{|d| d[0]}}"
end