cocoapods-core 1.9.0.beta.2 → 1.9.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: 2068906214db58b78edba5d2a5e3a2aa20a70f0b30bd7fa7112aed7a661b80f6
4
- data.tar.gz: 180cd57384a4f7e2fad61758686088d18236ead7a70032e64443e956a6d243f4
3
+ metadata.gz: 54fe39c5a8d2e28001ef66999f292a88604274247f3e59655ccd365beaf1b42c
4
+ data.tar.gz: 6dcfaa8628e0252eebf2c745a901a5fd78a0a88519d3fc679567f9e5c278fb0e
5
5
  SHA512:
6
- metadata.gz: 36bbc3021c70097371a445f290adbfd550a1aa24f71ae13be4d705dc3c01fef9d089992392ff6f013391137c027ba51187d860389054f8c0d48daa01d849302f
7
- data.tar.gz: 83b018426829df792c243bd4e7f5e79e0391134c829cf1d953f413a88c7da57e04b65e4e1c477c4c3c19c432ee76c14e0c7bd4e0d4aafb1bb362b193d91f433f
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)
@@ -376,9 +382,9 @@ module Pod
376
382
  FileUtils.touch path
377
383
  partial_url
378
384
  when 200
379
- File.open(path, 'w') { |f| f.write(response.response_body) }
385
+ File.open(path, 'w') { |f| f.write(response.response_body.force_encoding('UTF-8')) }
380
386
 
381
- etag_new = response.headers['etag']
387
+ etag_new = response.headers['etag'] unless response.headers.nil?
382
388
  debug "CDN: #{name} Relative path downloaded: #{partial_url}, save ETag: #{etag_new}"
383
389
  File.open(etag_path, 'w') { |f| f.write(etag_new) } unless etag_new.nil?
384
390
  partial_url
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods-core.
3
3
  #
4
- CORE_VERSION = '1.9.0.beta.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.0.beta.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: 2019-12-17 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