unit_measurements 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8601bdbb7fb37856840869d267729adefddbf714ab6696376d6165252f9531f3
4
- data.tar.gz: 33c504c31db58c752ecb4b587112ae2df4b0af6c0e1efd957af1202e635e3622
3
+ metadata.gz: 2fd329380ef25e8589462a461c67a47370fbb69275b40a47e2ffde442e5890cc
4
+ data.tar.gz: 652ad790977e5a04bbc84b8388e0879a3c0f260d731551251359c7b070a92005
5
5
  SHA512:
6
- metadata.gz: 119bd53409c40aac1242b0721e3737e65231a2e243e1e0151ede230b5b2f76358679a63a0b9fc66c8ec8bf5fda9b9395a8539c8ad2f6fd08933edc8717ffaa6d
7
- data.tar.gz: 3a5ed9b00ec6e5abee27bc8fd653e5c8c069ad18c5c5cac2c4dbcba519f1c72cbd574243f8c5e955fb4a896a737434b376395b2b4a46e114e40b473292fe04b8
6
+ metadata.gz: 9d827fae22520241b97c0566afc5eaa19b6a9fe7235add28a08afcf928a5bae051f506ef5d53cee50d6c90f13c3646e360ae78c58cceac4b6d95f18f7df75ef5
7
+ data.tar.gz: 72c4dab2cc0a34f556e377b3276171274b811118979beb0b4bd940780d2d6b45fb6e7c9ed7c1c1d920f90071ffdb5745dc34c3a6723e6b09f962a7b6d7bed0cd
data/CHANGELOG.md CHANGED
@@ -1,4 +1,14 @@
1
- ## [2.1.0](https://github.com/shivam091/unit_measurements/compare/v1.7.0...v2.1.0) - 2023-08-21
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unit_measurements (2.1.0)
4
+ unit_measurements (2.2.0)
5
5
  activesupport (~> 7.0)
6
6
 
7
7
  GEM
@@ -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
@@ -3,5 +3,5 @@
3
3
  # -*- warn_indent: true -*-
4
4
 
5
5
  module UnitMeasurements
6
- VERSION = "2.1.0"
6
+ VERSION = "2.2.0"
7
7
  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
- | # | Symbol | Aliases |
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.1.0
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-20 00:00:00.000000000 Z
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