fastlane-plugin-ftps 0.1.12 → 0.1.13
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: 2307dfa6be69cee29694ae880bc37e2d2d141ee15b9f09b881b7852b4621fc2c
|
4
|
+
data.tar.gz: 87feacb48f9ce546d14c3cec8dd7a70f29bf087091a0bf11aea20f94ab54c9f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cef2f61368878f4694a8c34044b7a4725f22d3c1e1b9e39e982202825ea3dc3a68f9766b0f18f2081272dede141e15825b293a53cce03632c2416afca605721
|
7
|
+
data.tar.gz: fad58d0824deb61e8e66e9e3729ee6e3a979a7ceb77156677a873d4ba840743f9c7419b364960e272aee5dbacec013958de2abb7bd9fc0eb19353b63001fc006
|
@@ -19,36 +19,24 @@ module Fastlane
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
def self.connect_ftp(params)
|
23
|
-
ftp =
|
24
|
-
|
25
|
-
ftp.close
|
22
|
+
def self.connect_ftp(params, folder)
|
23
|
+
ftp = open(params, folder)
|
24
|
+
ftp
|
26
25
|
end
|
27
26
|
|
28
27
|
|
29
|
-
def self.open(
|
28
|
+
def self.open(param, folder)
|
30
29
|
ftp = Net::FTP.new(params[:host], params[:options])
|
31
30
|
ftp.connect(params[:host], params[:port])
|
32
31
|
ftp.login(params[:username], params[:password])
|
33
32
|
ftp.passive = true
|
34
33
|
UI.success("Successfully Login to #{params[:host]}:#{params[:port]}")
|
35
|
-
|
36
|
-
growing_path = ""
|
37
|
-
parts.each do |part|
|
38
|
-
growing_path += "/" + part
|
39
|
-
begin
|
40
|
-
ftp.chdir(growing_path)
|
41
|
-
rescue
|
42
|
-
ftp.mkdir(part) unless File.exist?(growing_path)
|
43
|
-
retry
|
44
|
-
end
|
45
|
-
end
|
46
|
-
ftp.close()
|
47
|
-
UI.success("FTP move in #{growing_path} on #{params[:host]}:#{params[:port]}")
|
34
|
+
ftp
|
48
35
|
end
|
49
36
|
|
50
37
|
def self.put(params)
|
51
38
|
ftp = connect_ftp(params)
|
39
|
+
ensure_remote_path(params[:upload][:dest], folder)
|
52
40
|
ftp.chdir(params[:upload][:dest])
|
53
41
|
filesize = File.size(params[:upload][:src])
|
54
42
|
progressbar.total = filesize
|
@@ -73,9 +61,7 @@ module Fastlane
|
|
73
61
|
|
74
62
|
# Upewniamy się, że ścieżka (folder) do której wgrywamy istnieje.
|
75
63
|
base_file_apth= params[:upload][:base_file_apth]
|
76
|
-
ensure_remote_path(ftp, params[:upload][:dest])
|
77
64
|
file_paths = params[:upload][:src]
|
78
|
-
ftp.chdir(params[:upload][:dest])
|
79
65
|
|
80
66
|
total_size = file_paths.reduce(0) { |sum, file_path| sum + File.size(file_path) }
|
81
67
|
progressbar = ProgressBar.create(
|