lagunitas 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +34 -0
- data/.github/workflows/test.yml +28 -0
- data/.github/workflows/yaml.yml +26 -0
- data/.rubocop.yml +2 -0
- data/.yamllint.yml +10 -0
- data/Gemfile +2 -0
- data/LICENSE +1 -1
- data/Rakefile +19 -0
- data/lagunitas.gemspec +9 -6
- data/lib/lagunitas.rb +3 -0
- data/lib/lagunitas/app.rb +10 -1
- data/lib/lagunitas/ipa.rb +8 -1
- data/lib/lagunitas/version.rb +3 -1
- data/test/lagunitas/app_test.rb +3 -1
- data/test/lagunitas/ipa_test.rb +3 -1
- data/test/lagunitas_test.rb +2 -0
- data/test/test_helper.rb +7 -3
- metadata +38 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 56fa97a715dde896b508360808a0bb4b11b668df2a8a8b486905151760456415
|
4
|
+
data.tar.gz: '0895bc28b55d105f46de7725e5d9a8e1415ddb4d716f25093573e57a9bec645e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 362150ea3ba7b5ace28c31d6181af1bb89422fe1cb9ee8a84a6fd970e849f2716465c3975ffdea1d82769933ceca558cfbed6d143159fd06072e0e73b9097a8c
|
7
|
+
data.tar.gz: 880dd41275ac06a631a6029762ee777e0621f4bda82e5c9d758839e227d99a51505dbece10db87db34a4d8ed274cdddf85f1ee68b5805680cbe3a0d4399d9a46
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: Ruby
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
paths:
|
5
|
+
- '**/*.rb'
|
6
|
+
- Gemfile
|
7
|
+
- Rakefile
|
8
|
+
push:
|
9
|
+
branches:
|
10
|
+
- main
|
11
|
+
jobs:
|
12
|
+
lint:
|
13
|
+
name: Lint
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
env:
|
16
|
+
RAILS_ENV: test
|
17
|
+
steps:
|
18
|
+
- name: Checkout
|
19
|
+
uses: actions/checkout@v2
|
20
|
+
- name: Setup Ruby
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: 2.7.2
|
24
|
+
- name: Cache gems
|
25
|
+
uses: actions/cache@v1
|
26
|
+
with:
|
27
|
+
path: vendor/bundle
|
28
|
+
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
29
|
+
- name: Install dependencies
|
30
|
+
run: |
|
31
|
+
bundle config path vendor/bundle
|
32
|
+
bundle install --jobs 4 --retry 3
|
33
|
+
- name: Run Rubocop
|
34
|
+
run: bundle exec rake lint:ruby
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: Test
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
name: Test
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- name: Checkout
|
13
|
+
uses: actions/checkout@v2
|
14
|
+
- name: Setup Ruby
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: 2.7.2
|
18
|
+
- name: Cache gems
|
19
|
+
uses: actions/cache@v1
|
20
|
+
with:
|
21
|
+
path: vendor/bundle
|
22
|
+
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
23
|
+
- name: Install dependencies
|
24
|
+
run: |
|
25
|
+
bundle config path vendor/bundle
|
26
|
+
bundle install --jobs 4 --retry 3
|
27
|
+
- name: Run tests
|
28
|
+
run: bundle exec rake test
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: YAML
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
paths:
|
5
|
+
- '**/*.yml'
|
6
|
+
- '**/*.yaml'
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
jobs:
|
11
|
+
lint:
|
12
|
+
name: Lint
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
steps:
|
15
|
+
- name: Checkout
|
16
|
+
uses: actions/checkout@v2
|
17
|
+
- name: Setup Python
|
18
|
+
uses: actions/setup-python@v2
|
19
|
+
with:
|
20
|
+
python-version: '3.x'
|
21
|
+
- name: Install dependencies
|
22
|
+
run: python -m pip install --upgrade pip setuptools wheel yamllint
|
23
|
+
- name: Lint
|
24
|
+
run: |
|
25
|
+
yamllint --version >/dev/null 2>&1 || pip3 install yamllint
|
26
|
+
yamllint -c .yamllint.yml .
|
data/.rubocop.yml
ADDED
data/.yamllint.yml
ADDED
data/Gemfile
CHANGED
data/LICENSE
CHANGED
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'bundler'
|
2
4
|
Bundler::GemHelper.install_tasks
|
3
5
|
|
@@ -7,3 +9,20 @@ Rake::TestTask.new(:test) do |t|
|
|
7
9
|
t.pattern = 'test/**/*_test.rb'
|
8
10
|
end
|
9
11
|
task default: :test
|
12
|
+
|
13
|
+
namespace :lint do
|
14
|
+
desc 'Lint Ruby'
|
15
|
+
task :ruby do
|
16
|
+
system 'bundle exec rubocop --parallel --config .rubocop.yml'
|
17
|
+
end
|
18
|
+
|
19
|
+
desc 'Lint YAML'
|
20
|
+
task :yaml do
|
21
|
+
abort 'yamllint is not installed. Install it with `pip3 install yamllint`.' if `which yamllint`.chomp.empty?
|
22
|
+
|
23
|
+
system 'yamllint -c .yamllint.yml .'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
desc 'Run all linters'
|
28
|
+
task lint: %i[lint:ruby lint:yaml]
|
data/lagunitas.gemspec
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'lagunitas/version'
|
5
6
|
|
@@ -12,18 +13,20 @@ Gem::Specification.new do |spec|
|
|
12
13
|
spec.summary = spec.description
|
13
14
|
spec.homepage = 'https://github.com/soffes/lagunitas'
|
14
15
|
spec.license = 'MIT'
|
16
|
+
spec.required_ruby_version = '>= 2.4'
|
15
17
|
|
16
|
-
spec.files = `git ls-files`.split(
|
18
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
19
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
21
|
spec.require_paths = ['lib']
|
20
22
|
|
21
|
-
spec.add_development_dependency 'bundler', '
|
23
|
+
spec.add_development_dependency 'bundler', '>= 1.3'
|
22
24
|
|
23
|
-
spec.add_dependency 'rubyzip', '>= 1.0.0'
|
24
25
|
spec.add_dependency 'CFPropertyList'
|
25
26
|
spec.add_dependency 'pngdefry', '>= 0.1.0'
|
27
|
+
spec.add_dependency 'rubocop', '>= 0.92.0'
|
28
|
+
spec.add_dependency 'rubyzip', '>= 1.0.0'
|
26
29
|
|
27
|
-
spec.add_development_dependency 'rake'
|
28
30
|
spec.add_development_dependency 'minitest', '>= 5.0'
|
31
|
+
spec.add_development_dependency 'rake'
|
29
32
|
end
|
data/lib/lagunitas.rb
CHANGED
data/lib/lagunitas/app.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'cfpropertylist'
|
2
4
|
require 'pngdefry'
|
3
5
|
|
4
6
|
module Lagunitas
|
7
|
+
# Representation of an app inside an IPA
|
5
8
|
class App
|
6
9
|
def initialize(path)
|
7
10
|
@path = path
|
@@ -15,6 +18,10 @@ module Lagunitas
|
|
15
18
|
info['CFBundleIdentifier']
|
16
19
|
end
|
17
20
|
|
21
|
+
def bundle_name
|
22
|
+
info['CFBundleName']
|
23
|
+
end
|
24
|
+
|
18
25
|
def display_name
|
19
26
|
info['CFBundleDisplayName']
|
20
27
|
end
|
@@ -41,7 +48,9 @@ module Lagunitas
|
|
41
48
|
icons << get_image(name)
|
42
49
|
icons << get_image("#{name}@2x")
|
43
50
|
end
|
44
|
-
icons.delete_if
|
51
|
+
icons.delete_if(&:!)
|
52
|
+
rescue NoMethodError # fix a ipa without icons
|
53
|
+
[]
|
45
54
|
end
|
46
55
|
end
|
47
56
|
|
data/lib/lagunitas/ipa.rb
CHANGED
@@ -1,10 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'zip'
|
2
4
|
require 'fileutils'
|
5
|
+
require 'securerandom'
|
3
6
|
|
4
7
|
module Lagunitas
|
8
|
+
# Representation of an IPA file
|
5
9
|
class IPA
|
6
10
|
def initialize(path)
|
7
11
|
@path = path
|
12
|
+
@contents = nil
|
8
13
|
end
|
9
14
|
|
10
15
|
def app
|
@@ -17,6 +22,7 @@ module Lagunitas
|
|
17
22
|
|
18
23
|
def cleanup
|
19
24
|
return unless @contents
|
25
|
+
|
20
26
|
FileUtils.rm_rf(@contents)
|
21
27
|
@contents = nil
|
22
28
|
end
|
@@ -25,7 +31,8 @@ module Lagunitas
|
|
25
31
|
|
26
32
|
def contents
|
27
33
|
return if @contents
|
28
|
-
|
34
|
+
|
35
|
+
@contents = "tmp/lagunitas-#{::SecureRandom.hex}"
|
29
36
|
|
30
37
|
Zip::File.open(@path) do |zip_file|
|
31
38
|
zip_file.each do |f|
|
data/lib/lagunitas/version.rb
CHANGED
data/test/lagunitas/app_test.rb
CHANGED
data/test/lagunitas/ipa_test.rb
CHANGED
data/test/lagunitas_test.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rubygems'
|
2
4
|
require 'bundler'
|
3
5
|
Bundler.require :test
|
@@ -6,10 +8,12 @@ require 'minitest/autorun'
|
|
6
8
|
require 'lagunitas'
|
7
9
|
|
8
10
|
# Support files
|
9
|
-
Dir["#{
|
11
|
+
Dir["#{__dir__}/support/*.rb"].sort.each do |file|
|
10
12
|
require file
|
11
13
|
end
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
+
module Lagunitas
|
16
|
+
class TestCase < MiniTest::Test
|
17
|
+
include Lagunitas
|
18
|
+
end
|
15
19
|
end
|
metadata
CHANGED
@@ -1,85 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lagunitas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Soffes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-26 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:
|
28
|
+
name: CFPropertyList
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '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:
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: pngdefry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.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
|
-
version:
|
54
|
+
version: 0.1.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.92.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
|
-
version: 0.
|
68
|
+
version: 0.92.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rubyzip
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
76
|
-
type: :
|
75
|
+
version: 1.0.0
|
76
|
+
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 1.0.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: minitest
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '5.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description: Easy iOS IPAs inspection.
|
98
112
|
email:
|
99
113
|
- sam@soff.es
|
@@ -101,7 +115,12 @@ executables: []
|
|
101
115
|
extensions: []
|
102
116
|
extra_rdoc_files: []
|
103
117
|
files:
|
118
|
+
- ".github/workflows/ruby.yml"
|
119
|
+
- ".github/workflows/test.yml"
|
120
|
+
- ".github/workflows/yaml.yml"
|
104
121
|
- ".gitignore"
|
122
|
+
- ".rubocop.yml"
|
123
|
+
- ".yamllint.yml"
|
105
124
|
- Gemfile
|
106
125
|
- LICENSE
|
107
126
|
- Rakefile
|
@@ -128,15 +147,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
128
147
|
requirements:
|
129
148
|
- - ">="
|
130
149
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
150
|
+
version: '2.4'
|
132
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
152
|
requirements:
|
134
153
|
- - ">="
|
135
154
|
- !ruby/object:Gem::Version
|
136
155
|
version: '0'
|
137
156
|
requirements: []
|
138
|
-
|
139
|
-
rubygems_version: 2.4.5
|
157
|
+
rubygems_version: 3.1.4
|
140
158
|
signing_key:
|
141
159
|
specification_version: 4
|
142
160
|
summary: Easy iOS IPAs inspection.
|