phosney-money 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/money.rb +2 -2
- data/phosney-money.gemspec +59 -0
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/money.rb
CHANGED
@@ -110,11 +110,11 @@ class Money
|
|
110
110
|
# Money.ca_dollar(570).format(:html, :with_currency) => "$5.70 <span class=\"currency\">CAD</span>"
|
111
111
|
def format(*rules)
|
112
112
|
return self.class.zero if zero? && self.class.zero
|
113
|
-
|
113
|
+
euro_symbol = [8364].pack("U")
|
114
114
|
rules = rules.flatten
|
115
115
|
case self.currency
|
116
116
|
when 'EUR'
|
117
|
-
formatted = to_format(rules.include?(:no_cents) ? 0 : 2) +"
|
117
|
+
formatted = to_format(rules.include?(:no_cents) ? 0 : 2) +"#{euro_symbol}"
|
118
118
|
when 'GBP'
|
119
119
|
formatted = "\u00A3" + to_format(rules.include?(:no_cents) ? 0 : 2)
|
120
120
|
when 'USD'
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{phosney-money}
|
8
|
+
s.version = "0.0.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Manuel Silva"]
|
12
|
+
s.date = %q{2010-05-03}
|
13
|
+
s.description = %q{Class aiding in the handling of Money and Currencies. It supports easy pluggable bank objects for customized exchange strategies. Can be used as composite in ActiveRecord tables.}
|
14
|
+
s.email = %q{ishmael@blackbalto.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"lib/money.rb",
|
27
|
+
"lib/money/bank/no_exchange_bank.rb",
|
28
|
+
"lib/money/bank/variable_exchange_bank.rb",
|
29
|
+
"lib/money/core_extensions.rb",
|
30
|
+
"lib/money/rails.rb",
|
31
|
+
"lib/support/cattr_accessor.rb",
|
32
|
+
"phosney-money.gemspec",
|
33
|
+
"test/helper.rb",
|
34
|
+
"test/test_money.rb"
|
35
|
+
]
|
36
|
+
s.homepage = %q{http://github.com/ishmael/money}
|
37
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
s.rubygems_version = %q{1.3.6}
|
40
|
+
s.summary = %q{Class aiding in the handling of Money.}
|
41
|
+
s.test_files = [
|
42
|
+
"test/helper.rb",
|
43
|
+
"test/test_money.rb"
|
44
|
+
]
|
45
|
+
|
46
|
+
if s.respond_to? :specification_version then
|
47
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
48
|
+
s.specification_version = 3
|
49
|
+
|
50
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
51
|
+
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
52
|
+
else
|
53
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
54
|
+
end
|
55
|
+
else
|
56
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Manuel Silva
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- lib/money/core_extensions.rb
|
52
52
|
- lib/money/rails.rb
|
53
53
|
- lib/support/cattr_accessor.rb
|
54
|
+
- phosney-money.gemspec
|
54
55
|
- test/helper.rb
|
55
56
|
- test/test_money.rb
|
56
57
|
has_rdoc: true
|