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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 565c1e39fe3e4ac67501f0064c9685dae36c40339c12ed1d7d489a73fbdb8a73
4
- data.tar.gz: 1f7fb702767b86261862c161384b6f1f44899b31923285e3af00de766daae784
3
+ metadata.gz: 36c249ffa21675ee5c8debd51957bb4b4e09365949557f04a87eb26c0f57d4c7
4
+ data.tar.gz: dc709b05642d76beb9a8b817e730933df00a71e5cfee515e36e5a4acc0c4ec83
5
5
  SHA512:
6
- metadata.gz: a06d4db0336c75b7c888c03c3c88fecba8bc0f4dd1622354b41d829a60ae0a5548b162bf9334320bac88984f7a77f043e909e0ff13c069d0debcff4f973ade23
7
- data.tar.gz: 0b3a278522ec51b683a0be41198909fe9f3a882148d053f4d444771dfb2cfe4ab6f16ed73cb11c30b89acbeb51fe56c935216e4527c7c9a71cd2436df3d3ce81
6
+ metadata.gz: fc3c47f7fdc1f286703cdabdf82bc0ec12cc925af3794676f557a9cdc0a540bbd533d62bb938973a86b5bcd1ff0ebad3147d1de8d9fafd80d1483e3b6d196517
7
+ data.tar.gz: 10dcf16804be326cd129b27703c72220f3ffe15fd32004cf2db85ca275b83e64fb02411a83084d92962c27e0290c45027f67a1f11726cbd615732ee568985b14
@@ -57,10 +57,7 @@ module Mml
57
57
  end
58
58
 
59
59
  def adapter=(adapter)
60
- Lutaml::Model::Config.configure do |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 = :ox unless 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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mml
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
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.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-18 00:00:00.000000000 Z
11
+ date: 2024-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model