sftp-sync 0.1.2 → 0.1.3
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/sftp/sync/client.rb +6 -2
- data/lib/sftp/sync/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb0cca0ee95ed24c2142f581adc73cf1599d8b16
|
|
4
|
+
data.tar.gz: 362efe2681388e8376547468dc848454a00535ea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5fa87d32d9cf9673bf969458e05c15960d4f9df541b6d864dfd268cf510d696a2edfb92103043b46f23a754ccb2e46ee11f8e1254a15de206d90a94799199f45
|
|
7
|
+
data.tar.gz: 5347b71e6013475a41a1610bf20e55cba77c7355d0bb329c86d10ae507922425dd01c72045b73a232912de493d95259c5c61cccb7a05d0fa6adb5e811b329be2
|
data/lib/sftp/sync/client.rb
CHANGED
|
@@ -136,10 +136,14 @@ module Sftp
|
|
|
136
136
|
def build_diff_map
|
|
137
137
|
diff_map = FileDiffMap.new
|
|
138
138
|
|
|
139
|
+
output_pathname = Pathname.new(File.expand_path(config.output_dir))
|
|
140
|
+
|
|
139
141
|
## enumerate local files
|
|
140
|
-
Dir[ File.join(
|
|
142
|
+
Dir[ File.join(output_pathname.to_s, '**', '*') ].each do |local_entry|
|
|
143
|
+
|
|
144
|
+
|
|
141
145
|
|
|
142
|
-
relative_path = Pathname.new(local_entry).relative_path_from(
|
|
146
|
+
relative_path = Pathname.new(local_entry).relative_path_from(output_pathname).to_s
|
|
143
147
|
|
|
144
148
|
diff_map.add(relative_path, (File.size?(local_entry)|| 0)) unless File.directory?(local_entry) || filter.match(relative_path)
|
|
145
149
|
end
|
data/lib/sftp/sync/version.rb
CHANGED