app-info 3.0.0.beta3 → 3.0.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/lib/app_info/dsym/debug_info.rb +9 -0
- data/lib/app_info/dsym/macho.rb +7 -0
- data/lib/app_info/dsym.rb +4 -0
- data/lib/app_info/proguard.rb +11 -7
- data/lib/app_info/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f280bf2b7d24887596063969a7491b89d799c39cabdd6a8149beb9d20554d73
|
4
|
+
data.tar.gz: 0a12bb443128045426a2de2c308e4d750e3269ed913d609e7546a3ec768cd6c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 144909595cce9cd8706b3e36cc2162ae61da7b4982bb06f7ba77f906473d05db7b3e67a6d86e0258911226251eab8db910f3e84c4746a8961746770fbd39cdbe
|
7
|
+
data.tar.gz: 04fbe3e5c61dded451319c6b1183ef3e1e48e1ae6297152a1354093697a2a562916f7360fbf4fc340d62864d45be11b8731fc32e43e482e81d953f06aa744f65
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
9
9
|
|
10
10
|
> List all changes before release a new version.
|
11
11
|
|
12
|
+
## [3.0.0.beta4] (2023-04-11)
|
13
|
+
|
14
|
+
### Added
|
15
|
+
|
16
|
+
- Add `.files` method to proguard parser.
|
17
|
+
|
18
|
+
### Fixed
|
19
|
+
|
20
|
+
- Fail to extract dsym contents.
|
21
|
+
|
12
22
|
## [3.0.0.beta3] (2023-04-05)
|
13
23
|
|
14
24
|
### Added
|
@@ -292,7 +302,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
292
302
|
|
293
303
|
- Updated dependency of CFPropertly list be a range between 2.3.4. (thanks @[cschroed](https://github.com/cschroed))
|
294
304
|
|
295
|
-
[Unreleased]: https://github.com/icyleaf/app-info/compare/v3.0.0.
|
305
|
+
[Unreleased]: https://github.com/icyleaf/app-info/compare/v3.0.0.beta4..HEAD
|
306
|
+
[3.0.0.beta4]: https://github.com/icyleaf/app-info/compare/v3.0.0.beta3...v3.0.0.beta4
|
296
307
|
[3.0.0.beta3]: https://github.com/icyleaf/app-info/compare/v3.0.0.beta2...v3.0.0.beta3
|
297
308
|
[3.0.0.beta2]: https://github.com/icyleaf/app-info/compare/v3.0.0.beta1...v3.0.0.beta2
|
298
309
|
[3.0.0.beta1]: https://github.com/icyleaf/app-info/compare/v2.8.5...v3.0.0.beta1
|
@@ -12,14 +12,17 @@ module AppInfo
|
|
12
12
|
@path = path
|
13
13
|
end
|
14
14
|
|
15
|
+
# @return [String]
|
15
16
|
def object
|
16
17
|
@object ||= ::File.basename(bin_path)
|
17
18
|
end
|
18
19
|
|
20
|
+
# @return [::MachO::MachOFile, ::MachO::FatFile]
|
19
21
|
def macho_type
|
20
22
|
@macho_type ||= ::MachO.open(bin_path)
|
21
23
|
end
|
22
24
|
|
25
|
+
# @return [Array<AppInfo::DSYM::MachO>]
|
23
26
|
def machos
|
24
27
|
@machos ||= case macho_type
|
25
28
|
when ::MachO::MachOFile
|
@@ -37,29 +40,35 @@ module AppInfo
|
|
37
40
|
end
|
38
41
|
end
|
39
42
|
|
43
|
+
# @return [String, nil]
|
40
44
|
def release_version
|
41
45
|
info.try(:[], 'CFBundleShortVersionString')
|
42
46
|
end
|
43
47
|
|
48
|
+
# @return [String, nil]
|
44
49
|
def build_version
|
45
50
|
info.try(:[], 'CFBundleVersion')
|
46
51
|
end
|
47
52
|
|
53
|
+
# @return [String, nil]
|
48
54
|
def identifier
|
49
55
|
info.try(:[], 'CFBundleIdentifier').sub('com.apple.xcode.dsym.', '')
|
50
56
|
end
|
51
57
|
alias bundle_id identifier
|
52
58
|
|
59
|
+
# @return [CFPropertyList]
|
53
60
|
def info
|
54
61
|
return nil unless ::File.exist?(info_path)
|
55
62
|
|
56
63
|
@info ||= CFPropertyList.native_types(CFPropertyList::List.new(file: info_path).value)
|
57
64
|
end
|
58
65
|
|
66
|
+
# @return [String]
|
59
67
|
def info_path
|
60
68
|
@info_path ||= ::File.join(path, 'Contents', 'Info.plist')
|
61
69
|
end
|
62
70
|
|
71
|
+
# @return [String]
|
63
72
|
def bin_path
|
64
73
|
@bin_path ||= lambda {
|
65
74
|
dwarf_path = ::File.join(path, 'Contents', 'Resources', 'DWARF')
|
data/lib/app_info/dsym/macho.rb
CHANGED
@@ -13,33 +13,40 @@ module AppInfo
|
|
13
13
|
@size = size
|
14
14
|
end
|
15
15
|
|
16
|
+
# @return [String]
|
16
17
|
def cpu_name
|
17
18
|
@file.cpusubtype
|
18
19
|
end
|
19
20
|
|
21
|
+
# @return [String]
|
20
22
|
def cpu_type
|
21
23
|
@file.cputype
|
22
24
|
end
|
23
25
|
|
26
|
+
# @return [String]
|
24
27
|
def type
|
25
28
|
@file.filetype
|
26
29
|
end
|
27
30
|
|
31
|
+
# @return [String, Integer]
|
28
32
|
def size(human_size: false)
|
29
33
|
return number_to_human_size(@size) if human_size
|
30
34
|
|
31
35
|
@size
|
32
36
|
end
|
33
37
|
|
38
|
+
# @return [String]
|
34
39
|
def uuid
|
35
40
|
@file[:LC_UUID][0].uuid_string
|
36
41
|
end
|
37
42
|
alias debug_id uuid
|
38
43
|
|
44
|
+
# @return [::MachO::Headers]
|
39
45
|
def header
|
40
46
|
@header ||= @file.header
|
41
47
|
end
|
42
48
|
|
49
|
+
# @return [Hash{Symbol => String, Integer}]
|
43
50
|
def to_h
|
44
51
|
{
|
45
52
|
uuid: uuid,
|
data/lib/app_info/dsym.rb
CHANGED
@@ -12,9 +12,11 @@ module AppInfo
|
|
12
12
|
Manufacturer::APPLE
|
13
13
|
end
|
14
14
|
|
15
|
+
# @return [nil]
|
15
16
|
def each_file(&block)
|
16
17
|
files.each { |file| block.call(file) }
|
17
18
|
end
|
19
|
+
alias each_objects each_file
|
18
20
|
|
19
21
|
# @return [Array<DebugInfo>] dsym_files files by alphabetical order
|
20
22
|
def files
|
@@ -22,6 +24,7 @@ module AppInfo
|
|
22
24
|
obj << DebugInfo.new(::File.join(contents, file))
|
23
25
|
end
|
24
26
|
end
|
27
|
+
alias objects files
|
25
28
|
|
26
29
|
def clear!
|
27
30
|
return unless @contents
|
@@ -52,6 +55,7 @@ module AppInfo
|
|
52
55
|
end
|
53
56
|
|
54
57
|
dest_path = ::File.join(base_path, file_path)
|
58
|
+
FileUtils.mkdir_p(::File.dirname(dest_path))
|
55
59
|
entry.extract(dest_path) unless ::File.exist?(dest_path)
|
56
60
|
end
|
57
61
|
end
|
data/lib/app_info/proguard.rb
CHANGED
@@ -50,13 +50,6 @@ module AppInfo
|
|
50
50
|
manifest.root.attributes['package']
|
51
51
|
end
|
52
52
|
|
53
|
-
# @return [String, nil]
|
54
|
-
def releasd_version
|
55
|
-
return unless manifest?
|
56
|
-
|
57
|
-
manifest.root.attributes['package']
|
58
|
-
end
|
59
|
-
|
60
53
|
# @return [String, nil]
|
61
54
|
def version_name
|
62
55
|
return unless manifest?
|
@@ -73,6 +66,17 @@ module AppInfo
|
|
73
66
|
end
|
74
67
|
alias build_version version_code
|
75
68
|
|
69
|
+
def files
|
70
|
+
Dir.children(contents).each_with_object([]) do |filename, obj|
|
71
|
+
path = ::File.join(contents, filename)
|
72
|
+
obj << {
|
73
|
+
name: filename,
|
74
|
+
path: path,
|
75
|
+
size: ::File.size(path)
|
76
|
+
}
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
76
80
|
# @return [REXML::Document]
|
77
81
|
def manifest
|
78
82
|
return unless manifest?
|
data/lib/app_info/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app-info
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- icyleaf
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: CFPropertyList
|