lg_pod_plugin 1.1.4 → 1.1.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10e8d5a2e4c3e10541b118c8e93fcb603cca17298f5553191a83f32f59ecbe20
4
- data.tar.gz: b4241f999d846e0e51a586333d541f9f17c759f71fc7b7c7ccb3065a822b5b89
3
+ metadata.gz: 87687aa81b8335f7b51b978287803b7e85dae0edd6eecfed4faafdf4c4de0550
4
+ data.tar.gz: b53597d6581b1a54b0aafc0e12f53a3d4450fb66d816dc8426e8b1c30a6e6a54
5
5
  SHA512:
6
- metadata.gz: 6839fc1d93fc1eb254b0f1a6017438494a0c8d9ece898cbb4ff50d9ad4077e41df23739d80911cbf31f6e181da873eb13a1b09fa79152f7f8500968c0ed1c7f2
7
- data.tar.gz: 62271e786fb952bdd95dc2812d0314f54f2b462927dfbae5c8fa1443f0a0d915bf8945c4633ce53926a8fcb6abe7abffc70db99357f5f76cf485a7b405c6d728
6
+ metadata.gz: 5457155ee61aa98b3f2d46f2eac75995f5389eede33f52a634dfb0553a0620ca73be8ef48ff4b4b11b513e46793f0a101b5ca580e8755ece71807b0d8c1bf4c1
7
+ data.tar.gz: 813f73b37ae4b359705794860bbeb00132da55429ab95dc31f8a65dd5dea7119c630278604905cd19cb134eae57e3751c0419e23e3d68b0dc0e740e92e2f9e56
@@ -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.2"
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.2
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-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods