cocoapods-modularization 0.2.0 → 0.2.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63944ae82b5b66ce3c213dd2cbc15fd378832bef84f6a33c74711967abad347b
|
4
|
+
data.tar.gz: a474c043be6b3031543d996cac56f1ce5558679cbce979d943a70008c86c5ea4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2a46b8ca4aa610346e769684710129f772b31e59d1b352651e3e2e6ef1ff68aebfc56403331f6ded433751509e10bd6efdb454b5303e0867c65397c0007ccb4
|
7
|
+
data.tar.gz: 6f1ecf9615e0cf901d0ab78bb56e282ccbd1ac2322efb7a1221e821ceb7e58310f730c8e68b285ec3f861ba6158d7e2cda3fcd000c5e4e27142c6fdf78dee7c6
|
@@ -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,14 @@ module Pod
|
|
190
174
|
end
|
191
175
|
|
192
176
|
private
|
177
|
+
def repo_url(name, regex)
|
178
|
+
puts "#{Config.instance.sources_manager.all.select { |e| e.name =~ /#{regex}/ }}"
|
179
|
+
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
|
180
|
+
url ||= 'https://github.com/CocoaPods/Specs.git'
|
181
|
+
puts url
|
182
|
+
url
|
183
|
+
end
|
184
|
+
|
193
185
|
def cached_repo_map
|
194
186
|
repo_map = Hash.new
|
195
187
|
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.1
|
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
|