unit_measurements 4.4.0 → 4.5.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 +9 -0
- data/Gemfile.lock +1 -1
- data/lib/unit_measurements/unit_groups/all.rb +2 -0
- data/lib/unit_measurements/unit_groups/energy.rb +27 -0
- data/lib/unit_measurements/unit_groups/power.rb +23 -0
- data/lib/unit_measurements/version.rb +1 -1
- data/units.md +27 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c247fd1e99142d30ce86410eec3c46782b1614c46ea770fbbdf0838da0ca24ff
|
4
|
+
data.tar.gz: 2e473dcfb0227dd324f1e6b4fe8a6f9d89b0b72a93d7ca510578ef66cbcca84a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e067faa355f836a0ea06077773c08a2e8a6da3599dc772d322e65f25f1188cc1f6d3d9a17e1be065ea665773fe59e19408634ac2905fe772d16076b4777b8b5
|
7
|
+
data.tar.gz: 2f57493cfc1632ad57ccbe8dec4d5690ad436f8b1d1e22278d6855346fc820d8ca8ac81d1f0834597cbffbb358bf5f22c594306b74085d828fe058ae0e2d013a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [4.5.0](https://github.com/shivam091/unit_measurements/compare/v4.4.0...v4.5.0) - 2023-10-09
|
2
|
+
|
3
|
+
### What's new
|
4
|
+
|
5
|
+
- Added unit group for `energy` units.
|
6
|
+
- Added unit group for `power` units.
|
7
|
+
|
8
|
+
----------
|
9
|
+
|
1
10
|
## [4.4.0](https://github.com/shivam091/unit_measurements/compare/v4.3.0...v4.4.0) - 2023-10-08
|
2
11
|
|
3
12
|
### What's new
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::Energy = UnitMeasurements.build do
|
6
|
+
primitive "J"
|
7
|
+
|
8
|
+
system :metric do
|
9
|
+
si_unit "J", aliases: ["joule", "joules"]
|
10
|
+
si_unit "cal", value: "4.1868 J", aliases: ["calorie", "calories"]
|
11
|
+
|
12
|
+
unit "eV", value: "1.602176634e-19 J", aliases: ["electronvolt", "electron volt", "electron-volt"]
|
13
|
+
end
|
14
|
+
|
15
|
+
system :centimetre_gram_second do
|
16
|
+
unit "erg", value: "1e-7 J", aliases: ["ergs"]
|
17
|
+
end
|
18
|
+
|
19
|
+
system :us_customary do
|
20
|
+
si_unit "Btu", value: "1055.05585262 J", aliases: ["btu", "btus", "british thermal unit", "british thermal units"]
|
21
|
+
|
22
|
+
unit "thm", value: "100 kBtu", aliases: ["therm", "therms"]
|
23
|
+
unit "quad", value: "1.05505585262e+18 J", aliases: ["quads"]
|
24
|
+
end
|
25
|
+
|
26
|
+
unit "foe", value: "1e+51 erg", aliases: ["bethe"]
|
27
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::Power = UnitMeasurements.build do
|
6
|
+
primitive "W"
|
7
|
+
|
8
|
+
system :metric do
|
9
|
+
si_unit "W", aliases: ["watt", "watts"]
|
10
|
+
|
11
|
+
unit "hp (M)", value: "735.49875 W", aliases: ["PS", "metric horsepower"]
|
12
|
+
end
|
13
|
+
|
14
|
+
system :imperial do
|
15
|
+
unit "hp", value: "745.69987158227022 W", aliases: ["hp (I)", "horsepower"]
|
16
|
+
end
|
17
|
+
|
18
|
+
system :centimetre_gram_second do
|
19
|
+
unit "erg/s", value: "1e-7 W", aliases: ["erg·s⁻¹", "erg per second", "ergs per second"]
|
20
|
+
end
|
21
|
+
|
22
|
+
unit "cal/s", value: "4.1868 W", aliases: ["cal·s⁻¹", "calorie per second", "calories per second"]
|
23
|
+
end
|
data/units.md
CHANGED
@@ -454,3 +454,30 @@ These units are defined in `UnitMeasurements::Frequency`.
|
|
454
454
|
| 2 | rad/s | rad·s⁻¹, radian per second, radians per second |
|
455
455
|
| 3 | deg/s | °/s, deg·s⁻¹, degree per second, degrees per second |
|
456
456
|
| 4 | rev/s | rps, rev·s⁻¹, revolution per second, revolutions per second |
|
457
|
+
|
458
|
+
## 39. Power
|
459
|
+
|
460
|
+
These units are defined in `UnitMeasurements::Power`.
|
461
|
+
|
462
|
+
| # | Name | Aliases |
|
463
|
+
|:--|:--|:--|
|
464
|
+
| _1_ | _W*_ | _watt, watts_ |
|
465
|
+
| 2 | hp (M) | PS, metric horsepower |
|
466
|
+
| 3 | hp | hp (I), horsepower |
|
467
|
+
| 4 | erg/s | erg·s⁻¹, erg per second, ergs per second |
|
468
|
+
| 5 | cal/s | cal·s⁻¹, calorie per second, calories per second |
|
469
|
+
|
470
|
+
## 40. Energy
|
471
|
+
|
472
|
+
These units are defined in `UnitMeasurements::Energy`.
|
473
|
+
|
474
|
+
| # | Name | Aliases |
|
475
|
+
|:--|:--|:--|
|
476
|
+
| _1_ | _J*_ | _joule, joules_ |
|
477
|
+
| 2 | cal | calorie, calories |
|
478
|
+
| 3 | eV | electronvolt, electron volt, electron-volt |
|
479
|
+
| 4 | erg | ergs |
|
480
|
+
| 5 | Btu | btu, btus, british thermal unit, british thermal units |
|
481
|
+
| 6 | thm | therm, therms |
|
482
|
+
| 7 | quad | quads |
|
483
|
+
| 8 | foe | bethe |
|
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.5.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-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- lib/unit_measurements/unit_groups/electrical_elastance.rb
|
138
138
|
- lib/unit_measurements/unit_groups/electrical_inductance.rb
|
139
139
|
- lib/unit_measurements/unit_groups/electrical_resistance.rb
|
140
|
+
- lib/unit_measurements/unit_groups/energy.rb
|
140
141
|
- lib/unit_measurements/unit_groups/force.rb
|
141
142
|
- lib/unit_measurements/unit_groups/frequency.rb
|
142
143
|
- lib/unit_measurements/unit_groups/illuminance.rb
|
@@ -148,6 +149,7 @@ files:
|
|
148
149
|
- lib/unit_measurements/unit_groups/magnetic_flux.rb
|
149
150
|
- lib/unit_measurements/unit_groups/magnetic_induction.rb
|
150
151
|
- lib/unit_measurements/unit_groups/plane_angle.rb
|
152
|
+
- lib/unit_measurements/unit_groups/power.rb
|
151
153
|
- lib/unit_measurements/unit_groups/pressure.rb
|
152
154
|
- lib/unit_measurements/unit_groups/quantity.rb
|
153
155
|
- lib/unit_measurements/unit_groups/solid_angle.rb
|