lib/figs/git_handler.rb in figs-1.2.2 vs lib/figs/git_handler.rb in figs-1.2.3

- old
+ new

@@ -1,16 +1,17 @@ require "git" +require "figs/directory_flattener" module Figs module GitHandler extend self TMP_GIT_DIR = "tmp/figs/" def location(gitpath, filenames) @temp_files = [] git_clone gitpath - temp_filenames(([]<< filenames).flatten) + temp_filenames(([]<< Figs::DirectoryFlattener.flattened_filenames(filenames.collect {|filename| "#{TMP_GIT_DIR}#{filename}"})).flatten) rescue Exception => e p e clear_tmp_dir clear_temp_files end @@ -30,10 +31,10 @@ end def copy_to_temp_files(filename) temp_file = Tempfile.new("#{filename.gsub('/','-')}") temp_file.open - temp_file.write(File.open("#{TMP_GIT_DIR}#{filename}").read) + temp_file.write(File.open("#{filename}").read) temp_file.flush @temp_files << temp_file temp_file.path end