ipa_reader 0.7.0 → 0.7.1.rc
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/README.md +9 -2
- data/lib/ipa_reader/ipa_file.rb +8 -3
- data/test/test_ipa_reader.rb +5 -0
- data/version.txt +1 -1
- metadata +8 -12
data/History.txt
CHANGED
data/README.md
CHANGED
@@ -10,7 +10,8 @@ I am using this gem to get version to build the over the air iPhone Ad Hoc distr
|
|
10
10
|
|
11
11
|
## USAGE
|
12
12
|
|
13
|
-
|
13
|
+
```bash
|
14
|
+
irb > require 'rubygems'
|
14
15
|
=> true
|
15
16
|
irb > require 'ipa_reader'
|
16
17
|
=> true
|
@@ -29,12 +30,18 @@ irb > ipa_file.url_schemes
|
|
29
30
|
irb > ipa_file.bundle_identifier
|
30
31
|
=> "com.dcrails.multig"
|
31
32
|
irb > ipa_file.icon_prerendered
|
32
|
-
=> false
|
33
|
+
=> false
|
34
|
+
```
|
33
35
|
|
34
36
|
## INSTALL
|
35
37
|
|
36
38
|
`gem install ipa_reader`
|
37
39
|
|
40
|
+
## Contributors
|
41
|
+
|
42
|
+
* [@yayanet](//github.com/yayanet)
|
43
|
+
* [@mwhuss](//github.com/mwhuss)
|
44
|
+
|
38
45
|
## LICENSE
|
39
46
|
|
40
47
|
(The MIT License)
|
data/lib/ipa_reader/ipa_file.rb
CHANGED
@@ -11,8 +11,9 @@ module IpaReader
|
|
11
11
|
def initialize(file_path)
|
12
12
|
self.file_path = file_path
|
13
13
|
info_plist_file = nil
|
14
|
-
|
15
|
-
|
14
|
+
regex = /Payload\/[^\/]+.app\/Info.plist/
|
15
|
+
Zip::ZipFile.foreach(file_path) { |f| info_plist_file = f if f.name.match(regex) }
|
16
|
+
cf_plist = CFPropertyList::List.new(:data => self.read_file(regex), :format => CFPropertyList::List::FORMAT_BINARY)
|
16
17
|
self.plist = cf_plist.value.to_rb
|
17
18
|
end
|
18
19
|
|
@@ -20,6 +21,10 @@ module IpaReader
|
|
20
21
|
plist["CFBundleVersion"]
|
21
22
|
end
|
22
23
|
|
24
|
+
def short_version
|
25
|
+
plist["CFBundleShortVersionString"]
|
26
|
+
end
|
27
|
+
|
23
28
|
def name
|
24
29
|
plist["CFBundleDisplayName"]
|
25
30
|
end
|
@@ -72,4 +77,4 @@ module IpaReader
|
|
72
77
|
file.get_input_stream.read
|
73
78
|
end
|
74
79
|
end
|
75
|
-
end
|
80
|
+
end
|
data/test/test_ipa_reader.rb
CHANGED
@@ -14,6 +14,11 @@ class IpaReaderTest < Test::Unit::TestCase
|
|
14
14
|
assert_equal(@ipa_file.version, "1.2.2.4")
|
15
15
|
end
|
16
16
|
|
17
|
+
def test_short_version
|
18
|
+
# asserting nil because the test file doesn't have this key
|
19
|
+
assert_nil(@ipa_file.short_version)
|
20
|
+
end
|
21
|
+
|
17
22
|
def test_name
|
18
23
|
assert_equal(@ipa_file.name, "MultiG")
|
19
24
|
end
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.1.rc
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ipa_reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
5
|
-
prerelease:
|
4
|
+
version: 0.7.1.rc
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Nicholas Schlueter
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-09-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: zip
|
@@ -65,9 +65,7 @@ email: schlueter@gmail.com
|
|
65
65
|
executables:
|
66
66
|
- ipa_reader
|
67
67
|
extensions: []
|
68
|
-
extra_rdoc_files:
|
69
|
-
- History.txt
|
70
|
-
- bin/ipa_reader
|
68
|
+
extra_rdoc_files: []
|
71
69
|
files:
|
72
70
|
- .gitignore
|
73
71
|
- History.txt
|
@@ -86,9 +84,7 @@ files:
|
|
86
84
|
homepage: http://github.com/schlu/Ipa-Reader
|
87
85
|
licenses: []
|
88
86
|
post_install_message:
|
89
|
-
rdoc_options:
|
90
|
-
- --main
|
91
|
-
- README.md
|
87
|
+
rdoc_options: []
|
92
88
|
require_paths:
|
93
89
|
- lib
|
94
90
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -100,12 +96,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
97
|
none: false
|
102
98
|
requirements:
|
103
|
-
- - ! '
|
99
|
+
- - ! '>'
|
104
100
|
- !ruby/object:Gem::Version
|
105
|
-
version:
|
101
|
+
version: 1.3.1
|
106
102
|
requirements: []
|
107
103
|
rubyforge_project: ipa_reader
|
108
|
-
rubygems_version: 1.8.
|
104
|
+
rubygems_version: 1.8.25
|
109
105
|
signing_key:
|
110
106
|
specification_version: 3
|
111
107
|
summary: Reads metadata form iPhone Package Archive Files (ipa).
|