currencies 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/VERSION +1 -1
- data/currencies.gemspec +62 -0
- data/lib/currencies/currency.rb +1 -1
- metadata +2 -1
data/.gitignore
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/currencies.gemspec
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{currencies}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["hexorx"]
|
12
|
+
s.date = %q{2010-02-18}
|
13
|
+
s.description = %q{If you are tracking any kind of assets the currencies gem is for you. It contains every currency in the ISO 4217 standard and allows you to add your own as well. So if you decide to take sparkly buttons as a form of payment you can use currencies to display the shiny button unicode symbol ☼ (disclaimer: ☼ may not look like a shiny button to everyone.) when used with something like the money gem. Speaking of the money gem, currencies gives you an ExchangeBank that the money gem can use to convert from one currency to another. There are plans to have ExchangeRate provider plugin system. Right now the rates are either set manually or pulled from Yahoo Finance.}
|
14
|
+
s.email = %q{hexorx@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.markdown"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.markdown",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"currencies.gemspec",
|
27
|
+
"lib/currencies.rb",
|
28
|
+
"lib/currencies/currency.rb",
|
29
|
+
"lib/currencies/exchange_bank.rb",
|
30
|
+
"lib/currencies/extentions.rb",
|
31
|
+
"lib/data/iso4217.yaml",
|
32
|
+
"spec/currency_spec.rb",
|
33
|
+
"spec/exchange_bank_spec.rb",
|
34
|
+
"spec/spec_helper.rb"
|
35
|
+
]
|
36
|
+
s.homepage = %q{http://github.com/hexorx/currencies}
|
37
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
s.rubygems_version = %q{1.3.5}
|
40
|
+
s.summary = %q{Simple gem for working with currencies. It is extracted from the countries gem and contains all the currency information in the ISO 4217 standard.}
|
41
|
+
s.test_files = [
|
42
|
+
"spec/currency_spec.rb",
|
43
|
+
"spec/exchange_bank_spec.rb",
|
44
|
+
"spec/spec_helper.rb"
|
45
|
+
]
|
46
|
+
|
47
|
+
if s.respond_to? :specification_version then
|
48
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
49
|
+
s.specification_version = 3
|
50
|
+
|
51
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
52
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
53
|
+
s.add_development_dependency(%q<yard>, [">= 0"])
|
54
|
+
else
|
55
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
56
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
57
|
+
end
|
58
|
+
else
|
59
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
60
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
61
|
+
end
|
62
|
+
end
|
data/lib/currencies/currency.rb
CHANGED
@@ -12,7 +12,7 @@ class Currency
|
|
12
12
|
@name = opts['name']
|
13
13
|
@symbol = opts['symbol']
|
14
14
|
@exchange_currency = opts['exchange_currency'] || Currency.base_currency
|
15
|
-
@exchange_rate = opts['exchange_rate'].to_f
|
15
|
+
@exchange_rate = opts['exchange_rate'].to_f if opts['exchange_rate']
|
16
16
|
end
|
17
17
|
|
18
18
|
def exchange_rate
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: currencies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hexorx
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- README.markdown
|
49
49
|
- Rakefile
|
50
50
|
- VERSION
|
51
|
+
- currencies.gemspec
|
51
52
|
- lib/currencies.rb
|
52
53
|
- lib/currencies/currency.rb
|
53
54
|
- lib/currencies/exchange_bank.rb
|