app-info 2.0.0.rc1 → 2.0.0

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: d350ac162d6e2f06920d058142063972c65d6ef76ca5a699a008df472af24ab9
4
- data.tar.gz: de69b545943db405cb45fd85d766effd31ea8aa668e56802943fc8f41d7fe06a
3
+ metadata.gz: 95e08bfdce22bf0efdc7670b4a05259d7b3963fa3800072e42db5d2e09b9f372
4
+ data.tar.gz: 9a4d648e7df8135213a0a4419a219701b83bc44580d528a634a02eb3fa09b816
5
5
  SHA512:
6
- metadata.gz: 9cec3e142689a77146257e3a2b553e35959be9db9081e66ffa049d09f66ffd7cc718ea8b2db75af228549e8c413ac3f3b6512b3aab0c7fe9e6fe6a394f16e83c
7
- data.tar.gz: c9515bad55fff843cdb14409682a2e1dd3271790e1cc41a70454670d63f0d6c0e76f9b92852bfa9c9ced6f588f7d823069417462e03036eb8d8ad19c41aa3ae0
6
+ metadata.gz: bff8b795e451f05af53cf5b278ec72eda4108c68f369f7cb3c2910a102cdd58d52cc868bc4fb23c1b08d1db59bab666b2c5c95f6e672bd201e066732bc1723e4
7
+ data.tar.gz: dc44a77545d74c2911d533a8ebbe384a4a31a15c6386bd45d4dddb9600d55b4385040eda9d9b5ee58d1df449fcc440b4b995cfba8c24549e2f7121f83247ac19
@@ -9,18 +9,21 @@ 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
- ### Changed
13
-
14
- - Remove `Parser` module to reduce namespace. #[13](https://github.com/icyleaf/app-info/issues/13)
15
- - Use parse Macho-O header and contents to detect file type instead of file extension name.
16
- - Dropped Ruby 2.2 and below versions support.
12
+ ## [2.0.0] (2019-10-29)
17
13
 
18
14
  ### Added
19
15
 
20
- - Added iOS .dSYM.zip format support. #[8](https://github.com/icyleaf/app-info/issues/8)
16
+ - Added iOS `.dSYM.zip` format support. #[8](https://github.com/icyleaf/app-info/issues/8)
21
17
  - Added parse mobileprovision in Linux. #[10](https://github.com/icyleaf/app_info/pull/10)
22
18
  - Added `AppInfo.file_type` to detect file type.
23
19
  - Added detect and simple parse Android proguard file support. #[15](https://github.com/icyleaf/app_info/pull/15)
20
+ - Added `AppInfo::IPA.archs` to return what architecture(s) support. #[16](https://github.com/icyleaf/app_info/pull/16)
21
+
22
+ ### Changed
23
+
24
+ - Remove `Parser` module to reduce namespace. #[13](https://github.com/icyleaf/app-info/issues/13)
25
+ - Use parse Macho-O header and contents to detect file type instead of file extension name.
26
+ - Dropped Ruby 2.2 and below versions support.
24
27
 
25
28
  ## [1.1.2] (2019-09-19)
26
29
 
data/README.md CHANGED
@@ -97,6 +97,10 @@ ipa.universal?
97
97
  ipa.release_type
98
98
  # => 'AdHoc'
99
99
 
100
+ # detect architecture(s)
101
+ ipa.archs
102
+ # => [:armv7, :arm64]
103
+
100
104
  # get more propety in Info.plist
101
105
  ipa.info[:CFBundleDisplayName]
102
106
  # => 'AppInfoDemo'
@@ -120,7 +124,7 @@ profile.team_id
120
124
  profile.team_name
121
125
  # => 'Company/Team Name'
122
126
 
123
- # get app icons
127
+ # get UDID of devices
124
128
  profile.devices
125
129
  # => ['18cf53cddee60c5af9c97b1521e7cbf8342628da']
126
130
  ```
data/Rakefile CHANGED
@@ -1,4 +1,6 @@
1
- $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift File.expand_path('lib', __dir__)
2
4
  require 'app_info'
3
5
  require 'bundler/gem_tasks'
4
6
  require 'rspec/core/rake_task'
@@ -6,8 +8,3 @@ require 'rspec/core/rake_task'
6
8
  RSpec::Core::RakeTask.new(:spec)
7
9
 
8
10
  task default: :spec
9
-
10
- task :try do
11
- a = AppInfo.parse('./spec/fixtures/proguards/full_mapping.zip')
12
- puts a.uuid
13
- end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'macho'
3
4
  require 'pngdefry'
4
5
  require 'fileutils'
5
6
  require 'cfpropertylist'
@@ -127,6 +128,21 @@ module AppInfo
127
128
  end
128
129
  end
129
130
 
131
+ def archs
132
+ return unless File.exist?(bundle_path)
133
+
134
+ file = MachO.open(bundle_path)
135
+ case file
136
+ when MachO::MachOFile
137
+ [file.cpusubtype]
138
+ else
139
+ file.machos.each_with_object([]) do |arch, obj|
140
+ obj << arch.cpusubtype
141
+ end
142
+ end
143
+ end
144
+ alias architectures archs
145
+
130
146
  def stored?
131
147
  metadata? ? true : false
132
148
  end
@@ -170,6 +186,10 @@ module AppInfo
170
186
  @metadata_path ||= File.join(contents, 'iTunesMetadata.plist')
171
187
  end
172
188
 
189
+ def bundle_path
190
+ @bundle_path ||= File.join(app_path, info.bundle_name)
191
+ end
192
+
173
193
  def info
174
194
  @info ||= InfoPlist.new(app_path)
175
195
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppInfo
4
- VERSION = '2.0.0.rc1'
4
+ VERSION = '2.0.0'
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: 2.0.0.rc1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - icyleaf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-16 00:00:00.000000000 Z
11
+ date: 2019-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: CFPropertyList
@@ -212,9 +212,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
212
212
  version: '2.3'
213
213
  required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  requirements:
215
- - - ">"
215
+ - - ">="
216
216
  - !ruby/object:Gem::Version
217
- version: 1.3.1
217
+ version: '0'
218
218
  requirements: []
219
219
  rubygems_version: 3.0.6
220
220
  signing_key: