backup_client 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f1b2c30caf1cf07ea1bf17b7e1826df07c92adcd53d2de7e9ab9c70ce57b01d
|
4
|
+
data.tar.gz: c9370f3665bc720198baaef3fd724aa85edb83a521418a4e70bd4e0cee6a563d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53199c83635218313a595e5704daec73802c427b45171123774c837b511129817f85415d8c9da1bf9c5f78cd9eebda05c12413ba438d2b649aa38b20acf216db
|
7
|
+
data.tar.gz: 975b99b5039e9f2516944d1631cb8c0e308a777fb73f2e7b1c9a3183b85b6c1c43cbb240371633529d92b1ae8878e315e0d1e9005ab3d188d607679891f78251
|
@@ -15,7 +15,7 @@ module BackupClient
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def call
|
18
|
-
remote_file_path = [remote_folder_path, local_file_path].join("/").gsub("//", "/")
|
18
|
+
remote_file_path = [remote_folder_path, to_unix_path(local_file_path)].join("/").gsub("//", "/")
|
19
19
|
|
20
20
|
File.open(local_file_path, "rb") do |file|
|
21
21
|
ftp_client.putbinaryfile(file, remote_file_path)
|
@@ -15,7 +15,7 @@ module BackupClient
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def call
|
18
|
-
current_destination_folder = destination_folder + local_path
|
18
|
+
current_destination_folder = destination_folder + to_unix_path(local_path)
|
19
19
|
ftp_mkdir_p(current_destination_folder)
|
20
20
|
Dir.glob("#{local_path.gsub('\\', '/')}/**/*", File::FNM_DOTMATCH).each do |path|
|
21
21
|
basename = File.basename(path)
|
@@ -4,11 +4,7 @@ module BackupClient
|
|
4
4
|
module Helpers
|
5
5
|
module FtpHelper
|
6
6
|
def to_unix_path(path)
|
7
|
-
|
8
|
-
path.sub(/^[A-Za-z]:\\/, '/').gsub('\\', '/')
|
9
|
-
else
|
10
|
-
path
|
11
|
-
end
|
7
|
+
path.split(':').last.gsub("\\", "/").gsub(/\/+/, '/')
|
12
8
|
end
|
13
9
|
|
14
10
|
def ftp_chdir(ftp_client, path)
|
data/lib/backup_client.rb
CHANGED