moxml-testsuite 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c83c47e9b732b9b23aa8923894275f0b5e9820c050b56363a1713a4305bd0d77
4
- data.tar.gz: 56443d6aaae65d2934e47c96903551ca474270bf5682cd23214e52908c1e6350
3
+ metadata.gz: cd1a74bafabbb9e498a6eded16276c5e8e8b6bc75be7d0c215ae50e3e45d0c18
4
+ data.tar.gz: 972dcc2695d440b46fee9379d76c6bedb1d65296bf98e9934f3ed2a6f8c021e9
5
5
  SHA512:
6
- metadata.gz: 9b921670e6cd7d478782efd840b11167ff9c9130a39635313fea482383569606c3a108ebe7be19f1edcd69de9930e7e2ba61ecd29460af0fb3fbe30d646bf865
7
- data.tar.gz: cf51812479aa486ae07c7ce65fa1407833ec1ac1c294c558a59997d72cc2b6f9cf5d89bf9fe2c36ab8f25c7a9588cac105af6bda9d8fb861c96994c131c34701
6
+ metadata.gz: 7a008e05e112cc47dd62f2c6cdbca73c70e68b5c0cc32a3707fe3517a24fe2a1bdb61d55cf5c4c93d47c52c0cbea4e7ae2e11616ff2b63b2ce2a9111088988b3
7
+ data.tar.gz: 1b43f4073fc6031d710446809d161a774f05184a3966e5d7133b012652ce1631fa2ccbc8d488a59a0aeb2c84bf9d473eba807d03e71052565816d7ee2e09bb7f
data/README.adoc CHANGED
@@ -23,7 +23,25 @@ The moxml processing model (https://github.com/lutaml/moxml — `docs/_reference
23
23
 
24
24
  == Certifying an engine
25
25
 
26
- The dataset ships vendored (`testdata/moxml-conformance.json`); the runner consumes rows and never restates them. Any object implementing the certification protocol can be certified:
26
+ The quick path is the CLI:
27
+
28
+ [source,console]
29
+ ----
30
+ $ moxml-testsuite
31
+ moxml-testsuite (facade: Moxml::TestSuite::Reference)
32
+ PASS decisions (126 cases)
33
+ PASS entity_registry (11 cases)
34
+ PASS serialization (20 cases)
35
+ PASS c14n (14 cases)
36
+ PASS xsd_structural (6 cases)
37
+
38
+ $ moxml-testsuite --adapter leptris
39
+ $ moxml-testsuite --families c14n,serialization
40
+ ----
41
+
42
+ The exit code mirrors the verdict (0 certified, 1 failed, 2 unusable adapter), so it drops straight into CI.
43
+
44
+ The library path - any object implementing the certification protocol can be certified:
27
45
 
28
46
  [source, ruby]
29
47
  ----
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "optparse"
5
+ require_relative "../lib/moxml/testsuite"
6
+
7
+ options = { adapter: nil, families: nil }
8
+
9
+ OptionParser.new do |opts|
10
+ opts.banner = "Usage: moxml-testsuite [options]"
11
+ opts.summary_width = 24
12
+
13
+ opts.on("-a", "--adapter NAME",
14
+ "The adapter to certify (default: moxml's default)") do |v|
15
+ options[:adapter] = v.to_sym
16
+ end
17
+
18
+ opts.on("-f", "--families LIST",
19
+ "Comma-separated family subset (default: all seven)") do |v|
20
+ options[:families] = v.split(",").map(&:strip)
21
+ end
22
+
23
+ opts.on("-h", "--help", "Show this help") do
24
+ puts opts
25
+ exit 0
26
+ end
27
+ end.parse!
28
+
29
+ begin
30
+ facade = Moxml::TestSuite::Reference.new(adapter: options[:adapter])
31
+ report = Moxml::TestSuite.run(facade, families: options[:families])
32
+ rescue LoadError => e
33
+ warn "moxml-testsuite: #{e.message}"
34
+ warn "moxml must be installed to run the bundled Reference facade"
35
+ exit 2
36
+ rescue Moxml::AdapterError => e
37
+ warn "moxml-testsuite: #{e.message.lines.first.strip}"
38
+ exit 2
39
+ end
40
+
41
+ puts report
42
+ exit(report.passed? ? 0 : 1)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Moxml
4
4
  module TestSuite
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moxml-testsuite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -73,12 +73,14 @@ description: The moxml model's committed answers as a certifiable test suite. En
73
73
  the model.
74
74
  email:
75
75
  - open.source@ribose.com
76
- executables: []
76
+ executables:
77
+ - moxml-testsuite
77
78
  extensions: []
78
79
  extra_rdoc_files: []
79
80
  files:
80
81
  - LICENSE
81
82
  - README.adoc
83
+ - exe/moxml-testsuite
82
84
  - lib/moxml/testsuite.rb
83
85
  - lib/moxml/testsuite/dataset.rb
84
86
  - lib/moxml/testsuite/families/c14n.rb
@@ -109,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
111
  - !ruby/object:Gem::Version
110
112
  version: '0'
111
113
  requirements: []
112
- rubygems_version: 4.0.23
114
+ rubygems_version: 4.0.20
113
115
  specification_version: 4
114
116
  summary: 'The moxml conformance test suite: certify any XML engine against the moxml
115
117
  model'