unit_measurements 2.1.0 → 2.2.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/CHANGELOG.md +11 -1
- data/Gemfile.lock +1 -1
- data/lib/unit_measurements/unit_groups/all.rb +5 -0
- data/lib/unit_measurements/unit_groups/electric_current.rb +11 -0
- data/lib/unit_measurements/unit_groups/luminous_intensity.rb +9 -0
- data/lib/unit_measurements/unit_groups/temperature.rb +9 -0
- data/lib/unit_measurements/version.rb +1 -1
- data/units.md +30 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fd329380ef25e8589462a461c67a47370fbb69275b40a47e2ffde442e5890cc
|
4
|
+
data.tar.gz: 652ad790977e5a04bbc84b8388e0879a3c0f260d731551251359c7b070a92005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d827fae22520241b97c0566afc5eaa19b6a9fe7235add28a08afcf928a5bae051f506ef5d53cee50d6c90f13c3646e360ae78c58cceac4b6d95f18f7df75ef5
|
7
|
+
data.tar.gz: 72c4dab2cc0a34f556e377b3276171274b811118979beb0b4bd940780d2d6b45fb6e7c9ed7c1c1d920f90071ffdb5745dc34c3a6723e6b09f962a7b6d7bed0cd
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
-
## [2.
|
1
|
+
## [2.2.0](https://github.com/shivam091/unit_measurements/compare/v2.1.0...v2.2.0) - 2023-08-21
|
2
|
+
|
3
|
+
### What's new
|
4
|
+
|
5
|
+
- Added unit group for `electric current` units.
|
6
|
+
- Added unit group for `luminous intensity` units.
|
7
|
+
- Added unit group for `temperature` units.
|
8
|
+
|
9
|
+
----------
|
10
|
+
|
11
|
+
## [2.1.0](https://github.com/shivam091/unit_measurements/compare/v1.7.0...v2.1.0) - 2023-08-20
|
2
12
|
|
3
13
|
### What's new
|
4
14
|
|
data/Gemfile.lock
CHANGED
@@ -2,7 +2,12 @@
|
|
2
2
|
# -*- frozen_string_literal: true -*-
|
3
3
|
# -*- warn_indent: true -*-
|
4
4
|
|
5
|
+
# Fundamental SI units
|
6
|
+
|
5
7
|
require_relative "amount_of_substance"
|
8
|
+
require_relative "electric_current"
|
6
9
|
require_relative "length"
|
10
|
+
require_relative "luminous_intensity"
|
11
|
+
require_relative "temperature"
|
7
12
|
require_relative "time"
|
8
13
|
require_relative "weight"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::ElectricCurrent = UnitMeasurements.build do
|
6
|
+
si_unit :A, aliases: [:amp, :ampere, :amperes]
|
7
|
+
|
8
|
+
unit :abA, value: "10 A", aliases: [:abampere, :abamperes]
|
9
|
+
unit :Bi, value: "10 A", aliases: [:biot, :biots]
|
10
|
+
unit :statA, value: "3.33564e-10 A", aliases: [:statampere, :statamperes]
|
11
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::LuminousIntensity = UnitMeasurements.build do
|
6
|
+
si_unit :cd, aliases: [:candela, :candelas]
|
7
|
+
|
8
|
+
unit :hk, value: "0.92 cd", aliases: [:hefnerkerze]
|
9
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::Temperature = UnitMeasurements.build do
|
6
|
+
si_unit :K, aliases: [:kelvin, :kelvins]
|
7
|
+
|
8
|
+
unit :°R, value: "5/9 K", aliases: [:R, :°Ra, :Ra, :rankine]
|
9
|
+
end
|
data/units.md
CHANGED
@@ -53,7 +53,36 @@ These units are defined in `UnitMeasurements::Time`.
|
|
53
53
|
|
54
54
|
These units are defined in `UnitMeasurements::AmountOfSubstance`.
|
55
55
|
|
56
|
-
| # |
|
56
|
+
| # | Name | Aliases |
|
57
57
|
|:--|:--|:--|
|
58
58
|
| **1** | **mol\*** | **mole, moles** |
|
59
59
|
| 2 | NA | avogadro constant |
|
60
|
+
|
61
|
+
## 5. Electric current
|
62
|
+
|
63
|
+
These units are defined in `UnitMeasurements::ElectricCurrent`.
|
64
|
+
|
65
|
+
| # | Name | Aliases |
|
66
|
+
|:--|:--|:--|
|
67
|
+
| **1** | **A\*** | **amp, ampere, amperes** |
|
68
|
+
| 2 | abA | abampere, abamperes |
|
69
|
+
| 3 | Bi | biot, biots |
|
70
|
+
| 4 | statA | statampere, statamperes |
|
71
|
+
|
72
|
+
## 6. Luminous intensity
|
73
|
+
|
74
|
+
These units are defined in `UnitMeasurements::LuminousIntensity`.
|
75
|
+
|
76
|
+
| # | Name | Aliases |
|
77
|
+
|:--|:--|:--|
|
78
|
+
| **1** | **cd\*** | **candela, candelas** |
|
79
|
+
| 2 | hk | hefnerkerze |
|
80
|
+
|
81
|
+
## 7. Temperature
|
82
|
+
|
83
|
+
These units are defined in `UnitMeasurements::Temperature`.
|
84
|
+
|
85
|
+
| # | Name | Aliases |
|
86
|
+
|:--|:--|:--|
|
87
|
+
| **1** | **K\*** | **kelvin, kelvins** |
|
88
|
+
| 2 | °R | R, °Ra, Ra, rankine |
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unit_measurements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harshal LADHE
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -120,7 +120,10 @@ files:
|
|
120
120
|
- lib/unit_measurements/unit_group_builder.rb
|
121
121
|
- lib/unit_measurements/unit_groups/all.rb
|
122
122
|
- lib/unit_measurements/unit_groups/amount_of_substance.rb
|
123
|
+
- lib/unit_measurements/unit_groups/electric_current.rb
|
123
124
|
- lib/unit_measurements/unit_groups/length.rb
|
125
|
+
- lib/unit_measurements/unit_groups/luminous_intensity.rb
|
126
|
+
- lib/unit_measurements/unit_groups/temperature.rb
|
124
127
|
- lib/unit_measurements/unit_groups/time.rb
|
125
128
|
- lib/unit_measurements/unit_groups/weight.rb
|
126
129
|
- lib/unit_measurements/version.rb
|