cocoapods-modularization 0.2.0 → 0.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67f059a9e0d46db0b16b2406a014d1c67c38b6e0ccfdc78a8709e7e47dcdc161
|
4
|
+
data.tar.gz: 1ed9ca0070efe02e4458b92cd5e7b65ef7e24e3da1d88ddaa7c47f0967c38f60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64ea0a12e3d679578e443418b1b9cfbaae78e2a824f4bb2cac1f98e260fcc429484ae0edeb7ef0efaf4610bff19a4978c2b6b2747614da3ee86a4b594e07375e
|
7
|
+
data.tar.gz: cb639f43d8fd2cae1e5304f4a74cb9d02f569fad684b4db63cadf858aa951143c2ef19f667ce05eb3517ca9ce74c6b8a7a982236cd7aa30d927917e2c8e19c9e
|
@@ -121,11 +121,12 @@ module Pod
|
|
121
121
|
def try_source(e, dependency_data)
|
122
122
|
binary = dependency_data[MetaConstants.binary_key]
|
123
123
|
source_url = dependency_data[MetaConstants.source_key]
|
124
|
+
_source_url = Private::PrivateCache.source_repo_url(e)
|
124
125
|
|
125
|
-
if binary && (source_url ==
|
126
|
-
source_url = Private::PrivateCache.binary_repo_url
|
126
|
+
if binary && (source_url == _source_url || source_url == nil)
|
127
|
+
source_url = Private::PrivateCache.binary_repo_url(e)
|
127
128
|
else
|
128
|
-
source_url ||= Private::PrivateCache.source_repo_url
|
129
|
+
source_url ||= Private::PrivateCache.source_repo_url(e)
|
129
130
|
end
|
130
131
|
|
131
132
|
Hash[e => [dependency_data[MetaConstants.version_key], Hash[:source => source_url]]]
|
@@ -49,32 +49,16 @@ module Pod
|
|
49
49
|
File.open(@@repo_map_path, 'w') { |io| io << repo_map.to_json }
|
50
50
|
end
|
51
51
|
|
52
|
-
def
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
binary_map.keys.first
|
57
|
-
end
|
58
|
-
|
59
|
-
def source_repo_name
|
60
|
-
repo_map = cached_repo_map
|
61
|
-
source_map = repo_map[@@source_repo_key]
|
62
|
-
return nil unless source_map.kind_of?(Hash)
|
63
|
-
source_map.keys.first
|
64
|
-
end
|
65
|
-
|
66
|
-
def binary_repo_url
|
67
|
-
repo_map = cached_repo_map
|
68
|
-
binary_map = repo_map[@@binary_repo_key]
|
69
|
-
return nil unless binary_map.kind_of?(Hash)
|
70
|
-
binary_map.values.first
|
52
|
+
def binary_repo_url(name)
|
53
|
+
repo_url = repo_url(name, ".*?specs[-_]?binary")
|
54
|
+
return nil unless repo_url.kind_of?(String) && repo_url.length > 0
|
55
|
+
repo_url
|
71
56
|
end
|
72
57
|
|
73
|
-
def source_repo_url
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
source_map.values.first
|
58
|
+
def source_repo_url(name)
|
59
|
+
repo_url = repo_url(name, ".*?specs[-_]?source")
|
60
|
+
return nil unless repo_url.kind_of?(String) && repo_url.length > 0
|
61
|
+
repo_url
|
78
62
|
end
|
79
63
|
|
80
64
|
def root_path
|
@@ -190,6 +174,12 @@ module Pod
|
|
190
174
|
end
|
191
175
|
|
192
176
|
private
|
177
|
+
def repo_url(name, regex)
|
178
|
+
url = Config.instance.sources_manager.all.select { |e| e.name =~ /#{regex}/ }.find { |e| Dir.exists?("#{Pathname.new(File.expand_path('~'))}/.cocoapods/repos/#{e}/#{name}") }.url
|
179
|
+
url ||= 'https://github.com/CocoaPods/Specs.git'
|
180
|
+
url
|
181
|
+
end
|
182
|
+
|
193
183
|
def cached_repo_map
|
194
184
|
repo_map = Hash.new
|
195
185
|
if File.exists?(@@repo_map_path)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-modularization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lazy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|