cocoapods-core 1.9.2 → 1.9.3

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: f68fc2e407a14367abefcd49fe9934a04850fd070ca09e077ff0abe19f7a8bde
4
- data.tar.gz: 6c56ef6c407fa08ac831a64afc0a5a90026189994c0d87651a229070214084e1
3
+ metadata.gz: 54fe39c5a8d2e28001ef66999f292a88604274247f3e59655ccd365beaf1b42c
4
+ data.tar.gz: 6dcfaa8628e0252eebf2c745a901a5fd78a0a88519d3fc679567f9e5c278fb0e
5
5
  SHA512:
6
- metadata.gz: cac009698a41a046bfcf617a8cfcee94dec8c800bdffb29d8854261975eaa9f58fb5b3b7a5d0a963f48baf01cee094f68813192de2c26ad1a666d6401e331c3a
7
- data.tar.gz: e2366a733ec586de15e7eb4c978a1e08012ac5c2d1e917c4f7e6cd46d2d1ee7e13499d69a092d2338a84ffe9a7da9fc5d591cca62f96ac67b8b1d8fc65cd8b2d
6
+ metadata.gz: 9047cbd1aa7f9bdb1c15aa85e2c837de09289483c029fb375c51dfc62880f5061a606594c5c391d0a9766149e0ba4949032ba763e1b29bfbe3ea0a873f82560c
7
+ data.tar.gz: 02ffef659eeeaa0c5bfe8227b030b30e477f6682c45d83ab49886ba29e8853a6483b1f6f97b00f3c07671a82215e4cfeec25405f4acf7f2fb61c8f25dd56665a
@@ -315,6 +315,11 @@ module Pod
315
315
  metadata.path_fragment(pod_name)[0..-2]
316
316
  end
317
317
 
318
+ def local_file_okay?(partial_url)
319
+ file_path = repo.join(partial_url)
320
+ File.exist?(file_path) && File.size(file_path) > 0
321
+ end
322
+
318
323
  def local_file(partial_url)
319
324
  file_path = repo.join(partial_url)
320
325
  File.open(file_path) do |file|
@@ -337,7 +342,8 @@ module Pod
337
342
  file_remote_url = URI.encode(url + partial_url.to_s)
338
343
  path = repo + partial_url
339
344
 
340
- if File.exist?(path)
345
+ file_okay = local_file_okay?(partial_url)
346
+ if file_okay
341
347
  if @startup_time < File.mtime(path)
342
348
  debug "CDN: #{name} Relative path: #{partial_url} modified during this run! Returning local"
343
349
  return Promises.fulfilled_future(partial_url, HYDRA_EXECUTOR)
@@ -353,7 +359,7 @@ module Pod
353
359
 
354
360
  etag_path = path.sub_ext(path.extname + '.etag')
355
361
 
356
- etag = File.read(etag_path) if File.exist?(etag_path)
362
+ etag = File.read(etag_path) if file_okay && File.exist?(etag_path)
357
363
  debug "CDN: #{name} Relative path: #{partial_url}, has ETag? #{etag}" unless etag.nil?
358
364
 
359
365
  download_and_save_with_retries_async(partial_url, file_remote_url, etag)
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods-core.
3
3
  #
4
- CORE_VERSION = '1.9.2'.freeze unless defined? Pod::CORE_VERSION
4
+ CORE_VERSION = '1.9.3'.freeze unless defined? Pod::CORE_VERSION
5
5
  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.9.2
4
+ version: 1.9.3
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: 2020-05-22 00:00:00.000000000 Z
12
+ date: 2020-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport