Module: Figs::GitHandler
Constant Summary collapse
- TMP_GIT_DIR =
"tmp/figs/"
Instance Method Summary collapse
Instance Method Details
#clear_temp_files ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/figs/git_handler.rb', line 19 def clear_temp_files return unless !@temp_files.nil? @temp_files.each do |temp_file| temp_file.close temp_file.unlink end end |
#location(gitpath, filenames) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/figs/git_handler.rb', line 9 def location(gitpath, filenames) @temp_files = [] git_clone gitpath temp_filenames(([]<< Figs::DirectoryFlattener.flattened_filenames(filenames.collect {|filename| "#{TMP_GIT_DIR}#{filename}"})).flatten) rescue Exception => e puts e clear_tmp_dir clear_temp_files end |