lib/overapp/files.rb in overapp-0.3.0 vs lib/overapp/files.rb in overapp-0.3.1

- old
+ new

@@ -62,11 +62,11 @@ def load(descriptor, ops={}) raise "bad #{descriptor}" if descriptor.blank? if ops[:type] == :command load_command(descriptor,ops) - elsif descriptor =~ /\.git/ + elsif descriptor =~ /\.git/ || descriptor =~ /file:\/\// load_repo(descriptor) else load_dir(descriptor,ops) end end @@ -77,9 +77,10 @@ combined = base.apply(top) combined.write_to! output_dir end def load_repo(url) + url = url.gsub "ROOT_DIR", File.expand_path(File.dirname(__FILE__) + "/../..") dir = "/tmp/#{rand(1000000000000000000)}" ec "git clone #{url} #{dir} 2>&1", :silent => true load dir ensure ec "rm -rf #{dir}", :silent => true \ No newline at end of file