fantastic_currency 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +1 -1
- data/Rakefile +1 -1
- data/fantastic_currency.gemspec +3 -3
- data/lib/fantastic_currency.rb +7 -2
- metadata +3 -3
data/Manifest
CHANGED
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('fantastic_currency', '0.1.
|
5
|
+
Echoe.new('fantastic_currency', '0.1.4') do |p|
|
6
6
|
p.description = "Manage currencies with Active Record"
|
7
7
|
p.url = "http://github.com/iamcalledrob/FantasticCurrency"
|
8
8
|
p.author = "Rob Mason"
|
data/fantastic_currency.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{fantastic_currency}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Rob Mason"]
|
9
|
-
s.date = %q{2010-
|
9
|
+
s.date = %q{2010-03-25}
|
10
10
|
s.description = %q{Manage currencies with Active Record}
|
11
11
|
s.email = %q{info+gems@slightlyfantastic.com}
|
12
12
|
s.extra_rdoc_files = ["README.textile", "lib/fantastic_currency.rb"]
|
13
|
-
s.files = ["
|
13
|
+
s.files = ["README.textile", "Rakefile", "lib/fantastic_currency.rb", "Manifest", "fantastic_currency.gemspec"]
|
14
14
|
s.homepage = %q{http://github.com/iamcalledrob/FantasticCurrency}
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Fantastic_currency", "--main", "README.textile"]
|
16
16
|
s.require_paths = ["lib"]
|
data/lib/fantastic_currency.rb
CHANGED
@@ -19,7 +19,8 @@ module FantasticCurrency
|
|
19
19
|
:after_unit => " ",
|
20
20
|
:convert_to => nil,
|
21
21
|
:precise_input => false,
|
22
|
-
:full_symbols => true
|
22
|
+
:full_symbols => true,
|
23
|
+
:precise_output => true
|
23
24
|
}.merge(options)
|
24
25
|
|
25
26
|
if options[:precise_input] == true
|
@@ -63,7 +64,11 @@ module FantasticCurrency
|
|
63
64
|
value_as_string
|
64
65
|
end
|
65
66
|
else
|
66
|
-
|
67
|
+
if options[:precise_output] == true
|
68
|
+
BigDecimal.new(value.to_s) / precision_factor
|
69
|
+
else
|
70
|
+
value
|
71
|
+
end
|
67
72
|
end
|
68
73
|
|
69
74
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fantastic_currency
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Mason
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-03-25 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -23,10 +23,10 @@ extra_rdoc_files:
|
|
23
23
|
- README.textile
|
24
24
|
- lib/fantastic_currency.rb
|
25
25
|
files:
|
26
|
-
- Manifest
|
27
26
|
- README.textile
|
28
27
|
- Rakefile
|
29
28
|
- lib/fantastic_currency.rb
|
29
|
+
- Manifest
|
30
30
|
- fantastic_currency.gemspec
|
31
31
|
has_rdoc: true
|
32
32
|
homepage: http://github.com/iamcalledrob/FantasticCurrency
|