lib/astrails/safe.rb in astrails-safe-0.2.7 vs lib/astrails/safe.rb in astrails-safe-0.3.0
- old
+ new
@@ -1,5 +1,7 @@
+require "astrails/safe/version"
+
require "aws/s3"
require "cloudfiles"
require 'net/sftp'
require 'fileutils'
require 'benchmark'
@@ -14,12 +16,10 @@
require 'astrails/safe/stream'
require 'astrails/safe/backup'
-require 'astrails/safe/backup'
-
require 'astrails/safe/source'
require 'astrails/safe/mysqldump'
require 'astrails/safe/pgdump'
require 'astrails/safe/archive'
require 'astrails/safe/svndump'
@@ -47,11 +47,11 @@
[Pgdump, [:pgdump, :databases]],
[Archive, [:tar, :archives]],
[Svndump, [:svndump, :repos]]
].each do |klass, path|
if collection = config[*path]
- collection.each do |name, config|
- klass.new(name, config).backup.run(config, :gpg, :gzip, :local, :s3, :cloudfiles, :sftp)
+ collection.each do |name, c|
+ klass.new(name, c).backup.run(c, :gpg, :gzip, :local, :s3, :cloudfiles, :sftp)
end
end
end
Astrails::Safe::TmpFile.cleanup