nofxx-money 2.3.11 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake'
4
4
  begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
- gem.name = "money"
7
+ gem.name = "nofxx-money"
8
8
  gem.summary = "This library aids one in handling money and different currencies."
9
9
  gem.description = "This library aids one in handling money and different currencies."
10
10
  gem.email = "see@reame"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.11
1
+ 2.5.0
@@ -47,7 +47,7 @@ class Money
47
47
  "CAD" => { :delimiter => ",", :separator => ".", :symbol => "$" },
48
48
  "HKD" => { :delimiter => ",", :separator => ".", :symbol => "$" },
49
49
  "SGD" => { :delimiter => ",", :separator => ".", :symbol => "$" },
50
- "BRL" => { :delimiter => ".", :separator => ",", :symbol => "R$" },
50
+ "BRL" => { :delimiter => ".", :separator => ",", :symbol => "R$ " },
51
51
  "ZWD" => { :delimiter => ",", :separator => ".", :symbol => "Z$"},
52
52
  "EUR" => { :delimiter => ",", :separator => ".", :symbol => '€', :html => '€' },
53
53
  "GBP" => { :delimiter => ",", :separator => ".", :symbol => '£', :html => '£' },
@@ -279,7 +279,6 @@ class Money
279
279
  formatted.gsub!(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/,'\1,\2')
280
280
 
281
281
  if rules[:with_currency]
282
- formatted << " "
283
282
  formatted << '<span class="currency">' if rules[:html]
284
283
  formatted << currency
285
284
  formatted << '</span>' if rules[:html]
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{money}
8
- s.version = "2.3.11"
7
+ s.name = %q{nofxx-money}
8
+ s.version = "2.5.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Money Team"]
12
- s.date = %q{2009-08-18}
12
+ s.date = %q{2010-01-16}
13
13
  s.description = %q{This library aids one in handling money and different currencies.}
14
14
  s.email = %q{see@reame}
15
15
  s.extra_rdoc_files = [
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
29
29
  "lib/money/errors.rb",
30
30
  "lib/money/exchange_bank.rb",
31
31
  "lib/money/money.rb",
32
- "money.gemspec",
32
+ "nofxx-money.gemspec",
33
33
  "rails/init.rb",
34
34
  "spec/db/database.yml",
35
35
  "spec/db/schema.rb",
@@ -65,3 +65,4 @@ Gem::Specification.new do |s|
65
65
  else
66
66
  end
67
67
  end
68
+
@@ -41,7 +41,7 @@ describe "Acts as Money" do
41
41
  lambda do
42
42
  @account = Account.create!(:value => 10, :total => "20 BRL")
43
43
  end.should change(Account, :count).by(1)
44
- Account.last.total.format.should eql("R$20,00")
44
+ Account.last.total.format.should eql("R$ 20,00")
45
45
  end
46
46
 
47
47
 
@@ -195,7 +195,7 @@ describe Money do
195
195
  before(:each) do
196
196
  @one = Proc.new { |cur| Money.new(100, cur).format }
197
197
  end
198
- it { @one["BRL"].should eql "R$1,00" }
198
+ it { @one["BRL"].should eql "R$ 1,00" }
199
199
  it { @one["USD"].should eql "$1.00" }
200
200
  it { @one["EUR"].should eql "€1.00" }
201
201
  it { @one["CAD"].should eql "$1.00" }
@@ -211,7 +211,7 @@ describe Money do
211
211
  @cash = Money.new(2_00, "JPY")
212
212
  end
213
213
  it { @cash.format.should eql("¥2.00") }
214
- it { @cash.format(:symbol => "R$ ").should eql("R$ 2.00") }
214
+ it { @cash.format(:symbol => "R$").should eql("R$2.00") }
215
215
  it { @cash.format(:no_cents => true).should eql("¥2") }
216
216
  it { @cash.format(:no_cents => true, :symbol => "R$ ").should eql("R$ 2") }
217
217
  it { @cash.format(:symbol => false).should eql("2.00") }
@@ -231,17 +231,17 @@ describe Money do
231
231
  it { Money.new(80000).format.should eql("$800.00") }
232
232
  it { Money.new(800000).format.should eql("$8,000.00") }
233
233
  it { Money.new(-8000000, "JPY").format(:no_cents => true).should eql("¥-80.000") }
234
- it { Money.new(87654321, "BRL").format.should eql("R$876.543,21") }
235
- it { Money.new(87654321, "brl").format.should eql("R$876.543,21") }
236
- it { Money.new(800000000, "BRL").format.should eql("R$8.000.000,00") }
237
- it { Money.new(8000000000, "BRL").format.should eql("R$80.000.000,00") }
234
+ it { Money.new(87654321, "BRL").format.should eql("R$ 876.543,21") }
235
+ it { Money.new(87654321, "brl").format.should eql("R$ 876.543,21") }
236
+ it { Money.new(800000000, "BRL").format.should eql("R$ 8.000.000,00") }
237
+ it { Money.new(8000000000, "BRL").format.should eql("R$ 80.000.000,00") }
238
238
  it { Money.new(80000000000, "CAD").format.should eql("$800,000,000.00") }
239
239
  it { Money.new(880000000000, "GBP").format(:no_cents => true).should eql("£8,800,000,000") }
240
240
  it { Money.new(8800000000088, "EUR").format.should eql("€88,000,000,000.88") }
241
- it { Money.new("10000", "BRL").format.should eql("R$100,00") }
241
+ it { Money.new("10000", "BRL").format.should eql("R$ 100,00") }
242
242
  it { Money.new("10000", "USD").format.should eql("$100.00") }
243
243
  it { "10,000.00 USD".to_money.format.should eql("$10,000.00") }
244
- it { "10,000.00 BRL".to_money.format.should eql("R$10.000,00") }
244
+ it { "10,000.00 BRL".to_money.format.should eql("R$ 10.000,00") }
245
245
 
246
246
  it "should fail nicely if symbol can`t be found" do
247
247
  Money.stub!(:default_currency).and_return("XXX")
@@ -12,6 +12,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
12
12
  require 'money'
13
13
 
14
14
  config = YAML.load_file(File.dirname(__FILE__) + '/db/database.yml')
15
+ config[:adapter] = "jdbcsqlite3" if RUBY_PLATFORM =~ /java/
15
16
  ActiveRecord::Base.logger = Logger.new("/tmp/money-debug.log")
16
17
  ActiveRecord::Base.establish_connection(config)
17
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nofxx-money
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.11
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Money Team
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-18 00:00:00 -07:00
12
+ date: 2010-01-16 00:00:00 -02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -35,7 +35,7 @@ files:
35
35
  - lib/money/errors.rb
36
36
  - lib/money/exchange_bank.rb
37
37
  - lib/money/money.rb
38
- - money.gemspec
38
+ - nofxx-money.gemspec
39
39
  - rails/init.rb
40
40
  - spec/db/database.yml
41
41
  - spec/db/schema.rb
@@ -46,9 +46,10 @@ files:
46
46
  - spec/spec.opts
47
47
  - spec/spec_helper.rb
48
48
  - tmp/.gitignore
49
- has_rdoc: false
49
+ has_rdoc: true
50
50
  homepage: http://github.com/nofxx/money
51
- licenses:
51
+ licenses: []
52
+
52
53
  post_install_message:
53
54
  rdoc_options:
54
55
  - --charset=UTF-8