unit_measurements 4.5.0 → 4.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c247fd1e99142d30ce86410eec3c46782b1614c46ea770fbbdf0838da0ca24ff
4
- data.tar.gz: 2e473dcfb0227dd324f1e6b4fe8a6f9d89b0b72a93d7ca510578ef66cbcca84a
3
+ metadata.gz: 5be3f3d8447b6405468a65a4458bf1b21d88bca500592e7749d76481f7ebe9c2
4
+ data.tar.gz: ecae15311d1bf917948c4a5df32296621d38f518198fa01c04bd627f96a93a71
5
5
  SHA512:
6
- metadata.gz: 5e067faa355f836a0ea06077773c08a2e8a6da3599dc772d322e65f25f1188cc1f6d3d9a17e1be065ea665773fe59e19408634ac2905fe772d16076b4777b8b5
7
- data.tar.gz: 2f57493cfc1632ad57ccbe8dec4d5690ad436f8b1d1e22278d6855346fc820d8ca8ac81d1f0834597cbffbb358bf5f22c594306b74085d828fe058ae0e2d013a
6
+ metadata.gz: 64b064f7443ace114b58f53399a9d64748fdc11bc4d695e3e8bc0c09eb210d8f6b08fb44ee20ed438b93904e7b372aaa9b2464102bc696c6a374ca7187b8f67e
7
+ data.tar.gz: 6dd82d248fc44043f062dd55ee7d14f2c4b6c7eb0a7d809594c4fd0350ceac8e66e042cb09ef8d58aedf7568d084d3f13b0e829de539e3171f7ea80f7211d47a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [4.7.0](https://github.com/shivam091/unit_measurements/compare/v4.6.0...v4.7.0) - 2023-10-11
2
+
3
+ ### What's new
4
+
5
+ - Added unit group for `magnetomotive force` units.
6
+ - Added unit group for `radioactivity` units.
7
+
8
+ ----------
9
+
10
+ ## [4.6.0](https://github.com/shivam091/unit_measurements/compare/v4.5.0...v4.6.0) - 2023-10-10
11
+
12
+ ### What's new
13
+
14
+ - Added unit group for `dynamic viscosity` units.
15
+ - Added unit group for `kinetic viscosity` units.
16
+
17
+ ----------
18
+
1
19
  ## [4.5.0](https://github.com/shivam091/unit_measurements/compare/v4.4.0...v4.5.0) - 2023-10-09
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 (4.5.0)
4
+ unit_measurements (4.7.0)
5
5
  activesupport (~> 7.0)
6
6
 
7
7
  GEM
@@ -43,6 +43,10 @@ require_relative "luminance"
43
43
  require_relative "frequency"
44
44
  require_relative "power"
45
45
  require_relative "energy"
46
+ require_relative "dynamic_viscosity"
47
+ require_relative "kinetic_viscosity"
48
+ require_relative "magnetomotive_force"
49
+ require_relative "radioactivity"
46
50
 
47
51
  ## Other units
48
52
 
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ UnitMeasurements::DynamicViscosity = UnitMeasurements.build do
6
+ primitive "Pa⋅s"
7
+
8
+ system :metric do
9
+ si_unit "Pa⋅s", aliases: ["Pa*s", "pascal second"]
10
+ end
11
+
12
+ system :centimetre_gram_second do
13
+ unit "P", value: "1 dPa⋅s", aliases: ["dyne·s/cm²", "dyne*s/cm^2", "poise"]
14
+ unit "Pl", value: "10 P", aliases: ["poiseuille"]
15
+ end
16
+
17
+ system :foot_pound_second do
18
+ unit "lb/(ft⋅s)", value: "1.488164 Pa⋅s", aliases: ["lb/(ft*s)", "pound per foot second"]
19
+ unit "lb/(ft⋅h)", value: "0.0004133789 Pa⋅s", aliases: ["lb/(ft*h)", "pound per foot hour"]
20
+
21
+ unit "(lbf⋅s)/ft²", value: "47.88026 Pa⋅s", aliases: ["(lb⋅s)/ft²", "(lbf*s)/ft^2", "(lb*s)/ft^2", "pound-force second per square foot"]
22
+ unit "(lbf⋅s)/in²", value: "6894.757 Pa⋅s", aliases: ["(lb⋅s)/in²", "(lbf*s)/in^2", "(lb*s)/in^2", "pound-force second per square inch"]
23
+ end
24
+ end
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ UnitMeasurements::KineticViscosity = UnitMeasurements.build do
6
+ primitive "m²/s"
7
+
8
+ system :metric do
9
+ unit "m²/s", aliases: ["m^2/s", "square metre per second", "square meter per second", "square metres per second", "square meters per second"]
10
+ end
11
+
12
+ system :foot_pound_second do
13
+ unit "ft²/s", value: "0.09290304 m²/s", aliases: ["ft^2/s", "square foot per second", "square feet per second"]
14
+ unit "in²/s", value: "0.006944444444444443 ft²/s", aliases: ["in^2/s", "square inch per second", "square inches per second"]
15
+ end
16
+
17
+ system :centimetre_gram_second do
18
+ unit "St", value: "1e-4 m²/s", aliases: ["strokes"]
19
+ end
20
+ end
@@ -0,0 +1,15 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ UnitMeasurements::MagnetomotiveForce = UnitMeasurements.build do
6
+ primitive "A⋅t"
7
+
8
+ system :metric do
9
+ unit "A⋅t", aliases: ["A*t", "ampere-turn"]
10
+ end
11
+
12
+ system :centimetre_gram_second do
13
+ unit "Gb", value: [Rational(10, (4 * Math::PI)), "A⋅t"], aliases: ["Gi", "gilbert", "gilberts"]
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ UnitMeasurements::Radioactivity = UnitMeasurements.build do
6
+ primitive "Bq"
7
+
8
+ system :metric do
9
+ si_unit "Bq", aliases: ["becquerel", "becquerels"]
10
+ end
11
+
12
+ unit "Ci", value: "3.7e+10 Bq", aliases: ["curie", "curies"]
13
+ unit "Rd", value: "1e+6 Bq", aliases: ["rutherford", "rutherfords"]
14
+ end
@@ -3,5 +3,5 @@
3
3
  # -*- warn_indent: true -*-
4
4
 
5
5
  module UnitMeasurements
6
- VERSION = "4.5.0"
6
+ VERSION = "4.7.0"
7
7
  end
data/units.md CHANGED
@@ -481,3 +481,47 @@ These units are defined in `UnitMeasurements::Energy`.
481
481
  | 6 | thm | therm, therms |
482
482
  | 7 | quad | quads |
483
483
  | 8 | foe | bethe |
484
+
485
+ ## 41. Dynamic viscosity
486
+
487
+ These units are defined in `UnitMeasurements::DynamicViscosity`.
488
+
489
+ | # | Name | Aliases |
490
+ |:--|:--|:--|
491
+ | _1_ | _Pa⋅s*_ | _Pa*s, pascal second_ |
492
+ | 2 | P | dyne·s/cm², dyne*s/cm^2, poise |
493
+ | 3 | lb/(ft⋅s) | lb/(ft*s), pound per foot second |
494
+ | 4 | lb/(ft⋅h) | lb/(ft*h), pound per foot hour |
495
+ | 5 | (lbf⋅s)/ft² | (lb⋅s)/ft², (lbf\*s)/ft^2, (lb\*s)/ft^2, pound-force second per square foot |
496
+ | 6 | (lbf⋅s)/in² | (lb⋅s)/in², (lbf\*s)/in^2, (lb\*s)/in^2, pound-force second per square inch |
497
+ | 7 | Pl | poiseuille |
498
+
499
+ ## 42. Kinetic viscosity
500
+
501
+ These units are defined in `UnitMeasurements::KineticViscosity`.
502
+
503
+ | # | Name | Aliases |
504
+ |:--|:--|:--|
505
+ | _1_ | _m²/s_ | _m^2/s, square metre per second, square meter per second, square metres per second, square meters per second_ |
506
+ | 2 | St | strokes |
507
+ | 3 | ft²/s | ft^2/s, square foot per second, square feet per second |
508
+ | 4 | in²/s | in^2/s, square inch per second, square inches per second |
509
+
510
+ ## 43. Magnetomotive force
511
+
512
+ These units are defined in `UnitMeasurements::MagnetomotiveForce`.
513
+
514
+ | # | Name | Aliases |
515
+ |:--|:--|:--|
516
+ | _1_ | _A⋅t_ | _A*t, ampere-turn_ |
517
+ | 2 | Gb | Gi, gilbert, gilberts |
518
+
519
+ ## 44. Radioactivity
520
+
521
+ These units are defined in `UnitMeasurements::Radioactivity`.
522
+
523
+ | # | Name | Aliases |
524
+ |:--|:--|:--|
525
+ | _1_ | _Bq*_ | _becquerel, becquerels_ |
526
+ | 2 | Ci | curie, curies |
527
+ | 3 | Rd | rutherford, rutherfords |
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.5.0
4
+ version: 4.7.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-09 00:00:00.000000000 Z
11
+ date: 2023-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -127,6 +127,7 @@ files:
127
127
  - lib/unit_measurements/unit_groups/area.rb
128
128
  - lib/unit_measurements/unit_groups/catalytic_activity.rb
129
129
  - lib/unit_measurements/unit_groups/density.rb
130
+ - lib/unit_measurements/unit_groups/dynamic_viscosity.rb
130
131
  - lib/unit_measurements/unit_groups/electric_charge.rb
131
132
  - lib/unit_measurements/unit_groups/electric_conductance.rb
132
133
  - lib/unit_measurements/unit_groups/electric_current.rb
@@ -141,6 +142,7 @@ files:
141
142
  - lib/unit_measurements/unit_groups/force.rb
142
143
  - lib/unit_measurements/unit_groups/frequency.rb
143
144
  - lib/unit_measurements/unit_groups/illuminance.rb
145
+ - lib/unit_measurements/unit_groups/kinetic_viscosity.rb
144
146
  - lib/unit_measurements/unit_groups/length.rb
145
147
  - lib/unit_measurements/unit_groups/luminance.rb
146
148
  - lib/unit_measurements/unit_groups/luminous_flux.rb
@@ -148,10 +150,12 @@ files:
148
150
  - lib/unit_measurements/unit_groups/magnetic_field.rb
149
151
  - lib/unit_measurements/unit_groups/magnetic_flux.rb
150
152
  - lib/unit_measurements/unit_groups/magnetic_induction.rb
153
+ - lib/unit_measurements/unit_groups/magnetomotive_force.rb
151
154
  - lib/unit_measurements/unit_groups/plane_angle.rb
152
155
  - lib/unit_measurements/unit_groups/power.rb
153
156
  - lib/unit_measurements/unit_groups/pressure.rb
154
157
  - lib/unit_measurements/unit_groups/quantity.rb
158
+ - lib/unit_measurements/unit_groups/radioactivity.rb
155
159
  - lib/unit_measurements/unit_groups/solid_angle.rb
156
160
  - lib/unit_measurements/unit_groups/sound_level.rb
157
161
  - lib/unit_measurements/unit_groups/temperature.rb