extract_ttc 0.3.6 → 0.3.7

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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -4
  3. data/.rubocop.yml +7 -9
  4. data/.rubocop_todo.yml +135 -0
  5. data/Gemfile +6 -6
  6. data/README.adoc +856 -55
  7. data/Rakefile +7 -101
  8. data/exe/extract_ttc +7 -0
  9. data/extract_ttc.gemspec +3 -4
  10. data/lib/extract_ttc/cli.rb +47 -0
  11. data/lib/extract_ttc/commands/extract.rb +88 -0
  12. data/lib/extract_ttc/commands/info.rb +112 -0
  13. data/lib/extract_ttc/commands/list.rb +60 -0
  14. data/lib/extract_ttc/configuration.rb +126 -0
  15. data/lib/extract_ttc/constants.rb +42 -0
  16. data/lib/extract_ttc/models/extraction_result.rb +56 -0
  17. data/lib/extract_ttc/models/validation_result.rb +53 -0
  18. data/lib/extract_ttc/true_type_collection.rb +79 -0
  19. data/lib/extract_ttc/true_type_font.rb +239 -0
  20. data/lib/extract_ttc/utilities/checksum_calculator.rb +89 -0
  21. data/lib/extract_ttc/utilities/output_path_generator.rb +100 -0
  22. data/lib/extract_ttc/version.rb +1 -1
  23. data/lib/extract_ttc.rb +83 -55
  24. data/sig/extract_ttc/configuration.rbs +19 -0
  25. data/sig/extract_ttc/constants.rbs +17 -0
  26. data/sig/extract_ttc/models/extraction_result.rbs +19 -0
  27. data/sig/extract_ttc/models/font_data.rbs +17 -0
  28. data/sig/extract_ttc/models/table_directory_entry.rbs +15 -0
  29. data/sig/extract_ttc/models/true_type_collection_header.rbs +15 -0
  30. data/sig/extract_ttc/models/true_type_font_offset_table.rbs +17 -0
  31. data/sig/extract_ttc/models/validation_result.rbs +17 -0
  32. data/sig/extract_ttc/utilities/checksum_calculator.rbs +13 -0
  33. data/sig/extract_ttc/utilities/output_path_generator.rbs +11 -0
  34. data/sig/extract_ttc/validators/true_type_collection_validator.rbs +9 -0
  35. data/sig/extract_ttc.rbs +20 -0
  36. metadata +44 -28
  37. data/ext/stripttc/LICENSE +0 -31
  38. data/ext/stripttc/dummy.c +0 -2
  39. data/ext/stripttc/extconf.rb +0 -5
  40. data/ext/stripttc/stripttc.c +0 -187
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 590052a1f263a68b8eab78f76674f3a73291131ee360cc1dfbff8900b460f17f
4
- data.tar.gz: 1bd7b0d42aaef2f2e80daa65119fb16383acc33f6425b79204b00411779d560a
3
+ metadata.gz: 465631271247538a2c3ef20b1f47076a36557304f2329deeb15268dfd4145f6b
4
+ data.tar.gz: dc1d708c0d4d652a0c4abae9529c897e79ecbdcecf0e64d91be1483160c149c9
5
5
  SHA512:
6
- metadata.gz: 844f688c6ed9ed8948ab3f113952953a5f4f9a553ba569a3a97eebb4e14330926fef6ea99025a607ec8b9e2a90e4edc9ef0447e86ef2f4f189603023cede9717
7
- data.tar.gz: c4535b912d18f5fe13f4ab7113a9d97416cd244caa4cac3c2c128a55e8f7538fd9ccb3a8d396995fb31e4aca7873294788d3535adfcd13baed330d7738830192
6
+ metadata.gz: 925b4c8de0c9b1af8cd42892668b08362be3eced8d3ac989a9375fb59454c8a4f55720539cde8e5b098ad90247e72016a6f14855993a8d66d034d8fe99cfcd7d
7
+ data.tar.gz: b858ec6518c403989901c3c0fd127b9d7ab8c3225c0b7be5d931b4b396ae43023ea8e98ba43ca334bfa052a576d6761ac60f3420d93aa6c404a4e4196583e0e7
data/.gitignore CHANGED
@@ -9,9 +9,5 @@
9
9
  /tmp/
10
10
  /Gemfile.lock
11
11
 
12
- /lib/*.so
13
- /lib/*.bundle
14
- /ext/*.o
15
-
16
12
  # remote file cache
17
13
  .rubocop-*
data/.rubocop.yml CHANGED
@@ -1,12 +1,10 @@
1
1
  inherit_from:
2
- - 'https://raw.githubusercontent.com/fontist/oss-guides/master/ci/rubocop.yml'
2
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
3
+ - .rubocop_todo.yml
3
4
 
4
- AllCops:
5
- TargetRubyVersion: 2.7
6
- SuggestExtensions: false
7
- Exclude:
8
- - 'tmp/**/*'
9
- - 'vendor/**/*'
5
+ # local repo-specific modifications
6
+ # ...
10
7
 
11
- Gemspec/RequireMFA:
12
- Enabled: false
8
+ # AllCops:
9
+ # TargetRubyVersion: 3.0
10
+ # NewCops: enable
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,135 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2025-11-07 06:32:18 UTC using RuboCop version 1.81.7.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: Severity.
11
+ Gemspec/RequiredRubyVersion:
12
+ Exclude:
13
+ - 'extract_ttc.gemspec'
14
+
15
+ # Offense count: 12
16
+ # This cop supports safe autocorrection (--autocorrect).
17
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
18
+ # SupportedStyles: with_first_argument, with_fixed_indentation
19
+ Layout/ArgumentAlignment:
20
+ Exclude:
21
+ - 'lib/extract_ttc/commands/extract.rb'
22
+ - 'lib/extract_ttc/commands/info.rb'
23
+
24
+ # Offense count: 68
25
+ # This cop supports safe autocorrection (--autocorrect).
26
+ # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
27
+ # URISchemes: http, https
28
+ Layout/LineLength:
29
+ Exclude:
30
+ - 'extract_ttc.gemspec'
31
+ - 'lib/extract_ttc/commands/extract.rb'
32
+ - 'lib/extract_ttc/commands/info.rb'
33
+ - 'lib/extract_ttc/configuration.rb'
34
+ - 'lib/extract_ttc/constants.rb'
35
+ - 'lib/extract_ttc/models/extraction_result.rb'
36
+ - 'lib/extract_ttc/true_type_collection.rb'
37
+ - 'lib/extract_ttc/true_type_font.rb'
38
+ - 'lib/extract_ttc/utilities/checksum_calculator.rb'
39
+ - 'lib/extract_ttc/utilities/output_path_generator.rb'
40
+ - 'spec/extract_ttc/cli_spec.rb'
41
+ - 'spec/extract_ttc/configuration_spec.rb'
42
+ - 'spec/extract_ttc/constants_spec.rb'
43
+ - 'spec/extract_ttc/true_type_font_spec.rb'
44
+ - 'spec/extract_ttc/utilities/checksum_calculator_spec.rb'
45
+
46
+ # Offense count: 9
47
+ # This cop supports safe autocorrection (--autocorrect).
48
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
49
+ # SupportedStyles: aligned, indented
50
+ Layout/MultilineOperationIndentation:
51
+ Exclude:
52
+ - 'lib/extract_ttc/commands/info.rb'
53
+
54
+ # Offense count: 4
55
+ # This cop supports safe autocorrection (--autocorrect).
56
+ # Configuration parameters: EnforcedStyle.
57
+ # SupportedStyles: final_newline, final_blank_line
58
+ Layout/TrailingEmptyLines:
59
+ Exclude:
60
+ - 'lib/extract_ttc/commands/info.rb'
61
+ - 'lib/extract_ttc/commands/list.rb'
62
+ - 'spec/extract_ttc/commands/info_spec.rb'
63
+ - 'spec/extract_ttc/commands/list_spec.rb'
64
+
65
+ # Offense count: 12
66
+ # This cop supports safe autocorrection (--autocorrect).
67
+ # Configuration parameters: AllowInHeredoc.
68
+ Layout/TrailingWhitespace:
69
+ Exclude:
70
+ - 'lib/extract_ttc/commands/extract.rb'
71
+ - 'lib/extract_ttc/commands/info.rb'
72
+
73
+ # Offense count: 1
74
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
75
+ Lint/DuplicateBranch:
76
+ Exclude:
77
+ - 'lib/extract_ttc/commands/extract.rb'
78
+
79
+ # Offense count: 1
80
+ Lint/ShadowedException:
81
+ Exclude:
82
+ - 'lib/extract_ttc.rb'
83
+
84
+ # Offense count: 6
85
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
86
+ Metrics/AbcSize:
87
+ Exclude:
88
+ - 'lib/extract_ttc.rb'
89
+ - 'lib/extract_ttc/commands/extract.rb'
90
+ - 'lib/extract_ttc/commands/info.rb'
91
+ - 'lib/extract_ttc/commands/list.rb'
92
+ - 'lib/extract_ttc/true_type_font.rb'
93
+
94
+ # Offense count: 12
95
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
96
+ Metrics/MethodLength:
97
+ Max: 28
98
+
99
+ # Offense count: 4
100
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
101
+ # SupportedStyles: snake_case, normalcase, non_integer
102
+ # AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
103
+ Naming/VariableNumber:
104
+ Exclude:
105
+ - 'spec/extract_ttc/constants_spec.rb'
106
+
107
+ # Offense count: 2
108
+ # Configuration parameters: MinSize.
109
+ Performance/CollectionLiteralInLoop:
110
+ Exclude:
111
+ - 'lib/extract_ttc/true_type_font.rb'
112
+
113
+ # Offense count: 9
114
+ # This cop supports unsafe autocorrection (--autocorrect-all).
115
+ # Configuration parameters: Mode.
116
+ Style/StringConcatenation:
117
+ Exclude:
118
+ - 'lib/extract_ttc/commands/info.rb'
119
+ - 'lib/extract_ttc/commands/list.rb'
120
+
121
+ # Offense count: 4
122
+ # This cop supports safe autocorrection (--autocorrect).
123
+ # Configuration parameters: EnforcedStyle.
124
+ # SupportedStyles: single_quotes, double_quotes
125
+ Style/StringLiteralsInInterpolation:
126
+ Exclude:
127
+ - 'lib/extract_ttc/commands/info.rb'
128
+
129
+ # Offense count: 1
130
+ # This cop supports safe autocorrection (--autocorrect).
131
+ # Configuration parameters: EnforcedStyleForMultiline.
132
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
133
+ Style/TrailingCommaInArguments:
134
+ Exclude:
135
+ - 'lib/extract_ttc/commands/list.rb'
data/Gemfile CHANGED
@@ -3,9 +3,9 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in extract_ttc.gemspec
4
4
  gemspec
5
5
 
6
- gem "rake-compiler", "~> 1.2"
7
- gem "rake-compiler-dock", "~> 1.2"
8
- gem "rspec", "~> 3.0"
9
- gem "rubocop", "~> 1.5"
10
- gem "rubocop-performance", "~> 1.10"
11
- gem "rubocop-rails", "~> 2.9"
6
+ gem "rake"
7
+ gem "rspec"
8
+ gem "rubocop"
9
+ gem "rubocop-performance"
10
+ gem "rubocop-rake"
11
+ gem "rubocop-rspec"