lg_pod_plugin 1.1.4.4 → 1.1.5.2
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/downloader.rb +2 -2
- data/lib/lg_pod_plugin/git/git_clone.rb +5 -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 +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28939d9769c3829633eae8e6560123eaa26f0185a06d0705916cd27400e550b5
|
4
|
+
data.tar.gz: ba61c2e383b9cb9d56b9a4ff8567d6292a49ac2b7fa44a5953b54416b258530e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aee9ac47bf1bcb62fd9dd87d190dfab70354e9836fbe4ca342c1efe42c0093b8fb06111b4542e8a78be391107fdca02a4380b96b83e1711048df8d5e2629ddb2
|
7
|
+
data.tar.gz: f1eb565fa4bc16908c78960901666ca03138f153cbd6486ea7453f20f6ef8ffb6f0090d679908d5bee078f584a41dc33c2a3b795f2e44f7f474073851f67f2cf
|
@@ -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
|
@@ -107,8 +107,8 @@ module LgPodPlugin
|
|
107
107
|
return download_params
|
108
108
|
elsif File.exist?(download_params.to_s) && download_params
|
109
109
|
FileUtils.chdir download_params
|
110
|
-
LgPodPlugin::LCache.cache_pod(name, download_params
|
111
|
-
LgPodPlugin::LCache.cache_pod(name, download_params
|
110
|
+
LgPodPlugin::LCache.cache_pod(name, download_params, { :git => git }, podspec, self.request.released_pod) if self.request.single_git
|
111
|
+
LgPodPlugin::LCache.cache_pod(name, download_params, self.request.get_cache_key_params,podspec, self.request.released_pod)
|
112
112
|
FileUtils.chdir(LFileManager.download_director)
|
113
113
|
FileUtils.rm_rf(download_params)
|
114
114
|
self.request.checkout_options.delete(:branch) if commit
|
@@ -51,9 +51,12 @@ module LgPodPlugin
|
|
51
51
|
|
52
52
|
# git clone commit
|
53
53
|
def git_clone_by_commit(path, temp_name)
|
54
|
-
|
54
|
+
unless File.exist?(temp_name)
|
55
|
+
FileUtils.mkdir(temp_name)
|
56
|
+
end
|
55
57
|
FileUtils.chdir(temp_name)
|
56
|
-
|
58
|
+
system("git init")
|
59
|
+
LgPodPlugin.log_blue "git clone -b #{self.commit} #{self.git}"
|
57
60
|
system("git remote add origin #{self.git}")
|
58
61
|
system("git fetch origin #{self.commit}")
|
59
62
|
system("git reset --hard FETCH_HEAD")
|
@@ -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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dongzb01
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-02 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
|