unit_measurements 3.7.0 → 3.8.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: '08735c5d46460f37e61ce9bfcdd4596ca4eb76820a9d9ea9e9fbeaf7ad8aaec8'
4
- data.tar.gz: b4b955ab37cc097abcec88f1c898ad89990b8693dd7a0aaff6e0110946e91637
3
+ metadata.gz: d1f5b33a4d36085c2a15c637a565132cfa411810b29272bac86e079892a7c8ee
4
+ data.tar.gz: db220a3d6272793892f82d1bcb3a8ecea8e499792230403318ce18566fc5afa0
5
5
  SHA512:
6
- metadata.gz: b674c2dcfb9ab7de21df9fa115fa21237b787ba3866a7ebe4b720ca875d57117e7e060cb374548ce2d4c669c2d2ef4fc34bbdcd10932a31d88e6fe652bd2ce1d
7
- data.tar.gz: 5fb259148d43d1644b63866c76170cce4b8211905c2f8cbc6424e68192edc062f4eefbb312efeb9bc5a61344f95eba3b8c57de2c39df378b03e8df84f1e42d35
6
+ metadata.gz: 7cfa24b914b602f492657014bacdd4ebb445c412aa06a99b73adb43c5e5f7c92213677c7b7487d7750f20e1877d83a5385cd57b1c29217993d774c40893ad7a6
7
+ data.tar.gz: c5f3e296d5c475889350139ef26830983d9515394ee8885854df32cfc6c27ec4f4ccb22e676637df557dbb827d6ecec04ebf3bbe7d7e9418fc1107b6258d4a68
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [3.8.0](https://github.com/shivam091/unit_measurements/compare/v3.7.0...v3.8.0) - 2023-10-02
2
+
3
+ ### What's new
4
+
5
+ - Added unit group for `magnetic field` units.
6
+ - Added unit group for `inductance` units.
7
+
8
+ ----------
9
+
1
10
  ## [3.7.0](https://github.com/shivam091/unit_measurements/compare/v3.6.0...v3.7.0) - 2023-10-01
2
11
 
3
12
  ### What's new
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unit_measurements (3.7.0)
4
+ unit_measurements (3.8.0)
5
5
  activesupport (~> 7.0)
6
6
 
7
7
  GEM
@@ -30,6 +30,8 @@ require_relative "resistance"
30
30
  require_relative "conductance"
31
31
  require_relative "magnetic_flux"
32
32
  require_relative "magnetic_induction"
33
+ require_relative "magnetic_field"
34
+ require_relative "inductance"
33
35
 
34
36
  ## Other units
35
37
 
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ UnitMeasurements::Inductance = UnitMeasurements.build do
6
+ system :metric do
7
+ primitive :H
8
+
9
+ si_unit :H, aliases: [:henry, :henries]
10
+ unit :"Wb/A", value: "1 H", aliases: [:"Wb·A⁻¹", :"weber per ampere", :"webers per ampere"]
11
+ end
12
+
13
+ system :centimetre_gram_second do
14
+ primitive :abH
15
+
16
+ unit :abH, value: "1e-9 H", aliases: [:abhenry, :abhenries]
17
+ unit :statH, value: "8.98755178736818e+11 H", aliases: [:stathenry, :stathenries]
18
+ end
19
+ end
@@ -0,0 +1,13 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ UnitMeasurements::MagneticField = UnitMeasurements.build do
6
+ system :metric do
7
+ primitive :Oe
8
+
9
+ si_unit :Oe, aliases: [:oersted, :oersteds]
10
+
11
+ unit :"A/m", value: [(Math::PI / 250), :Oe], aliases: [:"A·m⁻¹", :"ampere/meter", :"ampere/metre", :"ampere per meter", :"ampere per metre", :"amperes per meter", :"amperes per metre"]
12
+ end
13
+ end
@@ -3,5 +3,5 @@
3
3
  # -*- warn_indent: true -*-
4
4
 
5
5
  module UnitMeasurements
6
- VERSION = "3.7.0"
6
+ VERSION = "3.8.0"
7
7
  end
data/units.md CHANGED
@@ -334,3 +334,23 @@ These units are defined in `UnitMeasurements::MagneticInduction`.
334
334
  |:--|:--|:--|
335
335
  | 1 | T* | tesla, teslas |
336
336
  | 2 | G | Gs, gauss, gausses |
337
+
338
+ ## 28. Magnetic field
339
+
340
+ These units are defined in `UnitMeasurements::MagneticField`.
341
+
342
+ | # | Name | Aliases |
343
+ |:--|:--|:--|
344
+ | 1 | Oe* | oersted, oersteds |
345
+ | 2 | A/m | A·m⁻¹, ampere/meter, ampere/metre, ampere per meter, ampere per metre, amperes per meter, amperes per metre |
346
+
347
+ ## 29. Inductance
348
+
349
+ These units are defined in `UnitMeasurements::Inductance`.
350
+
351
+ | # | Name | Aliases |
352
+ |:--|:--|:--|
353
+ | 1 | H* | henry, henries |
354
+ | 2 | abH | abhenry, abhenries |
355
+ | 3 | statH | stathenry, stathenries |
356
+ | 4 | Wb/A | Wb·A⁻¹, weber per ampere, webers per ampere |
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: 3.7.0
4
+ version: 3.8.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-02 00:00:00.000000000 Z
11
+ date: 2023-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -131,8 +131,10 @@ files:
131
131
  - lib/unit_measurements/unit_groups/electric_charge.rb
132
132
  - lib/unit_measurements/unit_groups/electric_current.rb
133
133
  - lib/unit_measurements/unit_groups/force.rb
134
+ - lib/unit_measurements/unit_groups/inductance.rb
134
135
  - lib/unit_measurements/unit_groups/length.rb
135
136
  - lib/unit_measurements/unit_groups/luminous_intensity.rb
137
+ - lib/unit_measurements/unit_groups/magnetic_field.rb
136
138
  - lib/unit_measurements/unit_groups/magnetic_flux.rb
137
139
  - lib/unit_measurements/unit_groups/magnetic_induction.rb
138
140
  - lib/unit_measurements/unit_groups/plane_angle.rb