asciimath2unitsml 0.3.1 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +2 -23
- data/.hound.yml +5 -0
- data/.rubocop.yml +4 -8
- data/Gemfile +1 -1
- data/README.adoc +19 -1
- data/Rakefile +1 -1
- data/asciimath2unitsml.gemspec +14 -17
- data/bin/rspec +1 -2
- data/lib/asciimath2unitsml/conv.rb +74 -119
- data/lib/asciimath2unitsml/dimensions.rb +117 -0
- data/lib/asciimath2unitsml/parse.rb +122 -133
- data/lib/asciimath2unitsml/read.rb +42 -0
- data/lib/asciimath2unitsml/render.rb +48 -31
- data/lib/asciimath2unitsml/unit.rb +29 -23
- data/lib/asciimath2unitsml/validate.rb +59 -0
- data/lib/asciimath2unitsml/version.rb +1 -1
- data/lib/asciimath2unitsml.rb +0 -1
- data/lib/unitsdb/dimensions.yaml +65 -8
- data/lib/unitsdb_ruby/unitsdb.rb +87 -55
- data/spec/conv_spec.rb +1443 -1365
- data/spec/spec_helper.rb +10 -10
- metadata +23 -19
data/spec/spec_helper.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
SimpleCov.profiles.define
|
4
|
-
add_filter
|
5
|
-
add_filter
|
6
|
-
add_group
|
1
|
+
require "simplecov"
|
2
|
+
|
3
|
+
SimpleCov.profiles.define "gem" do
|
4
|
+
add_filter "/spec/"
|
5
|
+
add_filter "/autotest/"
|
6
|
+
add_group "Libraries", "/lib/"
|
7
7
|
end
|
8
|
-
SimpleCov.start
|
8
|
+
SimpleCov.start "gem"
|
9
9
|
|
10
|
-
require
|
10
|
+
require "asciimath2unitsml"
|
11
11
|
require "rspec/matchers"
|
12
12
|
require "equivalent-xml/rspec_matchers"
|
13
13
|
require "rexml/document"
|
@@ -24,10 +24,10 @@ RSpec.configure do |config|
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
def xmlpp(
|
27
|
+
def xmlpp(xml)
|
28
28
|
s = ""
|
29
29
|
f = REXML::Formatters::Pretty.new(2)
|
30
30
|
f.compact = true
|
31
|
-
f.write(REXML::Document.new(
|
31
|
+
f.write(REXML::Document.new(xml), s)
|
32
32
|
s
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciimath2unitsml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: '1.12'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: '1.12'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rsec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '12.0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rexml
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: rspec
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,20 +220,6 @@ dependencies:
|
|
206
220
|
- - "~>"
|
207
221
|
- !ruby/object:Gem::Version
|
208
222
|
version: '0.9'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: rexml
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - ">="
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: '0'
|
216
|
-
type: :development
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - ">="
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: '0'
|
223
223
|
description: 'Convert Asciimath via MathML to UnitsML
|
224
224
|
|
225
225
|
'
|
@@ -232,6 +232,7 @@ files:
|
|
232
232
|
- ".github/workflows/rake.yml"
|
233
233
|
- ".gitignore"
|
234
234
|
- ".gitmodules"
|
235
|
+
- ".hound.yml"
|
235
236
|
- ".rubocop.yml"
|
236
237
|
- Gemfile
|
237
238
|
- LICENSE
|
@@ -241,10 +242,13 @@ files:
|
|
241
242
|
- bin/rspec
|
242
243
|
- lib/asciimath2unitsml.rb
|
243
244
|
- lib/asciimath2unitsml/conv.rb
|
245
|
+
- lib/asciimath2unitsml/dimensions.rb
|
244
246
|
- lib/asciimath2unitsml/parse.rb
|
247
|
+
- lib/asciimath2unitsml/read.rb
|
245
248
|
- lib/asciimath2unitsml/render.rb
|
246
249
|
- lib/asciimath2unitsml/string.rb
|
247
250
|
- lib/asciimath2unitsml/unit.rb
|
251
|
+
- lib/asciimath2unitsml/validate.rb
|
248
252
|
- lib/asciimath2unitsml/version.rb
|
249
253
|
- lib/unitsdb/dimensions.yaml
|
250
254
|
- lib/unitsdb/prefixes.yaml
|
@@ -266,7 +270,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
266
270
|
requirements:
|
267
271
|
- - ">="
|
268
272
|
- !ruby/object:Gem::Version
|
269
|
-
version: 2.
|
273
|
+
version: 2.5.0
|
270
274
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
271
275
|
requirements:
|
272
276
|
- - ">="
|