cocoapods-nexus-plugin 0.0.9 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-nexus-plugin/gem_version.rb +1 -1
- data/lib/cocoapods_plugin.rb +27 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52db53c770864447cf5430160357a53118cd58e05afe34dcdde7ae8e7a9fa331
|
4
|
+
data.tar.gz: ab29c36c452a3a8b36f5580d00ff1bacf1079a126ed950ad42cb59d561dccc69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c6accb8ac001e5d2fbaf6a2c88d46a63e7aa06684a7ff4be0c741cce347f57fb663e77cd1745b1b8b32b37306b072d9a0ff3d7f7046f905cf6cd8932cd20e3a
|
7
|
+
data.tar.gz: e68a6aca44a9ee4150d0e57f4e21a9edbc2b49d24783086d0e9b97f65433c7703a35d949900c15dd1771fd0b2fb32eed31c23af76002adcb221e661200193a04
|
data/lib/cocoapods_plugin.rb
CHANGED
@@ -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
|
-
|
35
|
-
|
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 = [
|
36
|
+
sources = [NEXUS_COCOAPODS_REPO_URL].concat(sources)
|
45
37
|
end
|
46
38
|
|
47
|
-
|
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, "#{
|
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.
|
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-
|
11
|
+
date: 2022-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|