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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10e8d5a2e4c3e10541b118c8e93fcb603cca17298f5553191a83f32f59ecbe20
4
- data.tar.gz: b4241f999d846e0e51a586333d541f9f17c759f71fc7b7c7ccb3065a822b5b89
3
+ metadata.gz: 89c661389be97295bc4212695eb7309ad7e2649c8ace5ebaab3ee0353f772831
4
+ data.tar.gz: dcf0e7768f3e036385bead612fcbe36244c273432cc8f70c80ad113cc541bd9a
5
5
  SHA512:
6
- metadata.gz: 6839fc1d93fc1eb254b0f1a6017438494a0c8d9ece898cbb4ff50d9ad4077e41df23739d80911cbf31f6e181da873eb13a1b09fa79152f7f8500968c0ed1c7f2
7
- data.tar.gz: 62271e786fb952bdd95dc2812d0314f54f2b462927dfbae5c8fa1443f0a0d915bf8945c4633ce53926a8fcb6abe7abffc70db99357f5f76cf485a7b405c6d728
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)
@@ -24,6 +24,12 @@ module LgPodPlugin
24
24
  @lg_spec = pod.spec
25
25
  end
26
26
  self.preprocess_request
27
+ # require 'benchmark'
28
+ # col_width = 10
29
+ # Benchmark.bm(col_width) do |bm|
30
+ # bm.report("time") do
31
+ # end
32
+ # end
27
33
  end
28
34
 
29
35
  def preprocess_request
@@ -220,6 +220,7 @@ module LgPodPlugin
220
220
  # end
221
221
 
222
222
  public
223
+
223
224
  def self.get_podspec_file_content(host, token, project_id, sha, filepath)
224
225
  begin
225
226
  hash_map = Hash.new
@@ -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?" + "sha=#{sha}"
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?" + "sha=#{sha}"
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
- download_params.append({ "filename" => "#{key}.tar.bz2", "url" => download_url })
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?" + "sha=#{sha}"
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
@@ -62,8 +62,7 @@ module LgPodPlugin
62
62
  return ip_address
63
63
  end
64
64
  rescue
65
- LgPodPlugin.log_yellow("time ping #{uri.host} -t 1")
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?
@@ -1,3 +1,3 @@
1
1
  module LgPodPlugin
2
- VERSION = "1.1.4"
2
+ VERSION = "1.1.4.3"
3
3
  end
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 00:00:00.000000000 Z
11
+ date: 2022-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods