asciimath2unitsml 0.3.2 → 0.3.3
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 +3 -7
- data/Gemfile +1 -1
- data/Rakefile +1 -1
- data/asciimath2unitsml.gemspec +13 -16
- data/bin/rspec +1 -2
- data/lib/asciimath2unitsml.rb +0 -1
- data/lib/asciimath2unitsml/conv.rb +13 -13
- data/lib/asciimath2unitsml/parse.rb +27 -15
- data/lib/asciimath2unitsml/render.rb +22 -16
- data/lib/asciimath2unitsml/unit.rb +21 -17
- data/lib/asciimath2unitsml/validate.rb +14 -14
- data/lib/asciimath2unitsml/version.rb +1 -1
- data/lib/unitsdb_ruby/unitsdb.rb +21 -11
- data/spec/conv_spec.rb +1232 -1230
- data/spec/spec_helper.rb +10 -10
- metadata +19 -18
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.3.
|
4
|
+
version: 0.3.3
|
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-06-07 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.11'
|
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.11'
|
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
|