lare_round 0.0.2 → 0.0.3

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
- SHA1:
3
- metadata.gz: 22cc87361ca388e9fea449cc3fc775bba6c4869a
4
- data.tar.gz: 5b837592bedcd9da1f528fdabf5a328896422860
2
+ SHA256:
3
+ metadata.gz: d208fe3a2e4acdfa0c624b7dba9e36935fc0e23abaea5c64283272b6219b6192
4
+ data.tar.gz: 4b73f0f1d035445cc2a5b4de6f52436d2d0ea00a57d5d415a3582372a7306a5e
5
5
  SHA512:
6
- metadata.gz: 92fc9fcefcdb98717afbd19cc8b2c2423f23dd53e2e195af746fe50183422c6518abe76a31260a1d1ef0d77fde661f27cd4d251841e3c6222e6e8da841a6ff15
7
- data.tar.gz: cbd9d9df3a74c4f7a7a66d49f60923468e47066ffd615f421e055b732798c80b627c32f7ff12b03df05210cf5f04b9da51e41d32263f2d9c3d1daa1e9f6eae01
6
+ metadata.gz: b058ab1e006b7a3fc31ab71abe67f2be4c3471468f53b5f1b013f26a2a102a6c8afc99cf3767a810e95017f588813f3787fa59dba93eed013aaf9d723265afe3
7
+ data.tar.gz: d0b548004322dbecd8d72d7f2bfa168edab906f3646242b6f4874c17c61e72e0c3620d5393c26e8906c2b12b7a6ae0ca9efcae6251abf41bc1be23da2bef0312
@@ -0,0 +1 @@
1
+ inherit_from: .rubocop_todo.yml
@@ -0,0 +1,69 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2019-06-07 14:11:23 +0200 using RuboCop version 0.71.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 3
10
+ Metrics/AbcSize:
11
+ Max: 23
12
+
13
+ # Offense count: 3
14
+ # Configuration parameters: CountComments, ExcludedMethods.
15
+ # ExcludedMethods: refine
16
+ Metrics/BlockLength:
17
+ Max: 79
18
+
19
+ # Offense count: 1
20
+ # Configuration parameters: CountComments.
21
+ Metrics/ClassLength:
22
+ Max: 130
23
+
24
+ # Offense count: 2
25
+ # Configuration parameters: CountComments, ExcludedMethods.
26
+ Metrics/MethodLength:
27
+ Max: 18
28
+
29
+ # Offense count: 1
30
+ Style/Documentation:
31
+ Exclude:
32
+ - 'spec/**/*'
33
+ - 'test/**/*'
34
+ - 'lib/lare_round.rb'
35
+
36
+ # Offense count: 1
37
+ # Cop supports --auto-correct.
38
+ Style/ExpandPathArguments:
39
+ Exclude:
40
+ - 'lare_round.gemspec'
41
+
42
+ # Offense count: 2
43
+ # Configuration parameters: MinBodyLength.
44
+ Style/GuardClause:
45
+ Exclude:
46
+ - 'lib/lare_round.rb'
47
+
48
+ # Offense count: 1
49
+ # Cop supports --auto-correct.
50
+ # Configuration parameters: EnforcedStyle.
51
+ # SupportedStyles: use_perl_names, use_english_names
52
+ Style/SpecialGlobalVars:
53
+ Exclude:
54
+ - 'lare_round.gemspec'
55
+
56
+ # Offense count: 1
57
+ # Cop supports --auto-correct.
58
+ # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
59
+ # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
60
+ Style/TernaryParentheses:
61
+ Exclude:
62
+ - 'lib/lare_round.rb'
63
+
64
+ # Offense count: 1
65
+ # Cop supports --auto-correct.
66
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
67
+ # URISchemes: http, https
68
+ Metrics/LineLength:
69
+ Max: 82
@@ -1,8 +1,12 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1.1
7
- - 2.1.2
8
- - jruby-19mode
4
+ - 2.4.5
5
+ - 2.5.3
6
+ - 2.6.0
7
+ - jruby-9.1
8
+ - jruby-9.2
9
+
10
+ script:
11
+ - bundle exec rubocop
12
+ - bundle exec rake test
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in lare_round.gemspec
data/README.md CHANGED
@@ -4,25 +4,25 @@ A collection of BigDecimal items e.g. invoice items can be rounded for displayin
4
4
 
5
5
  ## Build status
6
6
  [![Build Status](https://secure.travis-ci.org/jethroo/lare_round.png)](http://travis-ci.org/jethroo/lare_round)
7
-
7
+ [![Gem Version](https://badge.fury.io/rb/lare_round.svg)](http://badge.fury.io/rb/lare_round)
8
8
 
9
9
  ## Used in production
10
10
 
11
- since 4th of september 2013 (still needs to be released as gem)
11
+ since 4th of September 2013
12
12
 
13
13
  ## Example
14
14
 
15
15
  say we have an array of 3 invoice items which are stored in the database and your invoice calculations are precise to the 4th position after the decimal point:
16
16
 
17
17
  ```ruby
18
- Array.new(3){BigDecimal.new('0.3334')}
18
+ Array.new(3){ BigDecimal('0.3334') }
19
19
  # => [#<BigDecimal:c75a38,'0.3334E0',9(18)>, #<BigDecimal:c759c0,'0.3334E0',9(18)>, #<BigDecimal:c75920,'0.3334E0',9(18)>]
20
20
  ```
21
21
  say you have an invoice which is rendered as pdf which only needs to display the total you are fine, because you only
22
22
  have to round once for displaying a customer friendly price:
23
23
 
24
24
  ```ruby
25
- Array.new(3){BigDecimal.new('0.3334')}.reduce(:+).round(2).to_f
25
+ Array.new(3){ BigDecimal('0.3334') }.reduce(:+).round(2).to_f
26
26
  # => 1.0
27
27
  ```
28
28
 
@@ -39,7 +39,7 @@ Item | Price
39
39
  So the most likely aproach is to simply round each item by itself, so the customer isn't bothered with 34/10000 €-Cents. Simple at it is its not quite what you want:
40
40
 
41
41
  ```ruby
42
- Array.new(3){BigDecimal.new('0.3334')}.map{|i| i.round(2)}.reduce(:+).to_f
42
+ Array.new(3){ BigDecimal('0.3334') }.map{|i| i.round(2)}.reduce(:+).to_f
43
43
  # => 0.99
44
44
  ```
45
45
 
@@ -54,7 +54,7 @@ Now you have the customer bothering about why there is a difference between the
54
54
 
55
55
  This gem helps to distribute the rounding error amongst the items to preserve the total:
56
56
  ```ruby
57
- a = Array.new(3){BigDecimal.new('0.3334')}
57
+ a = Array.new(3){ BigDecimal('0.3334') }
58
58
  # => [#<BigDecimal:887b6c8,'0.3334E0',9(18)>, #<BigDecimal:887b600,'0.3334E0',9(18)>, #<BigDecimal:887b4c0,'0.3334E0',9(18)>]
59
59
  a = LareRound.round(a,2)
60
60
  # => [#<BigDecimal:8867330,'0.34E0',9(36)>, #<BigDecimal:8867290,'0.33E0',9(36)>, #<BigDecimal:88671f0,'0.33E0',9(36)>]
@@ -75,7 +75,7 @@ Item | Price
75
75
  LareRound supports *Array* and *Hash* as collection types. As usage of array was shown above here comes the hash example:
76
76
 
77
77
  ```ruby
78
- hash = Hash[(1..3).map.with_index{|x,i|[x,BigDecimal.new('0.3334')]}]
78
+ hash = Hash[(1..3).map.with_index{ |x,i| [x,BigDecimal('0.3334')] }]
79
79
  # => {1=>#<BigDecimal:26ac7d0,'0.3334E0',9(18)>, 2=>#<BigDecimal:26ac730,'0.3334E0',9(18)>, 3=>#<BigDecimal:26ac690,'0.3334E0',9(18)>}
80
80
  LareRound.round(hash,2)
81
81
  # => {1=>#<BigDecimal:26b9318,'0.34E0',9(36)>, 2=>#<BigDecimal:26b9250,'0.33E0',9(36)>, 3=>#<BigDecimal:26b91b0,'0.33E0',9(36)>}
@@ -93,8 +93,6 @@ Item (unrounded)| Price (unrounded) | LareRound | Financial
93
93
  tax ( 8.23%) | 0.823 | 0.82 | 0.83
94
94
  **Total** | **10.823** | **10.82** | **10.83**
95
95
 
96
- * refactoring ^^
97
-
98
96
  ## Installation
99
97
 
100
98
  Add this line to your application's Gemfile:
@@ -114,6 +112,7 @@ And then execute:
114
112
  5. Create new Pull Request
115
113
 
116
114
  ## License
115
+
117
116
  Hereby released under MIT license.
118
117
 
119
118
  ## Authors/Contributors
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
 
3
5
  require 'rake/testtask'
@@ -1,4 +1,5 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'lare_round/version'
@@ -7,7 +8,7 @@ Gem::Specification.new do |spec|
7
8
  spec.name = 'lare_round'
8
9
  spec.version = LareRound::VERSION
9
10
  spec.authors = ['Carsten Wirth']
10
- spec.email = ['carsten.wirth@blacklane.com']
11
+ spec.email = ['cwirth79@web.de']
11
12
 
12
13
  spec.description = <<-DESCRIPTION
13
14
  A collection of BigDecimal items e.g. invoice items can be rounded for
@@ -25,13 +26,13 @@ Gem::Specification.new do |spec|
25
26
  spec.license = 'MIT'
26
27
 
27
28
  spec.files = `git ls-files`.split($/)
28
- spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
29
- spec.test_files = spec.files.grep(/^(test|spec|features)\//)
29
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
30
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
30
31
  spec.require_paths = ['lib']
31
32
 
32
- spec.add_development_dependency 'bundler', '~> 1.3'
33
+ spec.add_development_dependency 'bundler'
34
+ spec.add_development_dependency 'minitest'
33
35
  spec.add_development_dependency 'rake'
34
36
  spec.add_development_dependency 'rubocop'
35
- spec.add_development_dependency 'minitest'
36
37
  spec.add_development_dependency 'simplecov'
37
38
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bigdecimal'
2
4
 
3
5
  module LareRound
@@ -15,111 +17,113 @@ module LareRound
15
17
  # StandardError for dealing with application level errors
16
18
  class LareRoundError < StandardError; end
17
19
 
18
- private
20
+ class << self
21
+ private
19
22
 
20
- def self.process(values, precision)
21
- if values.is_a? Hash
22
- process_hash(values, precision)
23
- else
24
- round_array_of_values(values, precision)
23
+ def process(values, precision)
24
+ if values.is_a? Hash
25
+ process_hash(values, precision)
26
+ else
27
+ round_array_of_values(values, precision)
28
+ end
25
29
  end
26
- end
27
30
 
28
- def self.process_hash(values, precision)
29
- rounded_values = round_array_of_values(values.values, precision)
30
- values.tap do |hash|
31
- hash.keys.each_with_index do |key, index|
32
- hash[key] = rounded_values[index]
31
+ def process_hash(values, precision)
32
+ rounded_values = round_array_of_values(values.values, precision)
33
+ values.tap do |hash|
34
+ hash.keys.each_with_index do |key, index|
35
+ hash[key] = rounded_values[index]
36
+ end
33
37
  end
34
38
  end
35
- end
36
39
 
37
- def self.handle_value_errors(values)
38
- fail LareRoundError, 'values must not be nil' if values.nil?
39
- fail LareRoundError, 'values must not be empty' if values.empty?
40
- fail LareRoundError, 'values must be an array' unless values.is_a? Array
41
-
42
- numbers_invalid = values.map { |i| i.is_a? Numeric }
43
- .reject { |i| i == true }.size
44
- if numbers_invalid > 0
45
- error = <<-ERROR.strip.gsub(/\s+/, ' ')
46
- values contains not numeric values (#{numbers_invalid})
47
- ERROR
48
- fail LareRoundError, error
49
- end
40
+ def handle_value_errors(values)
41
+ raise LareRoundError, 'values must not be nil' if values.nil?
42
+ raise LareRoundError, 'values must not be empty' if values.empty?
43
+ raise LareRoundError, 'values must be an array' unless values.is_a? Array
44
+
45
+ numbers_invalid = values.map { |i| i.is_a? Numeric }
46
+ .reject { |i| i == true }.size
47
+ if numbers_invalid.positive?
48
+ error = <<-ERROR.strip.gsub(/\s+/, ' ')
49
+ values contains not numeric values (#{numbers_invalid})
50
+ ERROR
51
+ raise LareRoundError, error
52
+ end
50
53
 
51
- if values.map { |i| i.is_a? BigDecimal }.reject { |i| i == true }.size > 0
52
- warning = <<-WARNING.strip.gsub(/\s+/, ' ')
53
- values contains non decimal values,
54
- you might loose precision or even get wrong rounding results
55
- WARNING
56
- warn warning
54
+ unless values.map { |i| i.is_a? BigDecimal }.reject { |i| i == true }.empty?
55
+ warning = <<-WARNING.strip.gsub(/\s+/, ' ')
56
+ values contains non decimal values,
57
+ you might loose precision or even get wrong rounding results
58
+ WARNING
59
+ warn warning
60
+ end
57
61
  end
58
- end
59
-
60
- def self.handle_precision_errors(precision)
61
- fail LareRoundError, 'precision must not be nil' if precision.nil?
62
62
 
63
- unless precision.is_a? Numeric
64
- fail LareRoundError, 'precision must be a number'
65
- end
63
+ def handle_precision_errors(precision)
64
+ raise LareRoundError, 'precision must not be nil' if precision.nil?
66
65
 
67
- if precision < 0
68
- fail LareRoundError, 'precision must be greater or equal to 0'
69
- end
70
- end
66
+ unless precision.is_a? Numeric
67
+ raise LareRoundError, 'precision must be a number'
68
+ end
71
69
 
72
- Struct.new(
73
- 'IntermediaryResults',
74
- :decimal_shift,
75
- :rounded_total,
76
- :array_of_values,
77
- :unrounded_values,
78
- :precision,
79
- :rounded_values
80
- )
81
-
82
- def self.round_array_of_values(array_of_values, precision)
83
- mrc = Struct::IntermediaryResults.new
84
- mrc.precision = precision
85
- mrc.decimal_shift = BigDecimal.new(10**precision.to_i)
86
- mrc.rounded_total = array_of_values.reduce(:+)
87
- .round(precision) * mrc.decimal_shift
88
- mrc.array_of_values = array_of_values.map do |v|
89
- ((v.is_a? BigDecimal) ? v : BigDecimal.new(v.to_s))
70
+ if precision.negative?
71
+ raise LareRoundError, 'precision must be greater or equal to 0'
72
+ end
90
73
  end
91
- mrc.unrounded_values = array_of_values.map { |v| v * mrc.decimal_shift }
92
74
 
93
- largest_remainder_method(mrc)
75
+ Struct.new(
76
+ 'IntermediaryResults',
77
+ :decimal_shift,
78
+ :rounded_total,
79
+ :array_of_values,
80
+ :unrounded_values,
81
+ :precision,
82
+ :rounded_values
83
+ )
84
+
85
+ def round_array_of_values(array_of_values, precision)
86
+ mrc = Struct::IntermediaryResults.new
87
+ mrc.precision = precision
88
+ mrc.decimal_shift = BigDecimal(10**precision.to_i)
89
+ mrc.rounded_total = array_of_values.reduce(:+)
90
+ .round(precision) * mrc.decimal_shift
91
+ mrc.array_of_values = array_of_values.map do |v|
92
+ ((v.is_a? BigDecimal) ? v : BigDecimal(v.to_s))
93
+ end
94
+ mrc.unrounded_values = array_of_values.map { |v| v * mrc.decimal_shift }
94
95
 
95
- mrc.rounded_values
96
- end
96
+ largest_remainder_method(mrc)
97
97
 
98
- def self.largest_remainder_method(mrc)
99
- mrc.rounded_values = mrc.array_of_values.map do |v|
100
- largest_remainder_round(v, mrc)
98
+ mrc.rounded_values
101
99
  end
102
100
 
103
- until mrc.rounded_values.reduce(:+) >= mrc.rounded_total
104
- fractions = mrc.unrounded_values.zip(mrc.rounded_values).map do |x, y|
105
- x - y
101
+ def largest_remainder_method(mrc)
102
+ mrc.rounded_values = mrc.array_of_values.map do |v|
103
+ largest_remainder_round(v, mrc)
106
104
  end
107
- mrc.rounded_values[fractions.index(fractions.max)] += 1
108
- end
109
-
110
- mrc.rounded_values.map! { |v| v / mrc.decimal_shift }
111
- end
112
105
 
113
- def self.largest_remainder_round(v, mrc)
114
- # items needed to be rounded down if positiv:
115
- # 0.7 + 0.7 + 0.7 = ( 2.1 ).round(0) = 2
116
- # (0.7).round(0) + (0.7).round(0) + (0.7).round(0) = 1 + 1 + 1 = 3
117
- # elsewise if negative
118
- rounding_strategy = if v < 0
119
- BigDecimal::ROUND_UP
120
- else
121
- BigDecimal::ROUND_DOWN
106
+ until mrc.rounded_values.reduce(:+) >= mrc.rounded_total
107
+ fractions = mrc.unrounded_values.zip(mrc.rounded_values).map do |x, y|
108
+ x - y
109
+ end
110
+ mrc.rounded_values[fractions.index(fractions.max)] += 1
122
111
  end
123
- v.round(mrc.precision, rounding_strategy) * mrc.decimal_shift
112
+
113
+ mrc.rounded_values.map! { |v| v / mrc.decimal_shift }
114
+ end
115
+
116
+ def largest_remainder_round(value, mrc)
117
+ # items needed to be rounded down if positiv:
118
+ # 0.7 + 0.7 + 0.7 = ( 2.1 ).round(0) = 2
119
+ # (0.7).round(0) + (0.7).round(0) + (0.7).round(0) = 1 + 1 + 1 = 3
120
+ # elsewise if negative
121
+ rounding_strategy = if value.negative?
122
+ BigDecimal::ROUND_UP
123
+ else
124
+ BigDecimal::ROUND_DOWN
125
+ end
126
+ value.round(mrc.precision, rounding_strategy) * mrc.decimal_shift
127
+ end
124
128
  end
125
129
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module LareRound
2
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'test_helper'
2
4
  require 'bigdecimal'
3
5
  require 'securerandom'
@@ -8,20 +10,19 @@ class LareRoundTest < MiniTest::Spec
8
10
  end
9
11
 
10
12
  def create_big_decimal(precision, digit)
11
- BigDecimal.new('0.' + '3' * precision + "#{digit}")
13
+ BigDecimal('0.' + '3' * precision + digit.to_s)
12
14
  end
13
15
 
14
16
  (1..9).each do |digit|
15
17
  (1..23).each do |items|
16
18
  (0..10).each do |precision|
17
-
18
19
  method_name = <<-TESTMETHOD.strip.gsub(/\s+/, '_')
19
20
  test #{items} items with last digit of #{digit}
20
21
  should sum up to rounded total of BigDecimal items
21
22
  with precision of #{precision} if passed as array
22
23
  TESTMETHOD
23
24
  define_method method_name do
24
- arr = Array.new(items) { create_big_decimal(precision, digit) }
25
+ arr = Array.new(items) { create_big_decimal(precision, digit) }
25
26
  rounded_total = arr.reduce(:+).round(precision)
26
27
  assert_equal(
27
28
  rounded_total,
@@ -36,8 +37,8 @@ class LareRoundTest < MiniTest::Spec
36
37
  TESTMETHOD
37
38
  define_method method_name do
38
39
  hash = Hash[
39
- (1..items).map do
40
- |x| [x, create_big_decimal(precision, digit)]
40
+ (1..items).map do |x|
41
+ [x, create_big_decimal(precision, digit)]
41
42
  end
42
43
  ]
43
44
  rounded_total = hash.values.reduce(:+).round(precision)
@@ -55,7 +56,7 @@ class LareRoundTest < MiniTest::Spec
55
56
  define_method method_name do
56
57
  hash = Hash[
57
58
  (1..items).map.with_index do |x, i|
58
- [x, create_big_decimal(precision, digit) + BigDecimal.new(i)]
59
+ [x, create_big_decimal(precision, digit) + BigDecimal(i)]
59
60
  end
60
61
  ]
61
62
  rounded_hash = LareRound.round(hash.clone, precision)
@@ -71,7 +72,7 @@ class LareRoundTest < MiniTest::Spec
71
72
  TESTMETHOD
72
73
  define_method method_name do
73
74
  arr = Array.new(items) do
74
- BigDecimal.new(-1 * create_big_decimal(precision, digit))
75
+ BigDecimal(-1 * create_big_decimal(precision, digit))
75
76
  end
76
77
  rounded_total = arr.reduce(:+).round(precision)
77
78
  assert_equal(
@@ -98,7 +99,7 @@ class LareRoundTest < MiniTest::Spec
98
99
  end
99
100
  end
100
101
 
101
- let(:default_array) { Array.new(3) { BigDecimal.new('0.1234') } }
102
+ let(:default_array) { Array.new(3) { BigDecimal('0.1234') } }
102
103
 
103
104
  def test_should_raise_if_precision_is_nil
104
105
  exception = assert_raises(LareRound::LareRoundError) do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'simplecov'
2
4
  SimpleCov.start
3
5
 
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lare_round
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Wirth
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-22 00:00:00.000000000 Z
11
+ date: 2019-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rubocop
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: minitest
56
+ name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -90,12 +90,14 @@ description: |2
90
90
  Application of the largest remainder method can help to preserve the
91
91
  total sum for fractionated parts thus eliminating this confusion.
92
92
  email:
93
- - carsten.wirth@blacklane.com
93
+ - cwirth79@web.de
94
94
  executables: []
95
95
  extensions: []
96
96
  extra_rdoc_files: []
97
97
  files:
98
98
  - ".gitignore"
99
+ - ".rubocop.yml"
100
+ - ".rubocop_todo.yml"
99
101
  - ".travis.yml"
100
102
  - Gemfile
101
103
  - LICENSE.txt
@@ -126,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
128
  version: '0'
127
129
  requirements: []
128
130
  rubyforge_project:
129
- rubygems_version: 2.2.2
131
+ rubygems_version: 2.7.8
130
132
  signing_key:
131
133
  specification_version: 4
132
134
  summary: gem for rounding BigDecimal items by preserving its sum