lare_round 1.0.0 → 1.0.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/ci.yml +2 -2
- data/.ruby-version +1 -1
- data/lare_round.gemspec +1 -0
- data/lib/lare_round/version.rb +1 -1
- data/test/lare_round_test.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c07a9f81c93fab2471d9bdf65c6cdf464cc653b3396b4d8ed329c96d0bb4bf77
|
|
4
|
+
data.tar.gz: a1f7ce2c26f125dc2b4da3db8d6f4de06f1d51c500a19538f5dae236f96876e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2af1e0bb16ecb34475c72a3cfbc67d5d8f59affad96940e3969ab93649f293b3977bb60d2a9fbb5d88dd64031d54f41d3604ff582fae995891ea98a8ea7662e9
|
|
7
|
+
data.tar.gz: 7b3d004d5304fab438f2ac43e50ea9b602f52b7b67c6b017483265bf08cdb216c0121d3297bf6c84c9d8718ec515637aecc7e99619714fda41d0e7f2f6b60e85
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -12,14 +12,14 @@ jobs:
|
|
|
12
12
|
|
|
13
13
|
strategy:
|
|
14
14
|
matrix:
|
|
15
|
-
ruby-version: ['3.0.4', '3.1.2','3.2.0']
|
|
15
|
+
ruby-version: ['3.0.4', '3.1.2','3.2.0', '4.0.2']
|
|
16
16
|
|
|
17
17
|
steps:
|
|
18
18
|
- name: Check out code
|
|
19
19
|
uses: actions/checkout@v4
|
|
20
20
|
|
|
21
21
|
- name: Set up Ruby
|
|
22
|
-
uses: ruby/setup-ruby@v1.
|
|
22
|
+
uses: ruby/setup-ruby@v1.329.0
|
|
23
23
|
with:
|
|
24
24
|
ruby-version: ${{ matrix.ruby-version }}
|
|
25
25
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.2
|
data/lare_round.gemspec
CHANGED
data/lib/lare_round/version.rb
CHANGED
data/test/lare_round_test.rb
CHANGED
|
@@ -57,7 +57,7 @@ class LareRoundTest < Minitest::Spec
|
|
|
57
57
|
end.to_h
|
|
58
58
|
rounded_hash = LareRound.round(hash.clone, precision)
|
|
59
59
|
hash.each_key do |key|
|
|
60
|
-
assert(((
|
|
60
|
+
assert(((hash[key] - rounded_hash[key]) * (10**precision)).abs < 1)
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
metadata
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lare_round
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carsten Wirth
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
-
dependencies:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: bigdecimal
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 3.3.1
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: 3.3.1
|
|
12
26
|
description: |2
|
|
13
27
|
A collection of BigDecimal items e.g. invoice items can be rounded for
|
|
14
28
|
displaying them in views. Rounding may apply a rounding error to the
|
|
@@ -59,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
59
73
|
- !ruby/object:Gem::Version
|
|
60
74
|
version: '0'
|
|
61
75
|
requirements: []
|
|
62
|
-
rubygems_version:
|
|
76
|
+
rubygems_version: 4.0.6
|
|
63
77
|
specification_version: 4
|
|
64
78
|
summary: gem for rounding BigDecimal items by preserving its sum
|
|
65
79
|
test_files: []
|