unit_measurements 3.5.0 → 3.7.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: 4435eefb4098bb9a5419dd0d712b670996649aedf3c325c12a0e3d23ab6f1b35
4
- data.tar.gz: cd4806a5b68e37e39cd7473ce2020a98137c8848e59a95a05f905cef39e54835
3
+ metadata.gz: '08735c5d46460f37e61ce9bfcdd4596ca4eb76820a9d9ea9e9fbeaf7ad8aaec8'
4
+ data.tar.gz: b4b955ab37cc097abcec88f1c898ad89990b8693dd7a0aaff6e0110946e91637
5
5
  SHA512:
6
- metadata.gz: 6ec86d1da972eaabdf90f2df5e58a37973250ad0d6a3b7d5d8c3445529f4b289f720f06041757bb325d18b49c39c00a70a83f1466f78d842de8583077befbc1e
7
- data.tar.gz: ead67e5a9f286591e3f2b6a79032122128963f5deb3186beaa27c5c586ba4492acf6ea881ffc574e8d7a133ab3c771593554b4540878b331164bab55b3572241
6
+ metadata.gz: b674c2dcfb9ab7de21df9fa115fa21237b787ba3866a7ebe4b720ca875d57117e7e060cb374548ce2d4c669c2d2ef4fc34bbdcd10932a31d88e6fe652bd2ce1d
7
+ data.tar.gz: 5fb259148d43d1644b63866c76170cce4b8211905c2f8cbc6424e68192edc062f4eefbb312efeb9bc5a61344f95eba3b8c57de2c39df378b03e8df84f1e42d35
data/CHANGELOG.md CHANGED
@@ -1,4 +1,22 @@
1
- ## [3.5.0](https://github.com/shivam091/unit_measurements/compare/v3.4.1...v3.5.0) - 2023-08-30
1
+ ## [3.7.0](https://github.com/shivam091/unit_measurements/compare/v3.6.0...v3.7.0) - 2023-10-01
2
+
3
+ ### What's new
4
+
5
+ - Added unit group for `magnetic flux` units.
6
+ - Added unit group for `magnetic induction` units
7
+
8
+ ----------
9
+
10
+ ## [3.6.0](https://github.com/shivam091/unit_measurements/compare/v3.5.0...v3.6.0) - 2023-10-01
11
+
12
+ ### What's new
13
+
14
+ - Added unit group for `resistance` units.
15
+ - Added unit group for `conductance` units.
16
+
17
+ ----------
18
+
19
+ ## [3.5.0](https://github.com/shivam091/unit_measurements/compare/v3.4.1...v3.5.0) - 2023-09-30
2
20
 
3
21
  ### What's new
4
22
 
@@ -7,7 +25,7 @@
7
25
 
8
26
  ----------
9
27
 
10
- ## [3.4.1](https://github.com/shivam091/unit_measurements/compare/v3.4.0...v3.4.1) - 2023-08-29
28
+ ## [3.4.1](https://github.com/shivam091/unit_measurements/compare/v3.4.0...v3.4.1) - 2023-09-29
11
29
 
12
30
  ### What's changed
13
31
 
@@ -19,7 +37,7 @@
19
37
 
20
38
  ----------
21
39
 
22
- ## [3.4.0](https://github.com/shivam091/unit_measurements/compare/v3.3.0...v3.4.0) - 2023-08-28
40
+ ## [3.4.0](https://github.com/shivam091/unit_measurements/compare/v3.3.0...v3.4.0) - 2023-09-28
23
41
 
24
42
  ### What's new
25
43
 
@@ -34,7 +52,7 @@
34
52
 
35
53
  ----------
36
54
 
37
- ## [3.3.0](https://github.com/shivam091/unit_measurements/compare/v3.2.0...v3.3.0) - 2023-08-28
55
+ ## [3.3.0](https://github.com/shivam091/unit_measurements/compare/v3.2.0...v3.3.0) - 2023-09-28
38
56
 
39
57
  ### What's new
40
58
 
@@ -43,7 +61,7 @@
43
61
 
44
62
  ----------
45
63
 
46
- ## [3.2.0](https://github.com/shivam091/unit_measurements/compare/v3.1.0...v3.2.0) - 2023-08-27
64
+ ## [3.2.0](https://github.com/shivam091/unit_measurements/compare/v3.1.0...v3.2.0) - 2023-09-27
47
65
 
48
66
  ### What's new
49
67
 
@@ -52,7 +70,7 @@
52
70
 
53
71
  ----------
54
72
 
55
- ## [3.1.0](https://github.com/shivam091/unit_measurements/compare/v3.0.0...v3.1.0) - 2023-08-26
73
+ ## [3.1.0](https://github.com/shivam091/unit_measurements/compare/v3.0.0...v3.1.0) - 2023-09-26
56
74
 
57
75
  ### What's new
58
76
 
@@ -61,7 +79,7 @@
61
79
 
62
80
  ----------
63
81
 
64
- ## [3.0.0](https://github.com/shivam091/unit_measurements/compare/v2.6.2...v3.0.0) - 2023-08-25
82
+ ## [3.0.0](https://github.com/shivam091/unit_measurements/compare/v2.6.2...v3.0.0) - 2023-09-25
65
83
 
66
84
  ### What's new
67
85
 
@@ -77,7 +95,7 @@
77
95
 
78
96
  ----------
79
97
 
80
- ## [2.6.2](https://github.com/shivam091/unit_measurements/compare/v2.6.1...v2.6.2) - 2023-08-25
98
+ ## [2.6.2](https://github.com/shivam091/unit_measurements/compare/v2.6.1...v2.6.2) - 2023-09-25
81
99
 
82
100
  ### What's changed
83
101
 
@@ -85,7 +103,7 @@
85
103
 
86
104
  ----------
87
105
 
88
- ## [2.6.1](https://github.com/shivam091/unit_measurements/compare/v2.6.0...v2.6.1) - 2023-08-24
106
+ ## [2.6.1](https://github.com/shivam091/unit_measurements/compare/v2.6.0...v2.6.1) - 2023-09-24
89
107
 
90
108
  ### What's changed
91
109
 
@@ -93,7 +111,7 @@
93
111
 
94
112
  ----------
95
113
 
96
- ## [2.6.0](https://github.com/shivam091/unit_measurements/compare/v2.5.0...v2.6.0) - 2023-08-24
114
+ ## [2.6.0](https://github.com/shivam091/unit_measurements/compare/v2.5.0...v2.6.0) - 2023-09-24
97
115
 
98
116
  ### What's new
99
117
 
@@ -102,7 +120,7 @@
102
120
 
103
121
  ----------
104
122
 
105
- ## [2.5.0](https://github.com/shivam091/unit_measurements/compare/v2.4.0...v2.5.0) - 2023-08-23
123
+ ## [2.5.0](https://github.com/shivam091/unit_measurements/compare/v2.4.0...v2.5.0) - 2023-09-23
106
124
 
107
125
  ### What's new
108
126
 
@@ -111,7 +129,7 @@
111
129
 
112
130
  ----------
113
131
 
114
- ## [2.4.0](https://github.com/shivam091/unit_measurements/compare/v2.3.0...v2.4.0) - 2023-08-23
132
+ ## [2.4.0](https://github.com/shivam091/unit_measurements/compare/v2.3.0...v2.4.0) - 2023-09-23
115
133
 
116
134
  ### What's new
117
135
 
@@ -120,7 +138,7 @@
120
138
 
121
139
  ----------
122
140
 
123
- ## [2.3.0](https://github.com/shivam091/unit_measurements/compare/v2.2.0...v2.3.0) - 2023-08-22
141
+ ## [2.3.0](https://github.com/shivam091/unit_measurements/compare/v2.2.0...v2.3.0) - 2023-09-22
124
142
 
125
143
  ### What's new
126
144
 
@@ -129,7 +147,7 @@
129
147
 
130
148
  ----------
131
149
 
132
- ## [2.2.0](https://github.com/shivam091/unit_measurements/compare/v2.1.0...v2.2.0) - 2023-08-21
150
+ ## [2.2.0](https://github.com/shivam091/unit_measurements/compare/v2.1.0...v2.2.0) - 2023-09-21
133
151
 
134
152
  ### What's new
135
153
 
@@ -139,7 +157,7 @@
139
157
 
140
158
  ----------
141
159
 
142
- ## [2.1.0](https://github.com/shivam091/unit_measurements/compare/v1.7.0...v2.1.0) - 2023-08-20
160
+ ## [2.1.0](https://github.com/shivam091/unit_measurements/compare/v1.7.0...v2.1.0) - 2023-09-20
143
161
 
144
162
  ### What's new
145
163
 
@@ -148,7 +166,7 @@
148
166
 
149
167
  ----------
150
168
 
151
- ## [1.7.0](https://github.com/shivam091/unit_measurements/compare/v1.6.0...v1.7.0) - 2023-08-20
169
+ ## [1.7.0](https://github.com/shivam091/unit_measurements/compare/v1.6.0...v1.7.0) - 2023-09-20
152
170
 
153
171
  ### What's new
154
172
 
@@ -157,7 +175,7 @@
157
175
 
158
176
  ----------
159
177
 
160
- ## [1.6.0](https://github.com/shivam091/unit_measurements/compare/v1.5.1...v1.6.0) - 2023-08-19
178
+ ## [1.6.0](https://github.com/shivam091/unit_measurements/compare/v1.5.1...v1.6.0) - 2023-09-19
161
179
 
162
180
  ### What's new
163
181
 
@@ -165,7 +183,7 @@
165
183
 
166
184
  ----------
167
185
 
168
- ## [1.5.1](https://github.com/shivam091/unit_measurements/compare/v1.5.0...v1.5.1) - 2023-08-18
186
+ ## [1.5.1](https://github.com/shivam091/unit_measurements/compare/v1.5.0...v1.5.1) - 2023-09-18
169
187
 
170
188
  ### What's updated
171
189
 
@@ -173,7 +191,7 @@
173
191
 
174
192
  ----------
175
193
 
176
- ## [1.5.0](https://github.com/shivam091/unit_measurements/compare/v1.4.0...v1.5.0) - 2023-08-18
194
+ ## [1.5.0](https://github.com/shivam091/unit_measurements/compare/v1.4.0...v1.5.0) - 2023-09-18
177
195
 
178
196
  ### What's fixed
179
197
 
@@ -181,7 +199,7 @@
181
199
 
182
200
  ----------
183
201
 
184
- ## [1.4.0](https://github.com/shivam091/unit_measurements/compare/v1.3.0...v1.4.0) - 2023-08-17
202
+ ## [1.4.0](https://github.com/shivam091/unit_measurements/compare/v1.3.0...v1.4.0) - 2023-09-17
185
203
 
186
204
  ### What's new
187
205
 
@@ -189,7 +207,7 @@
189
207
 
190
208
  ----------
191
209
 
192
- ## [1.3.0](https://github.com/shivam091/unit_measurements/compare/v1.2.0...v1.3.0) - 2023-08-16
210
+ ## [1.3.0](https://github.com/shivam091/unit_measurements/compare/v1.2.0...v1.3.0) - 2023-09-16
193
211
 
194
212
  ### What's new
195
213
 
@@ -197,7 +215,7 @@
197
215
 
198
216
  ----------
199
217
 
200
- ## [1.2.0](https://github.com/shivam091/unit_measurements/compare/v1.1.0...v1.2.0) - 2023-08-15
218
+ ## [1.2.0](https://github.com/shivam091/unit_measurements/compare/v1.1.0...v1.2.0) - 2023-09-15
201
219
 
202
220
  ### What's new
203
221
 
@@ -205,7 +223,7 @@
205
223
 
206
224
  ----------
207
225
 
208
- ## [1.1.0](https://github.com/shivam091/unit_measurements/compare/v1.0.0...v1.1.0) - 2023-08-14
226
+ ## [1.1.0](https://github.com/shivam091/unit_measurements/compare/v1.0.0...v1.1.0) - 2023-09-14
209
227
 
210
228
  ### What's new
211
229
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unit_measurements (3.5.0)
4
+ unit_measurements (3.7.0)
5
5
  activesupport (~> 7.0)
6
6
 
7
7
  GEM
@@ -26,6 +26,10 @@ require_relative "voltage"
26
26
  require_relative "electric_charge"
27
27
  require_relative "capacitance"
28
28
  require_relative "elastance"
29
+ require_relative "resistance"
30
+ require_relative "conductance"
31
+ require_relative "magnetic_flux"
32
+ require_relative "magnetic_induction"
29
33
 
30
34
  ## Other units
31
35
 
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ UnitMeasurements::Conductance = UnitMeasurements.build do
6
+ system :metric do
7
+ primitive :S
8
+
9
+ si_unit :S, aliases: [:℧, :"Ω⁻¹", :siemens, :mho, :mhos]
10
+ unit :"A/V", value: "1 S", aliases: [:"A·V⁻¹", :"amp./volt", :"amps./volt", :"ampere/volt", :"amperes/volt", :"ampere per volt", :"amperes per volt"]
11
+ end
12
+
13
+ system :centimetre_gram_second do
14
+ primitive :statS
15
+
16
+ unit :abS, value: "1e+9 S", aliases: [:ab℧, :absiemens, :abmho, :abmhos]
17
+ unit :statS, value: "1.112347e-12 S", aliases: [:stat℧, :statsiemens, :statmho, :statmhos]
18
+ end
19
+ 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
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ UnitMeasurements::Resistance = UnitMeasurements.build do
6
+ system :metric do
7
+ primitive :Ω
8
+
9
+ si_unit :Ω, aliases: [:ω, :ohm, :ohms, :"reciprocal siemens"]
10
+ unit :S, value: "1 Ω", aliases: [:siemens, :mho, :mhos]
11
+ unit :"V/A", value: "1 Ω", aliases: [:"V·A⁻¹", :"volt/amp.", :"volts/amp.", :"volt/ampere", :"volts/ampere", :"volt per ampere", :"volts per ampere"]
12
+ end
13
+
14
+ system :centimetre_gram_second do
15
+ primitive :statΩ
16
+
17
+ unit :abΩ, value: "1e-9 Ω", aliases: [:abω, :abohm, :abohms]
18
+ unit :statΩ, value: "8.98755178737e+11 Ω", aliases: [:statω, :statohm, :statohms]
19
+ end
20
+ end
@@ -3,5 +3,5 @@
3
3
  # -*- warn_indent: true -*-
4
4
 
5
5
  module UnitMeasurements
6
- VERSION = "3.5.0"
6
+ VERSION = "3.7.0"
7
7
  end
data/units.md CHANGED
@@ -291,3 +291,46 @@ These units are defined in `UnitMeasurements::Elastance`.
291
291
  |:--|:--|:--|
292
292
  | 1 | D* | F⁻¹, daraf, darafs, reciprocal farad, reciprocal farads |
293
293
  | 2 | V/C | V·C⁻¹, volt/coulomb, volts/coulomb, volt per coulomb, volts per coulomb |
294
+
295
+ ## 24. Resistance
296
+
297
+ These units are defined in `UnitMeasurements::Resistance`.
298
+
299
+ | # | Name | Aliases |
300
+ |:--|:--|:--|
301
+ | 1 | Ω* | ω, ohm, ohms, reciprocal siemens |
302
+ | 2 | abΩ | abω, abohm, abohms |
303
+ | 3 | statΩ | statω, statohm, statohms |
304
+ | 4 | S | siemens, mho, mhos |
305
+ | 5 | V/A | V·A⁻¹, volt/amp., volts/amp., volt/ampere, volts/ampere, volt per ampere, volts per ampere |
306
+
307
+ ## 25. Conductance
308
+
309
+ These units are defined in `UnitMeasurements::Conductance`.
310
+
311
+ | # | Name | Aliases |
312
+ |:--|:--|:--|
313
+ | 1 | S* | ℧, Ω⁻¹, siemens, mho, mhos |
314
+ | 2 | abS | ab℧, absiemens, abmho, abmhos |
315
+ | 3 | statS | stat℧, statsiemens, statmho, statmhos |
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 |
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.5.0
4
+ version: 3.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-09-30 00:00:00.000000000 Z
11
+ date: 2023-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -125,6 +125,7 @@ files:
125
125
  - lib/unit_measurements/unit_groups/angular_velocity.rb
126
126
  - lib/unit_measurements/unit_groups/area.rb
127
127
  - lib/unit_measurements/unit_groups/capacitance.rb
128
+ - lib/unit_measurements/unit_groups/conductance.rb
128
129
  - lib/unit_measurements/unit_groups/density.rb
129
130
  - lib/unit_measurements/unit_groups/elastance.rb
130
131
  - lib/unit_measurements/unit_groups/electric_charge.rb
@@ -132,8 +133,11 @@ files:
132
133
  - lib/unit_measurements/unit_groups/force.rb
133
134
  - lib/unit_measurements/unit_groups/length.rb
134
135
  - lib/unit_measurements/unit_groups/luminous_intensity.rb
136
+ - lib/unit_measurements/unit_groups/magnetic_flux.rb
137
+ - lib/unit_measurements/unit_groups/magnetic_induction.rb
135
138
  - lib/unit_measurements/unit_groups/plane_angle.rb
136
139
  - lib/unit_measurements/unit_groups/quantity.rb
140
+ - lib/unit_measurements/unit_groups/resistance.rb
137
141
  - lib/unit_measurements/unit_groups/solid_angle.rb
138
142
  - lib/unit_measurements/unit_groups/sound_level.rb
139
143
  - lib/unit_measurements/unit_groups/temperature.rb