big_decimal_helper 2.0.6 → 2.1.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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7454475e12fb2cbfe64a53d51b241fd9e78f0c4976b2a1518ded16a79a8656db
|
4
|
+
data.tar.gz: 6991f10ef4b80e4524c32ad4cb071c9f9e5dd81eccb2b328509522f3795eead1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 673c63b013edda85231689443f3504c765277cf54c0775e0662767fc900124fd34fe27297fcafd577cfa288e5100428329e375a39c3d1faf868e6abb007b2c35
|
7
|
+
data.tar.gz: 3d21e8711edac63511177152c7dc4391835487e4bb6aca046e5323960392ca475d25fdff598f31f4ab3c74d63ec5d1f130d13095d9a82d995e2128c3eef911de
|
data/big_decimal_helper.gemspec
CHANGED
@@ -3,7 +3,7 @@ require File.expand_path('../lib/big_decimal_helper/version', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["Sam Livingston-Gray"]
|
6
|
-
gem.email = ["
|
6
|
+
gem.email = ["geeksam@gmail.com"]
|
7
7
|
gem.description = %q{Helpers for working with BigDecimals in Rails apps}
|
8
8
|
gem.summary = %q{Defines a #to_bd conversion protocol to ease typing, and provides an ActiveRecord macro to facilitate presentation of float fields as BigDecimal.}
|
9
9
|
gem.homepage = "https://github.com/livingsocial/big_decimal_helper"
|
@@ -14,7 +14,7 @@ module BigDecimalHelper
|
|
14
14
|
def to_bd
|
15
15
|
string_representation = to_s.gsub(/[^\-\d\.]/, '')
|
16
16
|
string_representation = "0" if string_representation =~ /^\s*$/ # convert blanks to zero
|
17
|
-
BigDecimal
|
17
|
+
BigDecimal(string_representation)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: big_decimal_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Livingston-Gray
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
version: 2.14.1
|
41
41
|
description: Helpers for working with BigDecimals in Rails apps
|
42
42
|
email:
|
43
|
-
-
|
43
|
+
- geeksam@gmail.com
|
44
44
|
executables: []
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
@@ -81,8 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
|
-
|
85
|
-
rubygems_version: 2.6.13
|
84
|
+
rubygems_version: 3.0.3
|
86
85
|
signing_key:
|
87
86
|
specification_version: 4
|
88
87
|
summary: 'Defines a #to_bd conversion protocol to ease typing, and provides an ActiveRecord
|