Sha256: 67a5ac6f50fca90a455edd50b9de4079d8eb96e5df582e7c45e19de2e8dddbda

Contents?: true

Size: 620 Bytes

Versions: 1

Compression:

Stored size: 620 Bytes

Contents

require 'rspec/core/rake_task'
require './lib/selbackup.rb'

RSpec::Core::RakeTask.new(:spec)

task :default => :spec

task :test_upload do
  if ENV["key"] && ENV["secret"] && ENV["bucket"]
    key = ENV["key"]
    secret = ENV["secret"]
    bucket = ENV["bucket"]

    `mkdir upload_test/tmp`
    `bash upload_test/create_files.sh`
    sb = SelBackup.new(key, secret, bucket)
    files = Dir.glob("upload_test/tmp/*")
    files.each do | file |
      puts "Uploading: #{file}"
      sb.upload_file(file)
      `rm #{file}`
    end
  else
    puts "Usage: rake test_upload key='...' secret='...' bucket='...'"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
selbackup-0.1.0 Rakefile