Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Currency data in JSON format #109

Merged
merged 4 commits into from

2 participants

@stevemorris

I've implemented support for storing currency data in JSON files.I migrated the existing data to two JSON files in a config directory, and I added a CurrencyLoader module.

@semmons99

There's two things I'd like to do here.

  1. change data_path to a constant.
  2. move the data directory into the root directory of the lib and rename it to config.
lib/money/currency_loader.rb
@@ -0,0 +1,17 @@
+module CurrencyLoader
+ extend self
+
+ DATA_PATH = File.dirname(__FILE__) + '/../../config/'
@semmons99 Owner

Could you change this to:

require 'pathname'
DATA_PATH = Pathname.new(__FILE__).dirname + "../../config/"

Using Pathname will make sure that we run on any OS. Once that's changed, I'll go ahead and accept the pull request :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@semmons99 semmons99 merged commit 5f6e20b into RubyMoney:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 19, 2011
  1. @stevemorris
Commits on Sep 23, 2011
  1. @stevemorris

    add CurrencyLoader module

    stevemorris authored
  2. @stevemorris
Commits on Sep 24, 2011
  1. @stevemorris
Something went wrong with that request. Please try again.