svg_conform 0.2.6 → 0.2.8

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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +1 -1
  3. data/Gemfile +2 -3
  4. data/Gemfile.lock +103 -76
  5. data/README.adoc +7 -0
  6. data/config/profiles/{metanorma.yml → metanorma-sample.yml} +4 -4
  7. data/docs/api_reference.adoc +21 -21
  8. data/docs/cli_guide.adoc +41 -41
  9. data/docs/profiles.adoc +8 -2
  10. data/docs/reference_manifest.adoc +3 -3
  11. data/lib/svg_conform/cli.rb +4 -5
  12. data/lib/svg_conform/errors/validation_issue.rb +6 -1
  13. data/lib/svg_conform/external_checkers/svgcheck/parser.rb +1 -3
  14. data/lib/svg_conform/quality_metrics/configuration.rb +4 -2
  15. data/lib/svg_conform/references/reference_manifest.rb +1 -2
  16. data/lib/svg_conform/validation/error_tracker.rb +37 -8
  17. data/lib/svg_conform/validation/svg_1_1_document_conformance.rb +0 -1
  18. data/lib/svg_conform/version.rb +1 -1
  19. data/lib/svg_conform/yaml_io.rb +20 -0
  20. data/lib/svg_conform.rb +1 -0
  21. data/spec/fixtures/quality_metrics/aliases.yml +7 -0
  22. data/spec/svg_conform/errors/validation_issue_spec.rb +53 -0
  23. data/spec/svg_conform/gemspec_spec.rb +23 -7
  24. data/spec/svg_conform/profiles/metanorma_profile_spec.rb +55 -7
  25. data/spec/svg_conform/profiles_plantuml_spec.rb +1 -1
  26. data/spec/svg_conform/quality_metrics/configuration_spec.rb +82 -0
  27. data/spec/svg_conform/references/integration_spec.rb +1 -1
  28. data/spec/svg_conform/requirements/id_reference_state_spec.rb +5 -5
  29. data/spec/svg_conform/requirements/text_as_path_requirement_spec.rb +15 -11
  30. data/spec/svg_conform/validator_input_types_spec.rb +11 -11
  31. data/spec/svg_conform/yaml_io_spec.rb +41 -0
  32. data/spec/svg_conform_spec.rb +3 -3
  33. data/svg_conform.gemspec +7 -0
  34. metadata +36 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f10bc419be4fc98db66f773730223b021d90914c88fd6ce7421015c5a8a2be84
4
- data.tar.gz: e70f5fe9224c41bf35e02eea2fbfa8b08fac28ceb997cb58529ca6b1a521626b
3
+ metadata.gz: dea950e992509d013e749d33df19346be795d3bea5fbddc0c26e32ab5739f3ef
4
+ data.tar.gz: 6159a5a4152bf0304d0832d63ff057ba6de76dfe2f7adabfa9af0554db26c0d0
5
5
  SHA512:
6
- metadata.gz: 8706aaee4a68d144e8edd9a5bd031eb2f5b8ca75ad5796acc85a58ff10a3fde582ea47e85cc8c41463eff42a66204148429ac3297fa2aef6bc0f022ab4a7fd5d
7
- data.tar.gz: 4de2cd0a001c640514e4d7622c2225cce1dad6f6849706d6b8bbe4b9cbab1a12ff8db609c1af3313c725729f51d92d047dc02da7b79af0ca0bb2e8d485151b42
6
+ metadata.gz: 568dc8fc2390dbe173b741512b2cd2fd2d4c0abb0238e63d5c71d62fd40065064878f0a426c6a28a8c35ae0c85d3ba236e5c782d5b5079fb31cf1ffe958b5710
7
+ data.tar.gz: b880f5000253f4fffd73d6a6ec7432b431faee76175d549df9dc573061f2dfb70cc1104bbcab43b3136cd1733f4d190a8f7a726a61e2f564c19d417d8ecfbcf7
@@ -18,4 +18,4 @@ jobs:
18
18
  # tests-passed dispatch is refused on pull_request runs; releases come from push
19
19
  cascade: ${{ github.event_name != 'pull_request' }}
20
20
  secrets:
21
- pat_token: ${{ secrets.GITHUB_TOKEN }}
21
+ pat_token: ${{ secrets.CLARICLE_CI_PAT_TOKEN }}
data/Gemfile CHANGED
@@ -9,9 +9,8 @@ gem "canon", "~>0.1.10"
9
9
  gem "leptris", ">= 1.9.399.0"
10
10
  gem "lutaml-model", "~> 0.8.155" # rubygems line; drop the git-main float
11
11
  gem "moxml", "~> 0.6.0"
12
- # Temporary pin on the lens_core v1 freeze candidate (claricle/lens_core#5 merge commit, after final-review fixes);
13
- # replace with a released gem before release.
14
- gem "lens_core", git: "https://github.com/claricle/lens_core.git", ref: "d00a6e8f7c0b5365a76b43e256a2f41ef9aee4ef"
12
+ # lens_core is optional at runtime (#121); development and CI use the released v1 gem.
13
+ gem "lens_core", "~> 0.1"
15
14
  gem "nokogiri", "~> 1.16"
16
15
  gem "openssl", "~> 3.0"
17
16
  gem "rake"
data/Gemfile.lock CHANGED
@@ -1,20 +1,15 @@
1
- GIT
2
- remote: https://github.com/claricle/lens_core.git
3
- revision: d00a6e8f7c0b5365a76b43e256a2f41ef9aee4ef
4
- ref: d00a6e8f7c0b5365a76b43e256a2f41ef9aee4ef
5
- specs:
6
- lens_core (0.1.0)
7
-
8
1
  PATH
9
2
  remote: .
10
3
  specs:
11
- svg_conform (0.2.6)
4
+ svg_conform (0.2.7)
5
+ lens_core (~> 0.1)
12
6
  lutaml-model (~> 0.8.155)
13
7
  moxml (~> 0.6.0)
14
8
  nokogiri (~> 1.16)
15
9
  rainbow
16
10
  table_tennis
17
11
  thor
12
+ yeptris (~> 0.6.36)
18
13
 
19
14
  GEM
20
15
  remote: https://rubygems.org/
@@ -39,72 +34,75 @@ GEM
39
34
  ffi (1.17.4-arm-linux-gnu)
40
35
  ffi (1.17.4-arm-linux-musl)
41
36
  ffi (1.17.4-arm64-darwin)
42
- ffi (1.17.4-x64-mingw-ucrt)
43
37
  ffi (1.17.4-x86_64-darwin)
44
38
  ffi (1.17.4-x86_64-linux-gnu)
45
39
  ffi (1.17.4-x86_64-linux-musl)
46
40
  json (3.1.0)
47
41
  language_server-protocol (3.17.0.6)
48
- leptris (1.9.399.0-aarch64-linux)
49
- ffi (~> 1.15)
50
- leptris (1.9.399.0-aarch64-linux-musl)
42
+ lens_core (0.1.0)
43
+ leptris (1.9.416.0-aarch64-linux)
51
44
  ffi (~> 1.15)
52
- leptris (1.9.399.0-arm-linux)
45
+ leptris (1.9.416.0-aarch64-linux-musl)
53
46
  ffi (~> 1.15)
54
- leptris (1.9.399.0-arm-linux-musl)
47
+ leptris (1.9.416.0-arm-linux)
55
48
  ffi (~> 1.15)
56
- leptris (1.9.399.0-arm64-darwin)
49
+ leptris (1.9.416.0-arm-linux-musl)
57
50
  ffi (~> 1.15)
58
- leptris (1.9.399.0-x64-mingw-ucrt)
51
+ leptris (1.9.416.0-arm64-darwin)
59
52
  ffi (~> 1.15)
60
- leptris (1.9.399.0-x86_64-darwin)
53
+ leptris (1.9.416.0-x86_64-darwin)
61
54
  ffi (~> 1.15)
62
- leptris (1.9.399.0-x86_64-linux)
55
+ leptris (1.9.416.0-x86_64-linux)
63
56
  ffi (~> 1.15)
64
- leptris (1.9.399.0-x86_64-linux-musl)
57
+ leptris (1.9.416.0-x86_64-linux-musl)
65
58
  ffi (~> 1.15)
66
59
  lint_roller (1.1.0)
67
60
  liquid (5.14.0)
68
61
  bigdecimal
69
62
  strscan (>= 3.1.1)
70
- lutaml-model (0.8.155)
63
+ lutaml-model (0.8.174)
71
64
  base64 (>= 0.1.1)
72
65
  bigdecimal
73
66
  canon
74
67
  concurrent-ruby
75
68
  liquid (>= 4.0, < 6.0)
76
- moxml (>= 0.5.139, < 0.7)
69
+ moxml (~> 0.6.1)
77
70
  ostruct
78
71
  rubyzip (~> 3.7)
79
72
  thor (~> 1.4)
80
73
  memo_wise (1.13.0)
81
- moxml (0.6.1)
82
- nokogiri (1.19.4-aarch64-linux-gnu)
83
- racc (~> 1.4)
84
- nokogiri (1.19.4-aarch64-linux-musl)
74
+ moxml (0.6.4)
75
+ nokogiri (1.19.7-aarch64-linux-gnu)
85
76
  racc (~> 1.4)
86
- nokogiri (1.19.4-arm-linux-gnu)
77
+ nokogiri (1.19.7-aarch64-linux-musl)
87
78
  racc (~> 1.4)
88
- nokogiri (1.19.4-arm-linux-musl)
79
+ nokogiri (1.19.7-arm-linux-gnu)
89
80
  racc (~> 1.4)
90
- nokogiri (1.19.4-arm64-darwin)
81
+ nokogiri (1.19.7-arm-linux-musl)
91
82
  racc (~> 1.4)
92
- nokogiri (1.19.4-x64-mingw-ucrt)
83
+ nokogiri (1.19.7-arm64-darwin)
93
84
  racc (~> 1.4)
94
- nokogiri (1.19.4-x86_64-darwin)
85
+ nokogiri (1.19.7-x86_64-darwin)
95
86
  racc (~> 1.4)
96
- nokogiri (1.19.4-x86_64-linux-gnu)
87
+ nokogiri (1.19.7-x86_64-linux-gnu)
97
88
  racc (~> 1.4)
98
- nokogiri (1.19.4-x86_64-linux-musl)
89
+ nokogiri (1.19.7-x86_64-linux-musl)
99
90
  racc (~> 1.4)
100
91
  openssl (3.3.3)
101
92
  ostruct (0.6.3)
102
93
  paint (2.3.0)
103
94
  parallel (2.3.0)
104
- parser (3.3.12.0)
95
+ parser (3.3.13.0)
105
96
  ast (~> 2.4.1)
106
97
  racc
107
- prism (1.9.0)
98
+ prism (2.1.0-aarch64-linux-gnu)
99
+ prism (2.1.0-aarch64-linux-musl)
100
+ prism (2.1.0-arm-linux-gnu)
101
+ prism (2.1.0-arm-linux-musl)
102
+ prism (2.1.0-arm64-darwin)
103
+ prism (2.1.0-x86_64-darwin)
104
+ prism (2.1.0-x86_64-linux-gnu)
105
+ prism (2.1.0-x86_64-linux-musl)
108
106
  racc (1.8.1)
109
107
  rainbow (3.1.1)
110
108
  rake (13.4.2)
@@ -113,16 +111,16 @@ GEM
113
111
  rspec-core (~> 3.13.0)
114
112
  rspec-expectations (~> 3.13.0)
115
113
  rspec-mocks (~> 3.13.0)
116
- rspec-core (3.13.6)
114
+ rspec-core (3.13.7)
117
115
  rspec-support (~> 3.13.0)
118
- rspec-expectations (3.13.5)
116
+ rspec-expectations (3.13.6)
119
117
  diff-lcs (>= 1.2.0, < 2.0)
120
118
  rspec-support (~> 3.13.0)
121
- rspec-mocks (3.13.8)
119
+ rspec-mocks (3.13.9)
122
120
  diff-lcs (>= 1.2.0, < 2.0)
123
121
  rspec-support (~> 3.13.0)
124
- rspec-support (3.13.7)
125
- rubocop (1.92.1)
122
+ rspec-support (3.13.8)
123
+ rubocop (1.92.2)
126
124
  json (>= 2.3)
127
125
  language_server-protocol (~> 3.17.0.2)
128
126
  lint_roller (~> 1.1.0)
@@ -133,9 +131,9 @@ GEM
133
131
  rubocop-ast (>= 1.49.0, < 2.0)
134
132
  ruby-progressbar (~> 1.7)
135
133
  unicode-display_width (>= 2.4.0, < 4.0)
136
- rubocop-ast (1.50.0)
134
+ rubocop-ast (1.51.0)
137
135
  parser (>= 3.3.7.2)
138
- prism (~> 1.7)
136
+ prism (>= 1.7)
139
137
  rubocop-performance (1.27.0)
140
138
  lint_roller (~> 1.1)
141
139
  rubocop (>= 1.89.0, < 2.0)
@@ -163,24 +161,40 @@ GEM
163
161
  unicode-name (1.15.1)
164
162
  unicode-types (~> 1.12)
165
163
  unicode-types (1.12.0)
164
+ yeptris (0.6.62.1-aarch64-linux)
165
+ ffi (~> 1.15)
166
+ yeptris (0.6.62.1-aarch64-linux-musl)
167
+ ffi (~> 1.15)
168
+ yeptris (0.6.62.1-arm-linux-eabihf)
169
+ ffi (~> 1.15)
170
+ yeptris (0.6.62.1-arm-linux-musleabihf)
171
+ ffi (~> 1.15)
172
+ yeptris (0.6.62.1-arm64-darwin)
173
+ ffi (~> 1.15)
174
+ yeptris (0.6.62.1-x86_64-darwin)
175
+ ffi (~> 1.15)
176
+ yeptris (0.6.62.1-x86_64-linux)
177
+ ffi (~> 1.15)
178
+ yeptris (0.6.62.1-x86_64-linux-musl)
179
+ ffi (~> 1.15)
166
180
 
167
181
  PLATFORMS
168
182
  aarch64-linux
169
183
  aarch64-linux-gnu
170
184
  aarch64-linux-musl
171
185
  arm-linux
186
+ arm-linux-eabihf
172
187
  arm-linux-gnu
173
188
  arm-linux-musl
189
+ arm-linux-musleabihf
174
190
  arm64-darwin
175
- x64-mingw-ucrt
176
191
  x86_64-darwin
177
- x86_64-linux
178
192
  x86_64-linux-gnu
179
193
  x86_64-linux-musl
180
194
 
181
195
  DEPENDENCIES
182
196
  canon (~> 0.1.10)
183
- lens_core!
197
+ lens_core (~> 0.1)
184
198
  leptris (>= 1.9.399.0)
185
199
  lutaml-model (~> 0.8.155)
186
200
  moxml (~> 0.6.0)
@@ -198,6 +212,7 @@ CHECKSUMS
198
212
  ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
199
213
  base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
200
214
  bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66
215
+ bundler (4.0.24) sha256=16ca64e20816a0cf151a948fb141d788602996d2b4d73577b74388fe84fa98bc
201
216
  canon (0.1.23) sha256=502646c0d50cd9e17c8867d24e5808b4adb85230482ad02157f4d4f161f74cc0
202
217
  concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
203
218
  csv (3.3.7) sha256=15a3f16f6628da8664d455eb634e7f22031bcf53044923caf56975109e71b9f8
@@ -207,66 +222,78 @@ CHECKSUMS
207
222
  ffi (1.17.4-arm-linux-gnu) sha256=d6dbddf7cb77bf955411af5f187a65b8cd378cb003c15c05697f5feee1cb1564
208
223
  ffi (1.17.4-arm-linux-musl) sha256=9d4838ded0465bef6e2426935f6bcc93134b6616785a84ffd2a3d82bc3cf6f95
209
224
  ffi (1.17.4-arm64-darwin) sha256=19071aaf1419251b0a46852abf960e77330a3b334d13a4ab51d58b31a937001b
210
- ffi (1.17.4-x64-mingw-ucrt) sha256=f6ff9618cfccc494138bddade27aa06c74c6c7bc367a1ea1103d80c2fcb9ed35
211
225
  ffi (1.17.4-x86_64-darwin) sha256=aa70390523cf3235096cf64962b709b4cfbd5c082a2cb2ae714eb0fe2ccda496
212
226
  ffi (1.17.4-x86_64-linux-gnu) sha256=9d3db14c2eae074b382fa9c083fe95aec6e0a1451da249eab096c34002bc752d
213
227
  ffi (1.17.4-x86_64-linux-musl) sha256=3fdf9888483de005f8ef8d1cf2d3b20d86626af206cbf780f6a6a12439a9c49e
214
228
  json (3.1.0) sha256=3ce7ccf8fde58960177a3a756c31f292a4c1e1dedee884547096a5b0604e3bd8
215
229
  language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0
216
- lens_core (0.1.0)
217
- leptris (1.9.399.0-aarch64-linux) sha256=f96125c2ceb69a48c9576dbba33d20466fd27b017ab7f54041f6bf37f0d3dc78
218
- leptris (1.9.399.0-aarch64-linux-musl) sha256=feede158d84c3a46ac11da49e99ba2108a0b85a3e7113e056fa33e88f1dc694f
219
- leptris (1.9.399.0-arm-linux) sha256=39046099c3d16e429966a79e5d509e120ad839bb41f3a1ed8183f0174f5a22fb
220
- leptris (1.9.399.0-arm-linux-musl) sha256=b7526a73a8b06843228010fc03c00c801241ca591b1504aaf09fae8a12bb7bdb
221
- leptris (1.9.399.0-arm64-darwin) sha256=f2c3e513cc31026307d4a28a92d97624fdb9dc1a67ef098a9586e0e76f250097
222
- leptris (1.9.399.0-x64-mingw-ucrt) sha256=b3aced983a662307e930eed3d408d844b82d947d63f80dc6e4c48fec962d6a7b
223
- leptris (1.9.399.0-x86_64-darwin) sha256=428c84f7c2e763bc2db614b1cafb49792852cd781d2c353e27206bf4aea3ce1c
224
- leptris (1.9.399.0-x86_64-linux) sha256=ae235c244456b8949920d10c21bf9d8f01cf05fb6900c41bc2ef2531e01e86a8
225
- leptris (1.9.399.0-x86_64-linux-musl) sha256=f7cf698c4858e132a19bf00667587ad96add7c35b3c629cbe97fdb20ef8099ce
230
+ lens_core (0.1.0) sha256=9481ce7721be1b9ddb08e0edde349775849614d40a78ff05ec5887de2aa9e2b6
231
+ leptris (1.9.416.0-aarch64-linux) sha256=b950304a998c90f684170a05befec108dc314a511e3ecc3f3f5115bb7886a826
232
+ leptris (1.9.416.0-aarch64-linux-musl) sha256=ec28b3bb1a4b446f7d16a2844acb097e8bf15da55ffe721672e9c930ade5610f
233
+ leptris (1.9.416.0-arm-linux) sha256=867adb4a68a8e23e4e076e272c4a43886c00f4ce3f8f9dbd5bc028c97ba0274d
234
+ leptris (1.9.416.0-arm-linux-musl) sha256=7906fe74a1f2eb9b94651bc7a8ad182af2e48a0fbac3fd89273311f5d9dac54c
235
+ leptris (1.9.416.0-arm64-darwin) sha256=df339c2f02858af5db7174ad7f5dac033953904c10a3789f3cc77787ea6c6103
236
+ leptris (1.9.416.0-x86_64-darwin) sha256=b0b2c4845bd3e12bc52ed4265293ecc81c20947346ee948839f22e41a703e30e
237
+ leptris (1.9.416.0-x86_64-linux) sha256=7b70e08e01d0f4135a261b29e3011e33d529ace54ce07081f480175915f06e6d
238
+ leptris (1.9.416.0-x86_64-linux-musl) sha256=319ed2d132145cca4726852da647caf773a68fa4ae6f973b58ddca992463442c
226
239
  lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
227
240
  liquid (5.14.0) sha256=e1020c2b2ee58c7a4d3bfdc7a331537bd27a783353748bff0bf27c6ac0c17065
228
- lutaml-model (0.8.155) sha256=3d90f2fb4fdf41a42d4a05b62b3f6644b433070b82291a9371deaa8e68a1e02d
241
+ lutaml-model (0.8.174) sha256=d8e92d630a5972fe98bf5fe3f778db47afa328fb36a712c71531e6f82b49d110
229
242
  memo_wise (1.13.0) sha256=30220c38c4cef410849bc73553c58664dc2c91c6379e4a1df22aea02358b716b
230
- moxml (0.6.1) sha256=5b7677258bbad372f0725a421f8adeae37b65d6f7871da2747e2c1906cdac7ea
231
- nokogiri (1.19.4-aarch64-linux-gnu) sha256=1269fb644a6de405057a53dd5c762b1209b43ca7424f839454d3dbc677c31a8f
232
- nokogiri (1.19.4-aarch64-linux-musl) sha256=35c65b9ce72b3bb03207bdbe7067915019dc18c1b9b59139684bd6690fdd01af
233
- nokogiri (1.19.4-arm-linux-gnu) sha256=a301313e38bb065d68239e79734bcd6f56fb6efaacebde29e9abf2a4735340ca
234
- nokogiri (1.19.4-arm-linux-musl) sha256=588923c101bcfa78869734d247d25b598674323e7f22474fc468f6e5647311eb
235
- nokogiri (1.19.4-arm64-darwin) sha256=a46db9853286e6597b36ebc6953817d15acf3a299583eb3f89fdc6f91dd63527
236
- nokogiri (1.19.4-x64-mingw-ucrt) sha256=051da97b8eccfdb5444fed40246a35e10d7298b9efe759b4cd25455ea04c587e
237
- nokogiri (1.19.4-x86_64-darwin) sha256=7fd17057d3e1f00e9954a74b3cd76595d3d4a5ef233b7ed9599047c204f70551
238
- nokogiri (1.19.4-x86_64-linux-gnu) sha256=379fae440b28915e3f19d752ce2dcf8465ed2b2fbefd2a7ca0dd497bc981a06a
239
- nokogiri (1.19.4-x86_64-linux-musl) sha256=17dfb7c1fa194ae02fbf7c51a7afc8d278045ab3fdacfd86f91d02d7b274470b
243
+ moxml (0.6.4) sha256=2038a222a367132b5fdcc40d669d67e6bb913145e4b5e5bd3b7b62fd73a25912
244
+ nokogiri (1.19.7-aarch64-linux-gnu) sha256=8f5e15d299602456406e1f03a9f3456cceb33a0722811e818d2ee2214eb4c84a
245
+ nokogiri (1.19.7-aarch64-linux-musl) sha256=efe0c3602e6e54521bc21c681930ce5568e2d11203de17400710b2b3ca2e4cb4
246
+ nokogiri (1.19.7-arm-linux-gnu) sha256=7fd1907125691aa89e838cc91161761c758b4e17bb32f0dd9b5515a82cc759af
247
+ nokogiri (1.19.7-arm-linux-musl) sha256=28d0ff0c87b6bb2e56580323a6fb049d5d4a02b94f0958fdd47e9ac146991c77
248
+ nokogiri (1.19.7-arm64-darwin) sha256=f27d7f25f4873fbc3aa35a2cc2fb680c98555fec1925348da439d0869d541142
249
+ nokogiri (1.19.7-x86_64-darwin) sha256=508e81e8c5f84aaa240dce981bf1c43faae60808726f0ce7024ee92effc5cafe
250
+ nokogiri (1.19.7-x86_64-linux-gnu) sha256=25865ccb462f714e712fdf8906fde07849cb6704a808e3d629d75baa5af5dd3b
251
+ nokogiri (1.19.7-x86_64-linux-musl) sha256=464d1f3dfb0d53cf54c0c6a7e23e8e91cf68ec3cafc2b27dc4a7682f2d9bf546
240
252
  openssl (3.3.3) sha256=d46902138f2987c13122fab826030a11c2bb9b8a16394215cbfc5062c5e2d335
241
253
  ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
242
254
  paint (2.3.0) sha256=327d623e4038619d5bd99ae5db07973859cd78400c7f0329eea283cef8e83be5
243
255
  parallel (2.3.0) sha256=f75a3e904101ce6a1ccb6b8dc800cbafd42166d83330192438dcf29395167a6f
244
- parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828
245
- prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
256
+ parser (3.3.13.0) sha256=e02f9b63c2fe05b0c68f692ba4df89b3cb113b663964f75d988fbebfd6c3deca
257
+ prism (2.1.0-aarch64-linux-gnu) sha256=808dddc72def68e1a0463689414c97e0ba211938eddbab05387a4844aa2b3ec2
258
+ prism (2.1.0-aarch64-linux-musl) sha256=dd1a0732620c1e575dabb07a297a62911fabd72f8e20ce850b522a866f877930
259
+ prism (2.1.0-arm-linux-gnu) sha256=96b2426b9dbab05448c4add735619929042be3cd7e871ff186468121b62bcfa8
260
+ prism (2.1.0-arm-linux-musl) sha256=00ef918e42a3dc98f11a461bf473586a3424b0f78bee8a4e43b5a65a5f5e2cd0
261
+ prism (2.1.0-arm64-darwin) sha256=2d0c2e3e011cfd89c041940907d3ff3def379d7b0f2ba158d1d42238e8ad8afc
262
+ prism (2.1.0-x86_64-darwin) sha256=6c645d8e6afc742956c7518220ce5106367727c4d9980ac9ab386d55004ddab4
263
+ prism (2.1.0-x86_64-linux-gnu) sha256=b2b647afce09551e650b8bb3e2fc91d7d73d392a09534ca307ec0d619c33bfd4
264
+ prism (2.1.0-x86_64-linux-musl) sha256=249f45981726923e259b927902246219fa25ad10a76f43849c9aee1a3d3ec5b8
246
265
  racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
247
266
  rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
248
267
  rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
249
268
  regexp_parser (2.13.1) sha256=5aedb6b7c35688f51e86eef17a15374dfd287c83f4ca644b2c5f3ec50a33b44b
250
269
  rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
251
- rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
252
- rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
253
- rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
254
- rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
255
- rubocop (1.92.1) sha256=a905381a5344215a79abcfe80f6c94366447e6a55347c9a525b5a24990e33f62
256
- rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
270
+ rspec-core (3.13.7) sha256=c64ff16d9788119805cbc6a3f4b6d87cc22417c2d25976a3330de136896b5469
271
+ rspec-expectations (3.13.6) sha256=bf538ca6d367ff5b0d85a87fdb5c0c6038f2cd1308a0eeba07476caa02d22f35
272
+ rspec-mocks (3.13.9) sha256=ea5c7ff3054a6098ca6039aacef80aec69d5a8a3ef80be8fc88337359b672a30
273
+ rspec-support (3.13.8) sha256=e4160030309b7e3e9d9863dfe720a35dfcc577162f5402cd68fc8c5258a0ffd6
274
+ rubocop (1.92.2) sha256=14fb31eed143a0dc6f78186c550c1715e81cd38f59d05d1165050e445c1f5382
275
+ rubocop-ast (1.51.0) sha256=0ec311e36b191b3872d909078a35274e962ae97dbce64be6812d145ca59acfcb
257
276
  rubocop-performance (1.27.0) sha256=eeeb1374d062a368ee1c787b70eb0b0cc4b184cb1f8565f424760946146d61ce
258
277
  rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d
259
278
  rubocop-rspec (3.10.2) sha256=0b3e2ecc592cd10ecbf0095bb58d1e357905276e069643523cc19eb7495f65e2
260
279
  ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
261
280
  rubyzip (3.7.0) sha256=65c19294da75297a939006f3516deacc33185fbd721ff1954f7a231db6d3e121
262
281
  strscan (3.1.8) sha256=aae2db611a225559f21ffbb71765c9a4e60fd262534a9ea84f4f11c7f32f679e
263
- svg_conform (0.2.6)
282
+ svg_conform (0.2.7)
264
283
  table_tennis (1.0.0) sha256=955f76ca4debd42ee88682af8d4554a74d533c89de4f1581bc37855b15faa956
265
284
  thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
266
285
  unicode-display_width (3.3.0) sha256=4b7aa66a4b11db50f6f7e98411215cd0dd10eaecb665d36eec5bcacb3fa0b613
267
286
  unicode-emoji (4.3.0) sha256=11c02fa73290378c066bb0562cd4c87d8e1b706fbbe0059ca12746a4244de8ce
268
287
  unicode-name (1.15.1) sha256=b8f2e3ca14bc24799f84a4f74d43a3612d02a051700d88bc6ca8e3bd53cda3f6
269
288
  unicode-types (1.12.0) sha256=7e26a4352cecc2a50325a3793df834b732581ca9f25c5e29f46f3378934363f6
289
+ yeptris (0.6.62.1-aarch64-linux) sha256=11057a57ab1312504dbf8f0aa89692d86465af375371971846d5a45ad9a40fc9
290
+ yeptris (0.6.62.1-aarch64-linux-musl) sha256=560d07a37536db5fdc51b3462cdf73eaaa5b47f34aca7c265428ef32e7246d3b
291
+ yeptris (0.6.62.1-arm-linux-eabihf) sha256=2144b498a725ef23af16f088eeba3943e73034a12c95f37d5d7274459f15a730
292
+ yeptris (0.6.62.1-arm-linux-musleabihf) sha256=486e8186cc70fed62f0c5c3b52414edfd7c24000b4dfbfdc7ba490729b89ae7b
293
+ yeptris (0.6.62.1-arm64-darwin) sha256=19f8917910248adf03475d43cf2f4f798626da820c112a28c948db8a24c8e2f1
294
+ yeptris (0.6.62.1-x86_64-darwin) sha256=c92bef3810dbbe4fddf67f9dd3b55a7dc2bb2077d0257942cdd7cccd6589d090
295
+ yeptris (0.6.62.1-x86_64-linux) sha256=5fc1f11f20afb898f10e311df7d1e111d078b2795c86a2bc58de49d681503917
296
+ yeptris (0.6.62.1-x86_64-linux-musl) sha256=67753c14a6e4c0efd40c9b08b2a3ca4199027761f6d704b6cfb27bea758f98b5
270
297
 
271
298
  BUNDLED WITH
272
- 2.7.2
299
+ 4.0.24
data/README.adoc CHANGED
@@ -35,6 +35,13 @@ SvgConform is distributed as a Ruby gem.
35
35
  * **Generic namespace handling**: Configuration-driven foreign namespace validation
36
36
  * **Text-as-path detection**: Warns when text is rendered as outlined path glyphs (quality check)
37
37
 
38
+ Profiles are consumer policy: the bundled profiles under `config/profiles/`
39
+ (including `metanorma-sample.yml`, a testing reference for the Metanorma
40
+ requirements) are samples, and the operative profile for a consumer lives
41
+ with that consumer — metanorma-standoc ships and loads its own instance by
42
+ path. Canonical diagnostics rendering rides the link:https://github.com/claricle/lens_core[lens_core]
43
+ gem, a declared runtime dependency.
44
+
38
45
 
39
46
  == Concepts
40
47
 
@@ -1,4 +1,4 @@
1
- name: "metanorma"
1
+ name: "metanorma-sample"
2
2
  description: "Metanorma SVG Profile - SVG requirements for Metanorma technical documents with embedded resources"
3
3
 
4
4
  requirements:
@@ -64,10 +64,10 @@ requirements:
64
64
  attributes: ["x", "y", "rotate", "id", "role", "fill", "style", "transform", "font-size", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "font-stretch", "writing-mode", "text-decoration", "clip-path", "mask", "textLength", "lengthAdjust"]
65
65
  allowed_children: ["desc", "title", "tspan", "text", "a"]
66
66
  - tag: "g"
67
- attributes: ["label", "class", "id", "role", "fill", "style", "transform", "fill-rule", "visibility", "base", "lang", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "data-name", "clip-path", "mask"]
67
+ attributes: ["label", "class", "id", "role", "fill", "style", "transform", "fill-rule", "visibility", "base", "lang", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "data-name", "clip-path", "clip-rule", "mask", "opacity"]
68
68
  allowed_children: ["title", "path", "rect", "circle", "line", "ellipse", "polyline", "polygon", "solidColor", "textArea", "text", "g", "defs", "use", "a", "tspan", "desc", "image"]
69
69
  - tag: "defs"
70
- attributes: ["id", "role", "fill", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
70
+ attributes: ["id", "role", "fill", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "clip-path", "mask"]
71
71
  allowed_children: ["title", "path", "rect", "circle", "line", "ellipse", "polyline", "polygon", "solidColor", "textArea", "text", "g", "defs", "use", "a", "tspan", "desc", "style", "clipPath", "linearGradient", "radialGradient", "pattern", "marker", "mask", "filter", "image"]
72
72
  - tag: "clipPath"
73
73
  attributes: ["id", "clipPathUnits", "class", "style"]
@@ -100,7 +100,7 @@ requirements:
100
100
  attributes: ["x", "y", "href", "xlink:href", "id", "role", "fill", "transform", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "clip-path", "mask"]
101
101
  allowed_children: ["title", "desc"]
102
102
  - tag: "a"
103
- attributes: ["id", "role", "fill", "transform", "fill-rule", "target", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "title"]
103
+ attributes: ["id", "role", "fill", "transform", "fill-rule", "target", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "title", "clip-path", "mask"]
104
104
  allowed_children: ["title", "path", "rect", "circle", "line", "ellipse", "polyline", "polygon", "solidColor", "textArea", "text", "g", "defs", "use", "a", "tspan", "desc"]
105
105
  - tag: "tspan"
106
106
  attributes: ["x", "y", "id", "role", "fill", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "letter-spacing"]
@@ -25,7 +25,7 @@ require 'svg_conform'
25
25
 
26
26
  # Validate an SVG file
27
27
  validator = SvgConform::Validator.new
28
- result = validator.validate_file('image.svg', profile: :metanorma)
28
+ result = validator.validate_file('image.svg', profile: :"metanorma-sample")
29
29
 
30
30
  if result.valid?
31
31
  puts "✓ SVG is valid"
@@ -90,15 +90,15 @@ Validate SVG content or document object.
90
90
  [source,ruby]
91
91
  ----
92
92
  # String input
93
- result = validator.validate(svg_string, profile: :metanorma)
93
+ result = validator.validate(svg_string, profile: :"metanorma-sample")
94
94
 
95
95
  # Nokogiri element (common in Metanorma integration)
96
96
  nokogiri_element = Nokogiri::XML(svg_string).root
97
- result = validator.validate(nokogiri_element, profile: :metanorma)
97
+ result = validator.validate(nokogiri_element, profile: :"metanorma-sample")
98
98
 
99
99
  # Moxml document
100
100
  moxml_doc = Moxml.new.parse(svg_string)
101
- result = validator.validate(moxml_doc, profile: :metanorma)
101
+ result = validator.validate(moxml_doc, profile: :"metanorma-sample")
102
102
  ----
103
103
 
104
104
  ===== validate_file(file_path, profile:, **options)
@@ -139,7 +139,7 @@ Validate multiple files.
139
139
  [source,ruby]
140
140
  ----
141
141
  files = ['image1.svg', 'image2.svg', 'image3.svg']
142
- results = validator.validate_files(files, profile: :metanorma)
142
+ results = validator.validate_files(files, profile: :"metanorma-sample")
143
143
 
144
144
  results.each do |file, result|
145
145
  puts "#{file}: #{result.valid? ? '✓' : '✗'}"
@@ -157,7 +157,7 @@ Get list of available profiles.
157
157
  [source,ruby]
158
158
  ----
159
159
  profiles = validator.available_profiles
160
- # => [:base, :svg_1_2_rfc, :metanorma, :lucid, ...]
160
+ # => [:base, :svg_1_2_rfc, :"metanorma-sample", :lucid, ...]
161
161
  ----
162
162
 
163
163
  === SvgConform::Profile
@@ -215,7 +215,7 @@ Validate a document against this profile.
215
215
 
216
216
  [source,ruby]
217
217
  ----
218
- profile = SvgConform::Profiles.get(:metanorma)
218
+ profile = SvgConform::Profiles.get(:"metanorma-sample")
219
219
  document = SvgConform::Document.from_file('image.svg')
220
220
  result = profile.validate(document)
221
221
  ----
@@ -234,7 +234,7 @@ Apply all remediations defined in the profile.
234
234
 
235
235
  [source,ruby]
236
236
  ----
237
- profile = SvgConform::Profiles.get(:metanorma)
237
+ profile = SvgConform::Profiles.get(:"metanorma-sample")
238
238
  document = SvgConform::Document.from_file('image.svg')
239
239
 
240
240
  changes = profile.apply_remediations(document)
@@ -448,7 +448,7 @@ Convert result to JSON string.
448
448
 
449
449
  [source,ruby]
450
450
  ----
451
- result = validator.validate(svg_content, profile: :metanorma)
451
+ result = validator.validate(svg_content, profile: :"metanorma-sample")
452
452
 
453
453
  puts "Valid: #{result.valid?}"
454
454
  puts "Errors: #{result.error_count}"
@@ -648,7 +648,7 @@ Get remediations from the profile.
648
648
 
649
649
  [source,ruby]
650
650
  ----
651
- profile = SvgConform::Profiles.get(:metanorma)
651
+ profile = SvgConform::Profiles.get(:"metanorma-sample")
652
652
  runner = SvgConform::RemediationRunner.new(profile: profile)
653
653
 
654
654
  result = runner.run_remediation_file('input.svg')
@@ -740,7 +740,7 @@ Get a profile by name.
740
740
 
741
741
  [source,ruby]
742
742
  ----
743
- profile = SvgConform::Profiles.get(:metanorma)
743
+ profile = SvgConform::Profiles.get(:"metanorma-sample")
744
744
  profile = SvgConform::Profiles.get('svg_1_2_rfc')
745
745
  ----
746
746
 
@@ -755,7 +755,7 @@ Get list of available profile names.
755
755
  [source,ruby]
756
756
  ----
757
757
  profiles = SvgConform::Profiles.available_profiles
758
- # => [:base, :svg_1_2_rfc, :metanorma, ...]
758
+ # => [:base, :svg_1_2_rfc, :"metanorma-sample", ...]
759
759
 
760
760
  profiles.each do |name|
761
761
  profile = SvgConform::Profiles.get(name)
@@ -778,7 +778,7 @@ end
778
778
  | `:svg_1_2_rfc_with_rdf`
779
779
  | RFC 7996 with RDF/Dublin Core metadata support
780
780
 
781
- | `:metanorma`
781
+ | `:"metanorma-sample"`
782
782
  | Metanorma document generation requirements
783
783
 
784
784
  | `:lucid`
@@ -1004,7 +1004,7 @@ Convert to hash.
1004
1004
 
1005
1005
  [source,ruby]
1006
1006
  ----
1007
- result = validator.validate(svg_content, profile: :metanorma)
1007
+ result = validator.validate(svg_content, profile: :"metanorma-sample")
1008
1008
  manifest = result.reference_manifest
1009
1009
 
1010
1010
  puts "IDs defined: #{manifest.available_ids.size}"
@@ -1121,7 +1121,7 @@ errors = []
1121
1121
 
1122
1122
  Dir.glob('images/**/*.svg') do |file|
1123
1123
  begin
1124
- result = validator.validate_file(file, profile: :metanorma)
1124
+ result = validator.validate_file(file, profile: :"metanorma-sample")
1125
1125
  results[file] = result
1126
1126
 
1127
1127
  unless result.valid?
@@ -1154,7 +1154,7 @@ end
1154
1154
 
1155
1155
  [source,ruby]
1156
1156
  ----
1157
- profile = SvgConform::Profiles.get(:metanorma)
1157
+ profile = SvgConform::Profiles.get(:"metanorma-sample")
1158
1158
  runner = SvgConform::RemediationRunner.new(profile: profile)
1159
1159
 
1160
1160
  Dir.glob('input/**/*.svg').each do |input_file|
@@ -1179,7 +1179,7 @@ end
1179
1179
 
1180
1180
  [source,ruby]
1181
1181
  ----
1182
- result = validator.validate(svg_content, profile: :metanorma)
1182
+ result = validator.validate(svg_content, profile: :"metanorma-sample")
1183
1183
  manifest = result.reference_manifest
1184
1184
 
1185
1185
  # Export manifest
@@ -1214,13 +1214,13 @@ end
1214
1214
  class SVGProcessor
1215
1215
  def initialize
1216
1216
  @validator = SvgConform::Validator.new
1217
- @profile = SvgConform::Profiles.get(:metanorma)
1217
+ @profile = SvgConform::Profiles.get(:"metanorma-sample")
1218
1218
  @runner = SvgConform::RemediationRunner.new(profile: @profile)
1219
1219
  end
1220
1220
 
1221
1221
  def process_svg_element(nokogiri_element)
1222
1222
  # Validate without serializing by user
1223
- result = @validator.validate(nokogiri_element, profile: :metanorma)
1223
+ result = @validator.validate(nokogiri_element, profile: :"metanorma-sample")
1224
1224
 
1225
1225
  if result.valid?
1226
1226
  return { status: :valid, element: nokogiri_element }
@@ -1259,7 +1259,7 @@ Raised when validation fails due to invalid input.
1259
1259
  [source,ruby]
1260
1260
  ----
1261
1261
  begin
1262
- result = validator.validate_file('missing.svg', profile: :metanorma)
1262
+ result = validator.validate_file('missing.svg', profile: :"metanorma-sample")
1263
1263
  rescue SvgConform::ValidationError => e
1264
1264
  puts "Validation error: #{e.message}"
1265
1265
  end
@@ -1342,7 +1342,7 @@ validator = SvgConform::Validator.new(mode: :dom)
1342
1342
  ----
1343
1343
  # Efficient batch processing
1344
1344
  validator = SvgConform::Validator.new(mode: :sax)
1345
- profile = SvgConform::Profiles.get(:metanorma) # Cache profile
1345
+ profile = SvgConform::Profiles.get(:"metanorma-sample") # Cache profile
1346
1346
 
1347
1347
  files.each do |file|
1348
1348
  result = validator.validate_file(file, profile: profile)