fx_lib 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -3
- data/lib/fx_lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b406394b9aa855e1e42a9e5299fffad3870e2ef
|
4
|
+
data.tar.gz: ec8c7bc219b8c16646d128e67372f3907e31dcac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08e5ef887a5ded25f8d640f510e8f1385b483ea31cb2db245e3761a0da6e7ceb29785969c61f68210c8270d855249381e996c78ff711d0b052a1f741f0df9bd5
|
7
|
+
data.tar.gz: 259994d47c491443c457aac1cc9b7d9675c0c723b12bc3044048f4a9f97c318a5ff6f24c69087a257ab20050ae3d75b116a9e190dd9d57946d7179e41c64a37c
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# FxLib
|
2
2
|
|
3
|
-
|
3
|
+
FxLib pull foreign exchange rates from xml feed and store it in a table and provides exchange ratesconversion method
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -10,7 +10,11 @@ Add this line to your application's Gemfile:
|
|
10
10
|
|
11
11
|
And then execute:
|
12
12
|
|
13
|
-
$
|
13
|
+
$ rails generate fx_lib:migration
|
14
|
+
|
15
|
+
To seed the database with current fx rates from xml file please run the following rake task
|
16
|
+
|
17
|
+
$ rake FX_URL="Your url to the xml file" fx_lib:db_seed
|
14
18
|
|
15
19
|
Or install it yourself as:
|
16
20
|
|
@@ -18,7 +22,10 @@ Or install it yourself as:
|
|
18
22
|
|
19
23
|
## Usage
|
20
24
|
|
21
|
-
|
25
|
+
Methods:
|
26
|
+
`FxLib::Exchange_Rate.at(Date, Base currency, Counter currency)`
|
27
|
+
`FxLib::fetch_data_on(URL, Date)` - Fetch data for a particular date - cron jobs
|
28
|
+
`FxLib::fetch_data(URL)` - Fetch, parse, store the feed
|
22
29
|
|
23
30
|
## Contributing
|
24
31
|
|
data/lib/fx_lib/version.rb
CHANGED