cocoapods-nexus-plugin 0.0.9 → 0.0.10

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: 8df026cfc9c2eefaa4beceaaf93abb41a19f3a76e806bab4e6c563ee2d0aabc7
4
- data.tar.gz: 98e8fd621d013dcafd3133671150040fc90694d2a2ab34c4f6070a45a183ac34
3
+ metadata.gz: 3b2c66db3b2ff1af98373df383cb1cd778c1b962e18af22ebed6b57af0f2a01a
4
+ data.tar.gz: fa71bd34cc332de94473428e1e500d391c1789b09d6850233983c44a4d968534
5
5
  SHA512:
6
- metadata.gz: b265154b6dde29a3252ac14a583cdf318b2772273a2fe01ea21278efcdfc4408153c731b1e5d392a4c5da73dcaeda86a5bc34ee7e16a83f28ab4d4d8a7fff339
7
- data.tar.gz: 45263dbf4c7677cf0f9eee71dd9504eafc385fd76f38c87e46805019c22d44d25fdc9b83d4b27252def17be072139263d26f03315db80cd75faa1ec55cb31d1e
6
+ metadata.gz: a048e0b18e356bd184b23331cd7de9cb2b14c7d051944ceefffe5017ce1317752c3001ada990cdeb1bc22f01fd31dfcf598ff6ef4647ad1f2d730452bc75e010
7
+ data.tar.gz: f938720c9a1a30cba71ebcd97c027a1434d7e33e1d6df3b806ce2223faf32e5d72e2391bc93f676ac9fdc8e7cc2994b1faa1b5fbe8e6fb97259ff5e079a31d7b
@@ -1,3 +1,3 @@
1
1
  module CocoapodsNexusPlugin
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
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",
@@ -31,20 +29,33 @@ module Pod
31
29
 
32
30
  sources = podfile.sources
33
31
 
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)
32
+ if sources.include?(Pod::TrunkSource::TRUNK_REPO_URL)
33
+ sources[sources.index(Pod::TrunkSource::TRUNK_REPO_URL)] = NEXUS_COCOAPODS_REPO_URL
43
34
  else
44
- sources = [Pod::CDNSource.new(repo_path)].concat(sources)
35
+ sources = [NEXUS_COCOAPODS_REPO_URL].concat(sources)
45
36
  end
46
37
 
47
- @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
+ #################################################################
48
59
  else
49
60
  orig_sources
50
61
  end
@@ -75,7 +86,7 @@ module Pod
75
86
  puts "detected #{detected_unsupported_pod}, using CocoaPods CDN to fetch its podspec..."
76
87
  @@_detected_unsupported_pods.push(detected_unsupported_pod)
77
88
  end
78
- _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)
79
90
  else
80
91
  _original_download_and_save_with_retries_async.bind(self).(partial_url, file_remote_url, etag, retries)
81
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.9
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-29 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