read_ipa 0.5.0 → 2.0.1

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
  SHA1:
3
- metadata.gz: 3d37cf24ced99fb95833fe3d2ecfe5b2a65d06d1
4
- data.tar.gz: 40cd3b2e26750ce4176fc1a7f9e73c0aaea85386
3
+ metadata.gz: d6a369d736a18d692bdd00811f2dbabca477da74
4
+ data.tar.gz: 5a2619072af97039b3ce95ca5d9f4135f6853a73
5
5
  SHA512:
6
- metadata.gz: ed2f9194f191abf821d123bc2bf85359cd29d3e00c1b7a33dbe14d45bacc65ec09852cd2b64c7b57aab3378afb9e9f6c6d44f5cd6d6b6519d0a9fc8735a91819
7
- data.tar.gz: b40fd1a545b28e1d0904338e3cf793164dc41d766a100429da2485700e1b7699e4fa82817312f5c2f32adbf93772b5a0175ff4206535dd39daa84094207f5328
6
+ metadata.gz: 8adfe73a08c261b26b46034027dbff03f05381fc1757a1a7c466c7f2bc7a13dd59b7cda353f3eedd82c9dcda1929d02786c908fb1fa3fea4bcac642935b08343
7
+ data.tar.gz: 7ee1df27ff38b04659a9b9cad4104bff9c5a74c80f3362aeac9cadadaad7e0010a32b8e398ba67e84fa1ef6d6e8041c6fd9b1a4d671d59f6c412284d6335a17e
data/README.md CHANGED
@@ -29,10 +29,7 @@ irb > ipa_file.icon_prerendered
29
29
 
30
30
  ## Supported ruby versions
31
31
 
32
- * 1.9 **NOT SUPPORTED**
33
- * 2.0
34
- * 2.1
35
- * 2.2
32
+ * >= 2.3.0
36
33
 
37
34
  ## INSTALL
38
35
 
@@ -19,19 +19,15 @@ module ReadIpa
19
19
  end
20
20
 
21
21
  def target_os_version
22
- @plist["DTPlatformVersion"].match(/[\d\.]*/)[0]
22
+ @plist["DTPlatformVersion"].match(/[\d\.]*/)[0] if @plist["DTPlatformVersion"]
23
23
  end
24
24
 
25
25
  def minimum_os_version
26
- @plist["MinimumOSVersion"].match(/[\d\.]*/)[0]
26
+ @plist["MinimumOSVersion"].match(/[\d\.]*/)[0] if @plist["MinimumOSVersion"]
27
27
  end
28
28
 
29
29
  def url_schemes
30
- if @plist["CFBundleURLTypes"] && @plist["CFBundleURLTypes"][0] && @plist["CFBundleURLTypes"][0]["CFBundleURLSchemes"]
31
- @plist["CFBundleURLTypes"][0]["CFBundleURLSchemes"]
32
- else
33
- []
34
- end
30
+ @plist.dig('CFBundleURLTypes', 0, 'CFBundleURLSchemes') || []
35
31
  end
36
32
 
37
33
  def icon_files
@@ -9,8 +9,8 @@ module ReadIpa
9
9
  attr_accessor :plist, :file_path
10
10
  def initialize(file_path)
11
11
  self.file_path = file_path
12
- @zipfile = Zip::File.open(file_path)
13
12
  @app_folder = get_app_folder
13
+ @zipfile = Zip::File.open(file_path)
14
14
  plist_str = @zipfile.read(@app_folder + 'Info.plist')
15
15
  @info_plist = InfoPlist.new(plist_str)
16
16
 
@@ -80,12 +80,16 @@ module ReadIpa
80
80
  end
81
81
 
82
82
  def get_app_folder
83
- @zipfile.each do |entry|
83
+ plist_path = nil
84
+ Zip::File.foreach(file_path) do |entry|
84
85
  if /.*\.app\/Info\.plist$/ =~ entry.to_s
85
- return entry.to_s.gsub(/Info\.plist$/, '')
86
+ plist_path = entry
87
+ break
86
88
  end
87
89
  end
88
- raise "Could not identify Main app Folder"
90
+ app_folder = plist_path.to_s.gsub(/Info\.plist$/, '')
91
+ raise "Could not identify Main app Folder" if app_folder.nil?
92
+ app_folder
89
93
  end
90
94
 
91
95
  def mobile_provision_file
@@ -24,7 +24,7 @@ module CFPropertyList
24
24
  class CFArray
25
25
  def to_hash
26
26
  hash_data = []
27
- value.each do |obj|
27
+ value.compact.each do |obj|
28
28
  hash_data << obj.to_hash
29
29
  end
30
30
  hash_data
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: read_ipa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marvin Killing
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-23 00:00:00.000000000 Z
11
+ date: 2017-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -42,30 +42,30 @@ dependencies:
42
42
  name: rubyzip
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: CFPropertyList
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '='
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.1.1
61
+ version: '2.1'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '='
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 2.1.1
68
+ version: '2.1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: apple_png
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -134,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '2'
137
+ version: '2.3'
138
138
  required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  requirements:
140
140
  - - ">="
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.4.6
145
+ rubygems_version: 2.6.12
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Read metadata from iOS IPA package files