lg_pod_plugin 1.1.4.3 → 1.1.5.1
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 +4 -4
- data/lib/lg_pod_plugin/config/l_config.rb +0 -2
- data/lib/lg_pod_plugin/downloader/l_cache.rb +1 -2
- data/lib/lg_pod_plugin/git/gitlab_api.rb +4 -2
- data/lib/lg_pod_plugin/git/gitlab_archive.rb +1 -0
- data/lib/lg_pod_plugin/installer/PodDownload +0 -0
- data/lib/lg_pod_plugin/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a4c2d321812e6bfcf156a1bb701d9fb8c39fa2c575bb0a6e3272c4346cf9ef2
|
4
|
+
data.tar.gz: 0bcd6f9e9861fbb172e32abd728f32d766a2f395e17466465360f12f3bad5a08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d10240bf1bff5772f97367e479f86375d083854ccd993cd2534358228fe398f9321572d38887230ed1b58fe49576b0c6f251531837ffee4d1ed1bcee4fdb961
|
7
|
+
data.tar.gz: c83e8e656698ad8f5029f0bff89bd9d6850af8ffb505dc39c3634cadab6a896aeea7ead949a3800b4e0171bbf09ccac6d0c5813ab62596b818a0c0f077a621d1
|
@@ -40,7 +40,6 @@ module LgPodPlugin
|
|
40
40
|
user_info = new_user_info
|
41
41
|
end
|
42
42
|
end
|
43
|
-
|
44
43
|
config = LConfig.new
|
45
44
|
config.host = uri.hostname
|
46
45
|
config.access_token = user_info.access_token
|
@@ -52,7 +51,6 @@ module LgPodPlugin
|
|
52
51
|
config.project = GitLabAPI.request_project_info(config.host, config.project_name, config.access_token, git)
|
53
52
|
end
|
54
53
|
return config
|
55
|
-
|
56
54
|
end
|
57
55
|
|
58
56
|
end
|
@@ -13,9 +13,8 @@ module LgPodPlugin
|
|
13
13
|
|
14
14
|
public
|
15
15
|
def pod_cache_exist(name, options, spec = nil, released_pod = false)
|
16
|
-
target = LProject.shared.workspace.join("Pods").join(name)
|
17
16
|
destination, cache_pod_spec = self.find_pod_cache name, options, spec, released_pod
|
18
|
-
if (File.exist?(destination) && !destination.children.empty?)
|
17
|
+
if (File.exist?(destination) && !destination.children.empty?)
|
19
18
|
[true, destination, cache_pod_spec]
|
20
19
|
else
|
21
20
|
[false, destination, cache_pod_spec]
|
@@ -20,7 +20,6 @@ module LgPodPlugin
|
|
20
20
|
end
|
21
21
|
|
22
22
|
public
|
23
|
-
|
24
23
|
# 获取 GitLab access_token
|
25
24
|
def self.request_gitlab_access_token(host, username, password)
|
26
25
|
user_id = LUserAuthInfo.get_user_id(host)
|
@@ -40,6 +39,10 @@ module LgPodPlugin
|
|
40
39
|
json = JSON.parse(res.body)
|
41
40
|
else
|
42
41
|
json = JSON.parse(res.body)
|
42
|
+
error = json["error"]
|
43
|
+
if error == "invalid_grant"
|
44
|
+
LSqliteDb.shared.delete_user_info(user_id)
|
45
|
+
end
|
43
46
|
raise json["error_description"]
|
44
47
|
end
|
45
48
|
access_token = json["access_token"]
|
@@ -50,7 +53,6 @@ module LgPodPlugin
|
|
50
53
|
LSqliteDb.shared.insert_user_info(user_model)
|
51
54
|
LgPodPlugin.log_green "请求成功: `access_token` => #{access_token}, expires_in => #{expires_in}"
|
52
55
|
rescue => exception
|
53
|
-
LSqliteDb.shared.delete_user_info(user_id)
|
54
56
|
LgPodPlugin.log_red "获取 `access_token` 失败, error => #{exception.to_s}"
|
55
57
|
end
|
56
58
|
end
|
@@ -90,6 +90,7 @@ module LgPodPlugin
|
|
90
90
|
lg_spec.source_files.each_key do |key|
|
91
91
|
next if key == "All" || key == "LICENSE" || key == "License"
|
92
92
|
path = LUtils.url_encode(key)
|
93
|
+
# download_url = host + "/api/v4/projects/" + "#{project.id}" + "/repository/archive.tar.bz2#{"\\?"}" + "sha#{"\\="}#{sha}"
|
93
94
|
download_url = host + "/api/v4/projects/" + "#{project.id}" + "/repository/archive.tar.bz2#{"\\?"}" + "path#{"\\="}#{path}#{"\\&"}sha#{"\\="}#{sha}"
|
94
95
|
download_url += "\\&access_token\\=#{token}" if token
|
95
96
|
download_params.append({ "filename" => "#{path}.tar.bz2", "url" => download_url })
|
Binary file
|
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
|
+
version: 1.1.5.1
|
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
|
+
date: 2022-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|
@@ -76,16 +76,16 @@ dependencies:
|
|
76
76
|
name: bundler
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- -
|
79
|
+
- - '='
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
81
|
+
version: 2.3.7
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- -
|
86
|
+
- - '='
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
88
|
+
version: 2.3.7
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: rake
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -276,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
276
|
- !ruby/object:Gem::Version
|
277
277
|
version: '0'
|
278
278
|
requirements: []
|
279
|
-
rubygems_version: 3.
|
279
|
+
rubygems_version: 3.3.7
|
280
280
|
signing_key:
|
281
281
|
specification_version: 4
|
282
282
|
summary: 封装了自定义podfile 中pod 方法
|