https://github.com/RubyMoney/money
Revision 6bf21596e9073551ab774e92450bd83cc935491f authored by Ismael Celis on 20 May 2015, 16:12:38 UTC, committed by Ismael Celis on 21 May 2015, 20:57:37 UTC
This allows us to swap the storage mechanism (i.e. Redis, memcache, database, file, etc) without losing the behaviour in VariableExchange, or having to subclass or re-implement it. Composition > Inheritance. RatesStore::Memory only deals in currency iso codes: type checking and coercing stops at the bank. Removed testing of private #rate_key_for method. Todo: * do not test instance variables! (@mutex). Find a better way to test thread-safety. * move thread-safety tests to store tests. Bank doesn’t need to know about it.
1 parent 1aabe0d
Tip revision: 6bf21596e9073551ab774e92450bd83cc935491f authored by Ismael Celis on 20 May 2015, 16:12:38 UTC
Move exchange rates storage from Bank::VariableExchange to RatesStore::Memory. VariableExchange uses that store by default.
Move exchange rates storage from Bank::VariableExchange to RatesStore::Memory. VariableExchange uses that store by default.
Tip revision: 6bf2159
File | Mode | Size |
---|---|---|
config | ||
lib | ||
spec | ||
.coveralls.yml | -rw-r--r-- | 46 bytes |
.gitignore | -rw-r--r-- | 169 bytes |
.travis.yml | -rw-r--r-- | 204 bytes |
AUTHORS | -rw-r--r-- | 1.7 KB |
CHANGELOG.md | -rw-r--r-- | 20.4 KB |
CONTRIBUTING.md | -rw-r--r-- | 492 bytes |
Gemfile | -rw-r--r-- | 147 bytes |
LICENSE | -rw-r--r-- | 1.1 KB |
README.md | -rw-r--r-- | 10.4 KB |
Rakefile | -rw-r--r-- | 312 bytes |
money.gemspec | -rw-r--r-- | 1.4 KB |
Computing file changes ...