lib/fig/repository.rb in fig-0.1.21 vs lib/fig/repository.rb in fig-0.1.22

- old
+ new

@@ -89,10 +89,11 @@ else false end end if resources.size > 0 + resources = expand_globs_from(resources) file = "resources.tar.gz" @os.create_archive(file, resources) new_package_statements.unshift(Archive.new(file)) at_exit { File.delete(file) } end @@ -191,9 +192,16 @@ rescue $stderr.puts "install failed, cleaning up" delete_local_package(package_name, version_name) raise end + end + + # 'resources' is an Array of filenames: ['tmp/foo/file1', 'tmp/foo/*.jar'] + def expand_globs_from(resources) + expanded_files = [] + resources.each {|f| expanded_files.concat(Dir.glob(f))} + expanded_files end def is_url?(url) not (/ftp:\/\/|http:\/\/|file:\/\/|ssh:\/\// =~ url).nil? end