lib/artifacts.rb in dev_tasks-0.0.26 vs lib/artifacts.rb in dev_tasks-0.0.27
- old
+ new
@@ -1,5 +1,7 @@
+require_relative('./dependencies.rb')
+
class Artifacts < Hash
def initialize
# gem, dev_tasks-0.0.7.gem
Dir.glob('*.gemspec') {|f|
spec=Gem::Specification.load(f)
@@ -13,9 +15,18 @@
assemblyName=text[/<AssemblyName>([\w\.]+)</,1]
outputPath=text[/Release[.\w\W]+<OutputPath>([\w\.\\]+)</,1]
if(!assemblyName.nil? && !outputPath.nil? && !assemblyName.include?("Test"))
cs_dll = "#{outputPath}\\#{assemblyName}.dll".gsub("\\\\","\\").gsub('/','\\').gsub('\\','/')
self[assemblyName]=cs_dll
+
+ # add in file dependencies
+ deps = Dependencies.get_dependencies_from_file f
+ if(deps.has_key?(:file))
+ deps[:file].each {|d|
+ name=d.split('/\\').last.gsub('.dll','')
+ self["#{assemblyName} #{name}"] = d
+ }
+ end
end
}
end
end
\ No newline at end of file