def download_artifact(path, opts = {})
      download_file = "#{name}.#{Time.new.to_i}"
      begin
        URI.download path, download_file, opts
        if File.exist?(download_file)
          FileUtils.mkdir_p(File.dirname(name))
          FileUtils.mv(download_file, name)
        end
      ensure
        File.delete(download_file) if File.exist?(download_file)
      end
    end
def download_artifact(path, opts = {})
      download_file = "#{name}.#{Time.new.to_i}"
      begin
        URI.download path, download_file, opts
        if File.exist?(download_file)
          FileUtils.mkdir_p(File.dirname(name))
          FileUtils.mv(download_file, name)
        end
      ensure
        File.delete(download_file) if File.exist?(download_file)
      end
    end
:call-seq:
   download_artifact

 Downloads artifact from given repository,
 supports downloading snapshot artifact with relocation on succeed to local repository