unitsml 0.2.6 → 0.2.8
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/lib/unitsml/parser.rb +1 -0
- data/lib/unitsml/prefix.rb +13 -4
- data/lib/unitsml/utility.rb +13 -0
- data/lib/unitsml/version.rb +1 -1
- data/unitsdb/prefixes.yaml +39 -0
- data/unitsdb/spec/units_spec.rb +19 -0
- data/unitsdb/units.yaml +49 -42
- data/unitsml.gemspec +1 -1
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a775437dde5a269c76fd4529f22f22eb41193345ef08cba32ac1e96cd5ebb74
|
4
|
+
data.tar.gz: 354441d98afb6f35ea037d8530faf7672a24002b16a0a78b5b8ac4cf9b11e650
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49a85665c41be2e35c0e4ce380b92adb2d8243293a841efab83673f2cdf61e7c3d7d13f8ba4cad9d6a6ffab8c9dc68f54038fa079961c6fc3c9add266ad27849
|
7
|
+
data.tar.gz: 1a231c9ba814a87cdf88ae3fc64e5cf4a8d1d6362dc0411c9169b1e437f4ddddad037ab93651b5b3daec8c9e8d86d192370e7ae4e1b8595b5c3cb3588f00b3e8
|
data/lib/unitsml/parser.rb
CHANGED
data/lib/unitsml/prefix.rb
CHANGED
@@ -2,15 +2,17 @@
|
|
2
2
|
|
3
3
|
module Unitsml
|
4
4
|
class Prefix
|
5
|
-
attr_accessor :prefix_name
|
5
|
+
attr_accessor :prefix_name, :only_instance
|
6
6
|
|
7
|
-
def initialize(prefix_name)
|
7
|
+
def initialize(prefix_name, only_instance = false)
|
8
8
|
@prefix_name = prefix_name
|
9
|
+
@only_instance = only_instance
|
9
10
|
end
|
10
11
|
|
11
12
|
def ==(object)
|
12
13
|
self.class == object.class &&
|
13
|
-
prefix_name == object&.prefix_name
|
14
|
+
prefix_name == object&.prefix_name &&
|
15
|
+
only_instance == object&.only_instance
|
14
16
|
end
|
15
17
|
|
16
18
|
def id
|
@@ -30,7 +32,14 @@ module Unitsml
|
|
30
32
|
end
|
31
33
|
|
32
34
|
def to_mathml
|
33
|
-
|
35
|
+
symbol = Utility.string_to_html_entity(
|
36
|
+
Utility.html_entity_to_unicode(
|
37
|
+
prefixes_symbols["html"]
|
38
|
+
),
|
39
|
+
)
|
40
|
+
return symbol unless only_instance
|
41
|
+
|
42
|
+
Utility.ox_element("mi") << symbol
|
34
43
|
end
|
35
44
|
|
36
45
|
def to_latex
|
data/lib/unitsml/utility.rb
CHANGED
@@ -306,6 +306,19 @@ module Unitsml
|
|
306
306
|
nodes&.each { |node| element << node unless node.nil? }
|
307
307
|
element
|
308
308
|
end
|
309
|
+
|
310
|
+
def string_to_html_entity(string)
|
311
|
+
entities = HTMLEntities.new
|
312
|
+
entities.encode(
|
313
|
+
string.frozen? ? string : string.force_encoding('UTF-8'),
|
314
|
+
:hexadecimal,
|
315
|
+
)
|
316
|
+
end
|
317
|
+
|
318
|
+
def html_entity_to_unicode(string)
|
319
|
+
entities = HTMLEntities.new
|
320
|
+
entities.decode(string)
|
321
|
+
end
|
309
322
|
end
|
310
323
|
end
|
311
324
|
end
|
data/lib/unitsml/version.rb
CHANGED
data/unitsdb/prefixes.yaml
CHANGED
@@ -1,4 +1,24 @@
|
|
1
1
|
---
|
2
|
+
NISTp10_30:
|
3
|
+
name: quetta
|
4
|
+
symbol:
|
5
|
+
ascii: Q
|
6
|
+
html: Q
|
7
|
+
latex: Q
|
8
|
+
unicode: Q
|
9
|
+
base: 10
|
10
|
+
power: 30
|
11
|
+
|
12
|
+
NISTp10_27:
|
13
|
+
name: ronna
|
14
|
+
symbol:
|
15
|
+
ascii: R
|
16
|
+
html: R
|
17
|
+
latex: R
|
18
|
+
unicode: R
|
19
|
+
base: 10
|
20
|
+
power: 27
|
21
|
+
|
2
22
|
NISTp10_24:
|
3
23
|
name: yotta
|
4
24
|
symbol:
|
@@ -210,6 +230,25 @@ NISTp10_-24:
|
|
210
230
|
base: 10
|
211
231
|
power: -24
|
212
232
|
|
233
|
+
NISTp10_-27:
|
234
|
+
name: ronto
|
235
|
+
symbol:
|
236
|
+
ascii: r
|
237
|
+
html: r
|
238
|
+
latex: r
|
239
|
+
unicode: r
|
240
|
+
base: 10
|
241
|
+
power: -27
|
242
|
+
|
243
|
+
NISTp10_-30:
|
244
|
+
name: quecto
|
245
|
+
symbol:
|
246
|
+
ascii: q
|
247
|
+
html: q
|
248
|
+
latex: q
|
249
|
+
unicode: q
|
250
|
+
base: 10
|
251
|
+
power: -30
|
213
252
|
|
214
253
|
# Binary Prefixes:
|
215
254
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'rspec'
|
3
|
+
require 'plurimath'
|
4
|
+
|
5
|
+
describe 'MathML in UnitsDB' do
|
6
|
+
unitsdb = YAML.load_file('units.yaml')
|
7
|
+
|
8
|
+
unitsdb.each do |unit, unit_data|
|
9
|
+
context "when parsing MathML for #{unit}" do
|
10
|
+
|
11
|
+
it 'parses successfully' do
|
12
|
+
unit_symbols = unit_data.dig("unit_symbols").flatten.compact
|
13
|
+
unit_symbols.each do |symbols_hash|
|
14
|
+
expect { Plurimath::Math.parse(symbols_hash.dig("mathml"), :mathml) }.not_to raise_error
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/unitsdb/units.yaml
CHANGED
@@ -1154,7 +1154,7 @@
|
|
1154
1154
|
- id: "m*s^-1"
|
1155
1155
|
ascii: "m*s^-1"
|
1156
1156
|
html: "m/s"
|
1157
|
-
mathml: "<mrow><mi mathvariant='normal'>m</mi><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
1157
|
+
mathml: "<mrow><mi mathvariant='normal'>m</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
1158
1158
|
latex: \ensuremath{\mathrm{m/s}}
|
1159
1159
|
unicode: "m·s⁻¹"
|
1160
1160
|
root_units:
|
@@ -1560,7 +1560,7 @@
|
|
1560
1560
|
- id: "abS"
|
1561
1561
|
ascii: "abS"
|
1562
1562
|
html: (abΩ)<sup>-1</sup>
|
1563
|
-
mathml: "<mrow><msup><mi mathvariant='normal'>(abΩ)</mi><mn>-1</mn></mrow>"
|
1563
|
+
mathml: "<mrow><msup><mi mathvariant='normal'>(abΩ)</mi><mn>-1</mn></msup></mrow>"
|
1564
1564
|
latex: \ensuremath{\mathrm{(ab\Omega)^{-1}}
|
1565
1565
|
unicode: "(abΩ)⁻¹"
|
1566
1566
|
root_units:
|
@@ -2290,7 +2290,7 @@
|
|
2290
2290
|
- id: "erg*s^-1"
|
2291
2291
|
ascii: "erg*s^-1"
|
2292
2292
|
html: "erg/s"
|
2293
|
-
mathml: "<mrow><mi mathvariant='normal'>erg</mi><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
2293
|
+
mathml: "<mrow><mi mathvariant='normal'>erg</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
2294
2294
|
latex: \ensuremath{\mathrm{erg/s}}
|
2295
2295
|
unicode: "erg·s⁻¹"
|
2296
2296
|
root_units:
|
@@ -2632,7 +2632,7 @@
|
|
2632
2632
|
- id: "ft*min^-1"
|
2633
2633
|
ascii: "ft*min^-1"
|
2634
2634
|
html: "ft/min"
|
2635
|
-
mathml: "<mrow><mi mathvariant='normal'>ft</mi><mo>/</mo><mrow><mi mathvariant='normal'>min</mi></mrow>"
|
2635
|
+
mathml: "<mrow><mi mathvariant='normal'>ft</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>min</mi></mrow>"
|
2636
2636
|
latex: \ensuremath{\mathrm{ft/min}}
|
2637
2637
|
unicode: "ft·min⁻¹"
|
2638
2638
|
root_units:
|
@@ -2660,7 +2660,7 @@
|
|
2660
2660
|
- id: "ft*s^-1"
|
2661
2661
|
ascii: "ft*s^-1"
|
2662
2662
|
html: "ft/s"
|
2663
|
-
mathml: "<mrow><mi mathvariant='normal'>ft</mi><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
2663
|
+
mathml: "<mrow><mi mathvariant='normal'>ft</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
2664
2664
|
latex: \ensuremath{\mathrm{ft/s}}
|
2665
2665
|
unicode: "ft·s⁻¹"
|
2666
2666
|
root_units:
|
@@ -2688,7 +2688,7 @@
|
|
2688
2688
|
- id: "in*s^-1"
|
2689
2689
|
ascii: "in*s^-1"
|
2690
2690
|
html: "in/s"
|
2691
|
-
mathml: "<mrow><mi mathvariant='normal'>in</mi><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
2691
|
+
mathml: "<mrow><mi mathvariant='normal'>in</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
2692
2692
|
latex: \ensuremath{\mathrm{in/s}}
|
2693
2693
|
unicode: "in·s⁻¹"
|
2694
2694
|
root_units:
|
@@ -2716,7 +2716,7 @@
|
|
2716
2716
|
- id: "mi*h^-1"
|
2717
2717
|
ascii: "mi*h^-1"
|
2718
2718
|
html: "mi/h"
|
2719
|
-
mathml: "<mrow><mi mathvariant='normal'>mi</mi><mo>/</mo><mrow><mi mathvariant='normal'>h</mi></mrow>"
|
2719
|
+
mathml: "<mrow><mi mathvariant='normal'>mi</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>h</mi></mrow>"
|
2720
2720
|
latex: \ensuremath{\mathrm{mi/h}}
|
2721
2721
|
unicode: "mi·h⁻¹"
|
2722
2722
|
root_units:
|
@@ -2744,7 +2744,7 @@
|
|
2744
2744
|
- id: "mi*min^-1"
|
2745
2745
|
ascii: "mi*min^-1"
|
2746
2746
|
html: "mi/min"
|
2747
|
-
mathml: "<mrow><mi mathvariant='normal'>mi</mi><mo>/</mo><mrow><mi mathvariant='normal'>min</mi></mrow>"
|
2747
|
+
mathml: "<mrow><mi mathvariant='normal'>mi</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>min</mi></mrow>"
|
2748
2748
|
latex: \ensuremath{\mathrm{mi/min}}
|
2749
2749
|
unicode: "mi·min⁻¹"
|
2750
2750
|
root_units:
|
@@ -2772,7 +2772,7 @@
|
|
2772
2772
|
- id: "mi*s^-1"
|
2773
2773
|
ascii: "mi*s^-1"
|
2774
2774
|
html: "mi/s"
|
2775
|
-
mathml: "<mrow><mi mathvariant='normal'>mi</mi><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
2775
|
+
mathml: "<mrow><mi mathvariant='normal'>mi</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
2776
2776
|
latex: \ensuremath{\mathrm{mi/s}}
|
2777
2777
|
unicode: "mi·s⁻¹"
|
2778
2778
|
root_units:
|
@@ -2979,7 +2979,7 @@
|
|
2979
2979
|
- id: "A*m^-1"
|
2980
2980
|
ascii: "A*m^-1"
|
2981
2981
|
html: "A/m"
|
2982
|
-
mathml: "<mrow><mi mathvariant='normal'>A</mi><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
2982
|
+
mathml: "<mrow><mi mathvariant='normal'>A</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
2983
2983
|
latex: \ensuremath{\mathrm{A/m}}
|
2984
2984
|
unicode: "A·m⁻¹"
|
2985
2985
|
root_units:
|
@@ -3126,6 +3126,12 @@
|
|
3126
3126
|
mathml: "<mi mathvariant='normal'>Gs</mi>"
|
3127
3127
|
latex: \ensuremath{\mathrm{Gs}}
|
3128
3128
|
unicode: "Gs"
|
3129
|
+
- id: "G"
|
3130
|
+
ascii: "G"
|
3131
|
+
html: "G"
|
3132
|
+
mathml: "<mi mathvariant='normal'>G</mi>"
|
3133
|
+
latex: \ensuremath{\mathrm{G}}
|
3134
|
+
unicode: "G"
|
3129
3135
|
root_units:
|
3130
3136
|
enumerated_root_units:
|
3131
3137
|
- unit: "gauss"
|
@@ -3677,7 +3683,7 @@
|
|
3677
3683
|
- id: "J*K^-1"
|
3678
3684
|
ascii: "J*K^-1"
|
3679
3685
|
html: "J/K"
|
3680
|
-
mathml: "<mrow><mi mathvariant='normal'>J</mi><mo>/</mo><mrow><mi mathvariant='normal'>K</mi></mrow>"
|
3686
|
+
mathml: "<mrow><mi mathvariant='normal'>J</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>K</mi></mrow>"
|
3681
3687
|
latex: \ensuremath{\mathrm{J/K}}
|
3682
3688
|
unicode: "J/K"
|
3683
3689
|
root_units:
|
@@ -3801,7 +3807,7 @@
|
|
3801
3807
|
- id: "N*m^-1"
|
3802
3808
|
ascii: "N*m^-1"
|
3803
3809
|
html: "N/m"
|
3804
|
-
mathml: "<mrow><mi mathvariant='normal'>N</mi><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
3810
|
+
mathml: "<mrow><mi mathvariant='normal'>N</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
3805
3811
|
latex: \ensuremath{\mathrm{N/m}}
|
3806
3812
|
unicode: "N/m"
|
3807
3813
|
root_units:
|
@@ -3829,7 +3835,7 @@
|
|
3829
3835
|
- id: "J*kg^-1"
|
3830
3836
|
ascii: "J*kg^-1"
|
3831
3837
|
html: "J/kg"
|
3832
|
-
mathml: "<mrow><mi mathvariant='normal'>J</mi><mo>/</mo><mrow><mi mathvariant='normal'>kg</mi></mrow>"
|
3838
|
+
mathml: "<mrow><mi mathvariant='normal'>J</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>kg</mi></mrow>"
|
3833
3839
|
latex: \ensuremath{\mathrm{J/kg}}
|
3834
3840
|
unicode: "J/kg"
|
3835
3841
|
root_units:
|
@@ -3918,7 +3924,7 @@
|
|
3918
3924
|
- id: "V*m^-1"
|
3919
3925
|
ascii: "V*m^-1"
|
3920
3926
|
html: "V/m"
|
3921
|
-
mathml: "<mrow><mi mathvariant='normal'>V</mi><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
3927
|
+
mathml: "<mrow><mi mathvariant='normal'>V</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
3922
3928
|
latex: \ensuremath{\mathrm{V/m}}
|
3923
3929
|
unicode: "V/m"
|
3924
3930
|
root_units:
|
@@ -4004,7 +4010,7 @@
|
|
4004
4010
|
- id: "F*m^-1"
|
4005
4011
|
ascii: "F*m^-1"
|
4006
4012
|
html: "F/m"
|
4007
|
-
mathml: "<mrow><mi mathvariant='normal'>F</mi><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
4013
|
+
mathml: "<mrow><mi mathvariant='normal'>F</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
4008
4014
|
latex: \ensuremath{\mathrm{F/m}}
|
4009
4015
|
unicode: "F/m"
|
4010
4016
|
root_units:
|
@@ -4032,7 +4038,7 @@
|
|
4032
4038
|
- id: "H*m^-1"
|
4033
4039
|
ascii: "H*m^-1"
|
4034
4040
|
html: "H/m"
|
4035
|
-
mathml: "<mrow><mi mathvariant='normal'>H</mi><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
4041
|
+
mathml: "<mrow><mi mathvariant='normal'>H</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
4036
4042
|
latex: \ensuremath{\mathrm{H/m}}
|
4037
4043
|
unicode: "H/m"
|
4038
4044
|
root_units:
|
@@ -4060,7 +4066,7 @@
|
|
4060
4066
|
- id: "J*mol^-1"
|
4061
4067
|
ascii: "J*mol^-1"
|
4062
4068
|
html: "J/mol"
|
4063
|
-
mathml: "<mrow><mi mathvariant='normal'>J</mi><mo>/</mo><mrow><mi mathvariant='normal'>mol</mi></mrow>"
|
4069
|
+
mathml: "<mrow><mi mathvariant='normal'>J</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>mol</mi></mrow>"
|
4064
4070
|
latex: \ensuremath{\mathrm{J/mol}}
|
4065
4071
|
unicode: "J/mol"
|
4066
4072
|
root_units:
|
@@ -4122,7 +4128,7 @@
|
|
4122
4128
|
- id: "C*kg^-1"
|
4123
4129
|
ascii: "C*kg^-1"
|
4124
4130
|
html: "C/kg"
|
4125
|
-
mathml: "<mrow><mi mathvariant='normal'>C</mi><mo>/</mo><mrow><mi mathvariant='normal'>kg</mi></mrow>"
|
4131
|
+
mathml: "<mrow><mi mathvariant='normal'>C</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>kg</mi></mrow>"
|
4126
4132
|
latex: \ensuremath{\mathrm{C/kg}}
|
4127
4133
|
unicode: "C/kg"
|
4128
4134
|
root_units:
|
@@ -4151,7 +4157,7 @@
|
|
4151
4157
|
- id: "Gy*s^-1"
|
4152
4158
|
ascii: "Gy*s^-1"
|
4153
4159
|
html: "Gy/s"
|
4154
|
-
mathml: "<mrow><mi mathvariant='normal'>Gy</mi><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
4160
|
+
mathml: "<mrow><mi mathvariant='normal'>Gy</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
4155
4161
|
latex: \ensuremath{\mathrm{Gy/s}}
|
4156
4162
|
unicode: "Gy/s"
|
4157
4163
|
root_units:
|
@@ -4282,7 +4288,7 @@
|
|
4282
4288
|
- id: "W*sr^-1"
|
4283
4289
|
ascii: "W*sr^-1"
|
4284
4290
|
html: "W/sr"
|
4285
|
-
mathml: "<mrow><mi mathvariant='normal'>W</mi><mo>/</mo><mrow><mi mathvariant='normal'>sr</mi></mrow>"
|
4291
|
+
mathml: "<mrow><mi mathvariant='normal'>W</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>sr</mi></mrow>"
|
4286
4292
|
latex: \ensuremath{\mathrm{W/sr}}
|
4287
4293
|
unicode: "W/sr"
|
4288
4294
|
root_units:
|
@@ -4434,7 +4440,7 @@
|
|
4434
4440
|
- id: "rad*s^-1"
|
4435
4441
|
ascii: "rad*s^-1"
|
4436
4442
|
html: "rad/s"
|
4437
|
-
mathml: "<mrow><mi mathvariant='normal'>rad</mi><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
4443
|
+
mathml: "<mrow><mi mathvariant='normal'>rad</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
4438
4444
|
latex: \ensuremath{\mathrm{rad/s}}
|
4439
4445
|
unicode: "rad/s"
|
4440
4446
|
root_units:
|
@@ -4693,7 +4699,7 @@
|
|
4693
4699
|
- id: "km/h"
|
4694
4700
|
ascii: "km/h"
|
4695
4701
|
html: "kh/h"
|
4696
|
-
mathml: "<mrow><mi mathvariant='normal'>kh</mi><mo>/</mo><mrow><mi mathvariant='normal'>h</mi></mrow>"
|
4702
|
+
mathml: "<mrow><mi mathvariant='normal'>kh</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>h</mi></mrow>"
|
4697
4703
|
latex: \ensuremath{\mathrm{kh/h}}
|
4698
4704
|
unicode: "km/h"
|
4699
4705
|
root_units:
|
@@ -4753,7 +4759,7 @@
|
|
4753
4759
|
- id: "rad*m^-1"
|
4754
4760
|
ascii: "rad*m^-1"
|
4755
4761
|
html: "rad/m"
|
4756
|
-
mathml: "<mrow><mi mathvariant='normal'>rad</mi><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
4762
|
+
mathml: "<mrow><mi mathvariant='normal'>rad</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
4757
4763
|
latex: \ensuremath{\mathrm{rad/m}}
|
4758
4764
|
unicode: "rad/m"
|
4759
4765
|
root_units:
|
@@ -4781,7 +4787,7 @@
|
|
4781
4787
|
- id: "Np*s^-1"
|
4782
4788
|
ascii: "Np*s^-1"
|
4783
4789
|
html: "Np/s"
|
4784
|
-
mathml: "<mrow><mi mathvariant='normal'>Np</mi><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
4790
|
+
mathml: "<mrow><mi mathvariant='normal'>Np</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
4785
4791
|
latex: \ensuremath{\mathrm{Np/s}}
|
4786
4792
|
unicode: "Np/s"
|
4787
4793
|
root_units:
|
@@ -5330,7 +5336,7 @@
|
|
5330
5336
|
- id: "kg*m^-1"
|
5331
5337
|
ascii: "kg*m^-1"
|
5332
5338
|
html: "kg/m"
|
5333
|
-
mathml: "<mrow><mi mathvariant='normal'>kg</mi><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
5339
|
+
mathml: "<mrow><mi mathvariant='normal'>kg</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>m</mi></mrow>"
|
5334
5340
|
latex: \ensuremath{\mathrm{kg/m}}
|
5335
5341
|
unicode: "kg/m"
|
5336
5342
|
root_units:
|
@@ -5388,7 +5394,7 @@
|
|
5388
5394
|
- id: "kg*l^-1"
|
5389
5395
|
ascii: "kg*l^-1"
|
5390
5396
|
html: "kg/l"
|
5391
|
-
mathml: "<mrow><mi mathvariant='normal'>kg</mi><mo>/</mo><mrow><mi mathvariant='normal'>l</mi></mrow>"
|
5397
|
+
mathml: "<mrow><mi mathvariant='normal'>kg</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>l</mi></mrow>"
|
5392
5398
|
latex: \ensuremath{\mathrm{kg/l}}
|
5393
5399
|
unicode: "kg/l"
|
5394
5400
|
root_units:
|
@@ -5657,7 +5663,7 @@
|
|
5657
5663
|
- id: "kg*s^-1"
|
5658
5664
|
ascii: "kg*s^-1"
|
5659
5665
|
html: "kg/s"
|
5660
|
-
mathml: "<mrow><mi mathvariant='normal'>kg</mi><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
5666
|
+
mathml: "<mrow><mi mathvariant='normal'>kg</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>s</mi></mrow>"
|
5661
5667
|
latex: \ensuremath{\mathrm{kg/s}}
|
5662
5668
|
unicode: "kg/s"
|
5663
5669
|
root_units:
|
@@ -5742,7 +5748,7 @@
|
|
5742
5748
|
- id: "gf"
|
5743
5749
|
ascii: "gf"
|
5744
5750
|
html: "gf"
|
5745
|
-
mathml: "gf"
|
5751
|
+
mathml: "<mi mathvariant='normal'>gf</mi>"
|
5746
5752
|
latex: \ensuremath{\mathrm{gf}}
|
5747
5753
|
unicode: "gf"
|
5748
5754
|
root_units:
|
@@ -6319,7 +6325,7 @@
|
|
6319
6325
|
- id: "Pa*K^-1"
|
6320
6326
|
ascii: "Pa*K^-1"
|
6321
6327
|
html: "Pa/K"
|
6322
|
-
mathml: "<mrow><mi mathvariant='normal'>Pa</mi><mo>/</mo><mrow><mi mathvariant='normal'>K</mi></mrow>"
|
6328
|
+
mathml: "<mrow><mi mathvariant='normal'>Pa</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>K</mi></mrow>"
|
6323
6329
|
latex: \ensuremath{\mathrm{Pa/K}}
|
6324
6330
|
unicode: "Pa/K"
|
6325
6331
|
root_units:
|
@@ -10196,7 +10202,7 @@
|
|
10196
10202
|
- id: "mi/gal"
|
10197
10203
|
ascii: "mi/gal"
|
10198
10204
|
html: "mi/gal"
|
10199
|
-
mathml: "<mrow><mi mathvariant='normal'>mi</mi><mo>/</mo><mrow><mi mathvariant='normal'>gal</mi></mrow>"
|
10205
|
+
mathml: "<mrow><mi mathvariant='normal'>mi</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>gal</mi></mrow>"
|
10200
10206
|
latex: '\ensuremath{\mathrm{mi/gal}}'
|
10201
10207
|
unicode: "mi/gal"
|
10202
10208
|
root_units:
|
@@ -10231,7 +10237,7 @@
|
|
10231
10237
|
- id: "gal*min^-1"
|
10232
10238
|
ascii: "gal*min^-1"
|
10233
10239
|
html: "gal/min"
|
10234
|
-
mathml: "<mrow><mi mathvariant='normal'>gal</mi><mo>/</mo><mrow><mi mathvariant='normal'>min</mi></mrow>"
|
10240
|
+
mathml: "<mrow><mi mathvariant='normal'>gal</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>min</mi></mrow>"
|
10235
10241
|
latex: '\ensurement{\mathrm{gal/min}}'
|
10236
10242
|
unicode: "gpm"
|
10237
10243
|
root_units:
|
@@ -10289,18 +10295,19 @@
|
|
10289
10295
|
unit_name:
|
10290
10296
|
- "mole per liter"
|
10291
10297
|
unit_symbols:
|
10298
|
+
- id: "mol*l^-1"
|
10299
|
+
ascii: "mol*l^-1"
|
10300
|
+
html: "mol/l"
|
10301
|
+
mathml: "<mrow><mi mathvariant='normal'>mol</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>l</mi></mrow>"
|
10302
|
+
latex: '\ensuremath{\mathrm{mol/l}}'
|
10303
|
+
unicode: "mol/l"
|
10292
10304
|
- id: "mol*L^-1"
|
10293
10305
|
ascii: "mol*L^-1"
|
10294
10306
|
html: "mol/L"
|
10295
10307
|
mathml: "<mrow><mi mathvariant='normal'>mol</mi><mo>/</mo><mrow><mi mathvariant='normal'>L</mi></mrow>"
|
10296
10308
|
latex: '\ensuremath{\mathrm{mol/L}}'
|
10297
10309
|
unicode: "mol/L"
|
10298
|
-
|
10299
|
-
ascii: "mol*l^-1"
|
10300
|
-
html: "mol/l"
|
10301
|
-
mathml: "<mrow><mi mathvariant='normal'>mol</mi><mo>/</mo><mrow><mi mathvariant='normal'>l</mi></mrow>"
|
10302
|
-
latex: '\ensuremath{\mathrm{mol/l}}'
|
10303
|
-
unicode: "mol/l"
|
10310
|
+
|
10304
10311
|
root_units:
|
10305
10312
|
enumerated_root_units:
|
10306
10313
|
- unit: "mole"
|
@@ -10326,7 +10333,7 @@
|
|
10326
10333
|
- id: "mol*kg^-1"
|
10327
10334
|
ascii: "mol*kg^-1"
|
10328
10335
|
html: "mol/kg"
|
10329
|
-
mathml: "<mrow><mi mathvariant='normal'>mol</mi><mo>/</mo><mrow><mi mathvariant='normal'>kg</mi></mrow>"
|
10336
|
+
mathml: "<mrow><mi mathvariant='normal'>mol</mi></mrow><mo>/</mo><mrow><mi mathvariant='normal'>kg</mi></mrow>"
|
10330
10337
|
latex: \ensuremath{\mathrm{mol/kg}}
|
10331
10338
|
unicode: "mol/kg"
|
10332
10339
|
root_units:
|
@@ -10355,7 +10362,7 @@
|
|
10355
10362
|
- id: "l.w."
|
10356
10363
|
ascii: "l.w."
|
10357
10364
|
html: "l.w."
|
10358
|
-
mathml: "l.w
|
10365
|
+
mathml: "<mi mathvariant='normal'>l.w.</mi>"
|
10359
10366
|
latex: \ensuremath{\mathrm{l.w.}}
|
10360
10367
|
unicode: "l.w."
|
10361
10368
|
root_units:
|
@@ -10380,7 +10387,7 @@
|
|
10380
10387
|
- id: "l.h."
|
10381
10388
|
ascii: "l.h."
|
10382
10389
|
html: "l.h."
|
10383
|
-
mathml: "l.h
|
10390
|
+
mathml: "<mi mathvariant='normal'>l.h.</mi>"
|
10384
10391
|
latex: \ensuremath{\mathrm{l.h.}}
|
10385
10392
|
unicode: "l.h."
|
10386
10393
|
root_units:
|
@@ -10405,7 +10412,7 @@
|
|
10405
10412
|
- id: "l.m."
|
10406
10413
|
ascii: "l.m."
|
10407
10414
|
html: "l.m."
|
10408
|
-
mathml: "l.m
|
10415
|
+
mathml: "<mi mathvariant='normal'>l.m.</mi>"
|
10409
10416
|
latex: \ensuremath{\mathrm{l.m.}}
|
10410
10417
|
unicode: "l.m."
|
10411
10418
|
root_units:
|
@@ -10430,7 +10437,7 @@
|
|
10430
10437
|
- id: "l.s."
|
10431
10438
|
ascii: "l.s."
|
10432
10439
|
html: "l.s."
|
10433
|
-
mathml: "l.s
|
10440
|
+
mathml: "<mi mathvariant='normal'>l.s.</mi>"
|
10434
10441
|
latex: \ensuremath{\mathrm{l.s.}}
|
10435
10442
|
unicode: "l.s."
|
10436
10443
|
root_units:
|
data/unitsml.gemspec
CHANGED
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib", "unitsdb/**/*.yaml"]
|
29
29
|
|
30
|
-
spec.add_dependency "plurimath"
|
31
30
|
spec.add_dependency "htmlentities"
|
31
|
+
spec.add_dependency "plurimath", "~> 0.8.4"
|
32
32
|
spec.add_development_dependency "byebug"
|
33
33
|
spec.add_development_dependency "equivalent-xml"
|
34
34
|
spec.add_development_dependency "pry", "~> 0.12.2"
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unitsml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: htmlentities
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: plurimath
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.8.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.8.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: byebug
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -174,6 +174,7 @@ files:
|
|
174
174
|
- unitsdb/docs/navigation.adoc
|
175
175
|
- unitsdb/prefixes.yaml
|
176
176
|
- unitsdb/quantities.yaml
|
177
|
+
- unitsdb/spec/units_spec.rb
|
177
178
|
- unitsdb/unit_systems.yaml
|
178
179
|
- unitsdb/units.yaml
|
179
180
|
- unitsml.gemspec
|
@@ -182,7 +183,7 @@ licenses:
|
|
182
183
|
- BSD-2-Clause
|
183
184
|
metadata:
|
184
185
|
homepage_uri: https://github.com/unitsml/unitsml-ruby
|
185
|
-
post_install_message:
|
186
|
+
post_install_message:
|
186
187
|
rdoc_options: []
|
187
188
|
require_paths:
|
188
189
|
- lib
|
@@ -198,8 +199,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
199
|
- !ruby/object:Gem::Version
|
199
200
|
version: '0'
|
200
201
|
requirements: []
|
201
|
-
rubygems_version: 3.3.
|
202
|
-
signing_key:
|
202
|
+
rubygems_version: 3.3.27
|
203
|
+
signing_key:
|
203
204
|
specification_version: 4
|
204
205
|
summary: Gem-wrapper for working with unitsdb
|
205
206
|
test_files: []
|