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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a08ed1b145023452764dc89296ba34e9ca5eb00cdbaa48cdd053bdc0ead1dbb9
4
- data.tar.gz: a74caaa5c72e9752d97c4c7c753d82f2af0f7ede94463bbc51eb084f1f009275
3
+ metadata.gz: ddeea3bb17c86ba25f7372ada8f793263409001041c7b9b2599bce78fa93c5b2
4
+ data.tar.gz: cc52c354309aebb6f3d954fe8660103631447e5d3a46e8c64d66a0d39f26f09f
5
5
  SHA512:
6
- metadata.gz: 8f46a6311181f3cd1e199bfb1478ca7fe5a1aeebc51b6523add6af95dd17b3abfc0ed8aabe68e45d03ded5bcd6f28ce480155f7c6aa94ef7345819f25499b338
7
- data.tar.gz: 790714452652b58d3e37056a6359193f42b7ff11d490cf6130005dd7059653eb90b61c54f39e712ea7cd92f52452b8c4485181adbb2bebd2e27c752e83ba46d3
6
+ metadata.gz: e62bbe2aada03fc0563c878abc73991332407f12d506c04b31d3c386cded8cb431e202f654612487606b4b57121eb46686cb46a85e7ea299f7ad0654d720d875
7
+ data.tar.gz: fab6eb7ea16bba3ee8d4d0bc707ae417fd24be1bdd98ac9003207d4edcf37b9dd1eeeb122e231cc576effab1d7285f93c8b8a1ff60b281438a22aef569e43c56
data/.gitignore CHANGED
@@ -9,3 +9,5 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ Gemfile.lock
13
+ /vendor/bundle/
data/.gitmodules CHANGED
@@ -1,6 +1,6 @@
1
1
  [submodule "unitsdb"]
2
2
  path = unitsdb
3
- url = git@github.com:unitsml/unitsdb.git
3
+ url = https://github.com/unitsml/unitsdb.git
4
4
  [submodule "vendor/unitsdb"]
5
5
  path = vendor/unitsdb
6
- url = git@github.com:unitsml/unitsdb.git
6
+ url = https://github.com/unitsml/unitsdb.git
@@ -6,16 +6,15 @@ module Unitsml
6
6
  class << self
7
7
  def load_yaml(file_name)
8
8
  @@hash ||= {}
9
- file_path = File.path(valid_path(file_name))
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("dimensions")
13
+ @@dim_file = load_yaml(:dimensions)
15
14
  end
16
15
 
17
16
  def load_units
18
- @@units_file = load_yaml("units")
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("quantities")
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("prefixes"))
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
- path = "unitsdb/#{file_name}.yaml"
99
- File.file?(path) ? path : "../#{path}"
97
+ File.expand_path(
98
+ File.join(__dir__, "..", "..","unitsdb", "#{file_name}.yaml")
99
+ )
100
100
  end
101
101
  end
102
102
  end
@@ -1,3 +1,3 @@
1
1
  module Unitsml
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.2"
3
3
  end
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.0
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-09-25 00:00:00.000000000 Z
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.1.2
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