unitsml 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.gitmodules +2 -2
- data/lib/unitsml/unitsdb.rb +8 -8
- data/lib/unitsml/version.rb +1 -1
- data/unitsml.gemspec +0 -1
- metadata +6 -28
- data/Gemfile.lock +0 -83
- data/unitsdb/dimensions.yaml +0 -859
- data/unitsdb/docs/README.adoc +0 -12
- data/unitsdb/docs/navigation.adoc +0 -7
- data/unitsdb/prefixes.yaml +0 -294
- data/unitsdb/quantities.yaml +0 -2467
- data/unitsdb/unit_systems.yaml +0 -16
- data/unitsdb/units.yaml +0 -10502
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddeea3bb17c86ba25f7372ada8f793263409001041c7b9b2599bce78fa93c5b2
|
4
|
+
data.tar.gz: cc52c354309aebb6f3d954fe8660103631447e5d3a46e8c64d66a0d39f26f09f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e62bbe2aada03fc0563c878abc73991332407f12d506c04b31d3c386cded8cb431e202f654612487606b4b57121eb46686cb46a85e7ea299f7ad0654d720d875
|
7
|
+
data.tar.gz: fab6eb7ea16bba3ee8d4d0bc707ae417fd24be1bdd98ac9003207d4edcf37b9dd1eeeb122e231cc576effab1d7285f93c8b8a1ff60b281438a22aef569e43c56
|
data/.gitignore
CHANGED
data/.gitmodules
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[submodule "unitsdb"]
|
2
2
|
path = unitsdb
|
3
|
-
url =
|
3
|
+
url = https://github.com/unitsml/unitsdb.git
|
4
4
|
[submodule "vendor/unitsdb"]
|
5
5
|
path = vendor/unitsdb
|
6
|
-
url =
|
6
|
+
url = https://github.com/unitsml/unitsdb.git
|
data/lib/unitsml/unitsdb.rb
CHANGED
@@ -6,16 +6,15 @@ module Unitsml
|
|
6
6
|
class << self
|
7
7
|
def load_yaml(file_name)
|
8
8
|
@@hash ||= {}
|
9
|
-
|
10
|
-
@@hash[file_name.to_sym] ||= YAML.load_file(file_path)
|
9
|
+
@@hash[file_name] ||= YAML.load_file(valid_path(file_name))
|
11
10
|
end
|
12
11
|
|
13
12
|
def load_dimensions
|
14
|
-
@@dim_file = load_yaml(
|
13
|
+
@@dim_file = load_yaml(:dimensions)
|
15
14
|
end
|
16
15
|
|
17
16
|
def load_units
|
18
|
-
@@units_file = load_yaml(
|
17
|
+
@@units_file = load_yaml(:units)
|
19
18
|
end
|
20
19
|
|
21
20
|
def units
|
@@ -47,7 +46,7 @@ module Unitsml
|
|
47
46
|
end
|
48
47
|
|
49
48
|
def quantities
|
50
|
-
@@quantities ||= load_yaml(
|
49
|
+
@@quantities ||= load_yaml(:quantities)
|
51
50
|
end
|
52
51
|
|
53
52
|
def filtered_units
|
@@ -57,7 +56,7 @@ module Unitsml
|
|
57
56
|
end
|
58
57
|
|
59
58
|
def prefixes_hash
|
60
|
-
@@prefixes_hashes ||= prefixs_ids(load_yaml(
|
59
|
+
@@prefixes_hashes ||= prefixs_ids(load_yaml(:prefixes))
|
61
60
|
end
|
62
61
|
|
63
62
|
def dimensions_hash
|
@@ -95,8 +94,9 @@ module Unitsml
|
|
95
94
|
end
|
96
95
|
|
97
96
|
def valid_path(file_name)
|
98
|
-
|
99
|
-
|
97
|
+
File.expand_path(
|
98
|
+
File.join(__dir__, "..", "..","unitsdb", "#{file_name}.yaml")
|
99
|
+
)
|
100
100
|
end
|
101
101
|
end
|
102
102
|
end
|
data/lib/unitsml/version.rb
CHANGED
data/unitsml.gemspec
CHANGED
@@ -27,7 +27,6 @@ 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 "parslet"
|
31
30
|
spec.add_dependency "plurimath"
|
32
31
|
spec.add_dependency "htmlentities"
|
33
32
|
spec.add_development_dependency "byebug"
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
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.2
|
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: 2023-
|
11
|
+
date: 2023-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: parslet
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: plurimath
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,7 +149,6 @@ files:
|
|
163
149
|
- ".gitmodules"
|
164
150
|
- ".rspec"
|
165
151
|
- Gemfile
|
166
|
-
- Gemfile.lock
|
167
152
|
- LICENSE.txt
|
168
153
|
- Rakefile
|
169
154
|
- bin/console
|
@@ -184,20 +169,13 @@ files:
|
|
184
169
|
- lib/unitsml/unitsdb.rb
|
185
170
|
- lib/unitsml/utility.rb
|
186
171
|
- lib/unitsml/version.rb
|
187
|
-
- unitsdb/dimensions.yaml
|
188
|
-
- unitsdb/docs/README.adoc
|
189
|
-
- unitsdb/docs/navigation.adoc
|
190
|
-
- unitsdb/prefixes.yaml
|
191
|
-
- unitsdb/quantities.yaml
|
192
|
-
- unitsdb/unit_systems.yaml
|
193
|
-
- unitsdb/units.yaml
|
194
172
|
- unitsml.gemspec
|
195
173
|
homepage: https://github.com/unitsml/unitsml-ruby
|
196
174
|
licenses:
|
197
175
|
- BSD-2-Clause
|
198
176
|
metadata:
|
199
177
|
homepage_uri: https://github.com/unitsml/unitsml-ruby
|
200
|
-
post_install_message:
|
178
|
+
post_install_message:
|
201
179
|
rdoc_options: []
|
202
180
|
require_paths:
|
203
181
|
- lib
|
@@ -213,8 +191,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
191
|
- !ruby/object:Gem::Version
|
214
192
|
version: '0'
|
215
193
|
requirements: []
|
216
|
-
rubygems_version: 3.
|
217
|
-
signing_key:
|
194
|
+
rubygems_version: 3.3.26
|
195
|
+
signing_key:
|
218
196
|
specification_version: 4
|
219
197
|
summary: Gem-wrapper for working with unitsdb
|
220
198
|
test_files: []
|
data/Gemfile.lock
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
unitsml (0.2.0)
|
5
|
-
htmlentities
|
6
|
-
parslet
|
7
|
-
plurimath
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
ast (2.4.2)
|
13
|
-
byebug (11.1.3)
|
14
|
-
coderay (1.1.3)
|
15
|
-
diff-lcs (1.4.4)
|
16
|
-
docile (1.3.5)
|
17
|
-
equivalent-xml (0.6.0)
|
18
|
-
nokogiri (>= 1.4.3)
|
19
|
-
htmlentities (4.3.4)
|
20
|
-
method_source (0.9.2)
|
21
|
-
mini_portile2 (2.8.1)
|
22
|
-
nokogiri (1.14.0)
|
23
|
-
mini_portile2 (~> 2.8.0)
|
24
|
-
racc (~> 1.4)
|
25
|
-
ox (2.14.17)
|
26
|
-
parallel (1.20.1)
|
27
|
-
parser (3.0.0.0)
|
28
|
-
ast (~> 2.4.1)
|
29
|
-
parslet (2.0.0)
|
30
|
-
plurimath (0.3.6)
|
31
|
-
ox
|
32
|
-
parslet
|
33
|
-
powerpack (0.1.3)
|
34
|
-
pry (0.12.2)
|
35
|
-
coderay (~> 1.1.0)
|
36
|
-
method_source (~> 0.9.0)
|
37
|
-
racc (1.6.2)
|
38
|
-
rainbow (3.0.0)
|
39
|
-
rake (12.3.3)
|
40
|
-
rspec (3.10.0)
|
41
|
-
rspec-core (~> 3.10.0)
|
42
|
-
rspec-expectations (~> 3.10.0)
|
43
|
-
rspec-mocks (~> 3.10.0)
|
44
|
-
rspec-core (3.10.1)
|
45
|
-
rspec-support (~> 3.10.0)
|
46
|
-
rspec-expectations (3.10.1)
|
47
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
-
rspec-support (~> 3.10.0)
|
49
|
-
rspec-mocks (3.10.2)
|
50
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
-
rspec-support (~> 3.10.0)
|
52
|
-
rspec-support (3.10.2)
|
53
|
-
rubocop (0.54.0)
|
54
|
-
parallel (~> 1.10)
|
55
|
-
parser (>= 2.5)
|
56
|
-
powerpack (~> 0.1)
|
57
|
-
rainbow (>= 2.2.2, < 4.0)
|
58
|
-
ruby-progressbar (~> 1.7)
|
59
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
60
|
-
ruby-progressbar (1.11.0)
|
61
|
-
simplecov (0.21.2)
|
62
|
-
docile (~> 1.1)
|
63
|
-
simplecov-html (~> 0.11)
|
64
|
-
simplecov_json_formatter (~> 0.1)
|
65
|
-
simplecov-html (0.12.3)
|
66
|
-
simplecov_json_formatter (0.1.2)
|
67
|
-
unicode-display_width (1.7.0)
|
68
|
-
|
69
|
-
PLATFORMS
|
70
|
-
ruby
|
71
|
-
|
72
|
-
DEPENDENCIES
|
73
|
-
byebug
|
74
|
-
equivalent-xml
|
75
|
-
pry (~> 0.12.2)
|
76
|
-
rake
|
77
|
-
rspec (~> 3.6)
|
78
|
-
rubocop (= 0.54.0)
|
79
|
-
simplecov (~> 0.15)
|
80
|
-
unitsml!
|
81
|
-
|
82
|
-
BUNDLED WITH
|
83
|
-
2.3.25
|