cocoapods-privacy 0.1.0 → 0.1.1

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: 169d976a4180a55f5ad139c4db9c1693eeccf2147077d92aa638eaf65ca4314f
4
- data.tar.gz: 63cc1f7128d7117ecf373408c1309fa21917b3c06588b59b000b10de6eeb65c2
3
+ metadata.gz: ad82b3ef0ee76d32a2323649deca0e0aade7ac3ce2b4833917b22e99bd4f2842
4
+ data.tar.gz: 5907b1321ca9eb9d496335743bff10cb49e666250eabc829e06c7728cb58b2b3
5
5
  SHA512:
6
- metadata.gz: 6cff9908e2198aa3068029f9e1b40603bfa279d73933f7099763cd91be76128db9e3b000cdf9182dfe84f11ced41954c63e0524041b8c8e681138fb29416df8b
7
- data.tar.gz: 564d4fa4e65c300b9009e54e54747728c5cc0f57b25c8e566a9ed0a5323d98044dd53efe22fd1c307fc9ebf38f309f028cdc72f18052123990c4740d0775dd35
6
+ metadata.gz: 499e6b195d45c6c87e8717cc0e84e670b8466ca8e8602170dee521af9bcf536a9fd8bc387a2f5097857de43eeb5fe73860030b45431578e629738fa1449af931
7
+ data.tar.gz: d6f72bc25b077147fa7e12489a45ca95401a9d9bef3f40efb7cf04feca3e488f94622fc531115a6b710dd31ef6154f947b37bdf85236024c5371dc7da666bd6d
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPrivacy
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -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 !@privacy_sources.empty?
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 !@privacy_sources.empty?
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.0
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-30 00:00:00.000000000 Z
11
+ date: 2024-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler