cocoapods-core 1.15.2 → 1.16.0

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: 28b58aee1d429faed6b698b36263cc7e86e1ebe4540b2c7e03d1883e28e74f59
4
- data.tar.gz: 81da93773c4f3cff54ae532ef20b3fd9b3190fbca1fc4d7fa89e57da4c840ab3
3
+ metadata.gz: f9a99c42eb6c9b2fd0f033ef171e3d0f60a5f8a4b9df8ade161d457dd4c57a41
4
+ data.tar.gz: fd55b1ae792a53fdf15bf3d613038aed4ba8d430d52f05fefafc3111488fe71f
5
5
  SHA512:
6
- metadata.gz: 6ab7a1a1c329774e398f25080dd03f3fda96bc96be0c5582088010b317e2c64876f2d3b01e1ae4d0ea48f32839443ff907f90b9cd27aa681cf9a9e1c94eee43d
7
- data.tar.gz: 7a82bc2bda4f3f2cf4f54bf70300bc5c633073696d5882cd282d302ec5b00d8a33072edd7cbaa60812b52525b51cce47ca10597dcefd1b82fb001c55e7852aa4
6
+ metadata.gz: 5f24ebc97fca9be15e00fe0494c2c97e68fe9a8481a5526a5f28ea3cdf90d025f87553637fa93b05f3f4edba31ba8cc758f64c48f6ff56d5bdc41ab88b91d701
7
+ data.tar.gz: 4e957a34d9548f150a6f61f91b1d97b7eccdfa0d9729f17663a0fbec455380fdce21dda9caa17e036987e60b8f46c797b9621cb37ca1a35ce267e398cb07d8e4
data/README.md CHANGED
@@ -34,7 +34,7 @@ All CocoaPods development happens on GitHub, there is a repository for
34
34
  specs](https://github.com/CocoaPods/Specs). Contributing patches or Pods is
35
35
  really easy and gratifying.
36
36
 
37
- Follow [@CocoaPods](http://twitter.com/CocoaPods) to get up to date
37
+ Follow [@CocoaPods](http://x.com/CocoaPods) to get up to date
38
38
  information about what's going on in the CocoaPods world.
39
39
 
40
40
  ## License
@@ -10,6 +10,7 @@ module Pod
10
10
  class CDNSource < Source
11
11
  include Concurrent
12
12
 
13
+ MAX_CONCURRENCY = (ENV['COCOAPODS_CDN_MAX_CONCURRENCY'] || 200).to_i
13
14
  MAX_NUMBER_OF_RETRIES = (ENV['COCOAPODS_CDN_MAX_NUMBER_OF_RETRIES'] || 5).to_i
14
15
  # Single thread executor for all network activity.
15
16
  HYDRA_EXECUTOR = Concurrent::SingleThreadExecutor.new
@@ -116,7 +117,7 @@ module Pod
116
117
  pod_path_actual = pod_path(name)
117
118
  pod_path_relative = relative_pod_path(name)
118
119
 
119
- return nil if @version_arrays_by_fragment_by_name[fragment][name].nil?
120
+ return nil if @version_arrays_by_fragment_by_name.dig(fragment, name).nil?
120
121
 
121
122
  concurrent_requests_catching_errors do
122
123
  loaders = []
@@ -282,14 +283,19 @@ module Pod
282
283
  # We use those because you can't get a directory listing from a CDN.
283
284
  index_file_name = index_file_name_for_fragment(fragment)
284
285
  download_file(index_file_name)
285
- versions_raw = local_file(index_file_name, &:to_a).map(&:chomp)
286
- @version_arrays_by_fragment_by_name[fragment] = versions_raw.reduce({}) do |hash, row|
287
- row = row.split('/')
288
- pod = row.shift
289
- versions = row
290
-
291
- hash[pod] = versions
292
- hash
286
+ file_okay = local_file_okay?(index_file_name)
287
+ if file_okay
288
+ versions_raw = local_file(index_file_name, &:to_a).map(&:chomp)
289
+ @version_arrays_by_fragment_by_name[fragment] = versions_raw.reduce({}) do |hash, row|
290
+ row = row.split('/')
291
+ pod = row.shift
292
+ versions = row
293
+
294
+ hash[pod] = versions
295
+ hash
296
+ end
297
+ else
298
+ debug "CDN: #{name} Relative path: #{index_file_name} not available in this source set"
293
299
  end
294
300
  end
295
301
 
@@ -484,7 +490,7 @@ module Pod
484
490
  end
485
491
 
486
492
  def queue_request(request)
487
- @hydra ||= Typhoeus::Hydra.new
493
+ @hydra ||= Typhoeus::Hydra.new(:max_concurrency => MAX_CONCURRENCY)
488
494
 
489
495
  # Queue the request into the Hydra (libcurl reactor).
490
496
  @hydra.queue(request)
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods-core.
3
3
  #
4
- CORE_VERSION = '1.15.2'.freeze unless defined? Pod::CORE_VERSION
4
+ CORE_VERSION = '1.16.0'.freeze unless defined? Pod::CORE_VERSION
5
5
  end
@@ -225,6 +225,9 @@ module Pod
225
225
 
226
226
  if comparison = lhs <=> rhs
227
227
  return comparison
228
+ else
229
+ return -1 if lhs.is_a?(Numeric) && rhs.is_a?(String)
230
+ return 1 if rhs.is_a?(Numeric) && lhs.is_a?(String)
228
231
  end
229
232
  end
230
233
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.2
4
+ version: 1.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-02-06 00:00:00.000000000 Z
12
+ date: 2024-10-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport