unit_measurements 3.6.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: '093ce14ea3ef94b656b3dd662af794f381fe69538d3f13045520c463331b41e2'
4
- data.tar.gz: 0bd30d1d40a96bb5f6237bd499c1da9427917a471a4780652c5c203334cae104
3
+ metadata.gz: d1f5b33a4d36085c2a15c637a565132cfa411810b29272bac86e079892a7c8ee
4
+ data.tar.gz: db220a3d6272793892f82d1bcb3a8ecea8e499792230403318ce18566fc5afa0
5
5
  SHA512:
6
- metadata.gz: 81d0e42bf1d4967821eb276f0574588a2bdf15ff9196659c7aafc34adf5a2da4cdcb4990bbac2e9a251117225ff39b31707ce4a09461416bd093868cd69c88d7
7
- data.tar.gz: 69ba5d10f7fb46451874f36db150aeff3516ce99b8394efc2402fa8d44600290c626817edba70620dc312040b0fdea93be4851ae527f255fae03f03481470647
6
+ metadata.gz: 7cfa24b914b602f492657014bacdd4ebb445c412aa06a99b73adb43c5e5f7c92213677c7b7487d7750f20e1877d83a5385cd57b1c29217993d774c40893ad7a6
7
+ data.tar.gz: c5f3e296d5c475889350139ef26830983d9515394ee8885854df32cfc6c27ec4f4ccb22e676637df557dbb827d6ecec04ebf3bbe7d7e9418fc1107b6258d4a68
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
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
+
10
+ ## [3.7.0](https://github.com/shivam091/unit_measurements/compare/v3.6.0...v3.7.0) - 2023-10-01
11
+
12
+ ### What's new
13
+
14
+ - Added unit group for `magnetic flux` units.
15
+ - Added unit group for `magnetic induction` units
16
+
17
+ ----------
18
+
1
19
  ## [3.6.0](https://github.com/shivam091/unit_measurements/compare/v3.5.0...v3.6.0) - 2023-10-01
2
20
 
3
21
  ### What's new
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unit_measurements (3.6.0)
4
+ unit_measurements (3.8.0)
5
5
  activesupport (~> 7.0)
6
6
 
7
7
  GEM
@@ -28,6 +28,10 @@ require_relative "capacitance"
28
28
  require_relative "elastance"
29
29
  require_relative "resistance"
30
30
  require_relative "conductance"
31
+ require_relative "magnetic_flux"
32
+ require_relative "magnetic_induction"
33
+ require_relative "magnetic_field"
34
+ require_relative "inductance"
31
35
 
32
36
  ## Other units
33
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
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ UnitMeasurements::MagneticFlux = UnitMeasurements.build do
6
+ system :metric do
7
+ primitive :Wb
8
+
9
+ si_unit :Wb, aliases: [:weber, :webers]
10
+ unit :"T·m²", value: "1 Wb", aliases: [:"T*m^2", :"tesla-square meter", :"tesla-square metre"]
11
+ end
12
+
13
+ system :centimetre_gram_second do
14
+ primitive :Mx
15
+
16
+ unit :Mx, value: "1e-8 Wb", aliases: [:maxwell, :maxwells]
17
+ unit :"G·cm²", value: "1e-8 Wb", aliases: [:"G*cm^2", :"gauss-square centimeter", :"gauss-square centimetre"]
18
+ end
19
+ end
@@ -0,0 +1,17 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ UnitMeasurements::MagneticInduction = UnitMeasurements.build do
6
+ system :metric do
7
+ primitive :T
8
+
9
+ si_unit :T, aliases: [:tesla, :teslas]
10
+ end
11
+
12
+ system :centimetre_gram_second do
13
+ primitive :G
14
+
15
+ unit :G, value: "1e-4 T", aliases: [:Gs, :gauss, :gausses]
16
+ end
17
+ end
@@ -3,5 +3,5 @@
3
3
  # -*- warn_indent: true -*-
4
4
 
5
5
  module UnitMeasurements
6
- VERSION = "3.6.0"
6
+ VERSION = "3.8.0"
7
7
  end
data/units.md CHANGED
@@ -314,3 +314,43 @@ These units are defined in `UnitMeasurements::Conductance`.
314
314
  | 2 | abS | ab℧, absiemens, abmho, abmhos |
315
315
  | 3 | statS | stat℧, statsiemens, statmho, statmhos |
316
316
  | 3 | A/V | A·V⁻¹, amp./volt, amps./volt, ampere/volt, amperes/volt, ampere per volt, amperes per volt |
317
+
318
+ ## 26. Magnetic flux
319
+
320
+ These units are defined in `UnitMeasurements::MagneticFlux`.
321
+
322
+ | # | Name | Aliases |
323
+ |:--|:--|:--|
324
+ | 1 | Wb* | weber, webers |
325
+ | 2 | Mx | maxwell, maxwells |
326
+ | 3 | T·m² | T*m^2, tesla-square meter, tesla-square metre |
327
+ | 4 | G·cm² | G*cm^2, gauss-square centimeter, gauss-square centimetre |
328
+
329
+ ## 27. Magnetic induction
330
+
331
+ These units are defined in `UnitMeasurements::MagneticInduction`.
332
+
333
+ | # | Name | Aliases |
334
+ |:--|:--|:--|
335
+ | 1 | T* | tesla, teslas |
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.6.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-01 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,12 @@ 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
138
+ - lib/unit_measurements/unit_groups/magnetic_flux.rb
139
+ - lib/unit_measurements/unit_groups/magnetic_induction.rb
136
140
  - lib/unit_measurements/unit_groups/plane_angle.rb
137
141
  - lib/unit_measurements/unit_groups/quantity.rb
138
142
  - lib/unit_measurements/unit_groups/resistance.rb