unit_measurements 4.2.0 → 4.3.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/README.md +2 -2
- data/lib/unit_measurements/unit_groups/all.rb +2 -0
- data/lib/unit_measurements/unit_groups/illuminance.rb +21 -0
- data/lib/unit_measurements/unit_groups/luminous_flux.rb +11 -0
- data/lib/unit_measurements/version.rb +1 -1
- data/units.md +20 -1
- 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: d3f6773d12334f587bca5c48febf8c0200364b0211c1a5f41f9c6956679fb5d6
|
4
|
+
data.tar.gz: 4a2a8539a325b5d8039b491808449ea742c9f1573b0f1aaa5750041a52f2cd1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4222392e0060b5be820580325ebf1736b2f30ed9b0a565bcdd116a5cbc6987066e144afe4be990f2e48f0d2d2c948e0ea8c5171899b7e594aa2e4ac152ff034e
|
7
|
+
data.tar.gz: e30b6814c18dcb98140e62b169638ffbc450ed469940237ad010f148ed8bb6315439e91f37d6d898e79d4c33c286241af06367d2d9d513b18dfedf047c2d440e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [4.3.0](https://github.com/shivam091/unit_measurements/compare/v4.2.0...v4.3.0) - 2023-10-07
|
2
|
+
|
3
|
+
### What's new
|
4
|
+
|
5
|
+
- Added unit group for `luminous flux` units.
|
6
|
+
- Added unit group for `illuminance` units.
|
7
|
+
|
8
|
+
----------
|
9
|
+
|
1
10
|
## [4.2.0](https://github.com/shivam091/unit_measurements/compare/v4.1.0...v4.2.0) - 2023-10-06
|
2
11
|
|
3
12
|
### What's new
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -424,10 +424,10 @@ and set primitive unit for each unit group using `primitive` method.
|
|
424
424
|
|
425
425
|
```ruby
|
426
426
|
UnitMeasurements::Time = UnitMeasurements.build do
|
427
|
-
# Set primitive unit for the unit group.
|
427
|
+
# Set primitive unit for the unit group (optional).
|
428
428
|
primitive "s"
|
429
429
|
|
430
|
-
# Group units by the unit system.
|
430
|
+
# Group units by the unit system (optional).
|
431
431
|
system :metric do
|
432
432
|
# Add a SI unit to the unit group.
|
433
433
|
si_unit "s", aliases: ["second", "seconds"]
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
UnitMeasurements::Illuminance = UnitMeasurements.build do
|
6
|
+
primitive "lx"
|
7
|
+
|
8
|
+
system :metric do
|
9
|
+
si_unit "lx", aliases: ["lux", "lm/m²", "lm/m^2", "lm·m⁻²", "lumen per square metre", "lumen per square meter"]
|
10
|
+
end
|
11
|
+
|
12
|
+
system :centimetre_gram_second do
|
13
|
+
unit "ph", value: "10000 lx", aliases: ["phot", "phots", "lm/cm²", "lm/cm^2", "lm·cm⁻²", "lumen per square centimetre", "lumen per square centimeter"]
|
14
|
+
end
|
15
|
+
|
16
|
+
system :us_customary do
|
17
|
+
unit "fc", value: "10.763910417 lx", aliases: ["footcandle", "lm/ft²", "lm/ft^2", "lm·ft⁻²", "lumen per square foot"]
|
18
|
+
end
|
19
|
+
|
20
|
+
unit "nx", value: "1 mlx", aliases: ["nox"]
|
21
|
+
end
|
data/units.md
CHANGED
@@ -4,7 +4,7 @@ As there are lots of units bundled with `unit_measurements`, we recommend you to
|
|
4
4
|
bundled units before converting your measurements.
|
5
5
|
|
6
6
|
**Notes:**
|
7
|
-
1. Unit names suffixed with `*` support all [SI prefixes](README.md#si-
|
7
|
+
1. Unit names suffixed with `*` support all [SI prefixes](README.md#support-for-si-decimal-prefixes).
|
8
8
|
2. Primitive unit of the unit group is in _emphasis typeface_.
|
9
9
|
|
10
10
|
## 1. Length/Distance
|
@@ -411,3 +411,22 @@ These units are defined in `UnitMeasurements::Torque`.
|
|
411
411
|
| 6 | ozf·ft | oz⋅ft, ozf\*ft, oz\*ft, ounce-force foot, ounce-foot |
|
412
412
|
| 7 | lbf⋅in | lb⋅in, lbf\*in, lb\*in, pound-force inch, pound-inch |
|
413
413
|
| 8 | lbf⋅ft | lb⋅ft, lbf\*ft, lb\*ft, pound-force foot, pound-foot |
|
414
|
+
|
415
|
+
## 35. Luminous flux
|
416
|
+
|
417
|
+
These units are defined in `UnitMeasurements::LuminousFlux`.
|
418
|
+
|
419
|
+
| # | Name | Aliases |
|
420
|
+
|:--|:--|:--|
|
421
|
+
| _1_ | _lm*_ | _lumen, lumens_ |
|
422
|
+
|
423
|
+
## 36. Illuminance
|
424
|
+
|
425
|
+
These units are defined in `UnitMeasurements::Illuminance`.
|
426
|
+
|
427
|
+
| # | Name | Aliases |
|
428
|
+
|:--|:--|:--|
|
429
|
+
| _1_ | _lx*_ | _lux, lm/m², lm/m^2, lm·m⁻², lumen per square metre, lumen per square meter_ |
|
430
|
+
| 2 | ph | phot, phots, lm/cm², lm/cm^2, lm·cm⁻², lumen per square centimetre, lumen per square centimeter |
|
431
|
+
| 3 | fc | footcandle, lm/ft², lm/ft^2, lm·ft⁻², lumen per square foot |
|
432
|
+
| 4 | nx | nox |
|
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.3.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-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -138,7 +138,9 @@ files:
|
|
138
138
|
- lib/unit_measurements/unit_groups/electrical_inductance.rb
|
139
139
|
- lib/unit_measurements/unit_groups/electrical_resistance.rb
|
140
140
|
- lib/unit_measurements/unit_groups/force.rb
|
141
|
+
- lib/unit_measurements/unit_groups/illuminance.rb
|
141
142
|
- lib/unit_measurements/unit_groups/length.rb
|
143
|
+
- lib/unit_measurements/unit_groups/luminous_flux.rb
|
142
144
|
- lib/unit_measurements/unit_groups/luminous_intensity.rb
|
143
145
|
- lib/unit_measurements/unit_groups/magnetic_field.rb
|
144
146
|
- lib/unit_measurements/unit_groups/magnetic_flux.rb
|