module ArchiveUploader

Constants

AUTH_METHODS
VERSION

Public Instance Methods

get_url() click to toggle source
# File lib/archive_uploader.rb, line 27
def get_url
  ENV["ARCHIVE_UPLOADER_URL"] || @options.url 
end
start(options) click to toggle source
# File lib/archive_uploader.rb, line 13
def start(options)
  @options = options
  puts get_url
  puts "Start uploading files"
  @file = Archiver.new(:files => options.directories).perform!
  @git_data = Git.data
  # puts @git_data
  puts Curb.new(:file => @file.path, :fields => @git_data, :url => ENV["ARCHIVE_UPLOADER_URL"], :auth => options.auth).perform!
  
ensure
  FileUtils.rm(@file)
end