fontist 2.1.5 → 2.1.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0625c7b3933a74de8462f617558b73b8c4a27112e42a4066209dd66f805df21d
4
- data.tar.gz: 7fb21a4892763ed22113cec7950af17a6c716d00f3dc8b569a636c3de013a594
3
+ metadata.gz: 05672d3a03b438efbe391225909a93826f3bc28796cce2e85a07594b5079e1f7
4
+ data.tar.gz: 4797833807c35169995bf31ad5b4141e03d21975a292b82bb3b0e9f075e18cbb
5
5
  SHA512:
6
- metadata.gz: 8446fbdb79e95e818298e6ed0f487789299992afc598676f5bd7f376e8c3dbedc267d46ffcf9acf6cf67c5bb66d96d34338677ce7f9818d0c167729e6db1770e
7
- data.tar.gz: 9ca12d1d2a163a289fe0ed5cef1bee92f0f5d6e48b3b79c30c9a9eb86da189802fce19c66393736038d925822524357066d91bed1c54699509a5b26b119cac11
6
+ metadata.gz: 9480bdbb4afd3b90dc3de5e7ea943d7284919f43daa4edea7a3e12559037472d2deea3eec932f4feb6aea29985c67992bab8de24703c09465a8201cca461b061
7
+ data.tar.gz: 423929c85c2525661fe196e62dce2f49141ec67be5e68daa0b2be8920846e18d95b2ea3206f32f2b8400633f46f6c17bb35db9968d00f547a313bd6669b20637
data/.rubocop_todo.yml CHANGED
@@ -1,40 +1,441 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-01-21 22:46:14 UTC using RuboCop version 1.82.1.
3
+ # on 2026-03-18 01:55:49 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
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 25
9
+ # Offense count: 1
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ Gemspec/RequireMFA:
12
+ Exclude:
13
+ - 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
14
+
15
+ # Offense count: 1
16
+ Gemspec/RequiredRubyVersion:
17
+ Exclude:
18
+ - 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
19
+
20
+ # Offense count: 1
21
+ # This cop supports safe autocorrection (--autocorrect).
22
+ Layout/ElseAlignment:
23
+ Exclude:
24
+ - 'lib/fontist/font_path.rb'
25
+
26
+ # Offense count: 1
27
+ # This cop supports safe autocorrection (--autocorrect).
28
+ Layout/EmptyLineAfterGuardClause:
29
+ Exclude:
30
+ - 'spec/fontist/font_spec.rb'
31
+
32
+ # Offense count: 1
33
+ # This cop supports safe autocorrection (--autocorrect).
34
+ # Configuration parameters: EnforcedStyleAlignWith.
35
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
36
+ Layout/EndAlignment:
37
+ Exclude:
38
+ - 'lib/fontist/font_path.rb'
39
+
40
+ # Offense count: 4
41
+ # This cop supports safe autocorrection (--autocorrect).
42
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
43
+ Layout/ExtraSpacing:
44
+ Exclude:
45
+ - 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
46
+ - 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
47
+
48
+ # Offense count: 1
49
+ # This cop supports safe autocorrection (--autocorrect).
50
+ # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
51
+ # SupportedStylesAlignWith: start_of_line, relative_to_receiver
52
+ Layout/IndentationWidth:
53
+ Exclude:
54
+ - 'lib/fontist/font_path.rb'
55
+
56
+ # Offense count: 1
57
+ # This cop supports safe autocorrection (--autocorrect).
58
+ # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment, AllowRBSInlineAnnotation, AllowSteepAnnotation.
59
+ Layout/LeadingCommentSpace:
60
+ Exclude:
61
+ - 'spec/fontist/install_locations/system_location_spec.rb'
62
+
63
+ # Offense count: 1
64
+ # This cop supports safe autocorrection (--autocorrect).
65
+ Layout/LeadingEmptyLines:
66
+ Exclude:
67
+ - 'lib/fontist/macos_import_source.rb'
68
+
69
+ # Offense count: 2
70
+ # This cop supports safe autocorrection (--autocorrect).
71
+ # Configuration parameters: EnforcedStyle.
72
+ # SupportedStyles: space, no_space
73
+ Layout/LineContinuationSpacing:
74
+ Exclude:
75
+ - 'lib/fontist/import/google/data_sources/github.rb'
76
+
77
+ # Offense count: 1
78
+ # This cop supports safe autocorrection (--autocorrect).
79
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
80
+ # SupportedStyles: aligned, indented
81
+ Layout/LineEndStringConcatenationIndentation:
82
+ Exclude:
83
+ - 'lib/fontist/errors.rb'
84
+
85
+ # Offense count: 576
10
86
  # This cop supports safe autocorrection (--autocorrect).
11
87
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
12
88
  # URISchemes: http, https
13
89
  Layout/LineLength:
90
+ Enabled: false
91
+
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:
14
98
  Exclude:
15
- - 'spec/fontist/manifest_spec.rb'
16
- - 'spec/support/platform_fonts.rb'
99
+ - 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
100
+ - 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
17
101
 
18
102
  # Offense count: 1
19
103
  # This cop supports safe autocorrection (--autocorrect).
20
- # Configuration parameters: AllowComments.
21
- Lint/EmptyConditionalBody:
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
+ # Offense count: 1
111
+ # This cop supports safe autocorrection (--autocorrect).
112
+ # Configuration parameters: AllowInHeredoc.
113
+ Layout/TrailingWhitespace:
22
114
  Exclude:
23
115
  - 'spec/fontist/manifest_spec.rb'
24
116
 
25
- # Offense count: 8
117
+ # Offense count: 5
118
+ # This cop supports safe autocorrection (--autocorrect).
119
+ Lint/AmbiguousOperatorPrecedence:
120
+ Exclude:
121
+ - 'lib/fontist/import/import_display.rb'
122
+ - 'lib/fontist/utils/downloader.rb'
123
+ - 'lib/fontist/utils/system.rb'
124
+
125
+ # Offense count: 1
126
+ Lint/CopDirectiveSyntax:
127
+ Exclude:
128
+ - 'spec/support/fontist_helper.rb'
129
+
130
+ # Offense count: 3
131
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
132
+ Lint/DuplicateBranch:
133
+ Exclude:
134
+ - 'lib/fontist/helpers.rb'
135
+ - 'lib/fontist/import/import_display.rb'
136
+ - 'lib/fontist/utils/downloader.rb'
137
+
138
+ # Offense count: 2
139
+ Lint/DuplicateMethods:
140
+ Exclude:
141
+ - 'lib/fontist/import/recursive_extraction.rb'
142
+ - 'lib/fontist/system_index.rb'
143
+
144
+ # Offense count: 9
145
+ # Configuration parameters: AllowComments, AllowEmptyLambdas.
146
+ Lint/EmptyBlock:
147
+ Exclude:
148
+ - 'spec/fontist/resources/apple_cdn_resource_spec.rb'
149
+ - 'spec/fontist/utils/file_ops_spec.rb'
150
+
151
+ # Offense count: 28
152
+ # This cop supports unsafe autocorrection (--autocorrect-all).
153
+ Lint/NonAtomicFileOperation:
154
+ Exclude:
155
+ - 'lib/fontist/cache/store.rb'
156
+ - 'spec/fontist/cache/manager_spec.rb'
157
+ - 'spec/fontist/cache/store_spec.rb'
158
+ - 'spec/fontist/indexes/directory_change_spec.rb'
159
+ - 'spec/fontist/indexes/directory_snapshot_spec.rb'
160
+ - 'spec/fontist/indexes/incremental_index_updater_spec.rb'
161
+ - 'spec/fontist/indexes/incremental_scanner_spec.rb'
162
+ - 'spec/fontist/manifest_spec.rb'
163
+ - 'spec/fontist/path_scanning_spec.rb'
164
+ - 'spec/fontist/utils/file_ops_spec.rb'
165
+ - 'spec/support/fontist_helper.rb'
166
+ - 'spec/support/spec_isolation_manager.rb'
167
+ - 'spec/support/system_fonts.rb'
168
+ - 'spec/support/windows_test_helper.rb'
169
+
170
+ # Offense count: 1
171
+ # This cop supports safe autocorrection (--autocorrect).
172
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
173
+ # NotImplementedExceptions: NotImplementedError
174
+ Lint/UnusedMethodArgument:
175
+ Exclude:
176
+ - 'lib/fontist/validator.rb'
177
+
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
192
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
193
+ Metrics/AbcSize:
194
+ Enabled: false
195
+
196
+ # Offense count: 10
26
197
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
27
198
  # AllowedMethods: refine
28
199
  Metrics/BlockLength:
29
- Max: 320
200
+ Max: 63
30
201
 
31
- # Offense count: 2
202
+ # Offense count: 57
203
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
204
+ Metrics/CyclomaticComplexity:
205
+ Enabled: false
206
+
207
+ # Offense count: 160
32
208
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
33
209
  Metrics/MethodLength:
34
- Max: 14
210
+ Max: 129
211
+
212
+ # Offense count: 3
213
+ # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
214
+ Metrics/ParameterLists:
215
+ Max: 6
216
+
217
+ # Offense count: 46
218
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
219
+ Metrics/PerceivedComplexity:
220
+ Enabled: false
221
+
222
+ # Offense count: 3
223
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
224
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
225
+ Naming/MethodParameterName:
226
+ Exclude:
227
+ - 'spec/fontist/memoizable_spec.rb'
228
+
229
+ # Offense count: 4
230
+ # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
231
+ # AllowedMethods: call
232
+ # WaywardPredicates: infinite?, nonzero?
233
+ Naming/PredicateMethod:
234
+ Exclude:
235
+ - 'lib/fontist.rb'
236
+ - 'lib/fontist/font.rb'
237
+ - 'lib/fontist/import/google/models/metadata.rb'
238
+ - 'spec/fontist/memoizable_spec.rb'
239
+
240
+ # Offense count: 4
241
+ # Configuration parameters: MinSize.
242
+ Performance/CollectionLiteralInLoop:
243
+ Exclude:
244
+ - 'lib/fontist/cache/manager.rb'
245
+ - 'lib/fontist/import/otf/font_file.rb'
246
+ - 'spec/fontist/import/create_formula_spec.rb'
247
+
248
+ # Offense count: 16
249
+ # This cop supports unsafe autocorrection (--autocorrect-all).
250
+ Performance/MapCompact:
251
+ 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'
263
+
264
+ # Offense count: 2
265
+ Security/MarshalLoad:
266
+ Exclude:
267
+ - 'lib/fontist/cache/store.rb'
268
+ - 'spec/fontist/cache/store_spec.rb'
269
+
270
+ # Offense count: 4
271
+ # This cop supports safe autocorrection (--autocorrect).
272
+ # Configuration parameters: EnforcedStyle.
273
+ # SupportedStyles: trailing_conditional, ternary
274
+ Style/EmptyStringInsideInterpolation:
275
+ Exclude:
276
+ - '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'
285
+
286
+ # Offense count: 12
287
+ # This cop supports safe autocorrection (--autocorrect).
288
+ # Configuration parameters: AllowedVars, DefaultToNil.
289
+ Style/FetchEnvVar:
290
+ Exclude:
291
+ - 'lib/fontist/utils/system.rb'
292
+ - 'spec/fontist/import/google/data_sources/base_spec.rb'
293
+ - 'spec/fontist/import/google/data_sources/ttf_spec.rb'
294
+ - 'spec/fontist/import/google/data_sources/vf_spec.rb'
295
+ - 'spec/fontist/import/google/data_sources/woff2_spec.rb'
296
+ - 'spec/fontist/install_locations/system_location_spec.rb'
297
+ - 'spec/support/fontist_helper.rb'
298
+ - 'spec/support/fresh_home.rb'
299
+ - 'spec/support/vcr_setup.rb'
300
+
301
+ # Offense count: 1
302
+ Style/FileOpen:
303
+ Exclude:
304
+ - 'lib/fontist/utils/locking.rb'
305
+
306
+ # Offense count: 1
307
+ # This cop supports safe autocorrection (--autocorrect).
308
+ Style/FileWrite:
309
+ Exclude:
310
+ - 'lib/fontist/import/upgrade_formulas.rb'
311
+
312
+ # Offense count: 1
313
+ # This cop supports unsafe autocorrection (--autocorrect-all).
314
+ # Configuration parameters: AllowSplatArgument.
315
+ Style/HashConversion:
316
+ Exclude:
317
+ - 'lib/fontist/system_index.rb'
35
318
 
36
319
  # Offense count: 1
37
320
  # Configuration parameters: MinBranchesCount.
38
321
  Style/HashLikeCase:
39
322
  Exclude:
40
323
  - 'spec/support/platform_fonts.rb'
324
+
325
+ # 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
+ # This cop supports unsafe autocorrection (--autocorrect-all).
339
+ Style/IdenticalConditionalBranches:
340
+ Exclude:
341
+ - 'lib/fontist/helpers.rb'
342
+ - 'lib/fontist/import/import_display.rb'
343
+
344
+ # Offense count: 3
345
+ # This cop supports unsafe autocorrection (--autocorrect-all).
346
+ Style/MapToHash:
347
+ Exclude:
348
+ - 'lib/fontist/system_index.rb'
349
+ - 'lib/fontist/utils/downloader.rb'
350
+ - 'spec/fontist/indexes/incremental_scanner_spec.rb'
351
+
352
+ # Offense count: 1
353
+ # This cop supports unsafe autocorrection (--autocorrect-all).
354
+ # Configuration parameters: EnforcedStyle.
355
+ # SupportedStyles: literals, strict
356
+ Style/MutableConstant:
357
+ Exclude:
358
+ - 'lib/fontist/utils/github_url.rb'
359
+
360
+ # Offense count: 1
361
+ Style/OpenStructUse:
362
+ Exclude:
363
+ - 'spec/fontist/cache/store_spec.rb'
364
+
365
+ # Offense count: 1
366
+ # This cop supports unsafe autocorrection (--autocorrect-all).
367
+ Style/PartitionInsteadOfDoubleSelect:
368
+ Exclude:
369
+ - 'spec/fontist/import/google/data_sources/vf_spec.rb'
370
+
371
+ # Offense count: 3
372
+ # This cop supports unsafe autocorrection (--autocorrect-all).
373
+ Style/ReduceToHash:
374
+ Exclude:
375
+ - 'lib/fontist/import/google/font_database.rb'
376
+ - 'lib/fontist/indexes/directory_snapshot.rb'
377
+
378
+ # Offense count: 1
379
+ # This cop supports safe autocorrection (--autocorrect).
380
+ Style/RedundantBegin:
381
+ Exclude:
382
+ - 'spec/fontist/font_spec.rb'
383
+
384
+ # Offense count: 1
385
+ # This cop supports safe autocorrection (--autocorrect).
386
+ Style/RedundantRegexpArgument:
387
+ Exclude:
388
+ - 'lib/fontist/repo.rb'
389
+
390
+ # Offense count: 2
391
+ # This cop supports safe autocorrection (--autocorrect).
392
+ Style/RescueModifier:
393
+ Exclude:
394
+ - 'lib/fontist/cache/store.rb'
395
+
396
+ # Offense count: 1
397
+ # This cop supports safe autocorrection (--autocorrect).
398
+ # Configuration parameters: EnforcedStyle.
399
+ # SupportedStyles: implicit, explicit
400
+ Style/RescueStandardError:
401
+ Exclude:
402
+ - 'lib/fontist/cache/store.rb'
403
+
404
+ # Offense count: 1
405
+ # Configuration parameters: Max.
406
+ Style/SafeNavigationChainLength:
407
+ Exclude:
408
+ - 'lib/fontist/system_index.rb'
409
+
410
+ # Offense count: 2
411
+ # This cop supports unsafe autocorrection (--autocorrect-all).
412
+ # Configuration parameters: Mode.
413
+ Style/StringConcatenation:
414
+ Exclude:
415
+ - 'lib/fontist/cache/store.rb'
416
+ - 'spec/fontist/system_index_spec.rb'
417
+
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
+ # Offense count: 1
428
+ # This cop supports safe autocorrection (--autocorrect).
429
+ Style/SuperArguments:
430
+ Exclude:
431
+ - 'lib/fontist/import/google/models/font_family.rb'
432
+
433
+ # Offense count: 6
434
+ # This cop supports safe autocorrection (--autocorrect).
435
+ # Configuration parameters: EnforcedStyleForMultiline.
436
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
437
+ Style/TrailingCommaInArguments:
438
+ Exclude:
439
+ - 'lib/fontist/utils/github_url.rb'
440
+ - 'spec/fontist/system_index_spec.rb'
441
+ - 'spec/fontist/utils/github_url_spec.rb'
@@ -1,3 +1,3 @@
1
1
  module Fontist
2
- VERSION = "2.1.5".freeze
2
+ VERSION = "2.1.6".freeze
3
3
  end
data/lib/fontist.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "down"
2
2
  require "digest"
3
3
  require "singleton"
4
+ require "pathname"
4
5
  require "lutaml/model"
5
6
 
6
7
  require_relative "fontist/errors"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fontist
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-03-17 00:00:00.000000000 Z
11
+ date: 2026-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: down