svg_conform 0.2.10 → 0.2.12
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/.github/workflows/release.yml +3 -0
- data/Gemfile +0 -1
- data/config/profiles/svg_1_2_rfc.yml +18 -0
- data/lib/svg_conform/adapter_configuration.rb +25 -0
- data/lib/svg_conform/document.rb +5 -6
- data/lib/svg_conform/remediations/disallowed_attribute_remediation.rb +42 -0
- data/lib/svg_conform/remediations/namespace_attribute_remediation.rb +30 -24
- data/lib/svg_conform/remediations.rb +2 -0
- data/lib/svg_conform/requirements/namespace_attributes_requirement.rb +3 -12
- data/lib/svg_conform/requirements/svg_1_1_document_requirement.rb +14 -13
- data/lib/svg_conform/semantic_comparator.rb +1 -1
- data/lib/svg_conform/validation/svg_1_1_document_conformance.rb +185 -23
- data/lib/svg_conform/version.rb +1 -1
- data/lib/svg_conform.rb +32 -7
- data/spec/svg_conform/adapter_configuration_spec.rb +36 -0
- data/spec/svg_conform/external_checkers/svgcheck/parser_spec.rb +52 -0
- data/spec/svg_conform/gemspec_spec.rb +1 -1
- data/spec/svg_conform/profiles_plantuml_spec.rb +14 -5
- data/spec/svg_conform/quality_metrics/configuration_spec.rb +0 -4
- data/spec/svg_conform/remediations/disallowed_attribute_remediation_spec.rb +78 -0
- data/spec/svg_conform/yaml_backend_spec.rb +103 -0
- data/svg_conform.gemspec +1 -1
- metadata +17 -12
- data/Gemfile.lock +0 -299
data/lib/svg_conform/version.rb
CHANGED
data/lib/svg_conform.rb
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
|
+
require "lutaml/yaml/adapter/yeptris_adapter"
|
|
5
|
+
require "yeptris/psych"
|
|
4
6
|
|
|
5
7
|
# lens_core is optional (0.2.5 shipped it as a hard dependency while the
|
|
6
8
|
# gem is still unpublished, which made every fresh resolve unsolvable).
|
|
@@ -12,15 +14,11 @@ rescue LoadError
|
|
|
12
14
|
nil
|
|
13
15
|
end
|
|
14
16
|
|
|
15
|
-
# Configure Lutaml::Model adapters
|
|
16
|
-
Lutaml::Model::Config.configure do |config|
|
|
17
|
-
config.xml_adapter_type = :leptris
|
|
18
|
-
config.json_adapter_type = :standard_json
|
|
19
|
-
config.yaml_adapter_type = :standard_yaml
|
|
20
|
-
end
|
|
21
|
-
|
|
22
17
|
require_relative "svg_conform/version"
|
|
18
|
+
require_relative "svg_conform/adapter_configuration"
|
|
23
19
|
require_relative "svg_conform/constants"
|
|
20
|
+
|
|
21
|
+
SvgConform::AdapterConfiguration.configure
|
|
24
22
|
require_relative "svg_conform/profile"
|
|
25
23
|
require_relative "svg_conform/profiles"
|
|
26
24
|
require_relative "svg_conform/document"
|
|
@@ -43,6 +41,33 @@ require_relative "svg_conform/fixer"
|
|
|
43
41
|
require_relative "svg_conform/external_checkers"
|
|
44
42
|
|
|
45
43
|
module SvgConform
|
|
44
|
+
# The native lutaml-model loader loses binary decoding and accepts Ruby
|
|
45
|
+
# object tags. Keep its permitted classes, using yeptris's safe loader.
|
|
46
|
+
module ModelYamlSafeLoad
|
|
47
|
+
def parse(yaml, _options = {})
|
|
48
|
+
Yeptris::Psych.safe_load(
|
|
49
|
+
yaml, permitted_classes: Lutaml::Yaml::Adapter::StandardAdapter::PERMITTED_CLASSES
|
|
50
|
+
)
|
|
51
|
+
rescue Yeptris::Psych::SyntaxError => e
|
|
52
|
+
# Preserve the adapter's Psych error boundary so lutaml-model wraps
|
|
53
|
+
# malformed input in InvalidFormatError as it does for other formats.
|
|
54
|
+
raise syntax_error(e)
|
|
55
|
+
rescue Yeptris::Psych::AliasesError
|
|
56
|
+
raise ::Psych::AliasesNotEnabled
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Keep stored YAML byte-compatible until yeptris's emitter matches the
|
|
61
|
+
# standard adapter for non-BMP text. Reads still use yeptris throughout.
|
|
62
|
+
module ModelYamlStableDump
|
|
63
|
+
def to_yaml(options = {})
|
|
64
|
+
Lutaml::Yaml::Adapter::StandardAdapter.new(@attributes).to_yaml(options)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
Lutaml::Yaml::Adapter::YeptrisAdapter.singleton_class.prepend(ModelYamlSafeLoad)
|
|
69
|
+
Lutaml::Yaml::Adapter::YeptrisAdapter.prepend(ModelYamlStableDump)
|
|
70
|
+
|
|
46
71
|
class Error < StandardError; end
|
|
47
72
|
class ParseError < Error; end
|
|
48
73
|
class ValidationError < Error; end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "spec_helper"
|
|
4
|
+
|
|
5
|
+
RSpec.describe SvgConform::AdapterConfiguration do
|
|
6
|
+
let(:resolver) { Lutaml::Model::AdapterResolver }
|
|
7
|
+
let(:formats) { %i[xml json yaml] }
|
|
8
|
+
|
|
9
|
+
around do |example|
|
|
10
|
+
saved = formats.to_h { |f| [f, resolver.configured_type(f)] }
|
|
11
|
+
formats.each { |f| resolver.unset_adapter_type(f) }
|
|
12
|
+
example.run
|
|
13
|
+
ensure
|
|
14
|
+
formats.each { |f| resolver.set_adapter_type(f, saved[f]) }
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
describe ".configure" do
|
|
18
|
+
it "pins the standalone engines when the host configured nothing" do
|
|
19
|
+
described_class.configure
|
|
20
|
+
|
|
21
|
+
expect(resolver.configured_type(:xml)).to eq(:leptris)
|
|
22
|
+
expect(resolver.configured_type(:json)).to eq(:standard_json)
|
|
23
|
+
expect(resolver.configured_type(:yaml)).to eq(:yeptris)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it "leaves a host-configured xml adapter untouched" do
|
|
27
|
+
resolver.set_adapter_type(:xml, :nokogiri)
|
|
28
|
+
|
|
29
|
+
described_class.configure
|
|
30
|
+
|
|
31
|
+
expect(resolver.configured_type(:xml)).to eq(:nokogiri)
|
|
32
|
+
expect(resolver.configured_type(:json)).to eq(:standard_json)
|
|
33
|
+
expect(resolver.configured_type(:yaml)).to eq(:yeptris)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "spec_helper"
|
|
4
|
+
require "psych"
|
|
5
|
+
require "tempfile"
|
|
6
|
+
|
|
7
|
+
RSpec.describe SvgConform::ExternalCheckers::Svgcheck::Parser do
|
|
8
|
+
describe "mapping config loading" do
|
|
9
|
+
let(:yaml) do
|
|
10
|
+
<<~YAML
|
|
11
|
+
message_patterns:
|
|
12
|
+
- pattern: "Element (\\\\w+) is not allowed"
|
|
13
|
+
requirement: forbidden_content
|
|
14
|
+
requirement_mappings:
|
|
15
|
+
forbidden_content:
|
|
16
|
+
- script
|
|
17
|
+
skip_patterns:
|
|
18
|
+
- "^Warning:"
|
|
19
|
+
special_rules: {}
|
|
20
|
+
YAML
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
let(:file) { Tempfile.new(["svgcheck_mapping", ".yml"]) }
|
|
24
|
+
let(:path) { file.path }
|
|
25
|
+
|
|
26
|
+
before do
|
|
27
|
+
file.write(yaml)
|
|
28
|
+
file.flush
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
after { file.close! }
|
|
32
|
+
|
|
33
|
+
it "loads message_patterns, requirement_mappings and skip_patterns" do
|
|
34
|
+
config = described_class.new(path).mapping_config
|
|
35
|
+
|
|
36
|
+
expect(config["message_patterns"]).to be_an(Array)
|
|
37
|
+
expect(config["requirement_mappings"]).to eq("forbidden_content" => ["script"])
|
|
38
|
+
expect(config["skip_patterns"]).to eq(["^Warning:"])
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
it "loads the same hash as Psych" do
|
|
42
|
+
expect(described_class.new(path).mapping_config).to eq(Psych.load_file(path))
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
it "loads the bundled mapping config the same as Psych" do
|
|
46
|
+
path = File.expand_path("../../../../config/svgcheck_mapping.yml", __dir__)
|
|
47
|
+
skip "no bundled mapping" unless File.exist?(path)
|
|
48
|
+
|
|
49
|
+
expect(described_class.new(path).mapping_config).to eq(Psych.load_file(path))
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -46,7 +46,7 @@ RSpec.describe "svg_conform.gemspec" do # rubocop:disable RSpec/DescribeClass
|
|
|
46
46
|
skip "no committed lockfile (release context)" unless File.exist?("Gemfile.lock")
|
|
47
47
|
|
|
48
48
|
lock = File.read("Gemfile.lock")
|
|
49
|
-
path_version = lock[
|
|
49
|
+
path_version = lock[/^PATH\n remote: \.\n specs:\n svg_conform \(([^)]+)\)/, 1]
|
|
50
50
|
expect(path_version).to eq(SvgConform::VERSION)
|
|
51
51
|
end
|
|
52
52
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "spec_helper"
|
|
4
|
-
require "
|
|
4
|
+
require "moxml"
|
|
5
5
|
|
|
6
6
|
RSpec.describe SvgConform::Profiles do
|
|
7
7
|
let(:validator) { SvgConform::Validator.new(mode: :sax) }
|
|
@@ -19,6 +19,14 @@ RSpec.describe SvgConform::Profiles do
|
|
|
19
19
|
SVG
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
def svg_namespace
|
|
23
|
+
"http://www.w3.org/2000/svg"
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def xlink_namespace
|
|
27
|
+
"http://www.w3.org/1999/xlink"
|
|
28
|
+
end
|
|
29
|
+
|
|
22
30
|
it "accepts the five explicit layout and link attributes" do
|
|
23
31
|
result = validator.validate(svg, profile: profile)
|
|
24
32
|
expect(result.errors.map(&:message)).to be_empty
|
|
@@ -68,14 +76,15 @@ RSpec.describe SvgConform::Profiles do
|
|
|
68
76
|
end
|
|
69
77
|
|
|
70
78
|
def text_layout(xml)
|
|
71
|
-
|
|
72
|
-
[node.
|
|
79
|
+
Moxml.parse(xml).xpath("//svg:text", "svg" => svg_namespace).map do |node|
|
|
80
|
+
[node.content, node["x"], node["y"], node["textLength"], node["lengthAdjust"]]
|
|
73
81
|
end
|
|
74
82
|
end
|
|
75
83
|
|
|
76
84
|
def diagram_links(xml)
|
|
77
|
-
|
|
78
|
-
|
|
85
|
+
Moxml.parse(xml).xpath("//svg:a", "svg" => svg_namespace).map do |node|
|
|
86
|
+
href = node.attributes.find { |attr| attr.namespace&.uri == xlink_namespace }
|
|
87
|
+
[node["title"], href&.value]
|
|
79
88
|
end
|
|
80
89
|
end
|
|
81
90
|
end
|
|
@@ -37,8 +37,6 @@ RSpec.describe SvgConform::QualityMetrics::Configuration do
|
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
it "preserves quoted Symbol values" do
|
|
40
|
-
pending "yeptris differs from Psych: quoted Symbols retain quotes; upstream issue to be filed, see PR description"
|
|
41
|
-
|
|
42
40
|
config = load_yaml('a: :"x y"')
|
|
43
41
|
|
|
44
42
|
expect(config.instance_variable_get(:@hash)).to eq("a" => :"x y")
|
|
@@ -50,8 +48,6 @@ RSpec.describe SvgConform::QualityMetrics::Configuration do
|
|
|
50
48
|
end
|
|
51
49
|
|
|
52
50
|
it "rejects disallowed times with the yeptris error naming Time" do
|
|
53
|
-
pending "yeptris differs from Psych: disallowed Time is reported as Date; upstream issue to be filed, see PR description"
|
|
54
|
-
|
|
55
51
|
expect { load_yaml("f: 2024-01-02 10:00:00\n") }
|
|
56
52
|
.to raise_error(Yeptris::Psych::DisallowedClass, /Time/)
|
|
57
53
|
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "spec_helper"
|
|
4
|
+
|
|
5
|
+
RSpec.describe SvgConform::Remediations::DisallowedAttributeRemediation do
|
|
6
|
+
# svg_1_2_rfc#88: Inkscape-authored documents carry enable-background
|
|
7
|
+
# on the root svg element; the attribute is removed in SVG 1.2 RFC
|
|
8
|
+
# (never rendered), so the remediation strips it wherever it rides.
|
|
9
|
+
|
|
10
|
+
let(:remediation) do
|
|
11
|
+
described_class.new(
|
|
12
|
+
id: "enable_background_removal",
|
|
13
|
+
description: "Remove enable-background",
|
|
14
|
+
targets: ["allowed_elements"],
|
|
15
|
+
attributes: ["enable-background"],
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
let(:document) { SvgConform::Document.from_content(src) }
|
|
20
|
+
|
|
21
|
+
context "with enable-background on the root svg element" do
|
|
22
|
+
let(:src) do
|
|
23
|
+
<<~SVG
|
|
24
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"
|
|
25
|
+
enable-background="new 0 0 10 10">
|
|
26
|
+
<rect width="5" height="5"/>
|
|
27
|
+
</svg>
|
|
28
|
+
SVG
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
it "removes the attribute" do
|
|
32
|
+
changes = remediation.apply(document, nil)
|
|
33
|
+
|
|
34
|
+
expect(changes.map { |c| c[:attribute] }).to eq(["enable-background"])
|
|
35
|
+
expect(document.to_xml).not_to include("enable-background")
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
it "leaves every other attribute in place" do
|
|
39
|
+
remediation.apply(document, nil)
|
|
40
|
+
|
|
41
|
+
expect(document.to_xml).to include(%(width="10"))
|
|
42
|
+
expect(document.to_xml).to include(%(height="10"))
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
context "with enable-background on nested elements" do
|
|
47
|
+
let(:src) do
|
|
48
|
+
<<~SVG
|
|
49
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10">
|
|
50
|
+
<g enable-background="new">
|
|
51
|
+
<rect enable-background="new" width="5" height="5"/>
|
|
52
|
+
</g>
|
|
53
|
+
</svg>
|
|
54
|
+
SVG
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it "removes every occurrence" do
|
|
58
|
+
changes = remediation.apply(document, nil)
|
|
59
|
+
|
|
60
|
+
expect(changes.size).to eq(2)
|
|
61
|
+
expect(document.to_xml).not_to include("enable-background")
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
context "with the attribute absent" do
|
|
66
|
+
let(:src) do
|
|
67
|
+
<<~SVG
|
|
68
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10">
|
|
69
|
+
<rect width="5" height="5"/>
|
|
70
|
+
</svg>
|
|
71
|
+
SVG
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
it "reports no changes" do
|
|
75
|
+
expect(remediation.apply(document, nil)).to be_empty
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "spec_helper"
|
|
4
|
+
require "yeptris/psych"
|
|
5
|
+
|
|
6
|
+
RSpec.describe "SvgConform" do
|
|
7
|
+
it "uses yeptris for lutaml-model YAML serialization" do
|
|
8
|
+
expect(Lutaml::Model::Config.yaml_adapter_type).to eq(:yeptris)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
Dir.glob(File.join(SvgConform::Profile::PROFILES_DIR, "*.yml")).each do |path|
|
|
12
|
+
it "loads the bundled #{File.basename(path)} profile through yeptris" do
|
|
13
|
+
expect(Lutaml::Yaml::Adapter::YeptrisAdapter).to receive(:parse).and_call_original
|
|
14
|
+
|
|
15
|
+
profile = SvgConform::Profile.load_from_file(path)
|
|
16
|
+
expected = Psych.safe_load_file(path)
|
|
17
|
+
|
|
18
|
+
expect(profile.name).to eq(expected.fetch("name"))
|
|
19
|
+
expect(profile.requirements.map(&:id))
|
|
20
|
+
.to eq(expected.fetch("requirements", []).map { |requirement| requirement.fetch("id") })
|
|
21
|
+
expect(Array(profile.remediations).map(&:id))
|
|
22
|
+
.to eq(expected.fetch("remediations", []).map { |remediation| remediation.fetch("id") })
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it "loads conformance reports through yeptris" do
|
|
27
|
+
expect(Lutaml::Yaml::Adapter::YeptrisAdapter).to receive(:parse).and_call_original
|
|
28
|
+
|
|
29
|
+
report = SvgConform::ConformanceReport.from_yaml(<<~YAML)
|
|
30
|
+
filename: example.svg
|
|
31
|
+
valid: false
|
|
32
|
+
errors:
|
|
33
|
+
total_count: 1
|
|
34
|
+
by_requirement:
|
|
35
|
+
viewbox_required: 1
|
|
36
|
+
issues:
|
|
37
|
+
- requirement_id: viewbox_required
|
|
38
|
+
message: Missing viewBox
|
|
39
|
+
line: 2
|
|
40
|
+
YAML
|
|
41
|
+
|
|
42
|
+
expect(report.filename).to eq("example.svg")
|
|
43
|
+
expect(report.valid).to be(false)
|
|
44
|
+
expect(report.errors.total_count).to eq(1)
|
|
45
|
+
expect(report.errors.by_requirement).to eq("viewbox_required" => 1)
|
|
46
|
+
expect(report.errors.issues.first.message).to eq("Missing viewBox")
|
|
47
|
+
expect(report.errors.issues.first.line).to eq(2)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
it "rejects non-permitted Ruby object tags in model YAML" do
|
|
51
|
+
yaml = "filename: !ruby/object:OpenStruct {}\nvalid: false\n"
|
|
52
|
+
|
|
53
|
+
expect { SvgConform::ConformanceReport.from_yaml(yaml) }
|
|
54
|
+
.to raise_error(Yeptris::Psych::DisallowedClass, /OpenStruct/)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it "decodes binary values in model YAML" do
|
|
58
|
+
report = SvgConform::ConformanceReport.from_yaml("filename: !!binary aGVsbG8=\n")
|
|
59
|
+
|
|
60
|
+
expect(report.filename).to eq("hello")
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
it "wraps malformed profile YAML in lutaml-model's format error" do
|
|
64
|
+
expect { SvgConform::Profile.from_yaml("name: [unclosed\n") }
|
|
65
|
+
.to raise_error(Lutaml::Model::InvalidFormatError)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
it "wraps malformed conformance report YAML in lutaml-model's format error" do
|
|
69
|
+
expect { SvgConform::ConformanceReport.from_yaml("filename: \"x\n valid: : :\n") }
|
|
70
|
+
.to raise_error(Lutaml::Model::InvalidFormatError)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
it "preserves the Psych alias rejection class for model YAML" do
|
|
74
|
+
expect do
|
|
75
|
+
SvgConform::ConformanceReport.from_yaml("a: &x foo.svg\nfilename: *x\n")
|
|
76
|
+
end.to raise_error(Psych::AliasesNotEnabled)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
it "preserves the standard adapter's emitted bytes for non-ASCII model text" do
|
|
80
|
+
report = SvgConform::ConformanceReport.new(filename: "émoji 🚀")
|
|
81
|
+
expected = Lutaml::Model::Config.with_adapter(yaml: :standard_yaml) do
|
|
82
|
+
report.to_yaml
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
expect(report.to_yaml).to eq(expected)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
it "keeps lib free of yaml requires and bare YAML or Psych calls" do
|
|
89
|
+
lib_dir = File.expand_path("../../lib", __dir__)
|
|
90
|
+
forbidden = /\brequire\s*(?:\(\s*)?["']yaml["']|(?<![\w:])(?:::)?(?:YAML|Psych)\s*\./
|
|
91
|
+
violations = Dir.glob("#{lib_dir}/**/*").select { |path| File.file?(path) }
|
|
92
|
+
.flat_map do |path|
|
|
93
|
+
File.readlines(path).each_with_index.filter_map do |line, index|
|
|
94
|
+
next unless line.match?(forbidden)
|
|
95
|
+
|
|
96
|
+
"#{path.delete_prefix("#{lib_dir}/")}:#{index + 1}: #{line.strip}"
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
expect(violations).to be_empty,
|
|
101
|
+
"Use SvgConform::YamlIO or Yeptris::Psych in lib/:\n#{violations.join("\n")}"
|
|
102
|
+
end
|
|
103
|
+
end
|
data/svg_conform.gemspec
CHANGED
|
@@ -35,9 +35,9 @@ Gem::Specification.new do |spec|
|
|
|
35
35
|
# crashed on strict bundler deployments, claricle/svg_conform#130).
|
|
36
36
|
# lens_core 0.1.0 is published, so the 0.2.5-era optionality is obsolete.
|
|
37
37
|
spec.add_dependency "lens_core", "~> 0.1"
|
|
38
|
+
spec.add_dependency "leptris", "~> 1.9"
|
|
38
39
|
spec.add_dependency "lutaml-model", "~> 0.8.155"
|
|
39
40
|
spec.add_dependency "moxml", "~> 0.6.0"
|
|
40
|
-
spec.add_dependency "nokogiri", "~> 1.16"
|
|
41
41
|
spec.add_dependency "rainbow"
|
|
42
42
|
spec.add_dependency "table_tennis"
|
|
43
43
|
spec.add_dependency "thor"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: svg_conform
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-12-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lens_core
|
|
@@ -25,47 +25,47 @@ dependencies:
|
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0.1'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: leptris
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
33
|
+
version: '1.9'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: '1.9'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: lutaml-model
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.
|
|
47
|
+
version: 0.8.155
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.
|
|
54
|
+
version: 0.8.155
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
56
|
+
name: moxml
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
61
|
+
version: 0.6.0
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
68
|
+
version: 0.6.0
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rainbow
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -141,7 +141,6 @@ files:
|
|
|
141
141
|
- CLAUDE.md
|
|
142
142
|
- CODE_OF_CONDUCT.md
|
|
143
143
|
- Gemfile
|
|
144
|
-
- Gemfile.lock
|
|
145
144
|
- README.adoc
|
|
146
145
|
- Rakefile
|
|
147
146
|
- TODO.issue-100/00-overview.md
|
|
@@ -183,6 +182,7 @@ files:
|
|
|
183
182
|
- examples/requirements_demo.rb
|
|
184
183
|
- exe/svg_conform
|
|
185
184
|
- lib/svg_conform.rb
|
|
185
|
+
- lib/svg_conform/adapter_configuration.rb
|
|
186
186
|
- lib/svg_conform/batch_report.rb
|
|
187
187
|
- lib/svg_conform/classification_cache.rb
|
|
188
188
|
- lib/svg_conform/cli.rb
|
|
@@ -252,6 +252,7 @@ files:
|
|
|
252
252
|
- lib/svg_conform/remediations.rb
|
|
253
253
|
- lib/svg_conform/remediations/base_remediation.rb
|
|
254
254
|
- lib/svg_conform/remediations/color_remediation.rb
|
|
255
|
+
- lib/svg_conform/remediations/disallowed_attribute_remediation.rb
|
|
255
256
|
- lib/svg_conform/remediations/font_embedding_remediation.rb
|
|
256
257
|
- lib/svg_conform/remediations/font_remediation.rb
|
|
257
258
|
- lib/svg_conform/remediations/image_embedding_remediation.rb
|
|
@@ -544,6 +545,7 @@ files:
|
|
|
544
545
|
- spec/fixtures/viewbox_required/repair/missing_viewbox.svg
|
|
545
546
|
- spec/spec_helper.rb
|
|
546
547
|
- spec/support/shared_examples_for_validation_modes.rb
|
|
548
|
+
- spec/svg_conform/adapter_configuration_spec.rb
|
|
547
549
|
- spec/svg_conform/batch_report_spec.rb
|
|
548
550
|
- spec/svg_conform/commands/check_command_spec.rb
|
|
549
551
|
- spec/svg_conform/commands/profiles_command_spec.rb
|
|
@@ -553,6 +555,7 @@ files:
|
|
|
553
555
|
- spec/svg_conform/conformance_report_spec.rb
|
|
554
556
|
- spec/svg_conform/diagnostics/lens_core_adapter_spec.rb
|
|
555
557
|
- spec/svg_conform/errors/validation_issue_spec.rb
|
|
558
|
+
- spec/svg_conform/external_checkers/svgcheck/parser_spec.rb
|
|
556
559
|
- spec/svg_conform/gemspec_spec.rb
|
|
557
560
|
- spec/svg_conform/profiles/base_profile_spec.rb
|
|
558
561
|
- spec/svg_conform/profiles/lucid_fix_profile_spec.rb
|
|
@@ -570,6 +573,7 @@ files:
|
|
|
570
573
|
- spec/svg_conform/references/reference_classifier_spec.rb
|
|
571
574
|
- spec/svg_conform/references/reference_manifest_spec.rb
|
|
572
575
|
- spec/svg_conform/remediations/color_remediation_spec.rb
|
|
576
|
+
- spec/svg_conform/remediations/disallowed_attribute_remediation_spec.rb
|
|
573
577
|
- spec/svg_conform/remediations/font_embedding_remediation_spec.rb
|
|
574
578
|
- spec/svg_conform/remediations/font_remediation_spec.rb
|
|
575
579
|
- spec/svg_conform/remediations/image_embedding_remediation_spec.rb
|
|
@@ -605,6 +609,7 @@ files:
|
|
|
605
609
|
- spec/svg_conform/validation_context_spec.rb
|
|
606
610
|
- spec/svg_conform/validation_result_spec.rb
|
|
607
611
|
- spec/svg_conform/validator_input_types_spec.rb
|
|
612
|
+
- spec/svg_conform/yaml_backend_spec.rb
|
|
608
613
|
- spec/svg_conform/yaml_io_spec.rb
|
|
609
614
|
- spec/svg_conform_spec.rb
|
|
610
615
|
- spec/svgcheck_compatibility_spec.rb
|