unit_measurements 5.1.0 → 5.1.1
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 +4 -4
- data/.github/workflows/pages.yml +1 -1
- data/.yardopts +2 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/README.md +12 -12
- data/lib/unit_measurements/version.rb +1 -1
- data/unit_measurements.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a5ba942c1c99f76efc0db51ce916d31d199646d5bd2a5ace71b34fadbadacb2
|
4
|
+
data.tar.gz: 681c3ce17cebe41d715c78b25669afe6347d726405b4fcea74ffd8da3d5e9dc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 518cdb270f00447a0a7817e4db3bf8dbd83e6ed1ccdb82e58ef60579d774eff9f40544669b216ab42ee7133e23cf69f1ce149c7d051e8ffc3e147cc356361392
|
7
|
+
data.tar.gz: 239e100a9b733cbe1792ffc54c812a5fce1abecc2e449bdd03ee6215b84e72ad98eaaa1abec9d9e389deee515fef04cdef022e7c8fe6ab765c8b436eb4f0b0b2
|
data/.github/workflows/pages.yml
CHANGED
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [5.1.1](https://github.com/shivam091/unit_measurements/compare/v5.1.0...v5.1.1) - 2023-10-20
|
2
|
+
|
3
|
+
### What's updated
|
4
|
+
|
5
|
+
- Updated readme and documentation.
|
6
|
+
- Updated documentation hosting link to `https://shivam091.github.io/unit_measurements`.
|
7
|
+
|
8
|
+
----------
|
9
|
+
|
1
10
|
## [5.1.0](https://github.com/shivam091/unit_measurements/compare/v5.0.0...v5.1.0) - 2023-10-19
|
2
11
|
|
3
12
|
### What's new
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -24,11 +24,11 @@ The `unit_measurements` gem is designed to simplify the handling of units for sc
|
|
24
24
|
|
25
25
|
## Features
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
1. Provides easy conversion between units.
|
28
|
+
2. Lightweight and easily extensible to include other units and conversions.
|
29
|
+
3. Built in support for various [unit groups](https://github.com/shivam091/unit_measurements/blob/main/units.md).
|
30
|
+
4. Well organized and very descriptive documentation published [here](https://shivam091.github.io/unit_measurements).
|
31
|
+
5. Parses strings representing complex, fractional, mixed fractional, scientific numbers, and ratios.
|
32
32
|
|
33
33
|
## Disclaimer
|
34
34
|
|
@@ -127,7 +127,7 @@ UnitMeasurements::Length.parse("2e+2 km to m")
|
|
127
127
|
#=> 200000.0 m
|
128
128
|
```
|
129
129
|
You can check supported special characters for exponents
|
130
|
-
[here](https://
|
130
|
+
[here](https://shivam091.github.io/unit_measurements/UnitMeasurements/Normalizer.html).
|
131
131
|
|
132
132
|
**Parse complex numbers, source unit, and (or) target unit:**
|
133
133
|
|
@@ -148,7 +148,7 @@ UnitMeasurements::Length.parse("2/3 km to m")
|
|
148
148
|
```
|
149
149
|
|
150
150
|
You can check supported special characters for fractional notations
|
151
|
-
[here](https://
|
151
|
+
[here](https://shivam091.github.io/unit_measurements/UnitMeasurements/Normalizer.html).
|
152
152
|
|
153
153
|
**Parse ratios, source unit, and (or) target unit:**
|
154
154
|
|
@@ -170,7 +170,7 @@ UnitMeasurements::Length.new(100, "m").to("in").format("%.4<quantity>f %<unit>s"
|
|
170
170
|
```
|
171
171
|
|
172
172
|
You can check more about formatting along with their examples
|
173
|
-
[here](https://
|
173
|
+
[here](https://shivam091.github.io/unit_measurements/UnitMeasurements/Formatter.html).
|
174
174
|
|
175
175
|
**Extract the unit and the quantity from measurement:**
|
176
176
|
|
@@ -265,7 +265,7 @@ UnitMeasurements::Length.parse("1 km") != UnitMeasurements::Length.parse("1 m")
|
|
265
265
|
```
|
266
266
|
|
267
267
|
You can check supported comparisons along with their examples
|
268
|
-
[here](https://
|
268
|
+
[here](https://shivam091.github.io/unit_measurements/UnitMeasurements/Comparison.html).
|
269
269
|
|
270
270
|
### Arithmetic
|
271
271
|
|
@@ -282,7 +282,7 @@ UnitMeasurements::Length.new(2, "km") * 2+2i
|
|
282
282
|
```
|
283
283
|
|
284
284
|
You can check supported arithmetic operations along with their examples
|
285
|
-
[here](https://
|
285
|
+
[here](https://shivam091.github.io/unit_measurements/UnitMeasurements/Arithmetic.html).
|
286
286
|
|
287
287
|
### Math
|
288
288
|
|
@@ -294,7 +294,7 @@ UnitMeasurements::Length.new(17.625, "m").round
|
|
294
294
|
```
|
295
295
|
|
296
296
|
You can check supported mathematical functions along with their examples
|
297
|
-
[here](https://
|
297
|
+
[here](https://shivam091.github.io/unit_measurements/UnitMeasurements/Math.html).
|
298
298
|
|
299
299
|
### Conversions
|
300
300
|
|
@@ -307,7 +307,7 @@ UnitMeasurements::Length.new(2.25567, "km").to_i
|
|
307
307
|
```
|
308
308
|
|
309
309
|
You can check more about them along with their examples
|
310
|
-
[here](https://
|
310
|
+
[here](https://shivam091.github.io/unit_measurements/UnitMeasurements/Conversion.html).
|
311
311
|
|
312
312
|
## Units
|
313
313
|
|
data/unit_measurements.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
23
23
|
|
24
24
|
spec.metadata["homepage_uri"] = spec.homepage
|
25
|
-
spec.metadata["documentation_uri"] = "https://
|
25
|
+
spec.metadata["documentation_uri"] = "https://shivam091.github.io/unit_measurements"
|
26
26
|
spec.metadata["source_code_uri"] = "https://github.com/shivam091/unit_measurements"
|
27
27
|
spec.metadata["changelog_uri"] = "https://github.com/shivam091/unit_measurements/blob/main/CHANGELOG.md"
|
28
28
|
spec.metadata["bug_tracker_uri"] = "https://github.com/shivam091/unit_measurements/issues"
|
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: 5.1.
|
4
|
+
version: 5.1.1
|
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-
|
11
|
+
date: 2023-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- ".github/workflows/pages.yml"
|
98
98
|
- ".gitignore"
|
99
99
|
- ".rspec"
|
100
|
+
- ".yardopts"
|
100
101
|
- CHANGELOG.md
|
101
102
|
- Gemfile
|
102
103
|
- Gemfile.lock
|
@@ -178,7 +179,7 @@ licenses:
|
|
178
179
|
metadata:
|
179
180
|
allowed_push_host: https://rubygems.org
|
180
181
|
homepage_uri: https://github.com/shivam091/unit_measurements
|
181
|
-
documentation_uri: https://
|
182
|
+
documentation_uri: https://shivam091.github.io/unit_measurements
|
182
183
|
source_code_uri: https://github.com/shivam091/unit_measurements
|
183
184
|
changelog_uri: https://github.com/shivam091/unit_measurements/blob/main/CHANGELOG.md
|
184
185
|
bug_tracker_uri: https://github.com/shivam091/unit_measurements/issues
|