much-decimal 0.1.1 → 0.1.2
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 +7 -7
- data/.l.yml +8 -0
- data/.rubocop.yml +6 -0
- data/.ruby-version +1 -0
- data/.t.yml +4 -0
- data/Gemfile +5 -1
- data/README.md +1 -1
- data/lib/much-decimal.rb +44 -52
- data/lib/much-decimal/version.rb +3 -1
- data/log/{.gitkeep → .keep} +0 -0
- data/much-decimal.gemspec +9 -5
- data/test/helper.rb +4 -11
- data/test/support/factory.rb +3 -2
- data/test/unit/much_decimal_tests.rb +114 -120
- metadata +65 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
SHA512:
|
6
|
-
|
7
|
-
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 17deac20653a970e1af8304da862f557e10c701e2b5ac469ea468f04e9e4dfa5
|
4
|
+
data.tar.gz: 93ba2c5485af9d79cebd1fae5457b92acec08dc4669e4fec1106c63ce4d05f74
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1e02c119bffc8890aaf82acc21ae2c65050cc06e5a221411774b13b1118060c0b9ded30fb560fc6192be201496283935c6fbd582963db28f602b996bf17ba957
|
7
|
+
data.tar.gz: d99c011bbe87a62916b9a2d445d398a75b88badd3c7e1eebaee28901e40dbfb8eaeab6505c7c11f95bfb3a7ee1702c525c50e8464bcc589bd17aa9d86f6f1598
|
data/.l.yml
ADDED
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.5.8
|
data/.t.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
data/lib/much-decimal.rb
CHANGED
@@ -1,77 +1,69 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "much-decimal/version"
|
4
|
+
require "much-mixin"
|
4
5
|
|
5
6
|
module MuchDecimal
|
6
|
-
include
|
7
|
+
include MuchMixin
|
7
8
|
|
8
|
-
DEFAULT_PRECISION = 2
|
9
|
+
DEFAULT_PRECISION = 2
|
9
10
|
|
10
11
|
def self.integer_to_decimal(integer, precision)
|
11
12
|
if integer.respond_to?(:to_i) && !integer.to_s.empty?
|
12
|
-
base_10_modifier = (10.0
|
13
|
+
base_10_modifier = (10.0**precision)
|
13
14
|
integer.to_i / base_10_modifier
|
14
15
|
end
|
15
16
|
end
|
16
17
|
|
17
18
|
def self.decimal_to_integer(decimal, precision)
|
18
19
|
if decimal.respond_to?(:to_f) && !decimal.to_s.empty?
|
19
|
-
base_10_modifier = (10.0
|
20
|
+
base_10_modifier = (10.0**precision)
|
20
21
|
(decimal.to_f * base_10_modifier).round.to_i
|
21
22
|
end
|
22
23
|
end
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
define_method("#{attribute}=") do |decimal|
|
41
|
-
integer = MuchDecimal.decimal_to_integer(decimal, precision)
|
42
|
-
self.send("#{source}=", integer)
|
43
|
-
end
|
25
|
+
mixin_class_methods do
|
26
|
+
def decimal_as_integer(attribute, source: nil, precision: nil)
|
27
|
+
source ||= "#{attribute}_as_integer"
|
28
|
+
precision = (precision || DEFAULT_PRECISION).to_i
|
29
|
+
|
30
|
+
class_eval(<<~RUBY, __FILE__, __LINE__ + 1)
|
31
|
+
def #{attribute}
|
32
|
+
MuchDecimal.integer_to_decimal(#{source}, #{precision})
|
33
|
+
end
|
34
|
+
|
35
|
+
def #{attribute}=(decimal_value)
|
36
|
+
self.#{source} =
|
37
|
+
MuchDecimal.decimal_to_integer(decimal_value, #{precision})
|
38
|
+
end
|
39
|
+
RUBY
|
44
40
|
end
|
45
|
-
|
46
41
|
end
|
42
|
+
end
|
47
43
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
plugin_included do
|
52
|
-
include InstanceMethods
|
53
|
-
|
54
|
-
require 'assert/factory'
|
55
|
-
end
|
56
|
-
|
57
|
-
module InstanceMethods
|
58
|
-
|
59
|
-
def assert_decimal_as_integer(subject, attribute, options = nil)
|
60
|
-
options ||= {}
|
61
|
-
source = options[:source] || "#{attribute}_as_integer"
|
62
|
-
precision = (options[:precision] || DEFAULT_PRECISION).to_i
|
63
|
-
|
64
|
-
value = Assert::Factory.float
|
65
|
-
subject.send("#{attribute}=", value)
|
44
|
+
module MuchDecimal::TestHelpers
|
45
|
+
include MuchMixin
|
66
46
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
assert_equal exp, subject.send(attribute)
|
71
|
-
end
|
47
|
+
mixin_included do
|
48
|
+
require "assert/factory"
|
49
|
+
end
|
72
50
|
|
51
|
+
mixin_instance_methods do
|
52
|
+
def assert_decimal_as_integer(
|
53
|
+
subject,
|
54
|
+
attribute,
|
55
|
+
source: nil,
|
56
|
+
precision: nil)
|
57
|
+
source ||= "#{attribute}_as_integer"
|
58
|
+
precision = (precision || MuchDecimal::DEFAULT_PRECISION).to_i
|
59
|
+
|
60
|
+
value = Assert::Factory.float
|
61
|
+
subject.public_send("#{attribute}=", value)
|
62
|
+
|
63
|
+
integer = MuchDecimal.decimal_to_integer(value, precision)
|
64
|
+
assert_that(subject.public_send(source)).equals(integer)
|
65
|
+
assert_that(subject.public_send(attribute))
|
66
|
+
.equals(MuchDecimal.integer_to_decimal(integer, precision))
|
73
67
|
end
|
74
|
-
|
75
68
|
end
|
76
|
-
|
77
69
|
end
|
data/lib/much-decimal/version.rb
CHANGED
data/log/{.gitkeep → .keep}
RENAMED
File without changes
|
data/much-decimal.gemspec
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
6
|
require "much-decimal/version"
|
5
7
|
|
@@ -11,15 +13,17 @@ Gem::Specification.new do |gem|
|
|
11
13
|
gem.summary = "Define decimal attributes that are stored as integers"
|
12
14
|
gem.description = "Define decimal attributes that are stored as integers"
|
13
15
|
gem.homepage = "https://github.com/redding/much-decimal"
|
14
|
-
gem.license =
|
16
|
+
gem.license = "MIT"
|
15
17
|
|
16
|
-
gem.files = `git ls-files`.split(
|
18
|
+
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
17
19
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
20
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
21
|
gem.require_paths = ["lib"]
|
20
22
|
|
21
|
-
gem.
|
23
|
+
gem.required_ruby_version = "~> 2.5"
|
22
24
|
|
23
|
-
gem.
|
25
|
+
gem.add_development_dependency("assert", ["~> 2.19.2"])
|
26
|
+
gem.add_development_dependency("much-style-guide", ["~> 0.4.0"])
|
24
27
|
|
28
|
+
gem.add_dependency("much-mixin", ["~> 0.2.3"])
|
25
29
|
end
|
data/test/helper.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# this file is automatically required when you run `assert`
|
2
4
|
# put any test helpers here
|
3
5
|
|
@@ -5,15 +7,6 @@
|
|
5
7
|
$LOAD_PATH.unshift(File.expand_path("../..", __FILE__))
|
6
8
|
|
7
9
|
# require pry for debugging (`binding.pry`)
|
8
|
-
require
|
9
|
-
|
10
|
-
require 'test/support/factory'
|
11
|
-
|
12
|
-
# 1.8.7 backfills
|
10
|
+
require "pry"
|
13
11
|
|
14
|
-
|
15
|
-
if !(a = Array.new).respond_to?(:sample) && a.respond_to?(:choice)
|
16
|
-
class Array
|
17
|
-
alias_method :sample, :choice
|
18
|
-
end
|
19
|
-
end
|
12
|
+
require "test/support/factory"
|
data/test/support/factory.rb
CHANGED
@@ -1,220 +1,214 @@
|
|
1
|
-
|
2
|
-
require 'much-decimal'
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
|
-
|
3
|
+
require "assert"
|
4
|
+
require "much-decimal"
|
5
5
|
|
6
|
+
module MuchDecimal
|
6
7
|
class UnitTests < Assert::Context
|
7
8
|
desc "MuchDecimal"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
subject{ unit_module }
|
10
|
+
|
11
|
+
let(:unit_module){ MuchDecimal }
|
12
|
+
|
13
|
+
let(:integer){ Factory.integer }
|
14
|
+
let(:decimal){ Factory.float }
|
15
|
+
let(:precision){ Factory.integer(10) }
|
16
|
+
let(:base_10_modifier){ 10.0**precision }
|
17
|
+
let(:invalid_value){ [nil, "", true, false].sample }
|
12
18
|
|
13
19
|
should have_imeths :integer_to_decimal, :decimal_to_integer
|
14
20
|
|
15
|
-
should "use
|
16
|
-
|
21
|
+
should "use MuchMixin" do
|
22
|
+
assert_that(subject).includes(MuchMixin)
|
17
23
|
end
|
18
24
|
|
19
25
|
should "know its default precision" do
|
20
|
-
|
26
|
+
assert_that(DEFAULT_PRECISION).equals(2)
|
21
27
|
end
|
22
28
|
|
23
29
|
should "know how to convert an integer to a decimal" do
|
24
|
-
integer = Factory.integer
|
25
|
-
precision = Factory.integer(10)
|
26
|
-
base_10_modifier = (10.0 ** precision)
|
27
|
-
|
28
30
|
exp = integer / base_10_modifier
|
29
|
-
|
30
|
-
|
31
|
+
assert_that(subject.integer_to_decimal(integer, precision)).equals(exp)
|
32
|
+
assert_that(subject.integer_to_decimal(integer.to_s, precision))
|
33
|
+
.equals(exp)
|
31
34
|
|
32
|
-
invalid_value
|
33
|
-
assert_nil subject.integer_to_decimal(invalid_value, precision)
|
35
|
+
assert_that(subject.integer_to_decimal(invalid_value, precision)).is_nil
|
34
36
|
end
|
35
37
|
|
36
38
|
should "know how to convert a decimal to an integer" do
|
37
|
-
decimal = Factory.float
|
38
|
-
precision = Factory.integer(10)
|
39
|
-
base_10_modifier = (10.0 ** precision)
|
40
|
-
|
41
39
|
exp = (decimal * base_10_modifier).round.to_i
|
42
|
-
|
43
|
-
|
40
|
+
assert_that(subject.decimal_to_integer(decimal, precision)).equals(exp)
|
41
|
+
assert_that(subject.decimal_to_integer(decimal.to_s, precision))
|
42
|
+
.equals(exp)
|
44
43
|
|
45
|
-
invalid_value
|
46
|
-
assert_nil subject.decimal_to_integer(invalid_value, precision)
|
44
|
+
assert_that(subject.decimal_to_integer(invalid_value, precision)).is_nil
|
47
45
|
end
|
48
|
-
|
49
46
|
end
|
50
47
|
|
51
|
-
class
|
52
|
-
|
53
|
-
|
48
|
+
class ReceiverSetupTests < UnitTests
|
49
|
+
subject{ receiver_class }
|
50
|
+
|
51
|
+
let(:receiver_class) do
|
52
|
+
Class.new do
|
54
53
|
include MuchDecimal
|
55
54
|
attr_accessor :seconds_as_integer, :integer_seconds
|
56
55
|
end
|
57
56
|
end
|
58
|
-
subject{ @class }
|
59
|
-
|
60
57
|
end
|
61
58
|
|
62
|
-
class
|
63
|
-
desc "
|
59
|
+
class ReceiverTests < ReceiverSetupTests
|
60
|
+
desc "receiver"
|
61
|
+
|
62
|
+
let(:decimal){ Factory.float }
|
63
|
+
let(:integer){ Factory.integer }
|
64
|
+
|
65
|
+
let(:custom_source){ :integer_seconds }
|
66
|
+
let(:custom_precision){ Factory.integer(5) }
|
64
67
|
|
65
68
|
should have_imeths :decimal_as_integer
|
66
69
|
|
67
70
|
should "add a decimal-as-integer accessor using `decimal_as_integer`" do
|
68
|
-
subject.decimal_as_integer
|
69
|
-
|
70
|
-
instance = subject.new
|
71
|
-
assert_respond_to :seconds, instance
|
72
|
-
assert_respond_to :seconds=, instance
|
71
|
+
subject.decimal_as_integer(:seconds)
|
73
72
|
|
74
|
-
|
75
|
-
|
73
|
+
receiver = subject.new
|
74
|
+
assert_that(receiver).responds_to(:seconds)
|
75
|
+
assert_that(receiver).responds_to(:seconds=)
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
receiver.seconds = decimal
|
78
|
+
assert_that(receiver.seconds_as_integer)
|
79
|
+
.equals(unit_module.decimal_to_integer(decimal, DEFAULT_PRECISION))
|
80
80
|
|
81
|
-
|
82
|
-
|
83
|
-
|
81
|
+
receiver.seconds_as_integer = integer
|
82
|
+
assert_that(receiver.seconds)
|
83
|
+
.equals(unit_module.integer_to_decimal(integer, DEFAULT_PRECISION))
|
84
84
|
end
|
85
85
|
|
86
86
|
should "allow specifying custom options using `decimal_as_integer`" do
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
:
|
91
|
-
|
92
|
-
}
|
93
|
-
|
94
|
-
instance = subject.new
|
95
|
-
assert_respond_to :seconds, instance
|
96
|
-
assert_respond_to :seconds=, instance
|
87
|
+
subject.decimal_as_integer(
|
88
|
+
:seconds,
|
89
|
+
source: custom_source,
|
90
|
+
precision: custom_precision,
|
91
|
+
)
|
97
92
|
|
98
|
-
|
99
|
-
|
93
|
+
receiver = subject.new
|
94
|
+
assert_that(receiver).responds_to(:seconds)
|
95
|
+
assert_that(receiver).responds_to(:seconds=)
|
100
96
|
|
101
|
-
|
102
|
-
|
103
|
-
|
97
|
+
receiver.seconds = decimal
|
98
|
+
assert_that(receiver.public_send(custom_source))
|
99
|
+
.equals(unit_module.decimal_to_integer(decimal, custom_precision))
|
104
100
|
|
105
|
-
|
106
|
-
|
107
|
-
|
101
|
+
receiver.public_send("#{custom_source}=", integer)
|
102
|
+
assert_that(receiver.seconds)
|
103
|
+
.equals(unit_module.integer_to_decimal(integer, custom_precision))
|
108
104
|
end
|
109
|
-
|
110
105
|
end
|
111
106
|
|
112
107
|
class EdgeCaseTests < UnitTests
|
113
108
|
desc "edge cases"
|
114
|
-
|
115
|
-
|
109
|
+
subject{ receiver_class.new }
|
110
|
+
|
111
|
+
let(:receiver_class) do
|
112
|
+
Class.new do
|
116
113
|
include MuchDecimal
|
117
114
|
|
118
115
|
attr_accessor :ten_thousandth_seconds
|
119
116
|
|
120
|
-
decimal_as_integer
|
121
|
-
|
122
|
-
|
123
|
-
})
|
117
|
+
decimal_as_integer :seconds,
|
118
|
+
source: :ten_thousandth_seconds,
|
119
|
+
precision: 4
|
124
120
|
end
|
125
|
-
@instance = @class.new
|
126
121
|
end
|
127
|
-
subject{ @instance }
|
128
122
|
|
129
123
|
should "allow writing and reading `nil` values" do
|
130
|
-
|
131
|
-
|
124
|
+
assert_that(subject.ten_thousandth_seconds).is_nil
|
125
|
+
assert_that(subject.seconds).is_nil
|
132
126
|
|
133
127
|
subject.seconds = 1.2345
|
134
|
-
|
135
|
-
|
128
|
+
assert_that(subject.ten_thousandth_seconds).equals(12345)
|
129
|
+
assert_that(subject.seconds).equals(1.2345)
|
136
130
|
|
137
|
-
|
138
|
-
|
139
|
-
|
131
|
+
assert_that{ subject.seconds = nil }.does_not_raise
|
132
|
+
assert_that(subject.seconds).is_nil
|
133
|
+
assert_that(subject.ten_thousandth_seconds).is_nil
|
140
134
|
end
|
141
135
|
|
142
136
|
should "write empty string values as `nil` values" do
|
143
137
|
subject.seconds = 1.2345
|
144
|
-
|
145
|
-
|
138
|
+
assert_that(subject.ten_thousandth_seconds).is_not_nil
|
139
|
+
assert_that(subject.seconds).is_not_nil
|
146
140
|
|
147
|
-
|
148
|
-
|
149
|
-
|
141
|
+
assert_that{ subject.seconds = "" }.does_not_raise
|
142
|
+
assert_that(subject.seconds).is_nil
|
143
|
+
assert_that(subject.ten_thousandth_seconds).is_nil
|
150
144
|
end
|
151
145
|
|
152
146
|
should "write values that can't be converted as `nil` values" do
|
153
147
|
subject.seconds = 1.2345
|
154
|
-
|
155
|
-
|
148
|
+
assert_that(subject.ten_thousandth_seconds).is_not_nil
|
149
|
+
assert_that(subject.seconds).is_not_nil
|
156
150
|
|
157
|
-
|
158
|
-
|
159
|
-
|
151
|
+
assert_that{ subject.seconds = true }.does_not_raise
|
152
|
+
assert_that(subject.seconds).is_nil
|
153
|
+
assert_that(subject.ten_thousandth_seconds).is_nil
|
160
154
|
end
|
161
155
|
|
162
156
|
should "handle decimals with less significant digits" do
|
163
157
|
subject.seconds = 1.12
|
164
|
-
|
165
|
-
|
158
|
+
assert_that(subject.ten_thousandth_seconds).equals(11200)
|
159
|
+
assert_that(subject.seconds).equals(1.12)
|
166
160
|
end
|
167
161
|
|
168
162
|
should "handle integers" do
|
169
163
|
subject.seconds = 5
|
170
|
-
|
171
|
-
|
164
|
+
assert_that(subject.ten_thousandth_seconds).equals(50000)
|
165
|
+
assert_that(subject.seconds).equals(5.0)
|
172
166
|
end
|
173
167
|
|
174
168
|
should "handle decimals that are less than 1" do
|
175
169
|
subject.seconds = 0.0001
|
176
|
-
|
177
|
-
|
170
|
+
assert_that(subject.ten_thousandth_seconds).equals(1)
|
171
|
+
assert_that(subject.seconds).equals(0.0001)
|
178
172
|
end
|
179
173
|
|
180
174
|
should "handle decimals with too many significant digits by rounding" do
|
181
175
|
subject.seconds = 1.00005
|
182
|
-
|
183
|
-
|
176
|
+
assert_that(subject.ten_thousandth_seconds).equals(10001)
|
177
|
+
assert_that(subject.seconds).equals(1.0001)
|
184
178
|
end
|
185
179
|
|
186
180
|
should "handle repeating decimals" do
|
187
181
|
subject.seconds = 1 / 3.0
|
188
|
-
|
189
|
-
|
182
|
+
assert_that(subject.ten_thousandth_seconds).equals(3333)
|
183
|
+
assert_that(subject.seconds).equals(0.3333)
|
190
184
|
end
|
191
|
-
|
192
185
|
end
|
193
186
|
|
194
|
-
class TestHelpersTests <
|
187
|
+
class TestHelpersTests < ReceiverSetupTests
|
195
188
|
include MuchDecimal::TestHelpers
|
196
189
|
|
197
190
|
desc "TestHelpers"
|
198
|
-
|
199
|
-
@class.decimal_as_integer :seconds
|
200
|
-
@custom_precision = Factory.integer(10)
|
201
|
-
@class.decimal_as_integer :other_seconds, {
|
202
|
-
:source => :integer_seconds,
|
203
|
-
:precision => @custom_precision
|
204
|
-
}
|
191
|
+
subject{ receiver_class.new }
|
205
192
|
|
206
|
-
|
193
|
+
setup do
|
194
|
+
receiver_class.decimal_as_integer(:seconds)
|
195
|
+
receiver_class.decimal_as_integer(
|
196
|
+
:other_seconds,
|
197
|
+
source: :integer_seconds,
|
198
|
+
precision: @custom_precision,
|
199
|
+
)
|
207
200
|
end
|
208
|
-
subject{ @instance }
|
209
201
|
|
210
|
-
|
211
|
-
assert_decimal_as_integer subject, :seconds
|
212
|
-
assert_decimal_as_integer subject, :other_seconds, {
|
213
|
-
:source => :integer_seconds,
|
214
|
-
:precision => @custom_precision
|
215
|
-
}
|
216
|
-
end
|
202
|
+
let(:custom_precision){ Factory.integer(10) }
|
217
203
|
|
204
|
+
should "provide helpers for testing that a class has decimal fields" do
|
205
|
+
assert_decimal_as_integer(subject, :seconds)
|
206
|
+
assert_decimal_as_integer(
|
207
|
+
subject,
|
208
|
+
:other_seconds,
|
209
|
+
source: :integer_seconds,
|
210
|
+
precision: @custom_precision,
|
211
|
+
)
|
212
|
+
end
|
218
213
|
end
|
219
|
-
|
220
214
|
end
|
metadata
CHANGED
@@ -1,87 +1,106 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: much-decimal
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Kelly Redding
|
8
8
|
- Collin Redding
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2021-01-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: assert
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 2.19.2
|
21
|
+
type: :development
|
17
22
|
prerelease: false
|
18
|
-
|
19
|
-
requirements:
|
20
|
-
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 2.
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 2.19.2
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: much-style-guide
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.4.0
|
23
35
|
type: :development
|
24
|
-
version_requirements: *id001
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: much-plugin
|
27
36
|
prerelease: false
|
28
|
-
|
29
|
-
requirements:
|
30
|
-
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 0.4.0
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: much-mixin
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 0.2.3
|
33
49
|
type: :runtime
|
34
|
-
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.2.3
|
35
56
|
description: Define decimal attributes that are stored as integers
|
36
|
-
email:
|
57
|
+
email:
|
37
58
|
- kelly@kellyredding.com
|
38
59
|
- collin.redding@me.com
|
39
60
|
executables: []
|
40
|
-
|
41
61
|
extensions: []
|
42
|
-
|
43
62
|
extra_rdoc_files: []
|
44
|
-
|
45
|
-
|
46
|
-
- .
|
63
|
+
files:
|
64
|
+
- ".gitignore"
|
65
|
+
- ".l.yml"
|
66
|
+
- ".rubocop.yml"
|
67
|
+
- ".ruby-version"
|
68
|
+
- ".t.yml"
|
47
69
|
- Gemfile
|
48
70
|
- LICENSE
|
49
71
|
- README.md
|
50
72
|
- lib/much-decimal.rb
|
51
73
|
- lib/much-decimal/version.rb
|
52
|
-
- log/.
|
74
|
+
- log/.keep
|
53
75
|
- much-decimal.gemspec
|
54
76
|
- test/helper.rb
|
55
77
|
- test/support/factory.rb
|
56
78
|
- test/unit/much_decimal_tests.rb
|
57
|
-
- tmp/.gitkeep
|
58
79
|
homepage: https://github.com/redding/much-decimal
|
59
|
-
licenses:
|
80
|
+
licenses:
|
60
81
|
- MIT
|
61
82
|
metadata: {}
|
62
|
-
|
63
83
|
post_install_message:
|
64
84
|
rdoc_options: []
|
65
|
-
|
66
|
-
require_paths:
|
85
|
+
require_paths:
|
67
86
|
- lib
|
68
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
-
requirements:
|
70
|
-
-
|
71
|
-
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '2.5'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
77
97
|
requirements: []
|
78
|
-
|
79
98
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.7.6.2
|
81
100
|
signing_key:
|
82
101
|
specification_version: 4
|
83
102
|
summary: Define decimal attributes that are stored as integers
|
84
|
-
test_files:
|
103
|
+
test_files:
|
85
104
|
- test/helper.rb
|
86
105
|
- test/support/factory.rb
|
87
106
|
- test/unit/much_decimal_tests.rb
|