google_currency 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/lib/money/bank/google_currency.rb +13 -0
- metadata +11 -9
data/CHANGELOG
CHANGED
@@ -6,6 +6,19 @@ class Money
|
|
6
6
|
class GoogleCurrency < Money::Bank::VariableExchange
|
7
7
|
attr_reader :rates
|
8
8
|
|
9
|
+
def flush_rates
|
10
|
+
@mutex.synchronize{
|
11
|
+
@rates = {}
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
def flush_rate(from, to)
|
16
|
+
key = rate_key_for(from, to)
|
17
|
+
@mutex.synchronize{
|
18
|
+
@rates.delete(key)
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
9
22
|
def get_rate(from, to)
|
10
23
|
@mutex.synchronize{
|
11
24
|
@rates[rate_key_for(from, to)] ||= get_google_rate(from, to)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_currency
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Shane Emmons
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-12 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
hash: -
|
61
|
+
hash: -783475742
|
62
62
|
segments:
|
63
63
|
- 3
|
64
64
|
- 1
|
@@ -74,8 +74,10 @@ executables: []
|
|
74
74
|
|
75
75
|
extensions: []
|
76
76
|
|
77
|
-
extra_rdoc_files:
|
78
|
-
|
77
|
+
extra_rdoc_files:
|
78
|
+
- LICENSE
|
79
|
+
- README.md
|
80
|
+
- CHANGELOG
|
79
81
|
files:
|
80
82
|
- lib/money/bank/google_currency.rb
|
81
83
|
- LICENSE
|
@@ -86,8 +88,8 @@ homepage: http://rubymoney.github.com/google_currency
|
|
86
88
|
licenses: []
|
87
89
|
|
88
90
|
post_install_message:
|
89
|
-
rdoc_options:
|
90
|
-
|
91
|
+
rdoc_options:
|
92
|
+
- --charset=UTF-8
|
91
93
|
require_paths:
|
92
94
|
- lib
|
93
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|