lagunitas 0.0.1 → 0.0.2

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: 6c35cf7cdf9ef1343a43710c6dab81afa91263a3
4
- data.tar.gz: adfd3a81d4ee4de86d1ecc15c8f861b95f00df8f
3
+ metadata.gz: 5a194c09db06f502a74285d90164859150f76845
4
+ data.tar.gz: 8985a301c8dc5fb2e74d8318029b68e754923e7d
5
5
  SHA512:
6
- metadata.gz: a905e0768b5b2803786ec9ebf752cdf68f7667ae95afe3c8ded92e169a5bd40fc5fea77d3a231b20bd091a8859c4be70ac037649d671a45136a80ca130820a7c
7
- data.tar.gz: 93a078e24a3bc2eb45b53f2b3129b3985eb9ab83d9701e440a8e06c0b1fcd463fae70c9b7ecf8cb25bbd9894855199a62062b25a80c0af6456f142288246a177
6
+ metadata.gz: 0dae877a69f5d5786c9e66830bdd002728114f2d926fcbec0b976ccfb6d9dc4dad0024641d7cf96ac54fd1e3c6884cd48542196ea73f5da1e221580521aa193f
7
+ data.tar.gz: b2efd099fb4465c1b8f92aa9119a12e540c258c9fc14ab3b8a124dbd7086c02006094ce085ae1a99e373ac39f014f38f5aba04d3ad6c48ff1611622569817eea
data/Gemfile CHANGED
@@ -1,6 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
-
5
- gem 'rake'
6
- gem 'minitest'
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Sam Soffes, http://soff.es
1
+ Copyright (c) 2013-2014 Sam Soffes, http://soff.es
2
2
 
3
3
  MIT License
4
4
 
data/Readme.markdown CHANGED
@@ -1,12 +1,14 @@
1
1
  # Lagunitas
2
2
 
3
- TODO: Write a gem description
3
+ Easy iOS IPAs inspection.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem 'lagunitas'
9
+ ``` ruby
10
+ gem 'lagunitas'
11
+ ```
10
12
 
11
13
  And then execute:
12
14
 
@@ -18,7 +20,34 @@ Or install it yourself as:
18
20
 
19
21
  ## Usage
20
22
 
21
- TODO: Write usage instructions here
23
+ ``` ruby
24
+ ipa = Lagunitas::IPA.new('path/to/Your.ipa')
25
+
26
+ # Unzip and create app
27
+ app = ipa.app #=> Lagunitas::App
28
+
29
+ # Get information about the app
30
+ app.identifier #=> com.samsoffes.Sample
31
+ app.display_name #=> Sample
32
+ app.version #=> 13
33
+ app.short_version #=> 2.2
34
+
35
+ # Get an icon path at a specific size
36
+ app.icon(40) #=> '/absolute/path/to/Icon20x20@2x.png'
37
+
38
+ # You can also get all of the icons with their dimensions
39
+ app.icons #=> [{path:'...', width: 40, height: 40}, ...]
40
+
41
+ # Remove unzipped app
42
+ ipa.cleanup
43
+ ```
44
+
45
+ It's worth noting that if you get a path to an image in the bundle, it will be crushed with Apple's special PNGCrush. I have a gem to convert them called [pngdefry](https://github.com/soffes/pngdefry). Lagunitas depends on this already to get sizes for the icons. If you want to get a useable PNG out, do something like this:
46
+
47
+ ``` ruby
48
+ icon_path = app.icon(40)
49
+ Pngdefry.defry(icon_path, "output.png")
50
+ ```
22
51
 
23
52
  ## Contributing
24
53
 
data/lagunitas.gemspec CHANGED
@@ -20,9 +20,10 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency 'bundler', '~> 1.3'
22
22
 
23
- spec.add_dependency 'zip'
23
+ spec.add_dependency 'rubyzip', '>= 1.0.0'
24
24
  spec.add_dependency 'CFPropertyList'
25
25
  spec.add_dependency 'pngdefry', '>= 0.1.0'
26
26
 
27
27
  spec.add_development_dependency 'rake'
28
+ spec.add_development_dependency 'minitest', '>= 5.0'
28
29
  end
data/lib/lagunitas/ipa.rb CHANGED
@@ -27,7 +27,7 @@ module Lagunitas
27
27
  return if @contents
28
28
  @contents = "tmp/lagunitas-#{SecureRandom.hex}"
29
29
 
30
- Zip::ZipFile.open(@path) do |zip_file|
30
+ Zip::File.open(@path) do |zip_file|
31
31
  zip_file.each do |f|
32
32
  f_path = File.join(@contents, f.name)
33
33
  FileUtils.mkdir_p(File.dirname(f_path))
@@ -1,3 +1,3 @@
1
1
  module Lagunitas
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,85 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lagunitas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Soffes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-02 00:00:00.000000000 Z
11
+ date: 2015-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
- name: zip
28
+ name: rubyzip
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 1.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: CFPropertyList
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '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: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pngdefry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.1.0
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
68
  version: 0.1.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '5.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '5.0'
83
97
  description: Easy iOS IPAs inspection.
84
98
  email:
85
99
  - sam@soff.es
@@ -87,7 +101,7 @@ executables: []
87
101
  extensions: []
88
102
  extra_rdoc_files: []
89
103
  files:
90
- - .gitignore
104
+ - ".gitignore"
91
105
  - Gemfile
92
106
  - LICENSE
93
107
  - Rakefile
@@ -112,17 +126,17 @@ require_paths:
112
126
  - lib
113
127
  required_ruby_version: !ruby/object:Gem::Requirement
114
128
  requirements:
115
- - - '>='
129
+ - - ">="
116
130
  - !ruby/object:Gem::Version
117
131
  version: '0'
118
132
  required_rubygems_version: !ruby/object:Gem::Requirement
119
133
  requirements:
120
- - - '>='
134
+ - - ">="
121
135
  - !ruby/object:Gem::Version
122
136
  version: '0'
123
137
  requirements: []
124
138
  rubyforge_project:
125
- rubygems_version: 2.0.3
139
+ rubygems_version: 2.4.5
126
140
  signing_key:
127
141
  specification_version: 4
128
142
  summary: Easy iOS IPAs inspection.