bdsync 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/bdsync/core.rb +0 -0
- data/lib/bdsync/sftp.rb +13 -4
- data/lib/bdsync/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3865c38b86bcf0540b21e46442709b59af317a9980e57cdecf372bc589b2ba3c
|
4
|
+
data.tar.gz: 58896d6137ae9f0e2cd06f593a5fe49c88a236ff134cd21dad6a6ac80f3a8cf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 027aa2ca7b11b67e7bd03c0424edb041ac7a00fdaf48d71fa91929653fd1490f6d467b4b035d319ab6c5d491aaa79bb2972e810c46839846926fa60e5b970be1
|
7
|
+
data.tar.gz: cd94a0d04298dc29595637e7b034806d22eaf1c56f234db9a9339d29e77ce78d9be6adee23ed4ef76ae4a56f8b073327b1cfc06b4911ce0b52b88bc7c74db8d7
|
data/Gemfile.lock
CHANGED
data/lib/bdsync/core.rb
CHANGED
File without changes
|
data/lib/bdsync/sftp.rb
CHANGED
@@ -101,9 +101,18 @@ module Bdsync
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def get_remote_file_md5 remote_path
|
104
|
-
puts "#{Utils.caller_info 1}
|
105
|
-
|
106
|
-
|
104
|
+
puts "#{Utils.caller_info 1} get_remote_file_md5 #{remote_path}".white
|
105
|
+
|
106
|
+
tmpfile = Tempfile.new 'sftp.rb-get_remote_file_md5-'
|
107
|
+
|
108
|
+
begin
|
109
|
+
tmpfile.close
|
110
|
+
|
111
|
+
@sftp.download! remote_path, tmpfile.path
|
112
|
+
Utils.file_md5 tmpfile.path
|
113
|
+
ensure
|
114
|
+
tmpfile.unlink # deletes the temp file
|
115
|
+
end
|
107
116
|
end
|
108
117
|
|
109
118
|
# for test
|
@@ -113,7 +122,7 @@ module Bdsync
|
|
113
122
|
begin
|
114
123
|
tmpfile.write content
|
115
124
|
tmpfile.flush
|
116
|
-
|
125
|
+
|
117
126
|
@sftp.upload! tmpfile.path, remote_path
|
118
127
|
ensure
|
119
128
|
tmpfile.close
|
data/lib/bdsync/version.rb
CHANGED