cocoapods-privacy 0.1.0 → 0.1.1
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: ad82b3ef0ee76d32a2323649deca0e0aade7ac3ce2b4833917b22e99bd4f2842
|
4
|
+
data.tar.gz: 5907b1321ca9eb9d496335743bff10cb49e666250eabc829e06c7728cb58b2b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 499e6b195d45c6c87e8717cc0e84e670b8466ca8e8602170dee521af9bcf536a9fd8bc387a2f5097857de43eeb5fe73860030b45431578e629738fa1449af931
|
7
|
+
data.tar.gz: d6f72bc25b077147fa7e12489a45ca95401a9d9bef3f40efb7cf04feca3e488f94622fc531115a6b710dd31ef6154f947b37bdf85236024c5371dc7da666bd6d
|
@@ -33,7 +33,7 @@ class BBSpec
|
|
33
33
|
|
34
34
|
def initialize(name,alias_name,full_name)
|
35
35
|
@rows = []
|
36
|
-
@privacy_sources =
|
36
|
+
@privacy_sources = nil
|
37
37
|
@name = name
|
38
38
|
@alias_name = alias_name
|
39
39
|
@full_name = full_name
|
@@ -53,7 +53,7 @@ class BBSpec
|
|
53
53
|
spec = eval("Pod::Spec.new do |s|; s.source_files = #{line.value}; end;")
|
54
54
|
if spec && !spec.attributes_hash['source_files'].nil?
|
55
55
|
source_files_value = spec.attributes_hash['source_files']
|
56
|
-
if source_files_value.is_a?(String)
|
56
|
+
if source_files_value.is_a?(String) && !source_files_value.empty?
|
57
57
|
source_files_array = [source_files_value]
|
58
58
|
elsif source_files_value.is_a?(Array)
|
59
59
|
# 如果已经是数组,直接使用
|
@@ -76,14 +76,14 @@ class BBSpec
|
|
76
76
|
|
77
77
|
# 对应Spec新增隐私文件
|
78
78
|
def create_privacy_file_if_need(podspec_file_path)
|
79
|
-
if
|
79
|
+
if @privacy_sources
|
80
80
|
PrivacyUtils.create_privacy_if_empty(File.join(File.dirname(podspec_file_path), @privacy_file))
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
84
|
# 把新增的隐私文件 映射给 podspec
|
85
85
|
def modify_privacy_resource_bundle_if_need(source_files_index)
|
86
|
-
if
|
86
|
+
if @privacy_sources
|
87
87
|
privacy_resource_bundle = { "#{full_name}.privacy" => @privacy_file }
|
88
88
|
if @has_resource_bundle
|
89
89
|
@rows.each_with_index do |line, index|
|
@@ -184,7 +184,7 @@ module PrivacyModule
|
|
184
184
|
|
185
185
|
|
186
186
|
# Step 6: 获取privacy 相关信息,传递给后续处理
|
187
|
-
privacy_hash = fetch_privacy_hash(combin_sepcs_and_rows,podspec_file_path)
|
187
|
+
privacy_hash = fetch_privacy_hash(combin_sepcs_and_rows,podspec_file_path).compact
|
188
188
|
filtered_privacy_hash = privacy_hash.reject { |_, value| value.empty? }
|
189
189
|
filtered_privacy_hash
|
190
190
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-privacy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- youhui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|