png_conform 0.1.1 → 0.1.2
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 +4 -4
- data/.rubocop_todo.yml +14 -84
- data/Gemfile +2 -0
- data/README.adoc +3 -2
- data/benchmarks/README.adoc +570 -0
- data/benchmarks/config/default.yml +35 -0
- data/benchmarks/config/full.yml +32 -0
- data/benchmarks/config/quick.yml +32 -0
- data/benchmarks/direct_validation.rb +18 -0
- data/benchmarks/lib/benchmark_runner.rb +204 -0
- data/benchmarks/lib/metrics_collector.rb +193 -0
- data/benchmarks/lib/png_conform_runner.rb +68 -0
- data/benchmarks/lib/pngcheck_runner.rb +67 -0
- data/benchmarks/lib/report_generator.rb +301 -0
- data/benchmarks/lib/tool_runner.rb +104 -0
- data/benchmarks/profile_loading.rb +12 -0
- data/benchmarks/profile_validation.rb +18 -0
- data/benchmarks/results/.gitkeep +0 -0
- data/benchmarks/run_benchmark.rb +159 -0
- data/docs/CHUNK_TYPES.adoc +42 -0
- data/examples/README.md +282 -0
- data/lib/png_conform/commands/check_command.rb +3 -2
- data/lib/png_conform/models/decoded_chunk_data.rb +33 -0
- data/lib/png_conform/reporters/reporter_factory.rb +18 -11
- data/lib/png_conform/services/validation_service.rb +60 -15
- data/lib/png_conform/validators/ancillary/idot_validator.rb +102 -0
- data/lib/png_conform/validators/chunk_registry.rb +131 -128
- data/lib/png_conform/version.rb +1 -1
- data/lib/png_conform.rb +7 -46
- metadata +19 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9838bb140397822f351596fc1ff51179969ba68ac9d4310718a6ddcd549acb67
|
|
4
|
+
data.tar.gz: b88887d300166cb6aa8d38db1d277450a9ddec7d3662498b8529ec3d5eb1f168
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab5ec06d2d129c872e75fe3002129ce258eb6faa80519f147a358be32cad5c16a49e88592226bab55391c274512a17f76679ac51e031dd1e296e949d12d981d2
|
|
7
|
+
data.tar.gz: dbc3ceb3ceafc05d1f92e22c6693668249759fc7a1a54b2191854fb944e11c4445171fae162b0b145d7016afe9287afb9f278d6fc7d4e6cb0b71dc2957e56f40
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,56 +1,18 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2025-11-
|
|
3
|
+
# on 2025-11-23 07:50:45 UTC using RuboCop version 1.81.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:
|
|
10
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
-
# Configuration parameters: IndentationWidth.
|
|
12
|
-
Layout/AssignmentIndentation:
|
|
13
|
-
Exclude:
|
|
14
|
-
- 'lib/png_conform/models/file_analysis.rb'
|
|
15
|
-
|
|
16
|
-
# Offense count: 2
|
|
17
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
18
|
-
# Configuration parameters: EnforcedStyleAlignWith.
|
|
19
|
-
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
20
|
-
Layout/BlockAlignment:
|
|
21
|
-
Exclude:
|
|
22
|
-
- 'lib/png_conform/models/file_analysis.rb'
|
|
23
|
-
- 'lib/png_conform/services/validation_service.rb'
|
|
24
|
-
|
|
25
|
-
# Offense count: 2
|
|
26
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
27
|
-
Layout/BlockEndNewline:
|
|
28
|
-
Exclude:
|
|
29
|
-
- 'lib/png_conform/models/file_analysis.rb'
|
|
30
|
-
- 'lib/png_conform/services/validation_service.rb'
|
|
31
|
-
|
|
32
|
-
# Offense count: 4
|
|
33
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
34
|
-
# Configuration parameters: Width, AllowedPatterns.
|
|
35
|
-
Layout/IndentationWidth:
|
|
36
|
-
Exclude:
|
|
37
|
-
- 'lib/png_conform/models/file_analysis.rb'
|
|
38
|
-
- 'lib/png_conform/services/validation_service.rb'
|
|
39
|
-
|
|
40
|
-
# Offense count: 194
|
|
9
|
+
# Offense count: 231
|
|
41
10
|
# This cop supports safe autocorrection (--autocorrect).
|
|
42
11
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
|
43
12
|
# URISchemes: http, https
|
|
44
13
|
Layout/LineLength:
|
|
45
14
|
Enabled: false
|
|
46
15
|
|
|
47
|
-
# Offense count: 1
|
|
48
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
49
|
-
# Configuration parameters: AllowInHeredoc.
|
|
50
|
-
Layout/TrailingWhitespace:
|
|
51
|
-
Exclude:
|
|
52
|
-
- 'lib/png_conform/models/file_analysis.rb'
|
|
53
|
-
|
|
54
16
|
# Offense count: 1
|
|
55
17
|
Lint/BinaryOperatorWithIdenticalOperands:
|
|
56
18
|
Exclude:
|
|
@@ -65,29 +27,23 @@ Lint/DuplicateBranch:
|
|
|
65
27
|
- 'lib/png_conform/validators/ancillary/sbit_validator.rb'
|
|
66
28
|
- 'spec/pngsuite/helpers/semantic_validator.rb'
|
|
67
29
|
|
|
68
|
-
# Offense count:
|
|
69
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
70
|
-
Lint/UselessAssignment:
|
|
71
|
-
Exclude:
|
|
72
|
-
- 'examples/advanced_usage.rb'
|
|
73
|
-
|
|
74
|
-
# Offense count: 99
|
|
30
|
+
# Offense count: 113
|
|
75
31
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
76
32
|
Metrics/AbcSize:
|
|
77
33
|
Enabled: false
|
|
78
34
|
|
|
79
|
-
# Offense count:
|
|
35
|
+
# Offense count: 4
|
|
80
36
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
|
81
37
|
# AllowedMethods: refine
|
|
82
38
|
Metrics/BlockLength:
|
|
83
|
-
Max:
|
|
39
|
+
Max: 54
|
|
84
40
|
|
|
85
|
-
# Offense count:
|
|
41
|
+
# Offense count: 57
|
|
86
42
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
87
43
|
Metrics/CyclomaticComplexity:
|
|
88
44
|
Enabled: false
|
|
89
45
|
|
|
90
|
-
# Offense count:
|
|
46
|
+
# Offense count: 171
|
|
91
47
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
92
48
|
Metrics/MethodLength:
|
|
93
49
|
Max: 66
|
|
@@ -97,7 +53,7 @@ Metrics/MethodLength:
|
|
|
97
53
|
Metrics/ParameterLists:
|
|
98
54
|
Max: 10
|
|
99
55
|
|
|
100
|
-
# Offense count:
|
|
56
|
+
# Offense count: 41
|
|
101
57
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
102
58
|
Metrics/PerceivedComplexity:
|
|
103
59
|
Enabled: false
|
|
@@ -110,25 +66,24 @@ Naming/VariableNumber:
|
|
|
110
66
|
Exclude:
|
|
111
67
|
- 'lib/png_conform/validators/critical/plte_validator.rb'
|
|
112
68
|
|
|
113
|
-
# Offense count:
|
|
69
|
+
# Offense count: 1
|
|
114
70
|
# Configuration parameters: MinSize.
|
|
115
71
|
Performance/CollectionLiteralInLoop:
|
|
116
72
|
Exclude:
|
|
117
73
|
- 'examples/advanced_usage.rb'
|
|
118
|
-
- 'lib/png_conform/validators/chunk_registry.rb'
|
|
119
74
|
|
|
120
|
-
# Offense count:
|
|
75
|
+
# Offense count: 70
|
|
121
76
|
# Configuration parameters: Prefixes, AllowedPatterns.
|
|
122
77
|
# Prefixes: when, with, without
|
|
123
78
|
RSpec/ContextWording:
|
|
124
79
|
Enabled: false
|
|
125
80
|
|
|
126
|
-
# Offense count:
|
|
81
|
+
# Offense count: 20
|
|
127
82
|
# Configuration parameters: IgnoredMetadata.
|
|
128
83
|
RSpec/DescribeClass:
|
|
129
84
|
Enabled: false
|
|
130
85
|
|
|
131
|
-
# Offense count:
|
|
86
|
+
# Offense count: 304
|
|
132
87
|
# Configuration parameters: CountAsOne.
|
|
133
88
|
RSpec/ExampleLength:
|
|
134
89
|
Max: 19
|
|
@@ -138,7 +93,7 @@ RSpec/MultipleDescribes:
|
|
|
138
93
|
Exclude:
|
|
139
94
|
- 'spec/png_conform/validators/base_validator_spec.rb'
|
|
140
95
|
|
|
141
|
-
# Offense count:
|
|
96
|
+
# Offense count: 378
|
|
142
97
|
RSpec/MultipleExpectations:
|
|
143
98
|
Max: 10
|
|
144
99
|
|
|
@@ -159,19 +114,7 @@ RSpec/SpecFilePathFormat:
|
|
|
159
114
|
RSpec/VerifiedDoubles:
|
|
160
115
|
Enabled: false
|
|
161
116
|
|
|
162
|
-
# Offense count:
|
|
163
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
164
|
-
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
165
|
-
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
166
|
-
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
|
167
|
-
# FunctionalMethods: let, let!, subject, watch
|
|
168
|
-
# AllowedMethods: lambda, proc, it
|
|
169
|
-
Style/BlockDelimiters:
|
|
170
|
-
Exclude:
|
|
171
|
-
- 'lib/png_conform/models/file_analysis.rb'
|
|
172
|
-
- 'lib/png_conform/services/validation_service.rb'
|
|
173
|
-
|
|
174
|
-
# Offense count: 31
|
|
117
|
+
# Offense count: 41
|
|
175
118
|
# This cop supports safe autocorrection (--autocorrect).
|
|
176
119
|
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
|
|
177
120
|
# SupportedStyles: annotated, template, unannotated
|
|
@@ -182,16 +125,3 @@ Style/FormatStringToken:
|
|
|
182
125
|
Style/MissingRespondToMissing:
|
|
183
126
|
Exclude:
|
|
184
127
|
- 'lib/png_conform/cli.rb'
|
|
185
|
-
|
|
186
|
-
# Offense count: 1
|
|
187
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
188
|
-
Style/MultilineIfModifier:
|
|
189
|
-
Exclude:
|
|
190
|
-
- 'lib/png_conform/models/file_analysis.rb'
|
|
191
|
-
|
|
192
|
-
# Offense count: 2
|
|
193
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
194
|
-
Style/SlicingWithRange:
|
|
195
|
-
Exclude:
|
|
196
|
-
- 'examples/advanced_usage.rb'
|
|
197
|
-
- 'examples/basic_usage.rb'
|
data/Gemfile
CHANGED
data/README.adoc
CHANGED
|
@@ -16,8 +16,9 @@ extensibility and maintainability.
|
|
|
16
16
|
|
|
17
17
|
== Features
|
|
18
18
|
|
|
19
|
-
* *
|
|
19
|
+
* *47 Chunk Validators*: Complete validation of PNG (24), APNG (3), MNG (16), JNG (3), and Apple extensions (1) chunks
|
|
20
20
|
* *PNG 3rd Edition Support*: Includes cICP and mDCv chunks for HDR content
|
|
21
|
+
* *Apple Extensions Support*: Includes iDOT chunk for macOS/iOS display optimization
|
|
21
22
|
* *MNG/JNG Support*: Full Multiple-image Network Graphics and JPEG Network Graphics validation
|
|
22
23
|
* *CRC Validation*: CRC-32 checksum verification for all chunks with detailed error reporting
|
|
23
24
|
* *Chunk Ordering*: Validates proper chunk sequence and dependencies
|
|
@@ -35,7 +36,7 @@ extensibility and maintainability.
|
|
|
35
36
|
* *Multiple Output Modes*: Summary, verbose, very verbose, quiet, with optional palette/text/color output
|
|
36
37
|
* *Clean Architecture*: Layered OO design following MECE principles
|
|
37
38
|
* *CLI Interface*: Thor-based command-line tool with pngcheck-compatible options plus modern analysis features
|
|
38
|
-
* *Comprehensive Testing*: Extensive RSpec test suite (
|
|
39
|
+
* *Comprehensive Testing*: Extensive RSpec test suite (954 examples, 100% passing)
|
|
39
40
|
|
|
40
41
|
== Architecture
|
|
41
42
|
|