fastlane-plugin-ftps 0.1.18 → 0.1.20

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: c8cc54750dc7922e2dee8b6dc8f25b417250cc80c33a988c2d692baa21e43ec9
4
- data.tar.gz: 65417e5e8270174856bae91a86709909ce3de5295d7887a969bb5fba3171e9d8
3
+ metadata.gz: d4c1a6c9e85fb0190557d1942eb350eb7047cb8f08dd125ef32813d92e56be74
4
+ data.tar.gz: faf1d87828c3ad8fac45731ea32dbefba80fd29a1c4784c0872c26e122ba3b06
5
5
  SHA512:
6
- metadata.gz: 9c8d54fc23afb7d24e2bf18474e04bb01a08e540df682bbaa0646cf9930e3aa912c918a469184df8bb3793670c070c723d436dc6d33e5dfebd19703641e7365c
7
- data.tar.gz: 79cc80aa9c3e048b7f5bf611ad9e1d919a562b084185a19f0f3aaa5439d613874e5fcbf1c446cb8297cb16f39ab121c38919cb488e9de5e372c13f360c9db6e4
6
+ metadata.gz: 7575a424af5a8352f3eed74f0f4338c44591251374585b93d9f1d88238b15ba0ee26250ea9a32744ebe0e1b9534872916dc3f858cab11b62609488a09368d7e7
7
+ data.tar.gz: d2f489f74074428db085949b464c217bd133f8c5c7d7fa6b0cc55ad974b905f33114fdb1b5863e607e8c7632843896ac7336f3df06c5db78e8771788ce70d406
@@ -19,6 +19,23 @@ module Fastlane
19
19
  end
20
20
  end
21
21
 
22
+ def ensure_remote_path(ftp, folder)
23
+ parts = folder.split('/')
24
+ current_path = ''
25
+ parts.each do |part|
26
+ # Pomijamy puste elementy (np. jeśli folder zaczyna się od '/')
27
+ next if part.empty?
28
+
29
+ current_path = "#{current_path}/#{part}"
30
+ begin
31
+ ftp.chdir(current_path)
32
+ rescue Net::FTPPermError
33
+ ftp.mkdir(part)
34
+ ftp.chdir(current_path)
35
+ end
36
+ end
37
+ end
38
+
22
39
  def self.connect_ftp(params)
23
40
  ftp = open(params)
24
41
  ftp
@@ -36,7 +53,7 @@ module Fastlane
36
53
 
37
54
  def self.put(params)
38
55
  ftp = connect_ftp(params)
39
- ensure_remote_path(params[:upload][:dest], folder)
56
+ ensure_remote_path(ftp, params[:upload][:dest])
40
57
  ftp.chdir(params[:upload][:dest])
41
58
  filesize = File.size(params[:upload][:src])
42
59
  progressbar.total = filesize
@@ -60,8 +77,10 @@ module Fastlane
60
77
  ftp = connect_ftp(params)
61
78
 
62
79
  # Upewniamy się, że ścieżka (folder) do której wgrywamy istnieje.
63
- base_file_path= params[:upload][:base_file_path]
64
- file_paths = params[:upload][:src]
80
+ base_file_path = params[:upload_multiple][:base_file_path]
81
+ file_paths = params[:upload_multiple][:src]
82
+
83
+ ensure_remote_path(ftp, params[:upload_multiple][:dest])
65
84
 
66
85
  total_size = file_paths.reduce(0) { |sum, file_path| sum + File.size(file_path) }
67
86
  progressbar = ProgressBar.create(
@@ -93,23 +112,6 @@ module Fastlane
93
112
  UI.success("Successfully uploaded all files to #{params[:upload][:dest]}")
94
113
  end
95
114
 
96
- def ensure_remote_path(ftp, folder)
97
- parts = folder.split('/')
98
- current_path = ''
99
- parts.each do |part|
100
- # Pomijamy puste elementy (np. jeśli folder zaczyna się od '/')
101
- next if part.empty?
102
-
103
- current_path = "#{current_path}/#{part}"
104
- begin
105
- ftp.chdir(current_path)
106
- rescue Net::FTPPermError
107
- ftp.mkdir(part)
108
- ftp.chdir(current_path)
109
- end
110
- end
111
- end
112
-
113
115
  #####################################################
114
116
  # @!group Documentation
115
117
  #####################################################
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Ftps
3
- VERSION = "0.1.18"
3
+ VERSION = "0.1.20"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-ftps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafał Dziuryk