Sha256: 7829f1222c1a25bb0e04ec0f18cf948d79a2cf0b8b067b1f83f043c07529a166

Contents?: true

Size: 563 Bytes

Versions: 3

Compression:

Stored size: 563 Bytes

Contents

require "bundler/gem_tasks"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)
task :default => :spec

desc "Run the fake s3 server"
task :s3_server do
  trap("SIGINT") {
    puts "Restoring original s3cmd config..."
    FileUtils.cp("#{Dir.home}/.s3cfg.original", "#{Dir.home}/.s3cfg") rescue Errno::ENOENT
  }

  Dir.mktmpdir do |dir|
    FileUtils.cp("#{Dir.home}.s3cfg", "#{Dir.home}/.s3cfg.original") rescue Errno::ENOENT
    FileUtils.cp("s3cfg", "#{Dir.home}/.s3cfg")
    system("bundle exec bin/fakes3 --port 12345 --root #{dir}")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
s3imageoptim-0.1.2 Rakefile
s3imageoptim-0.1.1 Rakefile
s3imageoptim-0.1.0 Rakefile