unitsdb 0.1.1 → 2.1.0
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/.github/workflows/dependent-repos.json +5 -0
- data/.github/workflows/depenedent-gems.yml +16 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -1
- data/.rubocop_todo.yml +88 -12
- data/Gemfile +2 -2
- data/README.adoc +697 -1
- data/exe/unitsdb +7 -0
- data/lib/unitsdb/cli.rb +81 -0
- data/lib/unitsdb/commands/_modify.rb +22 -0
- data/lib/unitsdb/commands/base.rb +52 -0
- data/lib/unitsdb/commands/check_si.rb +124 -0
- data/lib/unitsdb/commands/get.rb +133 -0
- data/lib/unitsdb/commands/normalize.rb +81 -0
- data/lib/unitsdb/commands/release.rb +112 -0
- data/lib/unitsdb/commands/search.rb +219 -0
- data/lib/unitsdb/commands/si_formatter.rb +485 -0
- data/lib/unitsdb/commands/si_matcher.rb +470 -0
- data/lib/unitsdb/commands/si_ttl_parser.rb +100 -0
- data/lib/unitsdb/commands/si_updater.rb +212 -0
- data/lib/unitsdb/commands/validate/identifiers.rb +40 -0
- data/lib/unitsdb/commands/validate/references.rb +316 -0
- data/lib/unitsdb/commands/validate/si_references.rb +115 -0
- data/lib/unitsdb/commands/validate.rb +40 -0
- data/lib/unitsdb/config.rb +19 -0
- data/lib/unitsdb/database.rb +661 -0
- data/lib/unitsdb/dimension.rb +19 -25
- data/lib/unitsdb/dimension_details.rb +20 -0
- data/lib/unitsdb/dimension_reference.rb +8 -0
- data/lib/unitsdb/dimensions.rb +3 -6
- data/lib/unitsdb/errors.rb +13 -0
- data/lib/unitsdb/external_reference.rb +14 -0
- data/lib/unitsdb/identifier.rb +8 -0
- data/lib/unitsdb/localized_string.rb +17 -0
- data/lib/unitsdb/prefix.rb +11 -12
- data/lib/unitsdb/prefix_reference.rb +10 -0
- data/lib/unitsdb/prefixes.rb +3 -6
- data/lib/unitsdb/quantities.rb +3 -27
- data/lib/unitsdb/quantity.rb +12 -24
- data/lib/unitsdb/quantity_reference.rb +4 -7
- data/lib/unitsdb/root_unit_reference.rb +14 -0
- data/lib/unitsdb/scale.rb +17 -0
- data/lib/unitsdb/scale_properties.rb +12 -0
- data/lib/unitsdb/scale_reference.rb +10 -0
- data/lib/unitsdb/scales.rb +11 -0
- data/lib/unitsdb/si_derived_base.rb +13 -14
- data/lib/unitsdb/symbol_presentations.rb +14 -0
- data/lib/unitsdb/unit.rb +20 -26
- data/lib/unitsdb/unit_reference.rb +5 -8
- data/lib/unitsdb/unit_system.rb +8 -10
- data/lib/unitsdb/unit_system_reference.rb +10 -0
- data/lib/unitsdb/unit_systems.rb +3 -16
- data/lib/unitsdb/units.rb +3 -6
- data/lib/unitsdb/utils.rb +84 -0
- data/lib/unitsdb/version.rb +1 -1
- data/lib/unitsdb.rb +13 -10
- data/unitsdb.gemspec +6 -1
- metadata +112 -12
- data/lib/unitsdb/dimension_quantity.rb +0 -28
- data/lib/unitsdb/dimension_symbol.rb +0 -22
- data/lib/unitsdb/prefix_symbol.rb +0 -12
- data/lib/unitsdb/root_unit.rb +0 -17
- data/lib/unitsdb/root_units.rb +0 -20
- data/lib/unitsdb/symbol.rb +0 -17
- data/lib/unitsdb/unit_symbol.rb +0 -15
- data/lib/unitsdb/unitsdb.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b92f561a56f8cdd59a905cf7827c6ffda47acae64f1e31256f2c5efebfd81f2
|
4
|
+
data.tar.gz: 218a47cf5fb2c178f787f05e186c09f5b40d0f4914b81d6de5884759011621ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82bd1ac58073379426b3378bda8b94e0bcdf46f954148d082b6008931d0c49c0c50d35b53ac64661a75e0f58bfedf46a5f53e0e948e5520584711a0260ebe638
|
7
|
+
data.tar.gz: ff4538f70410cc9572f7a7719bf32aa1324f6e2cdaf7fe95acbd6426b31168b9c4ba72271d81fe8a76dd1339aa0d3d3307424a878b4cb11e96be5af9897078b0
|
@@ -0,0 +1,16 @@
|
|
1
|
+
name: dependent-gems-test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
tags: [ v* ]
|
7
|
+
pull_request:
|
8
|
+
workflow_dispatch:
|
9
|
+
repository_dispatch:
|
10
|
+
types: [ release-passed ]
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
rake:
|
14
|
+
uses: metanorma/ci/.github/workflows/dependent-rake.yml@main
|
15
|
+
with:
|
16
|
+
command: bundle exec rspec
|
data/.gitmodules
ADDED
data/.rspec
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2025-
|
3
|
+
# on 2025-05-20 11:22:36 UTC using RuboCop version 1.75.6.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -14,22 +14,98 @@ Gemspec/DuplicatedAssignment:
|
|
14
14
|
- 'unitsdb.gemspec'
|
15
15
|
|
16
16
|
# Offense count: 2
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
Lint/ShadowingOuterLocalVariable:
|
18
|
+
Exclude:
|
19
|
+
- 'lib/unitsdb/commands/search.rb'
|
20
|
+
- 'lib/unitsdb/commands/validate/si_references.rb'
|
21
|
+
|
22
|
+
# Offense count: 37
|
23
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
24
|
+
Metrics/AbcSize:
|
25
|
+
Max: 169
|
26
|
+
|
27
|
+
# Offense count: 27
|
28
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
29
|
+
# AllowedMethods: refine
|
30
|
+
Metrics/BlockLength:
|
31
|
+
Max: 173
|
32
|
+
|
33
|
+
# Offense count: 3
|
34
|
+
# Configuration parameters: CountComments, CountAsOne.
|
35
|
+
Metrics/ClassLength:
|
36
|
+
Max: 441
|
37
|
+
|
38
|
+
# Offense count: 38
|
39
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
40
|
+
Metrics/CyclomaticComplexity:
|
41
|
+
Max: 50
|
42
|
+
|
43
|
+
# Offense count: 47
|
44
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
45
|
+
Metrics/MethodLength:
|
46
|
+
Max: 169
|
47
|
+
|
48
|
+
# Offense count: 3
|
49
|
+
# Configuration parameters: CountComments, CountAsOne.
|
50
|
+
Metrics/ModuleLength:
|
51
|
+
Max: 369
|
52
|
+
|
53
|
+
# Offense count: 2
|
54
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
55
|
+
Metrics/ParameterLists:
|
56
|
+
Max: 6
|
57
|
+
|
58
|
+
# Offense count: 33
|
59
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
60
|
+
Metrics/PerceivedComplexity:
|
61
|
+
Max: 56
|
62
|
+
|
63
|
+
# Offense count: 1
|
64
|
+
Naming/AccessorMethodName:
|
21
65
|
Exclude:
|
22
|
-
- 'lib/unitsdb/
|
66
|
+
- 'lib/unitsdb/commands/si_formatter.rb'
|
23
67
|
|
24
|
-
# Offense count:
|
68
|
+
# Offense count: 3
|
69
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
70
|
+
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
71
|
+
Naming/MethodParameterName:
|
72
|
+
Exclude:
|
73
|
+
- 'lib/unitsdb/commands/si_ttl_parser.rb'
|
74
|
+
- 'lib/unitsdb/utils.rb'
|
75
|
+
|
76
|
+
# Offense count: 1
|
77
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
78
|
+
Style/CombinableLoops:
|
79
|
+
Exclude:
|
80
|
+
- 'lib/unitsdb/commands/si_matcher.rb'
|
81
|
+
|
82
|
+
# Offense count: 40
|
25
83
|
# Configuration parameters: AllowedConstants.
|
26
84
|
Style/Documentation:
|
27
85
|
Enabled: false
|
28
86
|
|
87
|
+
# Offense count: 2
|
88
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
89
|
+
Style/IdenticalConditionalBranches:
|
90
|
+
Exclude:
|
91
|
+
- 'lib/unitsdb/commands/si_formatter.rb'
|
92
|
+
|
29
93
|
# Offense count: 1
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
94
|
+
Style/MultilineBlockChain:
|
95
|
+
Exclude:
|
96
|
+
- 'lib/unitsdb/commands/normalize.rb'
|
97
|
+
|
98
|
+
# Offense count: 5
|
99
|
+
# Configuration parameters: AllowedMethods.
|
100
|
+
# AllowedMethods: respond_to_missing?
|
101
|
+
Style/OptionalBooleanParameter:
|
34
102
|
Exclude:
|
35
|
-
- 'lib/unitsdb/
|
103
|
+
- 'lib/unitsdb/commands/check_si.rb'
|
104
|
+
- 'lib/unitsdb/commands/si_updater.rb'
|
105
|
+
|
106
|
+
# Offense count: 6
|
107
|
+
# This cop supports safe autocorrection (--autocorrect).
|
108
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
109
|
+
# URISchemes: http, https
|
110
|
+
Layout/LineLength:
|
111
|
+
Max: 140
|