moxml 0.1.21 → 0.1.22

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/opal.yml +37 -0
  3. data/.rspec-opal +5 -0
  4. data/Gemfile +6 -0
  5. data/Rakefile +67 -0
  6. data/lib/compat/opal/rexml/namespace.rb +56 -0
  7. data/lib/compat/opal/rexml/parsers/baseparser.rb +952 -0
  8. data/lib/compat/opal/rexml/source.rb +213 -0
  9. data/lib/compat/opal/rexml/text.rb +418 -0
  10. data/lib/compat/opal/rexml/xmltokens.rb +45 -0
  11. data/lib/compat/opal/rexml_compat.rb +76 -0
  12. data/lib/moxml/adapter/customized_rexml/formatter.rb +11 -10
  13. data/lib/moxml/adapter/headed_ox.rb +2 -6
  14. data/lib/moxml/adapter/libxml.rb +5 -20
  15. data/lib/moxml/adapter/nokogiri.rb +7 -18
  16. data/lib/moxml/adapter/oga.rb +4 -22
  17. data/lib/moxml/adapter/ox.rb +8 -23
  18. data/lib/moxml/adapter/rexml.rb +29 -33
  19. data/lib/moxml/adapter.rb +38 -8
  20. data/lib/moxml/config.rb +1 -1
  21. data/lib/moxml/entity_registry.rb +36 -31
  22. data/lib/moxml/entity_registry_opal_data.rb +2137 -0
  23. data/lib/moxml/node.rb +19 -26
  24. data/lib/moxml/sax/namespace_splitter.rb +54 -0
  25. data/lib/moxml/version.rb +1 -1
  26. data/lib/moxml/xml_utils.rb +9 -1
  27. data/spec/consistency/adapter_parity_spec.rb +1 -1
  28. data/spec/integration/all_adapters_spec.rb +1 -1
  29. data/spec/integration/w3c_namespace_spec.rb +1 -1
  30. data/spec/moxml/adapter/ox_spec.rb +8 -0
  31. data/spec/moxml/adapter/platform_spec.rb +69 -0
  32. data/spec/moxml/adapter/shared_examples/adapter_contract.rb +0 -6
  33. data/spec/moxml/entity_registry_spec.rb +10 -0
  34. data/spec/moxml/native_attachment/opal_spec.rb +39 -2
  35. data/spec/moxml/node_type_map_spec.rb +43 -0
  36. data/spec/moxml/opal_rexml_adapter_spec.rb +14 -0
  37. data/spec/moxml/opal_smoke_spec.rb +61 -0
  38. data/spec/moxml/sax/namespace_splitter_spec.rb +67 -0
  39. data/spec/moxml/text_spec.rb +1 -1
  40. data/spec/spec_helper.rb +32 -13
  41. data/spec/support/opal.rb +16 -0
  42. metadata +17 -1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moxml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -23,11 +23,13 @@ files:
23
23
  - ".github/workflows/dependent-repos.json"
24
24
  - ".github/workflows/dependent-tests.yml"
25
25
  - ".github/workflows/docs.yml"
26
+ - ".github/workflows/opal.yml"
26
27
  - ".github/workflows/rake.yml"
27
28
  - ".github/workflows/release.yml"
28
29
  - ".github/workflows/round-trip.yml"
29
30
  - ".gitignore"
30
31
  - ".rspec"
32
+ - ".rspec-opal"
31
33
  - ".rubocop.yml"
32
34
  - ".rubocop_todo.yml"
33
35
  - Gemfile
@@ -96,6 +98,12 @@ files:
96
98
  - examples/web_scraper/README.md
97
99
  - examples/web_scraper/example_page.html
98
100
  - examples/web_scraper/web_scraper.rb
101
+ - lib/compat/opal/rexml/namespace.rb
102
+ - lib/compat/opal/rexml/parsers/baseparser.rb
103
+ - lib/compat/opal/rexml/source.rb
104
+ - lib/compat/opal/rexml/text.rb
105
+ - lib/compat/opal/rexml/xmltokens.rb
106
+ - lib/compat/opal/rexml_compat.rb
99
107
  - lib/moxml.rb
100
108
  - lib/moxml/adapter.rb
101
109
  - lib/moxml/adapter/base.rb
@@ -140,6 +148,7 @@ files:
140
148
  - lib/moxml/element.rb
141
149
  - lib/moxml/entity_reference.rb
142
150
  - lib/moxml/entity_registry.rb
151
+ - lib/moxml/entity_registry_opal_data.rb
143
152
  - lib/moxml/error.rb
144
153
  - lib/moxml/namespace.rb
145
154
  - lib/moxml/native_attachment.rb
@@ -152,6 +161,7 @@ files:
152
161
  - lib/moxml/sax/block_handler.rb
153
162
  - lib/moxml/sax/element_handler.rb
154
163
  - lib/moxml/sax/handler.rb
164
+ - lib/moxml/sax/namespace_splitter.rb
155
165
  - lib/moxml/text.rb
156
166
  - lib/moxml/version.rb
157
167
  - lib/moxml/xml_utils.rb
@@ -304,6 +314,7 @@ files:
304
314
  - spec/moxml/adapter/nokogiri_spec.rb
305
315
  - spec/moxml/adapter/oga_spec.rb
306
316
  - spec/moxml/adapter/ox_spec.rb
317
+ - spec/moxml/adapter/platform_spec.rb
307
318
  - spec/moxml/adapter/rexml_spec.rb
308
319
  - spec/moxml/adapter/shared_examples/.gitkeep
309
320
  - spec/moxml/adapter/shared_examples/adapter_contract.rb
@@ -338,7 +349,11 @@ files:
338
349
  - spec/moxml/node_set_cache_spec.rb
339
350
  - spec/moxml/node_set_spec.rb
340
351
  - spec/moxml/node_spec.rb
352
+ - spec/moxml/node_type_map_spec.rb
353
+ - spec/moxml/opal_rexml_adapter_spec.rb
354
+ - spec/moxml/opal_smoke_spec.rb
341
355
  - spec/moxml/processing_instruction_spec.rb
356
+ - spec/moxml/sax/namespace_splitter_spec.rb
342
357
  - spec/moxml/sax_spec.rb
343
358
  - spec/moxml/text_spec.rb
344
359
  - spec/moxml/version_spec.rb
@@ -372,6 +387,7 @@ files:
372
387
  - spec/performance/xpath_benchmark_spec.rb
373
388
  - spec/spec_helper.rb
374
389
  - spec/support/allocation_helper.rb
390
+ - spec/support/opal.rb
375
391
  - spec/support/w3c_namespace_helpers.rb
376
392
  - spec/support/xml_matchers.rb
377
393
  - spec/unit/rexml_isolated_test.rb