cocoapods-modularization 0.2.1 → 0.2.3
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 +4 -4
- data/lib/cocoapods-modularization/command/mod/info.rb +2 -2
- data/lib/cocoapods-modularization/gem_version.rb +1 -1
- data/lib/cocoapods-modularization/meta/meta_accessor.rb +1 -1
- data/lib/cocoapods-modularization/meta/meta_reference.rb +4 -4
- data/lib/cocoapods-modularization/private/private_cache.rb +12 -5
- 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: d075ef12765876d72726f62eb5c16276f74015f694543aa91b6c41b5e1648c70
|
|
4
|
+
data.tar.gz: f7042cc2fb5e875312bdf7fb845d558143e481c63a17ab29e982971a66d61703
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55af9a46121004d21724544e50f8ac2111a8c400d565e9507447d360214e1b444fbb6ce2a603c49a0c28adc698da2d739547b5325ffebc0ba0479e90d8d23461
|
|
7
|
+
data.tar.gz: 78b306721f37c53529643dab3f249ff5764d204c8ca5d790060367375f78f2d3dc58be46b4b23c075740c866751e4aff299466e665134b418780b6732390f2ec
|
|
@@ -37,9 +37,9 @@ module Pod
|
|
|
37
37
|
def run
|
|
38
38
|
repo_url = String.new
|
|
39
39
|
if @use_binary
|
|
40
|
-
repo_url = Private::PrivateCache.binary_repo_url
|
|
40
|
+
repo_url = Private::PrivateCache.binary_repo_url(@name)
|
|
41
41
|
else
|
|
42
|
-
repo_url = Private::PrivateCache.source_repo_url
|
|
42
|
+
repo_url = Private::PrivateCache.source_repo_url(@name)
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
# 如果工作区有存在的Repo,先删除后clone
|
|
@@ -18,7 +18,7 @@ module Pod
|
|
|
18
18
|
dep_map = Hash[
|
|
19
19
|
MetaConstants.version_key => version,
|
|
20
20
|
MetaConstants.binary_key => binary || true,
|
|
21
|
-
MetaConstants.source_key => binary ? Private::PrivateCache.binary_repo_url : Private::PrivateCache.source_repo_url,
|
|
21
|
+
MetaConstants.source_key => binary ? Private::PrivateCache.binary_repo_url(key) : Private::PrivateCache.source_repo_url(key),
|
|
22
22
|
]
|
|
23
23
|
end
|
|
24
24
|
|
|
@@ -154,7 +154,7 @@ module Pod
|
|
|
154
154
|
podspec = File.directory?(dependency.local?) ? Pod::Specification.from_file("#{dependency.local?}/#{dependency.name.to_s}.podspec") : Pod::Specification.from_file(dependency.local?)
|
|
155
155
|
next podspec.name.to_s == dependency.name.to_s
|
|
156
156
|
end
|
|
157
|
-
if [Private::PrivateCache.source_repo_url, Private::PrivateCache.binary_repo_url].include?(dependency.podspec_repo)
|
|
157
|
+
if [Private::PrivateCache.source_repo_url(dependency.name.to_s), Private::PrivateCache.binary_repo_url(dependency.name.to_s)].include?(dependency.podspec_repo)
|
|
158
158
|
next true
|
|
159
159
|
end
|
|
160
160
|
next false
|
|
@@ -169,7 +169,7 @@ module Pod
|
|
|
169
169
|
data_element[MetaConstants.local_path_key] = Private::PrivateCache.read_local_path(dependency.name)
|
|
170
170
|
end
|
|
171
171
|
|
|
172
|
-
data_element[MetaConstants.binary_key] = dependency.podspec_repo == Private::PrivateCache.binary_repo_url
|
|
172
|
+
data_element[MetaConstants.binary_key] = dependency.podspec_repo == Private::PrivateCache.binary_repo_url(dependency.name.to_s)
|
|
173
173
|
|
|
174
174
|
data[dependency.name.to_s] = data_element
|
|
175
175
|
end
|
|
@@ -186,8 +186,8 @@ module Pod
|
|
|
186
186
|
data_element[MetaConstants.version_key] = generate_version(dependency)
|
|
187
187
|
|
|
188
188
|
if dependency.podspec_repo.kind_of?(String)
|
|
189
|
-
if [Private::PrivateCache.source_repo_url, Private::PrivateCache.binary_repo_url].include?(dependency.podspec_repo)
|
|
190
|
-
data_element[MetaConstants.binary_key] = dependency.podspec_repo == Private::PrivateCache.binary_repo_url
|
|
189
|
+
if [Private::PrivateCache.source_repo_url(dependency.name.to_s), Private::PrivateCache.binary_repo_url(dependency.name.to_s)].include?(dependency.podspec_repo)
|
|
190
|
+
data_element[MetaConstants.binary_key] = dependency.podspec_repo == Private::PrivateCache.binary_repo_url(dependency.name.to_s)
|
|
191
191
|
else
|
|
192
192
|
data_element[MetaConstants.source_key] = dependency.podspec_repo
|
|
193
193
|
end
|
|
@@ -153,7 +153,12 @@ module Pod
|
|
|
153
153
|
map[repo_name] = path
|
|
154
154
|
|
|
155
155
|
# path的上一级作为search_path
|
|
156
|
-
|
|
156
|
+
search_path = json['search_path']
|
|
157
|
+
if search_path.kind_of?(String) && search_path.length > 0
|
|
158
|
+
map['search_path'] = search_path
|
|
159
|
+
else
|
|
160
|
+
map['search_path'] = Pathname.new(path).parent
|
|
161
|
+
end
|
|
157
162
|
|
|
158
163
|
File.open(@@path_map_path, "w") { |io| io.puts map.to_json }
|
|
159
164
|
end
|
|
@@ -175,10 +180,9 @@ module Pod
|
|
|
175
180
|
|
|
176
181
|
private
|
|
177
182
|
def repo_url(name, regex)
|
|
178
|
-
|
|
179
|
-
url =
|
|
183
|
+
source = Config.instance.sources_manager.all.select { |e| e.name =~ /#{regex}/ }.find { |e| Dir.exists?("#{Pathname.new(File.expand_path('~'))}/.cocoapods/repos/#{e}/#{name}") }
|
|
184
|
+
url = source.url if source.kind_of?(Source::Manager)
|
|
180
185
|
url ||= 'https://github.com/CocoaPods/Specs.git'
|
|
181
|
-
puts url
|
|
182
186
|
url
|
|
183
187
|
end
|
|
184
188
|
|
|
@@ -214,7 +218,10 @@ module Pod
|
|
|
214
218
|
end
|
|
215
219
|
|
|
216
220
|
def locate_spec_in_search_path(repo_name)
|
|
217
|
-
|
|
221
|
+
puts search_path
|
|
222
|
+
matched = Dir.glob("#{search_path}/**/{*, */*, */*/*}/#{repo_name}", File::FNM_CASEFOLD).min_by { |folder| folder.split('/').count }
|
|
223
|
+
puts matched
|
|
224
|
+
return matched
|
|
218
225
|
end
|
|
219
226
|
|
|
220
227
|
## 检查yrepos下是否包含repo_name
|
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.3
|
|
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-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|