Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'develop'

  • Loading branch information...
commit 19f3a453e728dda4edeae828a23ad28d165aa4cf 2 parents de071be + 12441c9
@meskyanichi meskyanichi authored
View
2  lib/backup/archive.rb
@@ -49,7 +49,7 @@ def exclude(path)
def perform!
mkdir(archive_path)
Logger.message("#{ self.class } started packaging and archiving #{ paths.map { |path| "\"#{path}\""}.join(", ") }.")
- run("#{ utility(:tar) } -c #{ paths_to_exclude } #{ paths_to_package } 1> '#{ File.join(archive_path, "#{name}.tar") }' 2> /dev/null")
+ run("#{ utility(:tar) } -c -f '#{ File.join(archive_path, "#{name}.tar") }' #{ paths_to_exclude } #{ paths_to_package } 2> /dev/null")
end
private
View
3  lib/backup/storage/s3.rb
@@ -34,14 +34,13 @@ def initialize(&block)
instance_eval(&block) if block_given?
- @path = path.sub(/^\//, '')
@time = TIME
end
##
# This is the remote path to where the backup files will be stored
def remote_path
- File.join(path, TRIGGER, '/')
+ File.join(path, TRIGGER).sub(/^\//, '')
end
##
View
2  lib/backup/version.rb
@@ -13,7 +13,7 @@ class Version
# Defines the minor version
# PATCH:
# Defines the patch version
- MAJOR, MINOR, PATCH = 3, 0, 10
+ MAJOR, MINOR, PATCH = 3, 0, 11
##
# Returns the major version ( big release based off of multiple minor releases )
View
4 spec/archive_spec.rb
@@ -64,7 +64,7 @@
context 'when both paths were added and paths that should be excluded were added' do
it 'should render both the syntax for the paths that be included as well as excluded' do
archive.expects(:mkdir).with(File.join(Backup::TMP_PATH, Backup::TRIGGER, 'archive'))
- archive.expects(:run).with("tar -c --exclude={'/home/rspecuser/excludefile','/home/rspecuser/excludedir/'} '/home/rspecuser/somefile' '/home/rspecuser/logs/' '/home/rspecuser/dotfiles/' 1> '#{File.join(Backup::TMP_PATH, Backup::TRIGGER, 'archive', "#{:dummy_archive}.tar")}' 2> /dev/null")
+ archive.expects(:run).with("tar -c -f '#{File.join(Backup::TMP_PATH, Backup::TRIGGER, 'archive', "#{:dummy_archive}.tar")}' --exclude={'/home/rspecuser/excludefile','/home/rspecuser/excludedir/'} '/home/rspecuser/somefile' '/home/rspecuser/logs/' '/home/rspecuser/dotfiles/' 2> /dev/null")
archive.expects(:utility).with(:tar).returns(:tar)
archive.perform!
end
@@ -77,7 +77,7 @@
end
archive.stubs(:utility).returns(:tar)
- archive.expects(:run).with("tar -c '/path/to/archive' 1> '#{File.join(Backup::TMP_PATH, Backup::TRIGGER, 'archive', "#{:dummy_archive}.tar")}' 2> /dev/null")
+ archive.expects(:run).with("tar -c -f '#{File.join(Backup::TMP_PATH, Backup::TRIGGER, 'archive', "#{:dummy_archive}.tar")}' '/path/to/archive' 2> /dev/null")
archive.perform!
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.