cocoapods-privacy 0.2.1 → 0.2.3
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: a3d1726df7b045146dfa364ba60ad74fc23f4ca87c13addea3130a2f740a6874
|
4
|
+
data.tar.gz: 57d2ef7ef31c20b1b53cab3f9eed8ecd88f93e7a57bf32967c16041fb6049f35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c903226e8685810ebd1c2e80bd02022b7a1dcf874a64d56c5a4e0b9303a4524e437809d5dd05a0be3ae5c3debfc142e0727fb68cc4a842a89a92d3f1f286928
|
7
|
+
data.tar.gz: 04f1d7173af7d36ea7cc0a7eb6046636ce066419a17b70facf7372148e3d7618aec06a39ef612074f21fe20b59f494b0a4d03a889e79e09d692e536641b920a1
|
@@ -88,33 +88,29 @@ module Pod
|
|
88
88
|
pod_folds = modules.map{ |spec|
|
89
89
|
name = spec.name.split('/').first
|
90
90
|
fold = File.join(@sandbox.root,name)
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
if
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
development_folds << File.join(podspec_fold_path,source_files)
|
103
|
-
elsif source_files.is_a?(Array)
|
104
|
-
source_files.each do |file|
|
105
|
-
development_folds << File.join(podspec_fold_path,file)
|
106
|
-
end
|
107
|
-
end
|
91
|
+
podspec_file_path_develop = validate_development_pods(name)
|
92
|
+
# 先验证是否是指向本地的组件(发现有的情况下 组件指向本地Pods 下依旧还是会有该组件,所以这里先判断本地的)
|
93
|
+
if podspec_file_path_develop
|
94
|
+
podspec_fold_path = File.dirname(podspec_file_path_develop)
|
95
|
+
source_files = spec.attributes_hash['source_files']
|
96
|
+
if source_files && !source_files.empty?
|
97
|
+
if source_files.is_a?(String) && !source_files.empty?
|
98
|
+
development_folds << File.join(podspec_fold_path,source_files)
|
99
|
+
elsif source_files.is_a?(Array)
|
100
|
+
source_files.each do |file|
|
101
|
+
development_folds << File.join(podspec_fold_path,file)
|
108
102
|
end
|
109
103
|
end
|
110
104
|
end
|
111
105
|
nil
|
106
|
+
elsif Dir.exist?(fold)
|
107
|
+
formatter_search_fold(fold)
|
112
108
|
end
|
113
109
|
}.compact
|
114
110
|
|
115
111
|
|
116
112
|
pod_folds += development_folds # 拼接本地调试和远端的pod目录
|
117
|
-
pod_folds += [PrivacyUtils.project_code_fold].compact # 拼接工程同名主目录
|
113
|
+
pod_folds += [formatter_search_fold(PrivacyUtils.project_code_fold)].compact # 拼接工程同名主目录
|
118
114
|
pod_folds += custom_folds || [] # 拼接外部传入的自定义目录
|
119
115
|
pod_folds = pod_folds.uniq # 去重
|
120
116
|
|
@@ -126,5 +122,22 @@ module Pod
|
|
126
122
|
end
|
127
123
|
puts "👆👆👆👆👆👆 End analysis project privacy 👆👆👆👆👆👆"
|
128
124
|
end
|
125
|
+
|
126
|
+
private
|
127
|
+
def formatter_search_fold(fold)
|
128
|
+
File.join(fold,"**","*.{m,c,swift,mm,hap,hpp,cpp}")
|
129
|
+
end
|
130
|
+
|
131
|
+
def validate_development_pods(name)
|
132
|
+
result = nil
|
133
|
+
development_pods = @sandbox.development_pods
|
134
|
+
if name && !name.empty? && development_pods && !development_pods.empty?
|
135
|
+
podspec_file_path = development_pods[name]
|
136
|
+
if podspec_file_path && !podspec_file_path.empty?
|
137
|
+
result = podspec_file_path
|
138
|
+
end
|
139
|
+
end
|
140
|
+
result
|
141
|
+
end
|
129
142
|
end
|
130
143
|
end
|