cocoapods-nexus-plugin 0.0.9 → 0.0.11

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: 8df026cfc9c2eefaa4beceaaf93abb41a19f3a76e806bab4e6c563ee2d0aabc7
4
- data.tar.gz: 98e8fd621d013dcafd3133671150040fc90694d2a2ab34c4f6070a45a183ac34
3
+ metadata.gz: 52db53c770864447cf5430160357a53118cd58e05afe34dcdde7ae8e7a9fa331
4
+ data.tar.gz: ab29c36c452a3a8b36f5580d00ff1bacf1079a126ed950ad42cb59d561dccc69
5
5
  SHA512:
6
- metadata.gz: b265154b6dde29a3252ac14a583cdf318b2772273a2fe01ea21278efcdfc4408153c731b1e5d392a4c5da73dcaeda86a5bc34ee7e16a83f28ab4d4d8a7fff339
7
- data.tar.gz: 45263dbf4c7677cf0f9eee71dd9504eafc385fd76f38c87e46805019c22d44d25fdc9b83d4b27252def17be072139263d26f03315db80cd75faa1ec55cb31d1e
6
+ metadata.gz: 1c6accb8ac001e5d2fbaf6a2c88d46a63e7aa06684a7ff4be0c741cce347f57fb663e77cd1745b1b8b32b37306b072d9a0ff3d7f7046f905cf6cd8932cd20e3a
7
+ data.tar.gz: e68a6aca44a9ee4150d0e57f4e21a9edbc2b49d24783086d0e9b97f65433c7703a35d949900c15dd1771fd0b2fb32eed31c23af76002adcb221e661200193a04
@@ -1,3 +1,3 @@
1
1
  module CocoapodsNexusPlugin
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -1,8 +1,6 @@
1
1
  require 'cocoapods-nexus-plugin/command'
2
2
  require 'fileutils'
3
3
 
4
- CDN_URL = "https://cdn.cocoapods.org"
5
-
6
4
  POD_BLACKLIST = [
7
5
  "libwebp",
8
6
  "Braintree",
@@ -11,7 +9,8 @@ POD_BLACKLIST = [
11
9
  "MapboxCommon",
12
10
  "MapboxCoreMaps",
13
11
  "CFSDK",
14
- "MapboxMobileEvents"
12
+ "MapboxMobileEvents",
13
+ "Mapbox-iOS-SDK"
15
14
  ]
16
15
 
17
16
  NEXUS_COCOAPODS_REPO_URL = ENV['NEXUS_COCOAPODS_REPO_URL']
@@ -31,20 +30,33 @@ module Pod
31
30
 
32
31
  sources = podfile.sources
33
32
 
34
- # create folder for our source
35
- repo_path = "#{Pod::Config.instance.home_dir}/repos/cocoapods-cache"
36
- FileUtils.mkdir_p(repo_path) unless Dir.exist?(repo_path)
37
-
38
- # create .url file in this folder which is used by CocoaPods to determine the source URL
39
- File.write("#{repo_path}/.url", NEXUS_COCOAPODS_REPO_URL)
40
-
41
- if sources.include?(CDN_URL)
42
- sources[sources.index(CDN_URL)] = Pod::CDNSource.new(repo_path)
33
+ if sources.include?(Pod::TrunkSource::TRUNK_REPO_URL)
34
+ sources[sources.index(Pod::TrunkSource::TRUNK_REPO_URL)] = NEXUS_COCOAPODS_REPO_URL
43
35
  else
44
- sources = [Pod::CDNSource.new(repo_path)].concat(sources)
36
+ sources = [NEXUS_COCOAPODS_REPO_URL].concat(sources)
45
37
  end
46
38
 
47
- @sources = sources
39
+ # Fragment below comes from the original sources method located https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/installer/analyzer.rb
40
+
41
+ #################################################################
42
+ plugin_sources = @plugin_sources || []
43
+
44
+ # Add any sources specified using the :source flag on individual dependencies.
45
+ dependency_sources = podfile_dependencies.map(&:podspec_repo).compact
46
+
47
+ sources += dependency_sources
48
+
49
+ result = sources.uniq.map do |source_url|
50
+ sources_manager.find_or_create_source_with_url(source_url)
51
+ end
52
+ unless plugin_sources.empty?
53
+ result.insert(0, *plugin_sources)
54
+ plugin_sources.each do |source|
55
+ sources_manager.add_source(source)
56
+ end
57
+ end
58
+ result
59
+ #################################################################
48
60
  else
49
61
  orig_sources
50
62
  end
@@ -75,7 +87,7 @@ module Pod
75
87
  puts "detected #{detected_unsupported_pod}, using CocoaPods CDN to fetch its podspec..."
76
88
  @@_detected_unsupported_pods.push(detected_unsupported_pod)
77
89
  end
78
- _original_download_and_save_with_retries_async.bind(self).(partial_url, "#{CDN_URL}/#{partial_url}", etag, retries)
90
+ _original_download_and_save_with_retries_async.bind(self).(partial_url, "#{Pod::TrunkSource::TRUNK_REPO_URL}/#{partial_url}", etag, retries)
79
91
  else
80
92
  _original_download_and_save_with_retries_async.bind(self).(partial_url, file_remote_url, etag, retries)
81
93
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-nexus-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Expo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-29 00:00:00.000000000 Z
11
+ date: 2022-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler