moxml 0.5.177 → 0.6.0
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/nightly-fuzz.yml +0 -14
- data/.github/workflows/performance-release.yml +0 -13
- data/.github/workflows/performance.yml +0 -17
- data/.github/workflows/rake.yml +0 -38
- data/.github/workflows/round-trip.yml +0 -45
- data/.github/workflows/windows.yml +0 -12
- data/Gemfile +4 -14
- data/README.adoc +5 -388
- data/Rakefile +2 -179
- data/docs/_references/processing-model.adoc +3 -2
- data/lib/moxml/adapter/customized_oga.rb +6 -4
- data/lib/moxml/adapter/customized_rexml.rb +5 -3
- data/lib/moxml/adapter/headed_ox.rb +0 -2
- data/lib/moxml/adapter/leptris.rb +43 -7
- data/lib/moxml/adapter/libxml.rb +0 -2
- data/lib/moxml/adapter/nokogiri.rb +0 -2
- data/lib/moxml/adapter/ox.rb +0 -2
- data/lib/moxml/adapter/rexml.rb +1 -3
- data/lib/moxml/adapter.rb +1 -6
- data/lib/moxml/config.rb +0 -17
- data/lib/moxml/entity_registry.rb +1 -5
- data/lib/moxml/native_attachment.rb +1 -3
- data/lib/moxml/version.rb +1 -1
- data/lib/moxml.rb +1 -2
- data/spec/moxml/adapter/platform_spec.rb +2 -47
- data/spec/moxml/adapter_capabilities_spec.rb +25 -0
- data/spec/moxml/native_attachment_spec.rb +4 -50
- data/spec/moxml/signature/edge_cases_spec.rb +0 -1
- data/spec/spec_helper.rb +13 -31
- metadata +2 -22
- data/.github/workflows/opal.yml +0 -61
- data/.gitmodules +0 -6
- data/lib/compat/opal/moxml_boot.rb +0 -68
- data/lib/compat/opal/rexml/namespace.rb +0 -59
- data/lib/compat/opal/rexml/parsers/baseparser.rb +0 -1016
- data/lib/compat/opal/rexml/source.rb +0 -214
- data/lib/compat/opal/rexml/text.rb +0 -426
- data/lib/compat/opal/rexml/xmltokens.rb +0 -45
- data/lib/compat/opal/rexml_compat.rb +0 -77
- data/lib/moxml/entity_registry_opal_data.rb +0 -2138
- data/lib/moxml/native_attachment/opal.rb +0 -38
- data/spec/moxml/native_attachment/opal_spec.rb +0 -66
- data/spec/moxml/opal_oga_adapter_spec.rb +0 -20
- data/spec/moxml/opal_oga_features_spec.rb +0 -212
- data/spec/moxml/opal_oga_smoke_spec.rb +0 -35
- data/spec/moxml/opal_rexml_adapter_spec.rb +0 -14
- data/spec/moxml/opal_smoke_spec.rb +0 -61
- data/spec/moxml/reference_opal_spec.rb +0 -29
- data/spec/moxml/signature_autoload_spec.rb +0 -52
- data/spec/support/opal.rb +0 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66a0ad64613ea6615d2876c58138a4e492bf986f6c26f73482a0848e522aef1c
|
|
4
|
+
data.tar.gz: 89333eb6b5d1cb8f74ca6fc5858bf60c596fb364157f11e20d812305f14d7571
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb40893e92da115a23d16699e9fd520dfcf5f0d3df708da67bedc907e794b2c75074f6b1fe4f44491df7e402cbbcd0fc81ff62504e7850f98796327dd9dfcb64
|
|
7
|
+
data.tar.gz: be8ef56d26910c2d50b8e8a29b52c2bcb3b558b5eddffc4a07382c1407b97617a2706b17d888ac48e1433034724806cd2eea69d6aedf70e20dd29b3be9749d16
|
|
@@ -20,8 +20,6 @@ jobs:
|
|
|
20
20
|
runs-on: ubuntu-latest
|
|
21
21
|
steps:
|
|
22
22
|
- uses: actions/checkout@v6
|
|
23
|
-
with:
|
|
24
|
-
submodules: "recursive"
|
|
25
23
|
|
|
26
24
|
- name: Set up Ruby
|
|
27
25
|
uses: ruby/setup-ruby@v1
|
|
@@ -29,21 +27,9 @@ jobs:
|
|
|
29
27
|
ruby-version: "3.4"
|
|
30
28
|
bundler-cache: false
|
|
31
29
|
|
|
32
|
-
- name: Install ragel
|
|
33
|
-
run: sudo apt-get update && sudo apt-get install -y ragel
|
|
34
|
-
|
|
35
|
-
- name: Install ruby-ll (for rake vendor:prepare)
|
|
36
|
-
run: gem install ruby-ll --no-document
|
|
37
|
-
|
|
38
|
-
- name: Generate ragel / ruby-ll outputs in vendored forks
|
|
39
|
-
run: rake vendor:prepare
|
|
40
|
-
|
|
41
30
|
- name: Install dependencies
|
|
42
31
|
run: bundle install
|
|
43
32
|
|
|
44
|
-
- name: Compile liboga / libll native extensions
|
|
45
|
-
run: rake vendor:compile
|
|
46
|
-
|
|
47
33
|
- name: Pick fuzz seeds
|
|
48
34
|
run: |
|
|
49
35
|
SEEDS=$(ruby -e 'srand; puts Array.new(3) { rand(1_000_000) }.join(",")')
|
|
@@ -44,7 +44,6 @@ jobs:
|
|
|
44
44
|
# main moves between the release and this report. A manual
|
|
45
45
|
# dispatch may pin any tree (backfills).
|
|
46
46
|
ref: ${{ inputs.ref || github.event.workflow_run.head_sha || 'main' }}
|
|
47
|
-
submodules: "recursive"
|
|
48
47
|
|
|
49
48
|
- name: Set up Ruby
|
|
50
49
|
uses: ruby/setup-ruby@v1
|
|
@@ -52,21 +51,9 @@ jobs:
|
|
|
52
51
|
ruby-version: "3.3"
|
|
53
52
|
bundler-cache: false
|
|
54
53
|
|
|
55
|
-
- name: Install ragel
|
|
56
|
-
run: sudo apt-get update && sudo apt-get install -y ragel
|
|
57
|
-
|
|
58
|
-
- name: Install ruby-ll (for rake vendor:prepare)
|
|
59
|
-
run: gem install ruby-ll --no-document
|
|
60
|
-
|
|
61
|
-
- name: Generate ragel / ruby-ll outputs in vendored forks
|
|
62
|
-
run: rake vendor:prepare
|
|
63
|
-
|
|
64
54
|
- name: Install dependencies
|
|
65
55
|
run: bundle install
|
|
66
56
|
|
|
67
|
-
- name: Compile liboga / libll native extensions
|
|
68
|
-
run: rake vendor:compile
|
|
69
|
-
|
|
70
57
|
- name: Let the runner settle after the build
|
|
71
58
|
run: |
|
|
72
59
|
# The compile steps above push the 1-minute load past the
|
|
@@ -22,33 +22,16 @@ jobs:
|
|
|
22
22
|
runs-on: ubuntu-24.04
|
|
23
23
|
steps:
|
|
24
24
|
- uses: actions/checkout@v6
|
|
25
|
-
with:
|
|
26
|
-
submodules: "recursive"
|
|
27
25
|
|
|
28
26
|
- name: Set up Ruby
|
|
29
27
|
uses: ruby/setup-ruby@v1
|
|
30
28
|
with:
|
|
31
29
|
ruby-version: "3.3"
|
|
32
|
-
# bundler-cache is disabled because the path-source oga and
|
|
33
|
-
# ruby-ll forks need generated outputs before their C
|
|
34
|
-
# extensions can compile.
|
|
35
30
|
bundler-cache: false
|
|
36
31
|
|
|
37
|
-
- name: Install ragel
|
|
38
|
-
run: sudo apt-get update && sudo apt-get install -y ragel
|
|
39
|
-
|
|
40
|
-
- name: Install ruby-ll (for rake vendor:prepare)
|
|
41
|
-
run: gem install ruby-ll --no-document
|
|
42
|
-
|
|
43
|
-
- name: Generate ragel / ruby-ll outputs in vendored forks
|
|
44
|
-
run: rake vendor:prepare
|
|
45
|
-
|
|
46
32
|
- name: Install dependencies
|
|
47
33
|
run: bundle install
|
|
48
34
|
|
|
49
|
-
- name: Compile liboga / libll native extensions
|
|
50
|
-
run: rake vendor:compile
|
|
51
|
-
|
|
52
35
|
- name: Let the runner settle after the build
|
|
53
36
|
run: |
|
|
54
37
|
# The compile steps above push the 1-minute load past the
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -21,40 +21,16 @@ jobs:
|
|
|
21
21
|
runs-on: ubuntu-latest
|
|
22
22
|
steps:
|
|
23
23
|
- uses: actions/checkout@v6
|
|
24
|
-
with:
|
|
25
|
-
submodules: "recursive"
|
|
26
24
|
|
|
27
25
|
- name: Set up Ruby
|
|
28
26
|
uses: ruby/setup-ruby@v1
|
|
29
27
|
with:
|
|
30
28
|
ruby-version: "3.3"
|
|
31
|
-
# bundler-cache is disabled because the path-source oga
|
|
32
|
-
# and ruby-ll forks need ragel + ruby-ll outputs generated
|
|
33
|
-
# (rake vendor:prepare) before their C extensions can compile.
|
|
34
29
|
bundler-cache: false
|
|
35
30
|
|
|
36
|
-
- name: Install ragel
|
|
37
|
-
run: sudo apt-get update && sudo apt-get install -y ragel
|
|
38
|
-
|
|
39
|
-
- name: Install ruby-ll (for rake vendor:prepare)
|
|
40
|
-
run: gem install ruby-ll --no-document
|
|
41
|
-
|
|
42
|
-
- name: Generate ragel / ruby-ll outputs in vendored forks
|
|
43
|
-
# Run before `bundle install`: the path-source oga/ruby-ll forks
|
|
44
|
-
# gitignore their generated .rb/.c files (parser.rb, lexer.rb,
|
|
45
|
-
# ext/c/lexer.c). bundle install compiles the C extensions via
|
|
46
|
-
# each fork's extconf.rb, which requires ext/c/lexer.c to exist.
|
|
47
|
-
run: rake vendor:prepare
|
|
48
|
-
|
|
49
31
|
- name: Install dependencies
|
|
50
32
|
run: bundle install
|
|
51
33
|
|
|
52
|
-
- name: Compile liboga / libll native extensions
|
|
53
|
-
# Bundler does not reliably build path-source gems' native
|
|
54
|
-
# extensions; compile them explicitly so `require "oga"` (which
|
|
55
|
-
# requires libll) resolves under CRuby.
|
|
56
|
-
run: rake vendor:compile
|
|
57
|
-
|
|
58
34
|
- name: Run fast tests (unit + adapter + integration)
|
|
59
35
|
run: bundle exec rake spec:fast
|
|
60
36
|
|
|
@@ -80,8 +56,6 @@ jobs:
|
|
|
80
56
|
runs-on: ubuntu-latest
|
|
81
57
|
steps:
|
|
82
58
|
- uses: actions/checkout@v6
|
|
83
|
-
with:
|
|
84
|
-
submodules: "recursive"
|
|
85
59
|
|
|
86
60
|
- name: Set up Ruby
|
|
87
61
|
uses: ruby/setup-ruby@v1
|
|
@@ -89,20 +63,8 @@ jobs:
|
|
|
89
63
|
ruby-version: "3.4"
|
|
90
64
|
bundler-cache: false
|
|
91
65
|
|
|
92
|
-
- name: Install ragel
|
|
93
|
-
run: sudo apt-get update && sudo apt-get install -y ragel
|
|
94
|
-
|
|
95
|
-
- name: Install ruby-ll (for rake vendor:prepare)
|
|
96
|
-
run: gem install ruby-ll --no-document
|
|
97
|
-
|
|
98
|
-
- name: Generate ragel / ruby-ll outputs in vendored forks
|
|
99
|
-
run: rake vendor:prepare
|
|
100
|
-
|
|
101
66
|
- name: Install dependencies
|
|
102
67
|
run: bundle install
|
|
103
68
|
|
|
104
|
-
- name: Compile liboga / libll native extensions
|
|
105
|
-
run: rake vendor:compile
|
|
106
|
-
|
|
107
69
|
- name: Full battery at the fixed seed
|
|
108
70
|
run: bundle exec rspec --order rand:424242
|
|
@@ -27,33 +27,16 @@ jobs:
|
|
|
27
27
|
category: [ metanorma, rfcxml, niso-jats ]
|
|
28
28
|
steps:
|
|
29
29
|
- uses: actions/checkout@v6
|
|
30
|
-
with:
|
|
31
|
-
submodules: "recursive"
|
|
32
30
|
|
|
33
31
|
- name: Set up Ruby
|
|
34
32
|
uses: ruby/setup-ruby@v1
|
|
35
33
|
with:
|
|
36
34
|
ruby-version: ${{ matrix.ruby }}
|
|
37
|
-
# bundler-cache is disabled because the path-source oga
|
|
38
|
-
# and ruby-ll forks need ragel + ruby-ll outputs generated
|
|
39
|
-
# (rake vendor:prepare) before their C extensions can compile.
|
|
40
35
|
bundler-cache: false
|
|
41
36
|
|
|
42
|
-
- name: Install ragel
|
|
43
|
-
run: sudo apt-get update && sudo apt-get install -y ragel
|
|
44
|
-
|
|
45
|
-
- name: Install ruby-ll (for rake vendor:prepare)
|
|
46
|
-
run: gem install ruby-ll --no-document
|
|
47
|
-
|
|
48
|
-
- name: Generate ragel / ruby-ll outputs in vendored forks
|
|
49
|
-
run: rake vendor:prepare
|
|
50
|
-
|
|
51
37
|
- name: Install dependencies
|
|
52
38
|
run: bundle install
|
|
53
39
|
|
|
54
|
-
- name: Compile liboga / libll native extensions
|
|
55
|
-
run: rake vendor:compile
|
|
56
|
-
|
|
57
40
|
- name: Run round-trip tests (${{ matrix.category }})
|
|
58
41
|
run: bundle exec rspec spec/consistency/ --tag round_trip --tag fixture_category:${{ matrix.category }}
|
|
59
42
|
env:
|
|
@@ -70,8 +53,6 @@ jobs:
|
|
|
70
53
|
category: [ metanorma, rfcxml, niso-jats ]
|
|
71
54
|
steps:
|
|
72
55
|
- uses: actions/checkout@v6
|
|
73
|
-
with:
|
|
74
|
-
submodules: "recursive"
|
|
75
56
|
|
|
76
57
|
- name: Set up Ruby
|
|
77
58
|
uses: ruby/setup-ruby@v1
|
|
@@ -79,21 +60,9 @@ jobs:
|
|
|
79
60
|
ruby-version: ${{ matrix.ruby }}
|
|
80
61
|
bundler-cache: false
|
|
81
62
|
|
|
82
|
-
- name: Install ragel
|
|
83
|
-
run: sudo apt-get update && sudo apt-get install -y ragel
|
|
84
|
-
|
|
85
|
-
- name: Install ruby-ll (for rake vendor:prepare)
|
|
86
|
-
run: gem install ruby-ll --no-document
|
|
87
|
-
|
|
88
|
-
- name: Generate ragel / ruby-ll outputs in vendored forks
|
|
89
|
-
run: rake vendor:prepare
|
|
90
|
-
|
|
91
63
|
- name: Install dependencies
|
|
92
64
|
run: bundle install
|
|
93
65
|
|
|
94
|
-
- name: Compile liboga / libll native extensions
|
|
95
|
-
run: rake vendor:compile
|
|
96
|
-
|
|
97
66
|
- name: Run Nokogiri × Ox round-trip tests (${{ matrix.category }})
|
|
98
67
|
run: bundle exec rspec spec/consistency/ --tag round_trip --tag fixture_category:${{ matrix.category }}
|
|
99
68
|
env:
|
|
@@ -112,8 +81,6 @@ jobs:
|
|
|
112
81
|
category: [ metanorma, rfcxml, niso-jats ]
|
|
113
82
|
steps:
|
|
114
83
|
- uses: actions/checkout@v6
|
|
115
|
-
with:
|
|
116
|
-
submodules: "recursive"
|
|
117
84
|
|
|
118
85
|
- name: Set up Ruby
|
|
119
86
|
uses: ruby/setup-ruby@v1
|
|
@@ -121,21 +88,9 @@ jobs:
|
|
|
121
88
|
ruby-version: ${{ matrix.ruby }}
|
|
122
89
|
bundler-cache: false
|
|
123
90
|
|
|
124
|
-
- name: Install ragel
|
|
125
|
-
run: sudo apt-get update && sudo apt-get install -y ragel
|
|
126
|
-
|
|
127
|
-
- name: Install ruby-ll (for rake vendor:prepare)
|
|
128
|
-
run: gem install ruby-ll --no-document
|
|
129
|
-
|
|
130
|
-
- name: Generate ragel / ruby-ll outputs in vendored forks
|
|
131
|
-
run: rake vendor:prepare
|
|
132
|
-
|
|
133
91
|
- name: Install dependencies
|
|
134
92
|
run: bundle install
|
|
135
93
|
|
|
136
|
-
- name: Compile liboga / libll native extensions
|
|
137
|
-
run: rake vendor:compile
|
|
138
|
-
|
|
139
94
|
- name: Run Nokogiri × REXML round-trip tests (${{ matrix.category }})
|
|
140
95
|
run: bundle exec rspec spec/consistency/ --tag round_trip --tag fixture_category:${{ matrix.category }}
|
|
141
96
|
env:
|
|
@@ -23,8 +23,6 @@ jobs:
|
|
|
23
23
|
|
|
24
24
|
steps:
|
|
25
25
|
- uses: actions/checkout@v6
|
|
26
|
-
with:
|
|
27
|
-
submodules: "recursive"
|
|
28
26
|
|
|
29
27
|
- name: Set up Ruby
|
|
30
28
|
uses: ruby/setup-ruby@v1
|
|
@@ -39,7 +37,6 @@ jobs:
|
|
|
39
37
|
mingw-w64-ucrt-x86_64-libxml2 ^
|
|
40
38
|
mingw-w64-ucrt-x86_64-libiconv ^
|
|
41
39
|
mingw-w64-ucrt-x86_64-zlib ^
|
|
42
|
-
mingw-w64-ucrt-x86_64-ragel ^
|
|
43
40
|
mingw-w64-ucrt-x86_64-make ^
|
|
44
41
|
mingw-w64-ucrt-x86_64-gcc
|
|
45
42
|
|
|
@@ -53,17 +50,8 @@ jobs:
|
|
|
53
50
|
run: |
|
|
54
51
|
bundle config build.libxml-ruby --with-xml2-include=C:/msys64/ucrt64/include/libxml2 --with-xml2-lib=C:/msys64/ucrt64/lib --with-iconv-include=C:/msys64/ucrt64/include --with-iconv-lib=C:/msys64/ucrt64/lib
|
|
55
52
|
|
|
56
|
-
- name: Generate ragel / ruby-ll outputs in vendored forks
|
|
57
|
-
shell: pwsh
|
|
58
|
-
run: |
|
|
59
|
-
gem install ruby-ll --no-document
|
|
60
|
-
rake vendor:prepare
|
|
61
|
-
|
|
62
53
|
- name: Install dependencies
|
|
63
54
|
run: bundle install --jobs 4
|
|
64
55
|
|
|
65
|
-
- name: Compile vendored native extensions
|
|
66
|
-
run: bundle exec rake vendor:compile
|
|
67
|
-
|
|
68
56
|
- name: Run adapter specs
|
|
69
57
|
run: bundle exec rake spec:adapter
|
data/Gemfile
CHANGED
|
@@ -5,6 +5,9 @@ source "https://rubygems.org"
|
|
|
5
5
|
# Specify your gem's dependencies in moxml.gemspec
|
|
6
6
|
gemspec
|
|
7
7
|
|
|
8
|
+
# base64 is a bundled gem on Ruby 3.4+; the signature module requires
|
|
9
|
+
# it (the opal dev deps used to carry it transitively).
|
|
10
|
+
gem "base64"
|
|
8
11
|
# Provides iteration per second benchmarking for Ruby
|
|
9
12
|
gem "benchmark"
|
|
10
13
|
gem "benchmark-ips"
|
|
@@ -12,19 +15,12 @@ gem "get_process_mem"
|
|
|
12
15
|
gem "leptris", "~> 1.9.386"
|
|
13
16
|
gem "libxml-ruby", ">= 5.0"
|
|
14
17
|
gem "nokogiri", "~> 1.18"
|
|
18
|
+
gem "oga"
|
|
15
19
|
gem "openssl", "~> 3.0"
|
|
16
20
|
gem "ox", "~> 2.14"
|
|
17
21
|
gem "rake"
|
|
18
22
|
gem "rexml"
|
|
19
23
|
|
|
20
|
-
# Opal-compatible forks of oga and ruby-ll. The forks add pure-Ruby lexer
|
|
21
|
-
# and driver fallbacks (under ext/pureruby/) plus an Opal-aware conditional
|
|
22
|
-
# in lib/oga.rb / lib/ll/setup.rb that selects the pure-Ruby implementation
|
|
23
|
-
# when RUBY_PLATFORM == 'opal'. Under CRuby/JRuby the forks behave
|
|
24
|
-
# identically to upstream (the conditional falls through to liboga/libll).
|
|
25
|
-
gem "oga", path: "vendor/opal-oga"
|
|
26
|
-
gem "ruby-ll", path: "vendor/opal-ruby-ll"
|
|
27
|
-
|
|
28
24
|
gem "rspec"
|
|
29
25
|
gem "rubocop"
|
|
30
26
|
gem "rubocop-performance"
|
|
@@ -37,9 +33,3 @@ gem "tempfile"
|
|
|
37
33
|
|
|
38
34
|
# Needed by get_process_mem on Windows
|
|
39
35
|
gem "sys-proctable" if Gem.win_platform?
|
|
40
|
-
|
|
41
|
-
group :opal do
|
|
42
|
-
gem "opal", "~> 1.8"
|
|
43
|
-
gem "opal-rspec", "~> 1.0"
|
|
44
|
-
gem "opal-sprockets"
|
|
45
|
-
end
|