cocoapods-privacy 0.5.1 → 0.5.2

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: 517e776e5936689d58b230349587b62cae56b02f1204934bed0620cf1117785c
4
- data.tar.gz: 4ece159c7db2ff224dd1958a5707911410f4f71fb00e337aa12493c53fb4bcdb
3
+ metadata.gz: 94168860cf706b12ecc89c41a75635f23e11f5afcf0b775ebf5f927a16ab6cef
4
+ data.tar.gz: 8bf3705783a5023c2a6b9066029d9c8e1ec40c596101c0dcf832f5fda70b34de
5
5
  SHA512:
6
- metadata.gz: 5404d58d4e398f9d7074f252960546e9272912ee536687ef6d5c2d9f8577888916e54b5d36399512693b04ebe15aac1b7a7e358236215cf59112a174ffef8dbc
7
- data.tar.gz: 4169159705cf07dd3f8e994c26bc9b3c65593d680434dc0dea23787fee59c51113559bab1652fcfa9c75e24987fac52fcb257a66bc0f280eae19a313ea068375
6
+ metadata.gz: 1bfc8743f267c99b07afb734ef2584cd9c4ffe07960118fe2a4d2f8d82e2783dd86dd88dd716299f63ed3c373f1148d48900a9aeff24d8fef4a24257e99eecfc
7
+ data.tar.gz: 2b42d00dcb94b13b9bbb35df5979762e65c6ba781d1f3bc16fdf7c80988c5213b96cf7df31c05b3219170f0c16953b9c0f33f8cb7f7e490f765afbf7d6779804
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPrivacy
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
@@ -187,9 +187,23 @@ module PrivacyHunter
187
187
  File.utime(File.atime(local_file_path), Time.parse(remote_file_time), local_file_path)
188
188
  end
189
189
 
190
+
191
+
192
+ #💡💡💡以下是 invalid byte sequence in UTF-8 错误复现 的数据代码
193
+ # File.write("/Users/xxx/.cache/cocoapods-privacy/privacy/file.txt", "vandflyver \xC5rhus \n
194
+
195
+ # \n
196
+
197
+ # \\n
198
+
199
+ # vandflyver
200
+ # \xC5rhus
201
+ # ")
190
202
  # 文件是否包含内容
191
203
  def self.contains_apis?(file_path, apis)
192
- file_content = File.read(file_path)
204
+
205
+ #使用UTF-8 读取,无法读取的会被默认处理,修复 https://github.com/ymoyao/cocoapods-privacy/issues/7
206
+ file_content = File.read(file_path, encoding: 'UTF-8', invalid: :replace, undef: :replace)
193
207
 
194
208
  #核心文件检查段落注释 /* */
195
209
  file_extension = File.extname(file_path).downcase
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.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - youhui
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-02 00:00:00.000000000 Z
11
+ date: 2024-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler