cocoapods-nexus-plugin 0.0.8 → 0.0.10

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: 76ad5a102a6047b964be4764ee45d41d0c2c354d881c9c000b5362fa45c9a934
4
- data.tar.gz: 8c23b06420608178fd14f67ed67b67f1d77dda541116517ad438447cc8c9e7ed
3
+ metadata.gz: 3b2c66db3b2ff1af98373df383cb1cd778c1b962e18af22ebed6b57af0f2a01a
4
+ data.tar.gz: fa71bd34cc332de94473428e1e500d391c1789b09d6850233983c44a4d968534
5
5
  SHA512:
6
- metadata.gz: a86ec4313b867765905e1746616caef6914a282ca18c1afc781661009ef29feb13c43873d1b1f41d4104e9be783baba466eeb3db5a1c7b35e1ea4445eb461c30
7
- data.tar.gz: 4cb073176500d71a818ca85c5be37eb7e5fc0d114d0f64bd693a94de779707885a643563604411ece7d89a824973385b00270d93679d4faca9320cbb5f309511
6
+ metadata.gz: a048e0b18e356bd184b23331cd7de9cb2b14c7d051944ceefffe5017ce1317752c3001ada990cdeb1bc22f01fd31dfcf598ff6ef4647ad1f2d730452bc75e010
7
+ data.tar.gz: f938720c9a1a30cba71ebcd97c027a1434d7e33e1d6df3b806ce2223faf32e5d72e2391bc93f676ac9fdc8e7cc2994b1faa1b5fbe8e6fb97259ff5e079a31d7b
@@ -1,3 +1,3 @@
1
1
  module CocoapodsNexusPlugin
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.10"
3
3
  end
@@ -1,9 +1,16 @@
1
1
  require 'cocoapods-nexus-plugin/command'
2
2
  require 'fileutils'
3
3
 
4
- CDN_URL = "https://cdn.cocoapods.org"
5
-
6
- POD_BLACKLIST = ["libwebp", "Braintree", "razorpay-pod", "TrezorCrypto", "MapboxCommon", "MapboxCoreMaps", "CFSDK"]
4
+ POD_BLACKLIST = [
5
+ "libwebp",
6
+ "Braintree",
7
+ "razorpay-pod",
8
+ "TrezorCrypto",
9
+ "MapboxCommon",
10
+ "MapboxCoreMaps",
11
+ "CFSDK",
12
+ "MapboxMobileEvents"
13
+ ]
7
14
 
8
15
  NEXUS_COCOAPODS_REPO_URL = ENV['NEXUS_COCOAPODS_REPO_URL']
9
16
 
@@ -22,20 +29,33 @@ module Pod
22
29
 
23
30
  sources = podfile.sources
24
31
 
25
- # create folder for our source
26
- repo_path = "#{Pod::Config.instance.home_dir}/repos/cocoapods-cache"
27
- FileUtils.mkdir_p(repo_path) unless Dir.exist?(repo_path)
28
-
29
- # create .url file in this folder which is used by CocoaPods to determine the source URL
30
- File.write("#{repo_path}/.url", NEXUS_COCOAPODS_REPO_URL)
31
-
32
- if sources.include?(CDN_URL)
33
- sources[sources.index(CDN_URL)] = Pod::CDNSource.new(repo_path)
32
+ if sources.include?(Pod::TrunkSource::TRUNK_REPO_URL)
33
+ sources[sources.index(Pod::TrunkSource::TRUNK_REPO_URL)] = NEXUS_COCOAPODS_REPO_URL
34
34
  else
35
- sources = [Pod::CDNSource.new(repo_path)].concat(sources)
35
+ sources = [NEXUS_COCOAPODS_REPO_URL].concat(sources)
36
36
  end
37
37
 
38
- @sources = sources
38
+ # Fragment below comes from the original sources method located https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/installer/analyzer.rb
39
+
40
+ #################################################################
41
+ plugin_sources = @plugin_sources || []
42
+
43
+ # Add any sources specified using the :source flag on individual dependencies.
44
+ dependency_sources = podfile_dependencies.map(&:podspec_repo).compact
45
+
46
+ sources += dependency_sources
47
+
48
+ result = sources.uniq.map do |source_url|
49
+ sources_manager.find_or_create_source_with_url(source_url)
50
+ end
51
+ unless plugin_sources.empty?
52
+ result.insert(0, *plugin_sources)
53
+ plugin_sources.each do |source|
54
+ sources_manager.add_source(source)
55
+ end
56
+ end
57
+ result
58
+ #################################################################
39
59
  else
40
60
  orig_sources
41
61
  end
@@ -66,7 +86,7 @@ module Pod
66
86
  puts "detected #{detected_unsupported_pod}, using CocoaPods CDN to fetch its podspec..."
67
87
  @@_detected_unsupported_pods.push(detected_unsupported_pod)
68
88
  end
69
- _original_download_and_save_with_retries_async.bind(self).(partial_url, "#{CDN_URL}/#{partial_url}", etag, retries)
89
+ _original_download_and_save_with_retries_async.bind(self).(partial_url, "#{Pod::TrunkSource::TRUNK_REPO_URL}/#{partial_url}", etag, retries)
70
90
  else
71
91
  _original_download_and_save_with_retries_async.bind(self).(partial_url, file_remote_url, etag, retries)
72
92
  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.8
4
+ version: 0.0.10
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-27 00:00:00.000000000 Z
11
+ date: 2022-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler