latinum 0.2.4 → 0.2.5

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/README.md CHANGED
@@ -5,7 +5,7 @@ Latinum
5
5
  * Copyright (C) 2012 Samuel G. D. Williams.
6
6
  * Released under the MIT license.
7
7
 
8
- Latinum is a framework for resource and currency calculations. *It is currently a work in progress and not designed to be taken seriously at this time*.
8
+ Latinum is a framework for resource and currency calculations.
9
9
 
10
10
  Basic Usage
11
11
  -----------
@@ -75,5 +75,13 @@ module Latinum
75
75
  :description => 'Japanese Yen',
76
76
  :formatter => Formatters::DecimalCurrencyFormatter
77
77
  }
78
+
79
+ Global[:BTC] = {
80
+ :precision => 8,
81
+ :symbol => 'B⃦',
82
+ :name => 'BTC',
83
+ :description => 'Bitcoin',
84
+ :formatter => Formatters::DecimalCurrencyFormatter
85
+ }
78
86
  end
79
87
  end
@@ -22,7 +22,7 @@ module Latinum
22
22
  module VERSION
23
23
  MAJOR = 0
24
24
  MINOR = 2
25
- TINY = 4
25
+ TINY = 5
26
26
 
27
27
  STRING = [MAJOR, MINOR, TINY].join('.')
28
28
  end
data/test/test_bank.rb CHANGED
@@ -22,6 +22,9 @@ class BankTest < Test::Unit::TestCase
22
22
 
23
23
  resource = Latinum::Resource.new("-100", "NZD")
24
24
  assert_equal "-$100.00 NZD", @bank.format(resource)
25
+
26
+ resource = Latinum::Resource.new("1.12345678", "BTC")
27
+ assert_equal "B⃦1.12000000 BTC", @bank.format(resource)
25
28
  end
26
29
 
27
30
  def test_exchange
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: latinum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-31 00:00:00.000000000 Z
12
+ date: 2012-08-20 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: samuel.williams@oriontransfer.co.nz