lg_pod_plugin 1.1.5.6 → 1.1.5.7
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/downloader.rb +1 -6
- data/lib/lg_pod_plugin/downloader/l_cache.rb +2 -2
- data/lib/lg_pod_plugin/git/gitlab_archive.rb +9 -9
- data/lib/lg_pod_plugin/installer/PodDownload +0 -0
- data/lib/lg_pod_plugin/installer/install.rb +10 -20
- 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: ce8fcf508c4622d896bc35d848db7c9d8238648722e38cde3dca35f5b30a5c42
|
4
|
+
data.tar.gz: 756567c34b08dc9d99af1f8f9c4fd8a3adf527d60afd4155315ed4c2e7a89616
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e35116e0824a397cfb7021ed6ffa793d1143f3300b8eab09c827a93e704292ed13b38bab506b8754ad3379d7fc682c34d537516545c2c4e9c89581158f399e3
|
7
|
+
data.tar.gz: defe217180c036512d189a183d7ad1ce1a20a6b90bbdc56ef957851c55d6bcfee279fbfeb5ce64ac8a762fda002b76c5601ae4f57ad6449e21cfe3984e304c9f
|
@@ -50,11 +50,7 @@ module LgPodPlugin
|
|
50
50
|
end
|
51
51
|
hash_map = self.request.get_cache_key_params
|
52
52
|
# 发现本地有缓存, 不需要更新缓存
|
53
|
-
|
54
|
-
pod_is_exist, destination, cache_pod_spec = LCache.new.pod_cache_exist(name, hash_map, podspec, self.request.released_pod)
|
55
|
-
else
|
56
|
-
pod_is_exist, destination, cache_pod_spec = LCache.new.pod_cache_exist(name, hash_map, podspec, self.request.released_pod)
|
57
|
-
end
|
53
|
+
pod_is_exist, destination, cache_pod_spec = LCache.new.pod_cache_exist(name, hash_map, podspec, self.request.released_pod)
|
58
54
|
if pod_is_exist
|
59
55
|
is_delete = self.request.params["is_delete"] ||= false
|
60
56
|
LProject.shared.need_update_pods.delete(name) if is_delete
|
@@ -102,7 +98,6 @@ module LgPodPlugin
|
|
102
98
|
download_params.delete("podspec_content")
|
103
99
|
end
|
104
100
|
end
|
105
|
-
FileUtils.rm_rf podspec_path
|
106
101
|
end
|
107
102
|
return download_params
|
108
103
|
elsif File.exist?(download_params.to_s) && download_params
|
@@ -14,8 +14,8 @@ module LgPodPlugin
|
|
14
14
|
public
|
15
15
|
def pod_cache_exist(name, options, spec = nil, released_pod = false)
|
16
16
|
destination, cache_pod_spec = self.find_pod_cache name, options, spec, released_pod
|
17
|
-
if (File.exist?(destination) && !destination.children.empty?)
|
18
|
-
[true, destination, cache_pod_spec]
|
17
|
+
if (File.exist?(destination) && !destination.children.empty?) && cache_pod_spec.exist?
|
18
|
+
return [true, destination, cache_pod_spec]
|
19
19
|
else
|
20
20
|
[false, destination, cache_pod_spec]
|
21
21
|
end
|
@@ -68,17 +68,17 @@ module LgPodPlugin
|
|
68
68
|
end
|
69
69
|
pod_spec_file_path = sandbox_path.join("#{podspec_filename}")
|
70
70
|
lg_spec = LgPodPlugin::PodSpec.form_string(podspec_content, pod_spec_file_path)
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
f.write podspec_content
|
76
|
-
end
|
77
|
-
rescue => exception
|
78
|
-
LgPodPlugin.log_red "#{exception}"
|
71
|
+
if podspec_content
|
72
|
+
begin
|
73
|
+
File.open(pod_spec_file_path, "w+") do |f|
|
74
|
+
f.write podspec_content
|
79
75
|
end
|
80
|
-
|
76
|
+
rescue => exception
|
77
|
+
LgPodPlugin.log_red "#{exception}"
|
81
78
|
end
|
79
|
+
@podspec_content = podspec_content
|
80
|
+
end
|
81
|
+
unless lg_spec
|
82
82
|
download_url = host + "/api/v4/projects/" + "#{project.id}" + "/repository/archive.tar.bz2\\?" + "sha\\=#{sha}"
|
83
83
|
download_url += "\\&access_token\\=#{token}" if token
|
84
84
|
return [{ "filename" => "#{self.name}.tar.bz2", "url" => download_url }]
|
Binary file
|
@@ -37,29 +37,13 @@ module LgPodPlugin
|
|
37
37
|
if request.lg_spec
|
38
38
|
cache_podspec = request.lg_spec.spec
|
39
39
|
else
|
40
|
-
cache_podspec = nil
|
41
|
-
end
|
42
|
-
|
43
|
-
unless cache_podspec
|
44
40
|
cache_podspec = LProject.shared.cache_specs[name]
|
45
41
|
request.lg_spec = LgPodPlugin::PodSpec.form_pod_spec cache_podspec if cache_podspec
|
46
42
|
end
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
pod_is_exist = true
|
52
|
-
else
|
53
|
-
pod_is_exist = false
|
54
|
-
end
|
55
|
-
else
|
56
|
-
destination = self.download_params["destination"]
|
57
|
-
if destination && File.exist?(destination) && !Pathname(destination).children.empty?
|
58
|
-
pod_is_exist = true
|
59
|
-
else
|
60
|
-
pod_is_exist = false
|
61
|
-
end
|
62
|
-
cache_pod_spec_path = self.download_params["cache_pod_spec_path"]
|
43
|
+
destination = self.download_params["destination"]
|
44
|
+
cache_pod_spec_path = self.download_params["cache_pod_spec_path"]
|
45
|
+
# podspec.json 不存在
|
46
|
+
unless cache_podspec
|
63
47
|
local_spec_path = destination.glob("#{name}.podspec{,.json}").last
|
64
48
|
if local_spec_path && File.exist?(local_spec_path)
|
65
49
|
cache_podspec = Pod::Specification.from_file local_spec_path
|
@@ -71,6 +55,12 @@ module LgPodPlugin
|
|
71
55
|
end
|
72
56
|
request.lg_spec = LgPodPlugin::PodSpec.form_pod_spec cache_podspec if cache_podspec
|
73
57
|
end
|
58
|
+
# 判断缓存是否下载成功
|
59
|
+
if (destination && File.exist?(destination) && !Pathname(destination).children.empty?) && (cache_pod_spec_path && File.exist?(cache_pod_spec_path))
|
60
|
+
pod_is_exist = true
|
61
|
+
else
|
62
|
+
pod_is_exist = false
|
63
|
+
end
|
74
64
|
if pod_is_exist
|
75
65
|
is_delete = request.params["is_delete"] ||= false
|
76
66
|
LProject.shared.need_update_pods.delete(name) if is_delete
|
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.5.
|
4
|
+
version: 1.1.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dongzb01
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|