cocoapods-privacy 0.2.1 → 0.2.2
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: aca165884812e22b5b99ff4220a5a87129f9b56f5940b95f32cea856418e8c32
|
4
|
+
data.tar.gz: fcfbee202add9d50cff29d74c5bf8b1558855daca7278905a25922d9674c40c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c61d2467300415d231fab11762e54c8a5e17ec7fb91f47af5f3aff9db72c85b30353d505354642e420513059bd7227bcb88a31f921d44929a9ba66150e626c7
|
7
|
+
data.tar.gz: 90718eb044f351c618a7a7c9490f156e010053083668aad75f31f6b5b7b95fca4142785193286b8b92008a3b7cc954b7724a7c1bc04a05786929ec290016aabb
|
@@ -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
|