unit_measurements 4.7.0 → 4.9.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 +18 -0
- data/Gemfile.lock +1 -1
- data/lib/unit_measurements/unit_groups/all.rb +4 -6
- data/lib/unit_measurements/unit_groups/information_entropy.rb +15 -0
- data/lib/unit_measurements/unit_groups/radiation_absorbed_dose.rb +16 -0
- data/lib/unit_measurements/unit_groups/radiation_equivalent_dose.rb +15 -0
- data/lib/unit_measurements/unit_groups/radiation_exposure.rb +15 -0
- data/lib/unit_measurements/version.rb +1 -1
- data/units.md +42 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47fa12ab5aef0b04a4c5c0144878e0d7493b0ffba91c046633df4512b38b8fc5
|
4
|
+
data.tar.gz: 889a7b19a632a2fbdbe7cfc8efa2f917b792ffb76cf75922001e342533c06b67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a70f8eb32af057207c1846a2d6678abca3f683bc5cb7f9278bdc45f3e31f6d330ad23f2c146e4ad2a192d2a245729b7dfe82cfb68926f469b77ed4508309bf0
|
7
|
+
data.tar.gz: 6c36c79eb4c7b1d3edaf9fe66e034ad5d8cea4d0ae2773f30dcf5a1f9ba0cf807cbd5793cf05590d8ec7d2a3cd21fb107358ff2e93f980c7cb356aa43bb8f1fb
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
## [4.9.0](https://github.com/shivam091/unit_measurements/compare/v4.8.0...v4.9.0) - 2023-10-13
|
2
|
+
|
3
|
+
### What's new
|
4
|
+
|
5
|
+
- Added unit group for `information entropy` units.
|
6
|
+
|
7
|
+
----------
|
8
|
+
|
9
|
+
## [4.8.0](https://github.com/shivam091/unit_measurements/compare/v4.7.0...v4.8.0) - 2023-10-12
|
10
|
+
|
11
|
+
### What's new
|
12
|
+
|
13
|
+
- Added unit group for `radiation exposure` units.
|
14
|
+
- Added unit group for `radiation absorbed dose` units.
|
15
|
+
- Added unit group for `radiation equivalent dose` units.
|
16
|
+
|
17
|
+
----------
|
18
|
+
|
1
19
|
## [4.7.0](https://github.com/shivam091/unit_measurements/compare/v4.6.0...v4.7.0) - 2023-10-11
|
2
20
|
|
3
21
|
### What's new
|
data/Gemfile.lock
CHANGED
@@ -2,8 +2,6 @@
|
|
2
2
|
# -*- frozen_string_literal: true -*-
|
3
3
|
# -*- warn_indent: true -*-
|
4
4
|
|
5
|
-
## Fundamental SI units
|
6
|
-
|
7
5
|
require_relative "amount_of_substance"
|
8
6
|
require_relative "electric_current"
|
9
7
|
require_relative "length"
|
@@ -12,8 +10,6 @@ require_relative "temperature"
|
|
12
10
|
require_relative "time"
|
13
11
|
require_relative "weight"
|
14
12
|
|
15
|
-
## Derived units
|
16
|
-
|
17
13
|
require_relative "area"
|
18
14
|
require_relative "volume"
|
19
15
|
require_relative "density"
|
@@ -47,8 +43,10 @@ require_relative "dynamic_viscosity"
|
|
47
43
|
require_relative "kinetic_viscosity"
|
48
44
|
require_relative "magnetomotive_force"
|
49
45
|
require_relative "radioactivity"
|
50
|
-
|
51
|
-
|
46
|
+
require_relative "radiation_exposure"
|
47
|
+
require_relative "radiation_absorbed_dose"
|
48
|
+
require_relative "radiation_equivalent_dose"
|
49
|
+
require_relative "information_entropy"
|
52
50
|
|
53
51
|
require_relative "sound_level"
|
54
52
|
require_relative "plane_angle"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::InformationEntropy = UnitMeasurements.build do
|
6
|
+
primitive "nat"
|
7
|
+
|
8
|
+
si_unit "b", value: "1 Sh", aliases: ["bit", "bits"]
|
9
|
+
si_unit "B", value: [2.pow(3), "b"], aliases: ["byte", "bytes"]
|
10
|
+
|
11
|
+
unit "Sh", value: [Math.log(2), "nat"], aliases: ["shannon", "shannons"]
|
12
|
+
unit "nat", aliases: ["nit", "nepit", "natural unit of information"]
|
13
|
+
unit "nybl", value: [2.pow(2), "b"], aliases: ["nibble", "nibbles", "nybble", "nyble"]
|
14
|
+
unit "Hart", value: [Math.log(10), "nat"], aliases: ["hartley", "ban", "dit"]
|
15
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::RadiationAbsorbedDose = UnitMeasurements.build do
|
6
|
+
primitive "Gy"
|
7
|
+
|
8
|
+
system :metric do
|
9
|
+
si_unit "Gy", aliases: ["gray", "grays"]
|
10
|
+
end
|
11
|
+
|
12
|
+
system :centimetre_gram_second do
|
13
|
+
unit "erg/g", value: "1e-4 Gy", aliases: ["erg per gram", "erg per gramme", "ergs per gram", "ergs per gramme"]
|
14
|
+
unit "rad", value: "0.01 Gy", aliases: ["radiation absorbed dose"]
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::RadiationEquivalentDose = UnitMeasurements.build do
|
6
|
+
primitive "Sv"
|
7
|
+
|
8
|
+
system :metric do
|
9
|
+
si_unit "Sv", aliases: ["sievert", "sieverts"]
|
10
|
+
end
|
11
|
+
|
12
|
+
system :centimetre_gram_second do
|
13
|
+
unit "rem", value: "0.01 Sv", aliases: ["röntgen equivalent man", "roentgen equivalent man"]
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::RadiationExposure = UnitMeasurements.build do
|
6
|
+
primitive "C/kg"
|
7
|
+
|
8
|
+
system :metric do
|
9
|
+
si_unit "C/kg", aliases: ["coulomb per kilogram", "coulomb per kilogramme", "coulombs per kilogram", "coulombs per kilogramme"]
|
10
|
+
end
|
11
|
+
|
12
|
+
system :legacy_units do
|
13
|
+
unit "R", value: "0.000258 C/kg", aliases: ["röntgen", "roentgen", "roentgens"]
|
14
|
+
end
|
15
|
+
end
|
data/units.md
CHANGED
@@ -5,7 +5,7 @@ bundled units before converting your measurements.
|
|
5
5
|
|
6
6
|
**Notes:**
|
7
7
|
1. Unit names suffixed with `*` support all [SI prefixes](README.md#support-for-si-decimal-prefixes).
|
8
|
-
2. Primitive unit of the unit group is in
|
8
|
+
2. Primitive unit of the unit group is in _emphasised typeface_.
|
9
9
|
|
10
10
|
## 1. Length/Distance
|
11
11
|
|
@@ -525,3 +525,44 @@ These units are defined in `UnitMeasurements::Radioactivity`.
|
|
525
525
|
| _1_ | _Bq*_ | _becquerel, becquerels_ |
|
526
526
|
| 2 | Ci | curie, curies |
|
527
527
|
| 3 | Rd | rutherford, rutherfords |
|
528
|
+
|
529
|
+
## 45. Radiation exposure
|
530
|
+
|
531
|
+
These units are defined in `UnitMeasurements::RadiationExposure`.
|
532
|
+
|
533
|
+
| # | Name | Aliases |
|
534
|
+
|:--|:--|:--|
|
535
|
+
| _1_ | _C/kg*_ | _coulomb per kilogram, coulomb per kilogramme, coulombs per kilogram, coulombs per kilogramme_ |
|
536
|
+
| 2 | R | röntgen, roentgen, roentgens |
|
537
|
+
|
538
|
+
## 46. Radiation absorbed dose
|
539
|
+
|
540
|
+
These units are defined in `UnitMeasurements::RadiationAbsorbedDose`.
|
541
|
+
|
542
|
+
| # | Name | Aliases |
|
543
|
+
|:--|:--|:--|
|
544
|
+
| _1_ | _Gy*_ | _gray, grays_ |
|
545
|
+
| 2 | erg/g | erg per gram, erg per gramme, ergs per gram, ergs per gramme |
|
546
|
+
| 3 | rad | radiation absorbed dose |
|
547
|
+
|
548
|
+
## 47. Radiation equivalent dose
|
549
|
+
|
550
|
+
These units are defined in `UnitMeasurements::RadiationEquivalentDose`.
|
551
|
+
|
552
|
+
| # | Name | Aliases |
|
553
|
+
|:--|:--|:--|
|
554
|
+
| _1_ | _Sv*_ | _sievert, sieverts_ |
|
555
|
+
| 2 | rem | röntgen equivalent man, roentgen equivalent man |
|
556
|
+
|
557
|
+
## 48. Information entropy
|
558
|
+
|
559
|
+
These units are defined in `UnitMeasurements::InformationEntropy`.
|
560
|
+
|
561
|
+
| # | Name | Aliases |
|
562
|
+
|:--|:--|:--|
|
563
|
+
| 1 | b* | bit, bits |
|
564
|
+
| 2 | B* | byte, bytes |
|
565
|
+
| 3 | Sh | shannon, shannons |
|
566
|
+
| _4_ | _nat_ | _nit, nepit, natural unit of information_ |
|
567
|
+
| 5 | nybl | nibble, nibbles, nybble, nyble |
|
568
|
+
| 6 | Hart | hartley, ban, dit |
|
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: 4.
|
4
|
+
version: 4.9.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-10-
|
11
|
+
date: 2023-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- lib/unit_measurements/unit_groups/force.rb
|
143
143
|
- lib/unit_measurements/unit_groups/frequency.rb
|
144
144
|
- lib/unit_measurements/unit_groups/illuminance.rb
|
145
|
+
- lib/unit_measurements/unit_groups/information_entropy.rb
|
145
146
|
- lib/unit_measurements/unit_groups/kinetic_viscosity.rb
|
146
147
|
- lib/unit_measurements/unit_groups/length.rb
|
147
148
|
- lib/unit_measurements/unit_groups/luminance.rb
|
@@ -155,6 +156,9 @@ files:
|
|
155
156
|
- lib/unit_measurements/unit_groups/power.rb
|
156
157
|
- lib/unit_measurements/unit_groups/pressure.rb
|
157
158
|
- lib/unit_measurements/unit_groups/quantity.rb
|
159
|
+
- lib/unit_measurements/unit_groups/radiation_absorbed_dose.rb
|
160
|
+
- lib/unit_measurements/unit_groups/radiation_equivalent_dose.rb
|
161
|
+
- lib/unit_measurements/unit_groups/radiation_exposure.rb
|
158
162
|
- lib/unit_measurements/unit_groups/radioactivity.rb
|
159
163
|
- lib/unit_measurements/unit_groups/solid_angle.rb
|
160
164
|
- lib/unit_measurements/unit_groups/sound_level.rb
|