headdesk 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +6 -2
- data/docs/api26.md +3 -0
- data/docs/facebook.md +3 -0
- data/docs/receiver.md +3 -0
- data/docs/teak/api21_icon.md +5 -0
- data/docs/teak/caching.md +6 -0
- data/docs/teak/configuration.md +6 -1
- data/headdesk.gemspec +3 -1
- data/lib/headdesk/apk/resources.rb +0 -2
- data/lib/headdesk/apk.rb +1 -3
- data/lib/headdesk/check.rb +1 -0
- data/lib/headdesk/checks/teak/api21_icon.rb +1 -1
- data/lib/headdesk/cli.rb +7 -0
- data/lib/headdesk/version.rb +1 -1
- data/lib/headdesk/versions.rb +29 -0
- data/lib/headdesk.rb +1 -0
- metadata +15 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9067a4b373fd01b502fd6cb77fafc2bd1c60e9d18aef42390832e855bf6437e8
|
4
|
+
data.tar.gz: 3eccbb70deffe105e84a5ae0bfd6aecf8977ae9d9399665863570681fa92933a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 046264add67d0b39f07a5d57eb95372fd5b0ba5278443c17768aade9932a3c2a868454f25a239df242644f61b4ec766370aed860ef8944a64012c8de6726dace
|
7
|
+
data.tar.gz: eac8f28b1aa2ddc80bb30369f9b384dc2c6928a611720b16b914705498d448feaa10e66a90cf19c98e646f64d17595f33df2d3d24e2468f2eeeb3249c0082f87
|
data/.rubocop.yml
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
headdesk (0.
|
4
|
+
headdesk (0.10.0)
|
5
5
|
awesome_print (~> 1.8)
|
6
|
+
gems (~> 1.1)
|
6
7
|
nokogiri (~> 1.10)
|
7
8
|
oily_png (~> 1.2)
|
8
9
|
thor (~> 0.20)
|
@@ -25,8 +26,11 @@ GEM
|
|
25
26
|
thread_safe (~> 0.3, >= 0.3.1)
|
26
27
|
diff-lcs (1.3)
|
27
28
|
equalizer (0.0.11)
|
29
|
+
gems (1.1.1)
|
30
|
+
json
|
28
31
|
ice_nine (0.11.2)
|
29
32
|
jaro_winkler (1.5.2)
|
33
|
+
json (2.1.0)
|
30
34
|
kwalify (0.7.2)
|
31
35
|
mini_portile2 (2.4.0)
|
32
36
|
nokogiri (1.10.1)
|
@@ -84,7 +88,7 @@ DEPENDENCIES
|
|
84
88
|
bundler (~> 2.0)
|
85
89
|
headdesk!
|
86
90
|
rake (~> 10.0)
|
87
|
-
reek
|
91
|
+
reek
|
88
92
|
rspec (~> 3.8)
|
89
93
|
rubocop
|
90
94
|
|
data/docs/api26.md
CHANGED
@@ -12,3 +12,6 @@ As of November 1, 2018 Google Play requires that all apps, and app updates, targ
|
|
12
12
|
|
13
13
|
> Google Play will require that new apps target at least Android 8.0 (API level 26) from August 1, 2018, and that app updates target Android 8.0 from November 1, 2018.
|
14
14
|
Source: https://developer.android.com/distribute/best-practices/develop/target-sdk
|
15
|
+
|
16
|
+
## Resolution
|
17
|
+
Target API 26 or higher.
|
data/docs/facebook.md
CHANGED
@@ -28,3 +28,6 @@ Facebook deprecates their SDKs two years after release.
|
|
28
28
|
|
29
29
|
> Core APIs and SDKs are central to the Facebook Platform offered to developers. These elements are subject to a version system, and guarantee that anything considered a core API node, field, edge, dialog, SDK or SDK method will remain available and unchanged for at least two years from the launch of that version.
|
30
30
|
Source: https://developers.facebook.com/docs/apps/versions/
|
31
|
+
|
32
|
+
## Resolution
|
33
|
+
Update the version of the Facebook SDK that your game uses.
|
data/docs/receiver.md
CHANGED
@@ -26,3 +26,6 @@ The recievers present in `AndroidManifest.xml`
|
|
26
26
|
|
27
27
|
## Reason
|
28
28
|
Frequently, during app updates, build settings will change, or an SDK will be removed but the `<receiver>` inside of the `AndroidManifest.xml` will not get updated or removed. This causes the app to crash.
|
29
|
+
|
30
|
+
## Resolution
|
31
|
+
Remove the `<receiver>` blocks which are missing implementations, or add the libraries which provide the implementations.
|
data/docs/teak/api21_icon.md
CHANGED
@@ -35,3 +35,8 @@ The values for `io_teak_small_notification_icon` for less than v21, and v21+.
|
|
35
35
|
|
36
36
|
## Reason
|
37
37
|
Android 5+ uses [Material Design](https://material.io/design/iconography/#notification) and needs a white and transparant icon for proper display of notification icons in the tray.
|
38
|
+
|
39
|
+
## Resolution
|
40
|
+
**Adobe AIR:** [Set Notification Icons for your Game](https://teak.readthedocs.io/projects/air/en/latest/android.html#set-notification-icons-for-your-game)
|
41
|
+
|
42
|
+
**Unity:** [Set Notification Icons for your Game](https://teak.readthedocs.io/projects/unity/en/latest/android.html#set-notification-icons-for-your-game)
|
data/docs/teak/caching.md
CHANGED
@@ -16,3 +16,9 @@ None.
|
|
16
16
|
The Teak SDK uses [Android HTTP Caching](https://developer.android.com/training/efficient-downloads/redundant_redundant#ResponseCache) to prevent downloading redundant Notification assets.
|
17
17
|
|
18
18
|
The `io_teak_enable_caching` setting allows you to disable this behavior, however it should be enabled unless your app, or an SDK that you use, makes uncommon assumptions.
|
19
|
+
|
20
|
+
## Resolution
|
21
|
+
Upgrade to the Teak 2.0 SDK, or add this to your Android resources XML:
|
22
|
+
```xml
|
23
|
+
<bool name="io_teak_enable_caching">true</bool>
|
24
|
+
```
|
data/docs/teak/configuration.md
CHANGED
@@ -26,4 +26,9 @@ The configuration values for the Teak SDK.
|
|
26
26
|
```
|
27
27
|
|
28
28
|
## Reason
|
29
|
-
|
29
|
+
Teak requires your Teak App Id, Teak API Key, GCM sender id, and Firebase App Id in order to function.
|
30
|
+
|
31
|
+
## Resolution
|
32
|
+
**Adobe AIR:** [Set up Teak support at the Application level](https://teak.readthedocs.io/projects/air/en/latest/android.html#set-up-teak-support-at-the-application-level)
|
33
|
+
|
34
|
+
**Unity:** Use the `Edit/Teak` menu item to configure Teak inside Unity, or [Edit res/values/teak.xml](https://teak.readthedocs.io/projects/unity/en/latest/android.html#edit-res-values-teak-xml).
|
data/headdesk.gemspec
CHANGED
@@ -15,6 +15,8 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.homepage = 'https://github.com/GoCarrot/headdesk'
|
16
16
|
spec.license = 'MIT'
|
17
17
|
|
18
|
+
spec.post_install_message = 'For breaking change announcements...'
|
19
|
+
|
18
20
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
19
21
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
20
22
|
# if spec.respond_to?(:metadata)
|
@@ -35,10 +37,10 @@ Gem::Specification.new do |spec|
|
|
35
37
|
|
36
38
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
37
39
|
spec.add_development_dependency 'rake', '~> 10.0'
|
38
|
-
spec.add_development_dependency 'reek', '~> 5.2'
|
39
40
|
spec.add_development_dependency 'rspec', '~> 3.8'
|
40
41
|
|
41
42
|
spec.add_dependency 'awesome_print', '~> 1.8'
|
43
|
+
spec.add_dependency 'gems', '~> 1.1'
|
42
44
|
spec.add_dependency 'nokogiri', '~> 1.10'
|
43
45
|
spec.add_dependency 'oily_png', '~> 1.2'
|
44
46
|
spec.add_dependency 'thor', '~> 0.20'
|
data/lib/headdesk/apk.rb
CHANGED
@@ -23,9 +23,7 @@ module Headdesk
|
|
23
23
|
android_manifest_xml = File.join(@path, 'AndroidManifest.xml').freeze
|
24
24
|
apktool_yml = File.join(@path, 'apktool.yml').freeze
|
25
25
|
|
26
|
-
unless File.exist?(android_manifest_xml) && File.exist?(apktool_yml)
|
27
|
-
throw CliError.new('Path did not contain AndroidManifest.xml and/or apktool.yml')
|
28
|
-
end
|
26
|
+
throw CliError.new('Path did not contain AndroidManifest.xml and/or apktool.yml') unless File.exist?(android_manifest_xml) && File.exist?(apktool_yml)
|
29
27
|
|
30
28
|
@yaml = YAML.load_file(apktool_yml)
|
31
29
|
@sdk_info = @yaml['sdkInfo']
|
data/lib/headdesk/check.rb
CHANGED
@@ -13,7 +13,7 @@ module Headdesk
|
|
13
13
|
|
14
14
|
check_name 'api21_icon'
|
15
15
|
describe 'Check for API 21+ Teak icons'
|
16
|
-
# :reek:UncommunicativeVariableName { accept: ['icon_v21'] }
|
16
|
+
# :reek:NilCheck and :reek:UncommunicativeVariableName { accept: ['icon_v21'] }
|
17
17
|
def call
|
18
18
|
skip_check if: -> { apk.min_sdk 21 }
|
19
19
|
|
data/lib/headdesk/cli.rb
CHANGED
@@ -11,6 +11,12 @@ module Headdesk
|
|
11
11
|
#
|
12
12
|
# :reek:TooManyStatements
|
13
13
|
class CLI < Thor
|
14
|
+
no_commands do
|
15
|
+
def print_update_message
|
16
|
+
STDOUT.puts format("\e[36m%s\e[0m", "Latest version is #{Headdesk::Versions.latest_version}, please run 'bundle update headdesk'")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
14
20
|
desc 'unpack FILE [DESTINATION]', 'Unpack an APK or IPA to [DESTINATION] or to the current directory'
|
15
21
|
method_option :analyze, type: :boolean, aliases: '-a'
|
16
22
|
def unpack(file, destination = nil)
|
@@ -90,6 +96,7 @@ module Headdesk
|
|
90
96
|
STDOUT.puts report.to_json
|
91
97
|
else
|
92
98
|
STDOUT.puts report.to_s
|
99
|
+
print_update_message unless Headdesk::Versions.latest_version?
|
93
100
|
end
|
94
101
|
rescue CliError => cli_err
|
95
102
|
STDERR.puts cli_err.message
|
data/lib/headdesk/version.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'gems'
|
4
|
+
|
5
|
+
module Headdesk
|
6
|
+
#
|
7
|
+
# Version information from RubyGems.org
|
8
|
+
#
|
9
|
+
class Versions
|
10
|
+
def self.versions
|
11
|
+
Gems.versions('headdesk').collect do |version|
|
12
|
+
Gem::Version.new(version['number'])
|
13
|
+
rescue StandardError
|
14
|
+
nil
|
15
|
+
end
|
16
|
+
.compact
|
17
|
+
.sort
|
18
|
+
.reverse
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.latest_version
|
22
|
+
Gem::Version.new(Gems.latest_version('headdesk')['version'])
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.latest_version?(version = VERSION)
|
26
|
+
latest_version == Gem::Version.new(version)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/headdesk.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: headdesk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pat Wilson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -39,47 +39,47 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3.8'
|
48
48
|
type: :development
|
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: '3.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: awesome_print
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
62
|
-
type: :
|
61
|
+
version: '1.8'
|
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: '
|
68
|
+
version: '1.8'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: gems
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1.
|
75
|
+
version: '1.1'
|
76
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: '1.
|
82
|
+
version: '1.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: nokogiri
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,6 +132,7 @@ extra_rdoc_files: []
|
|
132
132
|
files:
|
133
133
|
- ".gitignore"
|
134
134
|
- ".reek.yml"
|
135
|
+
- ".rubocop.yml"
|
135
136
|
- ".ruby-gemset"
|
136
137
|
- ".ruby-version"
|
137
138
|
- Gemfile
|
@@ -173,11 +174,12 @@ files:
|
|
173
174
|
- lib/headdesk/descriptionator/resources.rb
|
174
175
|
- lib/headdesk/report.rb
|
175
176
|
- lib/headdesk/version.rb
|
177
|
+
- lib/headdesk/versions.rb
|
176
178
|
homepage: https://github.com/GoCarrot/headdesk
|
177
179
|
licenses:
|
178
180
|
- MIT
|
179
181
|
metadata: {}
|
180
|
-
post_install_message:
|
182
|
+
post_install_message: For breaking change announcements...
|
181
183
|
rdoc_options: []
|
182
184
|
require_paths:
|
183
185
|
- lib
|