cocoapods-privacy 0.0.5 → 0.1.0
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: 169d976a4180a55f5ad139c4db9c1693eeccf2147077d92aa638eaf65ca4314f
|
4
|
+
data.tar.gz: 63cc1f7128d7117ecf373408c1309fa21917b3c06588b59b000b10de6eeb65c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cff9908e2198aa3068029f9e1b40603bfa279d73933f7099763cd91be76128db9e3b000cdf9182dfe84f11ced41954c63e0524041b8c8e681138fb29416df8b
|
7
|
+
data.tar.gz: 564d4fa4e65c300b9009e54e54747728c5cc0f57b25c8e566a9ed0a5323d98044dd53efe22fd1c307fc9ebf38f309f028cdc72f18052123990c4740d0775dd35
|
@@ -41,6 +41,7 @@ class BBSpec
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def privacy_handle(podspec_file_path)
|
44
|
+
source_files_index = 1
|
44
45
|
@rows.each_with_index do |line, index|
|
45
46
|
if !line || line.is_a?(BBSpec) || !line.key || line.key.empty?
|
46
47
|
next
|
@@ -62,6 +63,7 @@ class BBSpec
|
|
62
63
|
source_files_array = []
|
63
64
|
end
|
64
65
|
|
66
|
+
source_files_index = index
|
65
67
|
@privacy_sources = source_files_array.map do |file_path|
|
66
68
|
File.join(File.dirname(podspec_file_path), file_path.strip)
|
67
69
|
end
|
@@ -69,7 +71,7 @@ class BBSpec
|
|
69
71
|
end
|
70
72
|
end
|
71
73
|
create_privacy_file_if_need(podspec_file_path)
|
72
|
-
modify_privacy_resource_bundle_if_need()
|
74
|
+
modify_privacy_resource_bundle_if_need(source_files_index)
|
73
75
|
end
|
74
76
|
|
75
77
|
# 对应Spec新增隐私文件
|
@@ -80,7 +82,7 @@ class BBSpec
|
|
80
82
|
end
|
81
83
|
|
82
84
|
# 把新增的隐私文件 映射给 podspec
|
83
|
-
def modify_privacy_resource_bundle_if_need
|
85
|
+
def modify_privacy_resource_bundle_if_need(source_files_index)
|
84
86
|
if !@privacy_sources.empty?
|
85
87
|
privacy_resource_bundle = { "#{full_name}.privacy" => @privacy_file }
|
86
88
|
if @has_resource_bundle
|
@@ -99,11 +101,11 @@ class BBSpec
|
|
99
101
|
end
|
100
102
|
end
|
101
103
|
else
|
102
|
-
space = PrivacyUtils.count_spaces_before_first_character(rows.
|
104
|
+
space = PrivacyUtils.count_spaces_before_first_character(rows[source_files_index].content)
|
103
105
|
line = "#{alias_name}.resource_bundle = #{privacy_resource_bundle}"
|
104
|
-
line = PrivacyUtils.add_spaces_to_string(line,space
|
106
|
+
line = PrivacyUtils.add_spaces_to_string(line,space)
|
105
107
|
row = BBRow.new(line)
|
106
|
-
@rows.insert(1, row)
|
108
|
+
@rows.insert(source_files_index+1, row)
|
107
109
|
end
|
108
110
|
end
|
109
111
|
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.0
|
4
|
+
version: 0.1.0
|
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-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|