mml 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mml/configuration.rb +1 -4
- data/lib/mml/mml.rb +9 -1
- data/lib/mml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36c249ffa21675ee5c8debd51957bb4b4e09365949557f04a87eb26c0f57d4c7
|
4
|
+
data.tar.gz: dc709b05642d76beb9a8b817e730933df00a71e5cfee515e36e5a4acc0c4ec83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc3c47f7fdc1f286703cdabdf82bc0ec12cc925af3794676f557a9cdc0a540bbd533d62bb938973a86b5bcd1ff0ebad3147d1de8d9fafd80d1483e3b6d196517
|
7
|
+
data.tar.gz: 10dcf16804be326cd129b27703c72220f3ffe15fd32004cf2db85ca275b83e64fb02411a83084d92962c27e0290c45027f67a1f11726cbd615732ee568985b14
|
data/lib/mml/configuration.rb
CHANGED
@@ -57,10 +57,7 @@ module Mml
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def adapter=(adapter)
|
60
|
-
Lutaml::Model::Config.
|
61
|
-
require "lutaml/model/xml_adapter/#{adapter.downcase}_adapter"
|
62
|
-
config.xml_adapter = Lutaml::Model::XmlAdapter.const_get("#{adapter.to_s.capitalize}Adapter")
|
63
|
-
end
|
60
|
+
Lutaml::Model::Config.xml_adapter_type = adapter.downcase
|
64
61
|
end
|
65
62
|
|
66
63
|
def class_for(class_name)
|
data/lib/mml/mml.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
DEFAULT_ADAPTER = if RUBY_VERSION == "opal"
|
4
|
+
require "lutaml/model/xml_adapter/oga_adapter"
|
5
|
+
:oga
|
6
|
+
else
|
7
|
+
require "lutaml/model/xml_adapter/ox_adapter"
|
8
|
+
:ox
|
9
|
+
end
|
10
|
+
|
3
11
|
module Mml
|
4
12
|
class Error < StandardError; end
|
5
13
|
|
@@ -10,7 +18,7 @@ module Mml
|
|
10
18
|
end
|
11
19
|
|
12
20
|
def parse(input, namespace_exist: true)
|
13
|
-
Configuration.adapter =
|
21
|
+
Configuration.adapter = DEFAULT_ADAPTER unless Configuration.adapter
|
14
22
|
|
15
23
|
if namespace_exist
|
16
24
|
Mml::MathWithNamespace.from_xml(input)
|
data/lib/mml/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lutaml-model
|