backup_client 0.1.7 → 0.1.9
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 +4 -4
- data/lib/backup_client/helpers/ftp_helper.rb +7 -3
- data/lib/backup_client.rb +1 -1
- metadata +1 -2
- data/backup_client-0.1.5.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bbb74e182f60e139167e540d22837dabf046f6471f48d4729e072e73587b6c4
|
4
|
+
data.tar.gz: e4fc50965d2f786d53cb91ff519a816993c9f9d3c5a6e62e44af286fcab8be02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6416e2297e85483d190158496f55729a6fcf61993d6a5339c881fe5c5e56d9a55add712d1a5b197b31e4d479b5b82119abea7643800c7ac818e8cc8ad4b3af1c
|
7
|
+
data.tar.gz: cbe45e879d0ba38112a47c7e59cf2c14daebeda7f1892b443c973bbc0170a51907cb9930df3b4bbe57e61e85ea2305ddc523ffda863365b7fcb23f514b4e28be
|
@@ -4,7 +4,7 @@ module BackupClient
|
|
4
4
|
module Helpers
|
5
5
|
module FtpHelper
|
6
6
|
def to_unix_path(path)
|
7
|
-
path.
|
7
|
+
"/#{path.sub(/^[A-Za-z]:[\\\/]/, '')}".gsub("\\", "/").gsub(/\/+/, '/')
|
8
8
|
end
|
9
9
|
|
10
10
|
def ftp_chdir(ftp_client, path)
|
@@ -18,11 +18,15 @@ module BackupClient
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def upload_dir_ftp(local_folder, destination_folder)
|
21
|
-
::BackupClient::Components::Ftp::Commands::FolderUpload.new(
|
21
|
+
::BackupClient::Components::Ftp::Commands::FolderUpload.new(
|
22
|
+
ftp_client, local_folder.gsub('//', '/'), destination_folder
|
23
|
+
).call
|
22
24
|
end
|
23
25
|
|
24
26
|
def upload_file_ftp(local_file_path, remote_folder_path)
|
25
|
-
::BackupClient::Components::Ftp::Commands::FileUpload.new(
|
27
|
+
::BackupClient::Components::Ftp::Commands::FileUpload.new(
|
28
|
+
ftp_client, local_file_path.gsub('//', '/'), remote_folder_path
|
29
|
+
).call
|
26
30
|
end
|
27
31
|
|
28
32
|
def ftp_dir_exists?(ftp_client, path)
|
data/lib/backup_client.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backup_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex
|
@@ -66,7 +66,6 @@ files:
|
|
66
66
|
- LICENSE.txt
|
67
67
|
- README.md
|
68
68
|
- Rakefile
|
69
|
-
- backup_client-0.1.5.gem
|
70
69
|
- lib/backup_client.rb
|
71
70
|
- lib/backup_client/components/ftp/commands/create_folder.rb
|
72
71
|
- lib/backup_client/components/ftp/commands/file_upload.rb
|
data/backup_client-0.1.5.gem
DELETED
Binary file
|