eco-helpers 2.0.54 → 2.0.55
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -2
- data/lib/eco/api/common/session/sftp.rb +10 -1
- data/lib/eco/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: a4e49d95179b6066cd2729e64c1db009ed77de653c45a73eaebeab2387ae3bde
|
4
|
+
data.tar.gz: 746f3e6e1f8e17be778ec1c902a71810fa46c6439ea886449f2cf5dc7223d2b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88b70189433c7d4c71ea6b549e0eedbadafe9172bd8ea206d83e09f5bade447707f503e92b28f315e720e75743876f8aac480daf0ef5527d4525d17603e00bb2
|
7
|
+
data.tar.gz: d1d513c1c032101ab2aa9af5b1b41a542e99c0cb8312473c0b188698e855cdae965decda09134f01ec57123f2b518438dfe60c3a82265c2d93fdef51495ed0b3
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [2.0.55] - 2022-04-xx
|
5
|
+
|
6
|
+
### Added
|
7
|
+
### Changed
|
8
|
+
- `Eco::API::UseCases::DefaultCases::Samples::Sftp` should move the basename to Windows compatible chars.
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
|
4
12
|
## [2.0.54] - 2022-04-04
|
5
13
|
|
6
14
|
### Added
|
7
15
|
- `Eco::API::UseCases::DefaultCases::Samples::Sftp` should tell where the files went in the local.
|
8
16
|
|
9
|
-
### Changed
|
10
|
-
### Fixed
|
11
17
|
|
12
18
|
## [2.0.53] - 2022-04-04
|
13
19
|
|
@@ -65,8 +65,11 @@ module Eco
|
|
65
65
|
# @param files [String, Array<String>] full path to remote file(s) to be downloaded
|
66
66
|
# @param local_folder [String] local destination folder (`"."` if not specified)
|
67
67
|
def download(files, local_folder: nil)
|
68
|
+
puts "Creating local files:"
|
68
69
|
[files].flatten.compact.map do |fullname|
|
69
|
-
|
70
|
+
basename = windows_basename(fullname)
|
71
|
+
dest_fullname = File.join(local_folder || ".", basename)
|
72
|
+
puts " • #{dest_fullname}"
|
70
73
|
sftp_session.download(fullname, dest_fullname)
|
71
74
|
end.each do |dw|
|
72
75
|
# run SSH event loop while dw.active?
|
@@ -76,6 +79,12 @@ module Eco
|
|
76
79
|
|
77
80
|
private
|
78
81
|
|
82
|
+
def windows_basename(remote_fullname)
|
83
|
+
parts = remote_fullname.split(/[\\\/]/).map {|node| node.gsub(/[<>:\\\/\|?*]/, '_')}
|
84
|
+
local_fullname = File.join(*parts)
|
85
|
+
File.basename(local_fullname)
|
86
|
+
end
|
87
|
+
|
79
88
|
def logger
|
80
89
|
@enviro&.logger || ::Logger.new(IO::NULL)
|
81
90
|
end
|
data/lib/eco/version.rb
CHANGED