svg_conform 0.1.4 → 0.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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +18 -40
  3. data/README.adoc +111 -1171
  4. data/config/profiles/metanorma.yml +5 -0
  5. data/docs/api_reference.adoc +1355 -0
  6. data/docs/cli_guide.adoc +846 -0
  7. data/docs/reference_manifest.adoc +371 -0
  8. data/docs/requirements.adoc +68 -1
  9. data/examples/document_input_demo.rb +102 -0
  10. data/lib/svg_conform/document.rb +40 -1
  11. data/lib/svg_conform/profile.rb +15 -9
  12. data/lib/svg_conform/references/base_reference.rb +130 -0
  13. data/lib/svg_conform/references/id_definition.rb +38 -0
  14. data/lib/svg_conform/references/reference_classifier.rb +45 -0
  15. data/lib/svg_conform/references/reference_manifest.rb +129 -0
  16. data/lib/svg_conform/references.rb +11 -0
  17. data/lib/svg_conform/remediations/namespace_attribute_remediation.rb +34 -43
  18. data/lib/svg_conform/requirements/id_collection_requirement.rb +38 -0
  19. data/lib/svg_conform/requirements/id_reference_requirement.rb +11 -0
  20. data/lib/svg_conform/requirements/invalid_id_references_requirement.rb +3 -0
  21. data/lib/svg_conform/requirements/link_validation_requirement.rb +114 -31
  22. data/lib/svg_conform/requirements/no_external_css_requirement.rb +5 -2
  23. data/lib/svg_conform/requirements.rb +11 -9
  24. data/lib/svg_conform/sax_validation_handler.rb +16 -1
  25. data/lib/svg_conform/validation_context.rb +67 -1
  26. data/lib/svg_conform/validation_result.rb +43 -2
  27. data/lib/svg_conform/validator.rb +56 -16
  28. data/lib/svg_conform/version.rb +1 -1
  29. data/lib/svg_conform.rb +11 -2
  30. data/spec/svg_conform/commands/svgcheck_compare_command_spec.rb +1 -0
  31. data/spec/svg_conform/commands/svgcheck_compatibility_command_spec.rb +1 -0
  32. data/spec/svg_conform/commands/svgcheck_generate_command_spec.rb +1 -0
  33. data/spec/svg_conform/references/integration_spec.rb +206 -0
  34. data/spec/svg_conform/references/reference_classifier_spec.rb +142 -0
  35. data/spec/svg_conform/references/reference_manifest_spec.rb +307 -0
  36. data/spec/svg_conform/requirements/id_reference_state_spec.rb +93 -0
  37. data/spec/svg_conform/validator_input_types_spec.rb +172 -0
  38. data/svg_conform.gemspec +1 -1
  39. metadata +25 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24fb1d016b5e3ed96b2da518c95884fac16a47b18cd8566e129d81b49791fb32
4
- data.tar.gz: ad67c207d5f1489855772d6c8931ea4dd8277b041a2a791ceebb6fe2af63ff36
3
+ metadata.gz: a9ecc9cf94ec2791168aba3939afb43f456b86c596912339ea2947162c5f738d
4
+ data.tar.gz: 32671c37c920fdb2cb36666183d1e965d803c6c706dc4e98e97a581e2cf49e4d
5
5
  SHA512:
6
- metadata.gz: fa0cdaf7dcd0ed01c23d334ed2d92e1674954a9fce8aed9aad85fd884a2949a6da81cec006607005971d61093384076d2797f72204a7362bad94a8fb882712e2
7
- data.tar.gz: c6e9af1cba1fb25edbf89ed1ddc77261b4c8a3d068f79d1b56553d5636114f8a493b48dcbaa8a125c99319a043cbfbc5737be77dbe6054f9145a02ddeb94e37a
6
+ metadata.gz: 1d849f548dfff6df9b81c624430323459cd33f12756c64c9fe04e4cf801bf7a1a45d94bcbbb632423c5eeefac4040733eea9a3133bfcdd75d11a64568d74413e
7
+ data.tar.gz: d22c6710edadb75a1346a8e56f835f9f18d9113018c719bbc8362f04ea6288c6a17b6142144a9388c03b838a350217d59b797ceea3850dba232e0f388b7ee275
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2025-11-19 10:52:11 UTC using RuboCop version 1.81.1.
3
+ # on 2025-11-26 09:22:57 UTC using RuboCop version 1.81.7.
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
@@ -14,22 +14,7 @@ Layout/BlockAlignment:
14
14
  Exclude:
15
15
  - 'spec/svg_conform/profiles/svg_1_2_rfc_profile_spec.rb'
16
16
 
17
- # Offense count: 1
18
- # This cop supports safe autocorrection (--autocorrect).
19
- # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
20
- Layout/ExtraSpacing:
21
- Exclude:
22
- - 'lib/svg_conform/requirements/no_external_css_requirement.rb'
23
-
24
- # Offense count: 1
25
- # This cop supports safe autocorrection (--autocorrect).
26
- # Configuration parameters: EnforcedStyle.
27
- # SupportedStyles: normal, indented_internal_methods
28
- Layout/IndentationConsistency:
29
- Exclude:
30
- - 'lib/svg_conform/profile.rb'
31
-
32
- # Offense count: 616
17
+ # Offense count: 643
33
18
  # This cop supports safe autocorrection (--autocorrect).
34
19
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
35
20
  # URISchemes: http, https
@@ -48,6 +33,7 @@ Lint/ConstantDefinitionInBlock:
48
33
  Lint/DuplicateBranch:
49
34
  Exclude:
50
35
  - 'lib/svg_conform/profile.rb'
36
+ - 'lib/svg_conform/references/reference_classifier.rb'
51
37
  - 'lib/svg_conform/remediations/font_embedding_remediation.rb'
52
38
  - 'lib/svg_conform/remediations/image_embedding_remediation.rb'
53
39
  - 'lib/svg_conform/report_comparator.rb'
@@ -80,15 +66,7 @@ Lint/UnreachableCode:
80
66
  Exclude:
81
67
  - 'lib/svg_conform/commands/check.rb'
82
68
 
83
- # Offense count: 1
84
- # This cop supports safe autocorrection (--autocorrect).
85
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
86
- # NotImplementedExceptions: NotImplementedError
87
- Lint/UnusedMethodArgument:
88
- Exclude:
89
- - 'lib/svg_conform/requirements/no_external_css_requirement.rb'
90
-
91
- # Offense count: 148
69
+ # Offense count: 151
92
70
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
93
71
  Metrics/AbcSize:
94
72
  Enabled: false
@@ -104,12 +82,12 @@ Metrics/BlockLength:
104
82
  Metrics/BlockNesting:
105
83
  Max: 4
106
84
 
107
- # Offense count: 126
85
+ # Offense count: 128
108
86
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
109
87
  Metrics/CyclomaticComplexity:
110
88
  Enabled: false
111
89
 
112
- # Offense count: 261
90
+ # Offense count: 268
113
91
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
114
92
  Metrics/MethodLength:
115
93
  Max: 154
@@ -119,7 +97,7 @@ Metrics/MethodLength:
119
97
  Metrics/ParameterLists:
120
98
  Max: 9
121
99
 
122
- # Offense count: 101
100
+ # Offense count: 103
123
101
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
124
102
  Metrics/PerceivedComplexity:
125
103
  Enabled: false
@@ -138,7 +116,7 @@ Performance/CollectionLiteralInLoop:
138
116
  - 'lib/svg_conform/batch_report.rb'
139
117
  - 'lib/svg_conform/compatibility/pattern_discovery.rb'
140
118
 
141
- # Offense count: 8
119
+ # Offense count: 9
142
120
  # Configuration parameters: IgnoredMetadata.
143
121
  RSpec/DescribeClass:
144
122
  Exclude:
@@ -154,9 +132,10 @@ RSpec/DescribeClass:
154
132
  - 'spec/svg_conform/profiles/no_external_css_profile_spec.rb'
155
133
  - 'spec/svg_conform/profiles/svg_1_2_rfc_profile_spec.rb'
156
134
  - 'spec/svg_conform/profiles/svg_1_2_rfc_with_rdf_profile_spec.rb'
135
+ - 'spec/svg_conform/references/integration_spec.rb'
157
136
  - 'spec/svgcheck_compatibility_spec.rb'
158
137
 
159
- # Offense count: 109
138
+ # Offense count: 136
160
139
  # Configuration parameters: CountAsOne.
161
140
  RSpec/ExampleLength:
162
141
  Max: 53
@@ -166,14 +145,20 @@ RSpec/LeakyConstantDeclaration:
166
145
  Exclude:
167
146
  - 'spec/svg_conform/profiles/svg_1_2_rfc_profile_spec.rb'
168
147
 
148
+ # Offense count: 2
149
+ # Configuration parameters: .
150
+ # SupportedStyles: have_received, receive
151
+ RSpec/MessageSpies:
152
+ EnforcedStyle: receive
153
+
169
154
  # Offense count: 1
170
155
  RSpec/MultipleDescribes:
171
156
  Exclude:
172
157
  - 'spec/svg_conform/batch_report_spec.rb'
173
158
 
174
- # Offense count: 73
159
+ # Offense count: 111
175
160
  RSpec/MultipleExpectations:
176
- Max: 6
161
+ Max: 8
177
162
 
178
163
  # Offense count: 1
179
164
  Rake/MethodDefinitionInTask:
@@ -215,10 +200,3 @@ Style/OptionalBooleanParameter:
215
200
  Style/RedundantCondition:
216
201
  Exclude:
217
202
  - 'lib/svg_conform/external_checkers/svgcheck/parser.rb'
218
-
219
- # Offense count: 3
220
- # This cop supports safe autocorrection (--autocorrect).
221
- # Configuration parameters: AllowMultipleReturnValues.
222
- Style/RedundantReturn:
223
- Exclude:
224
- - 'lib/svg_conform/profile.rb'