app-info 3.3.1 → 3.3.2

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: 8e1a690f39cd0bfe4c6fe3f5eee14f3cd0af7a5be9635875bb6bda0ca7fa1e47
4
- data.tar.gz: c07b7ae5e8d2d995a5c1d32cc7e0de1fb5e6680450936c3e08344687ed14669f
3
+ metadata.gz: 2eb8cadddd284e0daa476a2eea39741a851d96f0b684ef9a9dcdae02cf4332e9
4
+ data.tar.gz: df8f30dafb96b302393920b6eb9a517bba6d95e92f7d64f8dc3662cf1af921fb
5
5
  SHA512:
6
- metadata.gz: b9f5504987f1173bc82880b974f735fba28d352223f8940aea3e497cf7c2ba9350481c52a9ca95cd9b5fdd3d68d273947e6e50201834c61210a153b8d7554cdb
7
- data.tar.gz: c43deb531c6fa974a5da4f0816526c099e7bd20f1d7cde286cb941df596e84932cddc044e403f3737124f2ab6b43f2250c840b6fac3fc339bfd17c452d560315
6
+ metadata.gz: 83f3c16f52ce79474baafb9ceafc17fed872e9f634f62d84b70fc7e17f38e0236ac2129fa66cfcdb5f3fa8ad88e21d7051a64331150d33329850b041a0a21b3c
7
+ data.tar.gz: 7e60efd2f1529165eee6a2e8b67ca2cdf82d661883ac7bba7048e28f391b9d107f278e5d6f1e79603e2b23a99117adfcadf3d164ac00e41dd0622c4b32020092
@@ -30,8 +30,7 @@ jobs:
30
30
  strategy:
31
31
  fail-fast: false
32
32
  matrix:
33
- # https://endoflife.date/ruby
34
- ruby: [ ruby-3.1, ruby-3.2, ruby-3.3 ]
33
+ ruby: [ ruby-3.1, ruby-3.2, ruby-3.3, ruby-3.4 ]
35
34
  experimental: [ false ]
36
35
  include:
37
36
  - ruby: head
@@ -9,7 +9,11 @@ module AppInfo
9
9
 
10
10
  class NotFoundError < Error; end
11
11
 
12
- class ProtobufParseError < Error; end
12
+ class ParseError < Error; end
13
+
14
+ class ProtobufParseError < ParseError; end
15
+
16
+ class MoileProvisionParseError < ParseError; end
13
17
 
14
18
  class UnknownFormatError < Error; end
15
19
  end
@@ -255,6 +255,8 @@ module AppInfo
255
255
 
256
256
  data = ::File.read(@file)
257
257
  data = strip_plist_wrapper(data) unless bplist?(data)
258
+ return @mobileprovision = nil unless data
259
+
258
260
  list = CFPropertyList::List.new(data: data).value
259
261
  @mobileprovision = CFPropertyList.native_types(list)
260
262
  rescue CFFormatError
@@ -275,14 +277,22 @@ module AppInfo
275
277
 
276
278
  private
277
279
 
280
+ PLIST_START_TAG = '<?xml version='
281
+ PLIST_END_TAG = '</plist>'
282
+ BPLIST = 'bplist'
283
+
278
284
  def bplist?(raw)
279
- raw[0..5] == 'bplist'
285
+ raw[0..5] == BPLIST
280
286
  end
281
287
 
282
288
  def strip_plist_wrapper(raw)
283
- end_tag = '</plist>'
284
- start_point = raw.index('<?xml version=')
285
- end_point = raw.index(end_tag) + end_tag.size - 1
289
+ return if raw.to_s.empty?
290
+
291
+ start_point = raw.index(PLIST_START_TAG)
292
+ end_point = raw.index(PLIST_END_TAG)
293
+ return unless start_point && end_point
294
+
295
+ end_point += PLIST_END_TAG.size - 1
286
296
  raw[start_point..end_point]
287
297
  end
288
298
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppInfo
4
- VERSION = '3.3.1'
4
+ VERSION = '3.3.2'
5
5
  end
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.3.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - icyleaf
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-04-27 00:00:00.000000000 Z
11
+ date: 2025-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: CFPropertyList