lg_pod_plugin 1.1.4 → 1.1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lg_pod_plugin/downloader/l_cache.rb +2 -2
- data/lib/lg_pod_plugin/downloader/request.rb +6 -0
- data/lib/lg_pod_plugin/git/gitlab_api.rb +1 -0
- data/lib/lg_pod_plugin/git/gitlab_archive.rb +8 -5
- data/lib/lg_pod_plugin/installer/PodDownload +0 -0
- data/lib/lg_pod_plugin/net/l_uri.rb +1 -2
- data/lib/lg_pod_plugin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89c661389be97295bc4212695eb7309ad7e2649c8ace5ebaab3ee0353f772831
|
4
|
+
data.tar.gz: dcf0e7768f3e036385bead612fcbe36244c273432cc8f70c80ad113cc541bd9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85c16f9a50df851ae650f987d48a831cd0f399a2dbd09e5a0804c2949a84fd2862e8f0122cff679794f40094c38231791a2a298328dc1b451c5701a381d76360
|
7
|
+
data.tar.gz: 8d6181fbd175682983edf0c20f22856d4fb315063070cb051e91de739a3766d1e8915030bb21e5f54dc6f666c63f2717d29426c0b8be302f769ce5b1f18b0bac
|
@@ -13,8 +13,8 @@ module LgPodPlugin
|
|
13
13
|
|
14
14
|
public
|
15
15
|
def pod_cache_exist(name, options, spec = nil, released_pod = false)
|
16
|
-
destination, cache_pod_spec = self.find_pod_cache name, options, spec, released_pod
|
17
16
|
target = LProject.shared.workspace.join("Pods").join(name)
|
17
|
+
destination, cache_pod_spec = self.find_pod_cache name, options, spec, released_pod
|
18
18
|
if (File.exist?(destination) && !destination.children.empty?) && File.exist?(target) && !target.children.empty?
|
19
19
|
[true, destination, cache_pod_spec]
|
20
20
|
else
|
@@ -47,7 +47,7 @@ module LgPodPlugin
|
|
47
47
|
Pod::Downloader::Request.new(spec: nil, released: false , name: name, params: params)
|
48
48
|
end
|
49
49
|
end
|
50
|
-
|
50
|
+
#MARK - 缓存方法
|
51
51
|
def self.path_for_pod(request, slug_opts = {})
|
52
52
|
root = self.root_path
|
53
53
|
root + request.slug(**slug_opts)
|
@@ -57,13 +57,13 @@ module LgPodPlugin
|
|
57
57
|
else
|
58
58
|
return nil
|
59
59
|
end
|
60
|
-
|
61
60
|
lg_spec = self.spec
|
62
61
|
unless lg_spec
|
63
62
|
podspec_filename = self.name + ".podspec"
|
64
63
|
podspec_content = GitLabAPI.get_podspec_file_content(host, token, project.id, sha, podspec_filename)
|
65
64
|
unless podspec_content && LUtils.is_a_string?(podspec_content)
|
66
|
-
download_url = host + "/api/v4/projects/" + "#{project.id}" + "/repository/archive.tar.bz2
|
65
|
+
download_url = host + "/api/v4/projects/" + "#{project.id}" + "/repository/archive.tar.bz2\\?" + "sha\\=#{sha}"
|
66
|
+
download_url += "\\&access_token\\=#{token}" if token
|
67
67
|
return [{ "filename" => "#{self.name}.tar.bz2", "url" => download_url }]
|
68
68
|
end
|
69
69
|
pod_spec_file_path = sandbox_path.join("#{podspec_filename}")
|
@@ -79,7 +79,8 @@ module LgPodPlugin
|
|
79
79
|
end
|
80
80
|
@podspec_content = podspec_content
|
81
81
|
end
|
82
|
-
download_url = host + "/api/v4/projects/" + "#{project.id}" + "/repository/archive.tar.bz2
|
82
|
+
download_url = host + "/api/v4/projects/" + "#{project.id}" + "/repository/archive.tar.bz2\\?" + "sha\\=#{sha}"
|
83
|
+
download_url += "\\&access_token\\=#{token}" if token
|
83
84
|
return [{ "filename" => "#{self.name}.tar.bz2", "url" => download_url }]
|
84
85
|
end
|
85
86
|
self.spec = lg_spec
|
@@ -90,10 +91,12 @@ module LgPodPlugin
|
|
90
91
|
next if key == "All" || key == "LICENSE" || key == "License"
|
91
92
|
path = LUtils.url_encode(key)
|
92
93
|
download_url = host + "/api/v4/projects/" + "#{project.id}" + "/repository/archive.tar.bz2#{"\\?"}" + "path#{"\\="}#{path}#{"\\&"}sha#{"\\="}#{sha}"
|
93
|
-
|
94
|
+
download_url += "\\&access_token\\=#{token}" if token
|
95
|
+
download_params.append({ "filename" => "#{path}.tar.bz2", "url" => download_url })
|
94
96
|
end
|
95
97
|
if download_params.empty?
|
96
|
-
download_url = host + "/api/v4/projects/" + "#{project.id}" + "/repository/archive.tar.bz2
|
98
|
+
download_url = host + "/api/v4/projects/" + "#{project.id}" + "/repository/archive.tar.bz2\\?" + "sha\\=#{sha}"
|
99
|
+
download_url += "\\&access_token\\=#{token}" if token
|
97
100
|
[{ "filename" => "#{self.name}.tar.bz2", "url" => download_url }]
|
98
101
|
else
|
99
102
|
download_params
|
Binary file
|
@@ -62,8 +62,7 @@ module LgPodPlugin
|
|
62
62
|
return ip_address
|
63
63
|
end
|
64
64
|
rescue
|
65
|
-
|
66
|
-
result = %x(time ping #{uri.host} -t 1)
|
65
|
+
result = %x(ping #{uri.host} -t 1)
|
67
66
|
return if !result || result == "" || result.include?("timeout")
|
68
67
|
match = %r{\d+.\d+.\d+.\d+}.match(result)
|
69
68
|
return if match.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lg_pod_plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.4
|
4
|
+
version: 1.1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dongzb01
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|