fir-cli 2.0.23 → 2.0.24
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 +4 -4
- data/Gemfile +4 -0
- data/README.md +1 -0
- data/lib/fir/patches/rest_client_fix.rb +26 -0
- data/lib/fir/patches.rb +1 -0
- data/lib/fir/util/parser/apk.rb +31 -7
- data/lib/fir/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 780261ddc58b3e97a74409054acc6873d510c9f56651374f1430f94cb97fd779
|
|
4
|
+
data.tar.gz: cb715ab080b9d6b87d6d804daae6ea88f91e870081003b555ca639e71a6ce5de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a18e89e1da15843183dbe1a14a16ccbfe9a09914e924f2b3b9b73867bb7b813f30d2430df6a1f7471a2a90465e139f545af5586040f18c69d4c5ca6120d897ad
|
|
7
|
+
data.tar.gz: 6ab8bbc3b9d15fbbcaacdb46a8eeb13a04e33fa00f5e09f68d5217f8736bfa07efbec7c490c7b29425d7c41b2a69a7d36520ae721e52bea2b6440d43138e6f3c
|
data/Gemfile
CHANGED
|
@@ -8,3 +8,7 @@ end
|
|
|
8
8
|
# Specify your gem's dependencies in fir.gemspec
|
|
9
9
|
gemspec
|
|
10
10
|
gem 'codeclimate-test-reporter', group: :test, require: nil
|
|
11
|
+
|
|
12
|
+
# Fix compatibility with Ruby 3.2.2
|
|
13
|
+
# mime-types 3.2.2 uses _1, _2, _3 as parameter names which are reserved in Ruby 2.7+
|
|
14
|
+
gem 'mime-types', '>= 3.3.0'
|
data/README.md
CHANGED
|
@@ -19,6 +19,7 @@ fir.im-cli 可以通过指令查看, 上传, iOS/Android 应用.
|
|
|
19
19
|
- 我们也提供 docker 版本的 fir-cli, 具体使用方式参见 **Docker 运行 fir-cli** 章节
|
|
20
20
|
|
|
21
21
|
# 最近更新
|
|
22
|
+
- (2.0.24) 修复部分 APK 包含非法 XML 控制字符导致解析失败的问题
|
|
22
23
|
- (2.0.23) 增强上传稳定性
|
|
23
24
|
- (2.0.22) 支持自定义下载文件名称 --user_download_file_name=具体文件名称 注意, 此参数无法与switch_to_qiniu 一起使用
|
|
24
25
|
- (2.0.21) 修正 publish 的结果不返回导致 fastlane-plugin-fir_cli 命令执行结果为nil 的问题
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Fix for rest-client 2.1.0 compatibility with Ruby 2.6/2.7
|
|
4
|
+
# The bug: In some cases, @response is a String instead of a response object,
|
|
5
|
+
# causing NoMethodError when calling @response.code in http_code method.
|
|
6
|
+
#
|
|
7
|
+
# See: https://github.com/rest-client/rest-client/issues/...
|
|
8
|
+
module RestClient
|
|
9
|
+
class Exception
|
|
10
|
+
def http_code
|
|
11
|
+
# return integer for compatibility
|
|
12
|
+
if @response
|
|
13
|
+
# Handle case where @response is a String (e.g., "401 Unauthorized")
|
|
14
|
+
# or when @response is a proper response object
|
|
15
|
+
code = if @response.respond_to?(:code)
|
|
16
|
+
@response.code
|
|
17
|
+
else
|
|
18
|
+
@response.to_s[/\d{3}/]
|
|
19
|
+
end
|
|
20
|
+
code.to_i
|
|
21
|
+
else
|
|
22
|
+
@initial_response_code
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
data/lib/fir/patches.rb
CHANGED
data/lib/fir/util/parser/apk.rb
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require_relative './common'
|
|
4
|
+
|
|
5
|
+
# Monkey patch to fix illegal character issues in AXML parsing
|
|
6
|
+
# Some APKs contain control characters in strings that REXML cannot handle
|
|
7
|
+
module Android
|
|
8
|
+
class AXMLParser
|
|
9
|
+
alias_method :original_parse_strings, :parse_strings
|
|
10
|
+
|
|
11
|
+
def parse_strings
|
|
12
|
+
original_parse_strings
|
|
13
|
+
# Remove illegal XML control characters from strings
|
|
14
|
+
@strings = @strings.map do |str|
|
|
15
|
+
next str unless str.is_a?(String)
|
|
16
|
+
# Keep only valid XML characters: #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
|
|
17
|
+
str.gsub(/[^\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD]/, '')
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
4
23
|
module FIR
|
|
5
24
|
module Parser
|
|
6
25
|
class Apk
|
|
@@ -18,13 +37,18 @@ module FIR
|
|
|
18
37
|
end
|
|
19
38
|
|
|
20
39
|
def basic_info
|
|
21
|
-
@basic_info ||=
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
40
|
+
@basic_info ||= begin
|
|
41
|
+
manifest = @apk.manifest
|
|
42
|
+
raise 'Failed to parse AndroidManifest.xml. The APK may be corrupted, repacked, or contain unsupported characters.' unless manifest
|
|
43
|
+
|
|
44
|
+
{
|
|
45
|
+
type: 'android',
|
|
46
|
+
name: fetch_label,
|
|
47
|
+
identifier: manifest.package_name,
|
|
48
|
+
build: manifest.version_code.to_s,
|
|
49
|
+
version: manifest.version_name.to_s
|
|
50
|
+
}
|
|
51
|
+
end
|
|
28
52
|
@basic_info.reject! { |_k, v| v.nil? }
|
|
29
53
|
@basic_info
|
|
30
54
|
end
|
data/lib/fir/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fir-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.24
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- NaixSpirit
|
|
8
8
|
- atpking
|
|
9
|
+
autorequire:
|
|
9
10
|
bindir: bin
|
|
10
11
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
+
date: 2026-03-15 00:00:00.000000000 Z
|
|
12
13
|
dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
|
14
15
|
name: bundler
|
|
@@ -225,6 +226,7 @@ files:
|
|
|
225
226
|
- lib/fir/patches/native_patch.rb
|
|
226
227
|
- lib/fir/patches/os_patch.rb
|
|
227
228
|
- lib/fir/patches/progress.rb
|
|
229
|
+
- lib/fir/patches/rest_client_fix.rb
|
|
228
230
|
- lib/fir/patches/try.rb
|
|
229
231
|
- lib/fir/util.rb
|
|
230
232
|
- lib/fir/util/ali_uploader.rb
|
|
@@ -289,7 +291,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
289
291
|
- !ruby/object:Gem::Version
|
|
290
292
|
version: '0'
|
|
291
293
|
requirements: []
|
|
292
|
-
rubygems_version: 3.6
|
|
294
|
+
rubygems_version: 3.1.6
|
|
295
|
+
signing_key:
|
|
293
296
|
specification_version: 4
|
|
294
297
|
summary: fir.im command tool
|
|
295
298
|
test_files:
|