headdesk 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +2 -2
- data/README.md +1 -1
- data/Rakefile +4 -0
- data/bin/facebook_sdk_versions +24 -8
- data/docs/target_sdk_version.md +14 -0
- data/lib/headdesk/checks/target_sdk_version.rb +19 -0
- data/lib/headdesk/data/facebook_sdk_versions.yaml +92 -2
- data/lib/headdesk/version.rb +1 -1
- metadata +4 -4
- data/docs/api26.md +0 -17
- data/lib/headdesk/checks/api26.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b515a8aecb49ea64462548ee2ae36181b1d106a78d3ea396235bf24ff2ef87d
|
4
|
+
data.tar.gz: 594961e4633d5bfcb7e4af07f6e90cfc94e5f03f0f82507c4ac2580cfbce8be7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c04f5d7f6ec81360149cb165a3f801f619a71c8f5f7fb93427be3547bcdc1733024cb77194acd08ca4431121ebfab2b96772e4d08ecb29ec8dd947868f1e766
|
7
|
+
data.tar.gz: 83c0724e4bae5cf7fc234b740504e4450ebd64df81ed8ef63ff11453a50bda6f44d6c630f5c6d83094b167400511beed04494011ed2a32fe0d2caad0a1e2b8a1
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
headdesk (0.
|
4
|
+
headdesk (0.14.0)
|
5
5
|
awesome_print (~> 1.8)
|
6
6
|
gems (~> 1.1)
|
7
7
|
nokogiri (~> 1.10)
|
@@ -35,7 +35,7 @@ GEM
|
|
35
35
|
json (2.1.0)
|
36
36
|
kwalify (0.7.2)
|
37
37
|
mini_portile2 (2.4.0)
|
38
|
-
nokogiri (1.10.
|
38
|
+
nokogiri (1.10.4)
|
39
39
|
mini_portile2 (~> 2.4.0)
|
40
40
|
oily_png (1.2.1)
|
41
41
|
chunky_png (~> 1.3.7)
|
data/README.md
CHANGED
@@ -17,9 +17,9 @@ This is output from the check that ensures that the version of the Facebook SDK
|
|
17
17
|
`headdesk` can also output to JSON.
|
18
18
|
|
19
19
|
## Checks
|
20
|
-
* [api26](docs/api26.md)
|
21
20
|
* [facebook](docs/facebook.md)
|
22
21
|
* [receiver](docs/receiver.md)
|
22
|
+
* [target_sdk_version](docs/target_sdk_version.md)
|
23
23
|
* [teak/api21_icon](docs/teak/api21_icon.md)
|
24
24
|
* [teak/configuration](docs/teak/configuration.md)
|
25
25
|
|
data/Rakefile
CHANGED
data/bin/facebook_sdk_versions
CHANGED
@@ -6,19 +6,35 @@ require 'nokogiri'
|
|
6
6
|
require 'open-uri'
|
7
7
|
require 'yaml'
|
8
8
|
|
9
|
-
|
9
|
+
@facebook_sdk_versions = {}
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
{
|
11
|
+
def add_version(str, matcher)
|
12
|
+
major, minor, patch, date = str.match(matcher).captures
|
13
|
+
version_string = "#{major.to_i || 0}.#{minor.to_i || 0}.#{patch.to_i || 0}"
|
14
|
+
@facebook_sdk_versions[version_string] = {
|
16
15
|
major: major.to_i || 0,
|
17
16
|
minor: minor.to_i || 0,
|
18
17
|
patch: patch.to_i || 0,
|
19
|
-
version:
|
18
|
+
version: version_string,
|
20
19
|
date: Date.parse(date)
|
21
20
|
}
|
22
21
|
end
|
23
22
|
|
24
|
-
|
23
|
+
html_doc = Nokogiri::HTML(open('https://developers.facebook.com/docs/android/change-log-4x'))
|
24
|
+
|
25
|
+
html_match = /^(\d+)\.(\d+)\.?(\d+)? \- (.*)$/
|
26
|
+
html_doc.xpath('//h2')
|
27
|
+
.select { |h2| html_match.match?(h2.text) }
|
28
|
+
.collect do |h2|
|
29
|
+
add_version(h2.text, html_match)
|
30
|
+
end
|
31
|
+
|
32
|
+
changelog_md = open('https://raw.githubusercontent.com/facebook/facebook-android-sdk/master/CHANGELOG.md') { |f| f.read }
|
33
|
+
|
34
|
+
markdown_match = /^## \[(\d+)\.(\d+)\.?(\d+)?\] \- (.*)$/
|
35
|
+
changelog_md.each_line.select { |line| markdown_match.match?(line) }
|
36
|
+
.collect do |line|
|
37
|
+
add_version(line, markdown_match)
|
38
|
+
end
|
39
|
+
|
40
|
+
File.write(Headdesk::FACEBOOK_SDK_VERSIONS_YAML, @facebook_sdk_versions.values.to_yaml)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# target_sdk_version
|
2
|
+
Ensures that the APK is built with `targetSdkVersion` at least 28.
|
3
|
+
|
4
|
+
## Will Fail If
|
5
|
+
* `targetSdkVersion` is less than 28.
|
6
|
+
|
7
|
+
## Exports
|
8
|
+
None.
|
9
|
+
|
10
|
+
## Reason
|
11
|
+
As of November 1, 2019 Google Play requires that all apps, and app updates, target Android 9 (API 28).
|
12
|
+
|
13
|
+
## Resolution
|
14
|
+
Target API 28 or higher.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Headdesk
|
4
|
+
module Checks
|
5
|
+
#
|
6
|
+
# APKs should all target API 26+
|
7
|
+
#
|
8
|
+
# :reek:UncommunicativeModuleName
|
9
|
+
class TargetSdkVersion
|
10
|
+
include Check::APK
|
11
|
+
|
12
|
+
check_name 'target_sdk_version'
|
13
|
+
describe 'targetSdkVersion must be at least 28'
|
14
|
+
def call
|
15
|
+
fail_check unless: -> { apk.targets_sdk 28 }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -8,12 +8,12 @@
|
|
8
8
|
:minor: 40
|
9
9
|
:patch: 0
|
10
10
|
:version: 4.40.0
|
11
|
-
:date: 2019-01-
|
11
|
+
:date: 2019-01-17
|
12
12
|
- :major: 4
|
13
13
|
:minor: 39
|
14
14
|
:patch: 0
|
15
15
|
:version: 4.39.0
|
16
|
-
:date: 2018-12-
|
16
|
+
:date: 2018-12-03
|
17
17
|
- :major: 4
|
18
18
|
:minor: 38
|
19
19
|
:patch: 1
|
@@ -294,3 +294,93 @@
|
|
294
294
|
:patch: 0
|
295
295
|
:version: 4.0.0
|
296
296
|
:date: 2015-03-25
|
297
|
+
- :major: 5
|
298
|
+
:minor: 13
|
299
|
+
:patch: 0
|
300
|
+
:version: 5.13.0
|
301
|
+
:date: 2019-12-11
|
302
|
+
- :major: 5
|
303
|
+
:minor: 12
|
304
|
+
:patch: 1
|
305
|
+
:version: 5.12.1
|
306
|
+
:date: 2019-12-08
|
307
|
+
- :major: 5
|
308
|
+
:minor: 12
|
309
|
+
:patch: 0
|
310
|
+
:version: 5.12.0
|
311
|
+
:date: 2019-12-03
|
312
|
+
- :major: 5
|
313
|
+
:minor: 11
|
314
|
+
:patch: 2
|
315
|
+
:version: 5.11.2
|
316
|
+
:date: 2019-11-21
|
317
|
+
- :major: 5
|
318
|
+
:minor: 11
|
319
|
+
:patch: 1
|
320
|
+
:version: 5.11.1
|
321
|
+
:date: 2019-11-21
|
322
|
+
- :major: 5
|
323
|
+
:minor: 11
|
324
|
+
:patch: 0
|
325
|
+
:version: 5.11.0
|
326
|
+
:date: 2019-11-14
|
327
|
+
- :major: 5
|
328
|
+
:minor: 9
|
329
|
+
:patch: 0
|
330
|
+
:version: 5.9.0
|
331
|
+
:date: 2019-10-28
|
332
|
+
- :major: 5
|
333
|
+
:minor: 8
|
334
|
+
:patch: 0
|
335
|
+
:version: 5.8.0
|
336
|
+
:date: 2019-10-08
|
337
|
+
- :major: 5
|
338
|
+
:minor: 5
|
339
|
+
:patch: 2
|
340
|
+
:version: 5.5.2
|
341
|
+
:date: 2019-10-04
|
342
|
+
- :major: 5
|
343
|
+
:minor: 5
|
344
|
+
:patch: 1
|
345
|
+
:version: 5.5.1
|
346
|
+
:date: 2019-09-05
|
347
|
+
- :major: 5
|
348
|
+
:minor: 5
|
349
|
+
:patch: 0
|
350
|
+
:version: 5.5.0
|
351
|
+
:date: 2019-08-30
|
352
|
+
- :major: 5
|
353
|
+
:minor: 4
|
354
|
+
:patch: 0
|
355
|
+
:version: 5.4.0
|
356
|
+
:date: 2019-08-15
|
357
|
+
- :major: 5
|
358
|
+
:minor: 2
|
359
|
+
:patch: 0
|
360
|
+
:version: 5.2.0
|
361
|
+
:date: 2019-07-29
|
362
|
+
- :major: 5
|
363
|
+
:minor: 1
|
364
|
+
:patch: 1
|
365
|
+
:version: 5.1.1
|
366
|
+
:date: 2019-07-21
|
367
|
+
- :major: 5
|
368
|
+
:minor: 1
|
369
|
+
:patch: 0
|
370
|
+
:version: 5.1.0
|
371
|
+
:date: 2019-06-21
|
372
|
+
- :major: 5
|
373
|
+
:minor: 0
|
374
|
+
:patch: 2
|
375
|
+
:version: 5.0.2
|
376
|
+
:date: 2019-06-07
|
377
|
+
- :major: 5
|
378
|
+
:minor: 0
|
379
|
+
:patch: 1
|
380
|
+
:version: 5.0.1
|
381
|
+
:date: 2019-05-16
|
382
|
+
- :major: 5
|
383
|
+
:minor: 0
|
384
|
+
:patch: 0
|
385
|
+
:version: 5.0.0
|
386
|
+
:date: 2019-04-30
|
data/lib/headdesk/version.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.15.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-
|
11
|
+
date: 2019-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -213,10 +213,10 @@ files:
|
|
213
213
|
- bin/facebook_sdk_versions
|
214
214
|
- bin/setup
|
215
215
|
- docs/activity_alias.md
|
216
|
-
- docs/api26.md
|
217
216
|
- docs/facebook.md
|
218
217
|
- docs/firebase_messaging_event.md
|
219
218
|
- docs/receiver.md
|
219
|
+
- docs/target_sdk_version.md
|
220
220
|
- docs/teak/api21_icon.md
|
221
221
|
- docs/teak/configuration.md
|
222
222
|
- exe/headdesk
|
@@ -232,10 +232,10 @@ files:
|
|
232
232
|
- lib/headdesk/apktool.rb
|
233
233
|
- lib/headdesk/check.rb
|
234
234
|
- lib/headdesk/checks/activity_alias.rb
|
235
|
-
- lib/headdesk/checks/api26.rb
|
236
235
|
- lib/headdesk/checks/facebook.rb
|
237
236
|
- lib/headdesk/checks/firebase_messaging_event.rb
|
238
237
|
- lib/headdesk/checks/receiver.rb
|
238
|
+
- lib/headdesk/checks/target_sdk_version.rb
|
239
239
|
- lib/headdesk/checks/teak.rb
|
240
240
|
- lib/headdesk/checks/teak/api21_icon.rb
|
241
241
|
- lib/headdesk/checks/teak/teak.rb
|
data/docs/api26.md
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# api26
|
2
|
-
Ensures that the APK is built with `targetSdkVersion` at least 26.
|
3
|
-
|
4
|
-
## Will Fail If
|
5
|
-
* `targetSdkVersion` is less than 26.
|
6
|
-
|
7
|
-
## Exports
|
8
|
-
None.
|
9
|
-
|
10
|
-
## Reason
|
11
|
-
As of November 1, 2018 Google Play requires that all apps, and app updates, target Android 8 (API 26).
|
12
|
-
|
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
|
-
Source: https://developer.android.com/distribute/best-practices/develop/target-sdk
|
15
|
-
|
16
|
-
## Resolution
|
17
|
-
Target API 26 or higher.
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Headdesk
|
4
|
-
module Checks
|
5
|
-
#
|
6
|
-
# APKs should all target API 26+
|
7
|
-
#
|
8
|
-
# :reek:UncommunicativeModuleName
|
9
|
-
class Api26
|
10
|
-
include Check::APK
|
11
|
-
|
12
|
-
check_name 'api26'
|
13
|
-
describe 'targetSdkVersion must be at least 26'
|
14
|
-
def call
|
15
|
-
fail_check unless: -> { apk.targets_sdk 26 }
|
16
|
-
|
17
|
-
klass_def = 'android/support/v4/app/NotificationCompat$Builder'
|
18
|
-
skip_check unless: -> { apk.class?(klass_def) }
|
19
|
-
klass = apk.find_class(klass_def)
|
20
|
-
|
21
|
-
describe 'support-v4 version is 26.1+'
|
22
|
-
fail_check unless: -> { klass.method?('setChannelId') }
|
23
|
-
|
24
|
-
# TODO: AndroidX/JetPack
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|