bd_money 0.0.7 → 0.0.8

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
data/bd_money.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bd_money}
8
- s.version = "0.0.7"
8
+ s.version = "0.0.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Adrian Madrid"]
@@ -20,7 +20,7 @@ class Money
20
20
  } unless const_defined?(:FORMATS)
21
21
 
22
22
  REMOVE_RE = %r{[$,_ ]} unless const_defined?(:REMOVE_RE)
23
- VALID_RE = %r{^(-)?(\d)+(\.\d{1,35})?$} unless const_defined?(:VALID_RE)
23
+ VALID_RE = %r{^(-)?(\d)+(\.\d{1,30}(e-\d{1,10})?)?$} unless const_defined?(:VALID_RE)
24
24
 
25
25
  YAML_TYPE_CLASS = 'npadv.com,2012-03-12' unless const_defined?(:YAML_TYPE_CLASS)
26
26
  YAML_TYPE_MODE = 'money' unless const_defined?(:YAML_TYPE_MODE)
@@ -65,6 +65,8 @@ describe Money do
65
65
  it { Money.valid?('.01').should_not be_true }
66
66
  it { Money.valid?('-0.01').should be_true }
67
67
  it { Money.valid?('-.01').should_not be_true }
68
+ it { Money.valid?('1.0e-05').should be_true }
69
+ it { Money.valid?('-1.0e-05').should be_true }
68
70
  end
69
71
 
70
72
  describe "initialize" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bd_money
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adrian Madrid