fontist 2.1.6 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -0
  3. data/.rubocop_todo.yml +184 -120
  4. data/README.adoc +1 -1
  5. data/TODO.fontist-v5.md +196 -0
  6. data/fontist.gemspec +1 -1
  7. data/lib/fontist/cache/store.rb +17 -7
  8. data/lib/fontist/cli.rb +116 -0
  9. data/lib/fontist/errors.rb +61 -0
  10. data/lib/fontist/extract.rb +13 -0
  11. data/lib/fontist/font.rb +9 -1
  12. data/lib/fontist/font_collection.rb +1 -0
  13. data/lib/fontist/font_finder.rb +154 -0
  14. data/lib/fontist/font_installer.rb +172 -15
  15. data/lib/fontist/font_model.rb +1 -0
  16. data/lib/fontist/font_path.rb +4 -4
  17. data/lib/fontist/font_style.rb +17 -0
  18. data/lib/fontist/format_matcher.rb +176 -0
  19. data/lib/fontist/format_spec.rb +80 -0
  20. data/lib/fontist/formula.rb +126 -215
  21. data/lib/fontist/formula_picker.rb +39 -4
  22. data/lib/fontist/import/create_formula.rb +80 -3
  23. data/lib/fontist/import/formula_builder.rb +5 -1
  24. data/lib/fontist/import/google/font_database.rb +15 -153
  25. data/lib/fontist/import/google/formula_builder.rb +26 -0
  26. data/lib/fontist/import/google/formula_builders/base_formula_builder.rb +93 -0
  27. data/lib/fontist/import/google/formula_builders/formula_builder_v4.rb +155 -0
  28. data/lib/fontist/import/google/formula_builders/formula_builder_v5.rb +193 -0
  29. data/lib/fontist/import/google_fonts_importer.rb +17 -5
  30. data/lib/fontist/import/{macos.rb → macos_importer.rb} +4 -2
  31. data/lib/fontist/import/recursive_extraction.rb +2 -0
  32. data/lib/fontist/import/{sil_import.rb → sil_importer.rb} +3 -1
  33. data/lib/fontist/import/upgrade_formulas.rb +1 -1
  34. data/lib/fontist/import/v4_to_v5_migrator.rb +263 -0
  35. data/lib/fontist/import_cli.rb +20 -2
  36. data/lib/fontist/indexes/index_mixin.rb +8 -4
  37. data/lib/fontist/manifest.rb +27 -1
  38. data/lib/fontist/path_scanning.rb +1 -1
  39. data/lib/fontist/resource.rb +54 -0
  40. data/lib/fontist/resource_collection.rb +18 -0
  41. data/lib/fontist/system_index.rb +18 -9
  42. data/lib/fontist/utils/downloader.rb +0 -2
  43. data/lib/fontist/utils/github_client.rb +5 -2
  44. data/lib/fontist/utils/github_url.rb +4 -3
  45. data/lib/fontist/utils.rb +1 -1
  46. data/lib/fontist/version.rb +1 -1
  47. data/lib/fontist.rb +2 -2
  48. metadata +19 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05672d3a03b438efbe391225909a93826f3bc28796cce2e85a07594b5079e1f7
4
- data.tar.gz: 4797833807c35169995bf31ad5b4141e03d21975a292b82bb3b0e9f075e18cbb
3
+ metadata.gz: 77c24ea82517ab8ea581b9f666eaf9177289848c489077c2fad2ea0ab528541f
4
+ data.tar.gz: 277836dbbefc29902a8212981ef06e60829ac4f102f130491ff9f03f896b67fd
5
5
  SHA512:
6
- metadata.gz: 9480bdbb4afd3b90dc3de5e7ea943d7284919f43daa4edea7a3e12559037472d2deea3eec932f4feb6aea29985c67992bab8de24703c09465a8201cca461b061
7
- data.tar.gz: 423929c85c2525661fe196e62dce2f49141ec67be5e68daa0b2be8920846e18d95b2ea3206f32f2b8400633f46f6c17bb35db9968d00f547a313bd6669b20637
6
+ metadata.gz: a1e3e14bc5febf2ca5afcbdfef1e89e6370ebc00b60b5b6fcb376e976219e76607b224de8a6d44c3cdc31b897823a50380a2a9292dea03ef783cd8c48dc92c1c
7
+ data.tar.gz: e7d1eed5edd5722a07f1801ccdd074c580d60465f7b2fa9707b45cea77b5e5370579121eb53c93a18d8145814a4ee3e132e3730591c95cdbebf67e445cf803af
data/.gitignore CHANGED
@@ -8,6 +8,9 @@
8
8
  /tmp/
9
9
  Gemfile.lock
10
10
 
11
+ # backup files
12
+ *.orig
13
+
11
14
  # fonts
12
15
  /spec/fixtures/fonts/*
13
16
  /spec/fixtures/fonts/DejaVuSerif.ttf
@@ -33,4 +36,6 @@ CLAUDE.md
33
36
  # macOS font catalogs (downloaded via rake task)
34
37
  /spec/fixtures/macos_catalogs/com_apple_MobileAsset_Font*.xml
35
38
 
39
+ CLAUDE.md
40
+ /cache/
36
41
  .lycheecache
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-03-18 01:55:49 UTC using RuboCop version 1.85.1.
3
+ # on 2026-03-18 07:11:54 UTC using RuboCop version 1.85.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -8,26 +8,33 @@
8
8
 
9
9
  # Offense count: 1
10
10
  # This cop supports safe autocorrection (--autocorrect).
11
- Gemspec/RequireMFA:
11
+ Layout/ElseAlignment:
12
12
  Exclude:
13
- - 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
13
+ - 'script/validate_v5_urls.rb'
14
14
 
15
- # Offense count: 1
16
- Gemspec/RequiredRubyVersion:
15
+ # Offense count: 3
16
+ # This cop supports safe autocorrection (--autocorrect).
17
+ Layout/EmptyLineAfterGuardClause:
17
18
  Exclude:
18
- - 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
19
+ - 'lib/fontist/extract.rb'
20
+ - 'script/validate_v5_urls.rb'
19
21
 
20
- # Offense count: 1
22
+ # Offense count: 2
21
23
  # This cop supports safe autocorrection (--autocorrect).
22
- Layout/ElseAlignment:
24
+ # Configuration parameters: EnforcedStyle.
25
+ # SupportedStyles: empty_lines, no_empty_lines
26
+ Layout/EmptyLinesAroundBlockBody:
23
27
  Exclude:
24
- - 'lib/fontist/font_path.rb'
28
+ - 'spec/fontist/import/v4_to_v5_migrator_spec.rb'
29
+ - 'spec/fontist/v5_integration_spec.rb'
25
30
 
26
31
  # Offense count: 1
27
32
  # This cop supports safe autocorrection (--autocorrect).
28
- Layout/EmptyLineAfterGuardClause:
33
+ # Configuration parameters: EnforcedStyle.
34
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
35
+ Layout/EmptyLinesAroundClassBody:
29
36
  Exclude:
30
- - 'spec/fontist/font_spec.rb'
37
+ - 'lib/fontist/font_finder.rb'
31
38
 
32
39
  # Offense count: 1
33
40
  # This cop supports safe autocorrection (--autocorrect).
@@ -35,15 +42,24 @@ Layout/EmptyLineAfterGuardClause:
35
42
  # SupportedStylesAlignWith: keyword, variable, start_of_line
36
43
  Layout/EndAlignment:
37
44
  Exclude:
38
- - 'lib/fontist/font_path.rb'
45
+ - 'script/validate_v5_urls.rb'
39
46
 
40
- # Offense count: 4
47
+ # Offense count: 1
41
48
  # This cop supports safe autocorrection (--autocorrect).
42
49
  # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
43
50
  Layout/ExtraSpacing:
44
51
  Exclude:
45
- - 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
46
- - 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
52
+ - 'lib/fontist/import/google/formula_builders/formula_builder_v4.rb'
53
+
54
+ # Offense count: 15
55
+ # This cop supports safe autocorrection (--autocorrect).
56
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
57
+ # SupportedHashRocketStyles: key, separator, table
58
+ # SupportedColonStyles: key, separator, table
59
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
60
+ Layout/HashAlignment:
61
+ Exclude:
62
+ - 'script/validate_v5_urls.rb'
47
63
 
48
64
  # Offense count: 1
49
65
  # This cop supports safe autocorrection (--autocorrect).
@@ -51,7 +67,7 @@ Layout/ExtraSpacing:
51
67
  # SupportedStylesAlignWith: start_of_line, relative_to_receiver
52
68
  Layout/IndentationWidth:
53
69
  Exclude:
54
- - 'lib/fontist/font_path.rb'
70
+ - 'script/validate_v5_urls.rb'
55
71
 
56
72
  # Offense count: 1
57
73
  # This cop supports safe autocorrection (--autocorrect).
@@ -82,37 +98,20 @@ Layout/LineEndStringConcatenationIndentation:
82
98
  Exclude:
83
99
  - 'lib/fontist/errors.rb'
84
100
 
85
- # Offense count: 576
101
+ # Offense count: 674
86
102
  # This cop supports safe autocorrection (--autocorrect).
87
103
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
88
104
  # URISchemes: http, https
89
105
  Layout/LineLength:
90
106
  Enabled: false
91
107
 
92
- # Offense count: 5
93
- # This cop supports safe autocorrection (--autocorrect).
94
- # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
95
- # SupportedStylesForExponentOperator: space, no_space
96
- # SupportedStylesForRationalLiterals: space, no_space
97
- Layout/SpaceAroundOperators:
98
- Exclude:
99
- - 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
100
- - 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
101
-
102
- # Offense count: 1
103
- # This cop supports safe autocorrection (--autocorrect).
104
- # Configuration parameters: EnforcedStyle.
105
- # SupportedStyles: final_newline, final_blank_line
106
- Layout/TrailingEmptyLines:
107
- Exclude:
108
- - 'spec/fontist/utils/github_url_spec.rb'
109
-
110
108
  # Offense count: 1
111
109
  # This cop supports safe autocorrection (--autocorrect).
112
- # Configuration parameters: AllowInHeredoc.
113
- Layout/TrailingWhitespace:
110
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
111
+ # SupportedStyles: aligned, indented
112
+ Layout/MultilineOperationIndentation:
114
113
  Exclude:
115
- - 'spec/fontist/manifest_spec.rb'
114
+ - 'script/validate_v5_formulas.rb'
116
115
 
117
116
  # Offense count: 5
118
117
  # This cop supports safe autocorrection (--autocorrect).
@@ -148,11 +147,22 @@ Lint/EmptyBlock:
148
147
  - 'spec/fontist/resources/apple_cdn_resource_spec.rb'
149
148
  - 'spec/fontist/utils/file_ops_spec.rb'
150
149
 
151
- # Offense count: 28
150
+ # Offense count: 1
151
+ Lint/IneffectiveAccessModifier:
152
+ Exclude:
153
+ - 'lib/fontist/import/google/formula_builders/base_formula_builder.rb'
154
+
155
+ # Offense count: 1
156
+ Lint/NoReturnInBeginEndBlocks:
157
+ Exclude:
158
+ - 'lib/fontist/font_installer.rb'
159
+
160
+ # Offense count: 31
152
161
  # This cop supports unsafe autocorrection (--autocorrect-all).
153
162
  Lint/NonAtomicFileOperation:
154
163
  Exclude:
155
164
  - 'lib/fontist/cache/store.rb'
165
+ - 'lib/fontist/font_installer.rb'
156
166
  - 'spec/fontist/cache/manager_spec.rb'
157
167
  - 'spec/fontist/cache/store_spec.rb'
158
168
  - 'spec/fontist/indexes/directory_change_spec.rb'
@@ -167,54 +177,54 @@ Lint/NonAtomicFileOperation:
167
177
  - 'spec/support/system_fonts.rb'
168
178
  - 'spec/support/windows_test_helper.rb'
169
179
 
170
- # Offense count: 1
180
+ # Offense count: 2
181
+ # This cop supports safe autocorrection (--autocorrect).
182
+ Lint/ScriptPermission:
183
+ Exclude:
184
+ - 'script/test_platform_license_skip.rb'
185
+ - 'script/validate_v5_urls.rb'
186
+
187
+ # Offense count: 2
171
188
  # This cop supports safe autocorrection (--autocorrect).
172
189
  # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
173
190
  # NotImplementedExceptions: NotImplementedError
174
191
  Lint/UnusedMethodArgument:
175
192
  Exclude:
176
193
  - 'lib/fontist/validator.rb'
194
+ - 'script/test_v5_install.rb'
177
195
 
178
- # Offense count: 1
179
- # This cop supports safe autocorrection (--autocorrect).
180
- # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
181
- Lint/UselessAccessModifier:
182
- Exclude:
183
- - 'lib/fontist/utils/downloader.rb'
184
-
185
- # Offense count: 1
186
- # This cop supports safe autocorrection (--autocorrect).
187
- Lint/UselessAssignment:
188
- Exclude:
189
- - 'lib/fontist/cache/store.rb'
190
-
191
- # Offense count: 98
196
+ # Offense count: 120
192
197
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
193
198
  Metrics/AbcSize:
194
199
  Enabled: false
195
200
 
196
- # Offense count: 10
201
+ # Offense count: 19
197
202
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
198
203
  # AllowedMethods: refine
199
204
  Metrics/BlockLength:
200
- Max: 63
205
+ Max: 217
206
+
207
+ # Offense count: 4
208
+ # Configuration parameters: CountBlocks, CountModifierForms.
209
+ Metrics/BlockNesting:
210
+ Max: 4
201
211
 
202
- # Offense count: 57
212
+ # Offense count: 72
203
213
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
204
214
  Metrics/CyclomaticComplexity:
205
215
  Enabled: false
206
216
 
207
- # Offense count: 160
217
+ # Offense count: 192
208
218
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
209
219
  Metrics/MethodLength:
210
220
  Max: 129
211
221
 
212
- # Offense count: 3
222
+ # Offense count: 6
213
223
  # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
214
224
  Metrics/ParameterLists:
215
- Max: 6
225
+ Max: 7
216
226
 
217
- # Offense count: 46
227
+ # Offense count: 55
218
228
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
219
229
  Metrics/PerceivedComplexity:
220
230
  Enabled: false
@@ -237,29 +247,36 @@ Naming/PredicateMethod:
237
247
  - 'lib/fontist/import/google/models/metadata.rb'
238
248
  - 'spec/fontist/memoizable_spec.rb'
239
249
 
240
- # Offense count: 4
250
+ # Offense count: 1
251
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
252
+ # NamePrefix: is_, has_, have_, does_
253
+ # ForbiddenPrefixes: is_, has_, have_, does_
254
+ # AllowedMethods: is_a?
255
+ # MethodDefinitionMacros: define_method, define_singleton_method
256
+ Naming/PredicatePrefix:
257
+ Exclude:
258
+ - 'spec/**/*'
259
+ - 'lib/fontist/import/google/formula_builders/formula_builder_v5.rb'
260
+
261
+ # Offense count: 5
241
262
  # Configuration parameters: MinSize.
242
263
  Performance/CollectionLiteralInLoop:
243
264
  Exclude:
244
265
  - 'lib/fontist/cache/manager.rb'
245
266
  - 'lib/fontist/import/otf/font_file.rb'
267
+ - 'script/test_v5_install.rb'
246
268
  - 'spec/fontist/import/create_formula_spec.rb'
247
269
 
248
- # Offense count: 16
270
+ # Offense count: 23
249
271
  # This cop supports unsafe autocorrection (--autocorrect-all).
250
272
  Performance/MapCompact:
273
+ Enabled: false
274
+
275
+ # Offense count: 1
276
+ # This cop supports unsafe autocorrection (--autocorrect-all).
277
+ Performance/TimesMap:
251
278
  Exclude:
252
- - 'lib/fontist/font.rb'
253
- - 'lib/fontist/formula.rb'
254
- - 'lib/fontist/import/formula_builder.rb'
255
- - 'lib/fontist/import/google/data_sources/github.rb'
256
- - 'lib/fontist/import/google/font_database.rb'
257
- - 'lib/fontist/import/google/metadata_adapter.rb'
258
- - 'lib/fontist/indexes/incremental_scanner.rb'
259
- - 'lib/fontist/macos/catalog/asset.rb'
260
- - 'lib/fontist/system_index.rb'
261
- - 'lib/fontist/validation.rb'
262
- - 'lib/fontist/validator.rb'
279
+ - 'script/validate_v5_urls.rb'
263
280
 
264
281
  # Offense count: 2
265
282
  Security/MarshalLoad:
@@ -267,6 +284,14 @@ Security/MarshalLoad:
267
284
  - 'lib/fontist/cache/store.rb'
268
285
  - 'spec/fontist/cache/store_spec.rb'
269
286
 
287
+ # Offense count: 1
288
+ # This cop supports safe autocorrection (--autocorrect).
289
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
290
+ # SupportedStyles: assign_to_condition, assign_inside_condition
291
+ Style/ConditionalAssignment:
292
+ Exclude:
293
+ - 'script/validate_v5_urls.rb'
294
+
270
295
  # Offense count: 4
271
296
  # This cop supports safe autocorrection (--autocorrect).
272
297
  # Configuration parameters: EnforcedStyle.
@@ -274,14 +299,7 @@ Security/MarshalLoad:
274
299
  Style/EmptyStringInsideInterpolation:
275
300
  Exclude:
276
301
  - 'lib/fontist/import/import_display.rb'
277
- - 'lib/fontist/import/macos.rb'
278
-
279
- # Offense count: 2
280
- # This cop supports safe autocorrection (--autocorrect).
281
- Style/ExpandPathArguments:
282
- Exclude:
283
- - 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
284
- - 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
302
+ - 'lib/fontist/import/macos_importer.rb'
285
303
 
286
304
  # Offense count: 12
287
305
  # This cop supports safe autocorrection (--autocorrect).
@@ -323,23 +341,19 @@ Style/HashLikeCase:
323
341
  - 'spec/support/platform_fonts.rb'
324
342
 
325
343
  # Offense count: 6
326
- # This cop supports safe autocorrection (--autocorrect).
327
- # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
328
- # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
329
- # SupportedShorthandSyntax: always, never, either, consistent, either_consistent
330
- Style/HashSyntax:
331
- Exclude:
332
- - 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
333
- - 'spec/fontist/font_spec.rb'
334
- - 'spec/fontist/formulas_isolation_spec.rb'
335
- - 'spec/fontist/manifest_spec.rb'
336
-
337
- # Offense count: 4
338
344
  # This cop supports unsafe autocorrection (--autocorrect-all).
339
345
  Style/IdenticalConditionalBranches:
340
346
  Exclude:
341
347
  - 'lib/fontist/helpers.rb'
342
348
  - 'lib/fontist/import/import_display.rb'
349
+ - 'script/validate_v5_urls.rb'
350
+
351
+ # Offense count: 1
352
+ # This cop supports safe autocorrection (--autocorrect).
353
+ # Configuration parameters: AllowIfModifier.
354
+ Style/IfInsideElse:
355
+ Exclude:
356
+ - 'script/validate_v5_formulas.rb'
343
357
 
344
358
  # Offense count: 3
345
359
  # This cop supports unsafe autocorrection (--autocorrect-all).
@@ -349,23 +363,34 @@ Style/MapToHash:
349
363
  - 'lib/fontist/utils/downloader.rb'
350
364
  - 'spec/fontist/indexes/incremental_scanner_spec.rb'
351
365
 
352
- # Offense count: 1
366
+ # Offense count: 22
353
367
  # This cop supports unsafe autocorrection (--autocorrect-all).
354
- # Configuration parameters: EnforcedStyle.
355
- # SupportedStyles: literals, strict
356
- Style/MutableConstant:
368
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
369
+ # SupportedStyles: predicate, comparison
370
+ Style/NumericPredicate:
357
371
  Exclude:
358
- - 'lib/fontist/utils/github_url.rb'
372
+ - 'spec/**/*'
373
+ - 'script/test_platform_license_skip.rb'
374
+ - 'script/test_v5_install.rb'
375
+ - 'script/validate_v5_formulas.rb'
376
+ - 'script/validate_v5_urls.rb'
377
+
378
+ # Offense count: 1
379
+ # Configuration parameters: AllowedClasses.
380
+ Style/OneClassPerFile:
381
+ Exclude:
382
+ - 'script/validate_v5_urls.rb'
359
383
 
360
384
  # Offense count: 1
361
385
  Style/OpenStructUse:
362
386
  Exclude:
363
387
  - 'spec/fontist/cache/store_spec.rb'
364
388
 
365
- # Offense count: 1
389
+ # Offense count: 2
366
390
  # This cop supports unsafe autocorrection (--autocorrect-all).
367
391
  Style/PartitionInsteadOfDoubleSelect:
368
392
  Exclude:
393
+ - 'script/validate_v5_urls.rb'
369
394
  - 'spec/fontist/import/google/data_sources/vf_spec.rb'
370
395
 
371
396
  # Offense count: 3
@@ -375,11 +400,18 @@ Style/ReduceToHash:
375
400
  - 'lib/fontist/import/google/font_database.rb'
376
401
  - 'lib/fontist/indexes/directory_snapshot.rb'
377
402
 
378
- # Offense count: 1
403
+ # Offense count: 2
379
404
  # This cop supports safe autocorrection (--autocorrect).
380
405
  Style/RedundantBegin:
381
406
  Exclude:
382
- - 'spec/fontist/font_spec.rb'
407
+ - 'lib/fontist/font_installer.rb'
408
+ - 'script/validate_v5_urls.rb'
409
+
410
+ # Offense count: 2
411
+ # This cop supports safe autocorrection (--autocorrect).
412
+ Style/RedundantParentheses:
413
+ Exclude:
414
+ - 'script/validate_v5_urls.rb'
383
415
 
384
416
  # Offense count: 1
385
417
  # This cop supports safe autocorrection (--autocorrect).
@@ -387,19 +419,32 @@ Style/RedundantRegexpArgument:
387
419
  Exclude:
388
420
  - 'lib/fontist/repo.rb'
389
421
 
390
- # Offense count: 2
422
+ # Offense count: 9
391
423
  # This cop supports safe autocorrection (--autocorrect).
392
424
  Style/RescueModifier:
393
425
  Exclude:
394
- - 'lib/fontist/cache/store.rb'
426
+ - 'script/validate_v5_urls.rb'
395
427
 
396
- # Offense count: 1
428
+ # Offense count: 11
397
429
  # This cop supports safe autocorrection (--autocorrect).
398
430
  # Configuration parameters: EnforcedStyle.
399
431
  # SupportedStyles: implicit, explicit
400
432
  Style/RescueStandardError:
401
433
  Exclude:
402
- - 'lib/fontist/cache/store.rb'
434
+ - 'script/test_platform_license_skip.rb'
435
+ - 'script/test_v5_install.rb'
436
+ - 'script/validate_v5_formulas.rb'
437
+ - 'script/validate_v5_urls.rb'
438
+
439
+ # Offense count: 3
440
+ # This cop supports unsafe autocorrection (--autocorrect-all).
441
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
442
+ # AllowedMethods: present?, blank?, presence, try, try!
443
+ Style/SafeNavigation:
444
+ Exclude:
445
+ - 'script/test_v5_install.rb'
446
+ - 'script/validate_v5_formulas.rb'
447
+ - 'script/validate_v5_urls.rb'
403
448
 
404
449
  # Offense count: 1
405
450
  # Configuration parameters: Max.
@@ -408,34 +453,53 @@ Style/SafeNavigationChainLength:
408
453
  - 'lib/fontist/system_index.rb'
409
454
 
410
455
  # Offense count: 2
456
+ # This cop supports safe autocorrection (--autocorrect).
457
+ # Configuration parameters: AllowModifier.
458
+ Style/SoleNestedConditional:
459
+ Exclude:
460
+ - 'script/validate_v5_formulas.rb'
461
+ - 'script/validate_v5_urls.rb'
462
+
463
+ # Offense count: 1
464
+ # This cop supports safe autocorrection (--autocorrect).
465
+ Style/StderrPuts:
466
+ Exclude:
467
+ - 'script/validate_v5_urls.rb'
468
+
469
+ # Offense count: 3
411
470
  # This cop supports unsafe autocorrection (--autocorrect-all).
412
471
  # Configuration parameters: Mode.
413
472
  Style/StringConcatenation:
414
473
  Exclude:
415
- - 'lib/fontist/cache/store.rb'
474
+ - 'script/validate_v5_formulas.rb'
416
475
  - 'spec/fontist/system_index_spec.rb'
417
476
 
418
- # Offense count: 5
419
- # This cop supports safe autocorrection (--autocorrect).
420
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
421
- # SupportedStyles: single_quotes, double_quotes
422
- Style/StringLiterals:
423
- Exclude:
424
- - 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
425
- - 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
426
-
427
477
  # Offense count: 1
428
478
  # This cop supports safe autocorrection (--autocorrect).
429
479
  Style/SuperArguments:
430
480
  Exclude:
431
481
  - 'lib/fontist/import/google/models/font_family.rb'
432
482
 
433
- # Offense count: 6
483
+ # Offense count: 3
484
+ # This cop supports unsafe autocorrection (--autocorrect-all).
485
+ # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
486
+ # AllowedMethods: define_method
487
+ Style/SymbolProc:
488
+ Exclude:
489
+ - 'lib/fontist/font_installer.rb'
490
+ - 'lib/fontist/format_matcher.rb'
491
+ - 'script/validate_v5_formulas.rb'
492
+
493
+ # Offense count: 1
434
494
  # This cop supports safe autocorrection (--autocorrect).
435
495
  # Configuration parameters: EnforcedStyleForMultiline.
436
496
  # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
437
497
  Style/TrailingCommaInArguments:
438
498
  Exclude:
439
- - 'lib/fontist/utils/github_url.rb'
440
- - 'spec/fontist/system_index_spec.rb'
441
- - 'spec/fontist/utils/github_url_spec.rb'
499
+ - 'spec/fontist/v5_integration_spec.rb'
500
+
501
+ # Offense count: 4
502
+ # This cop supports unsafe autocorrection (--autocorrect-all).
503
+ Style/ZeroLengthPredicate:
504
+ Exclude:
505
+ - 'script/validate_v5_urls.rb'
data/README.adoc CHANGED
@@ -2117,7 +2117,7 @@ fontist import sil --import-cache /custom/path ...
2117
2117
  Fontist.import_cache_path = "/custom/import/cache"
2118
2118
 
2119
2119
  # Per-import setting
2120
- Fontist::Import::Macos.new(
2120
+ Fontist::Import::MacosImporter.new(
2121
2121
  plist_path,
2122
2122
  import_cache: "/custom/cache"
2123
2123
  ).call