fxpotato 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Dockerfile +1 -0
- data/README.md +20 -1
- data/lib/fxpotato/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: 24544fa284a2f95fd354c81816d894fa2c68b46e
|
4
|
+
data.tar.gz: 51435cc944ec1c4773d93d89de6486f1a716b70d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 764ee8a411315648a90c775977e12152087015c811ab080839392f306492a7495628e62ac47a8e66d87afc3002dd30e7e1882ffb910069482d8542507f0ca650
|
7
|
+
data.tar.gz: 9446810407afec759ec378297657f38a362721c35734f04694ec1c873ec8a4a4a8ab15d06a1cf86a119cc380e6a0dfa14f2beb9ea926d4b02b24dce3e84fb02f
|
data/Dockerfile
CHANGED
data/README.md
CHANGED
@@ -2,11 +2,12 @@
|
|
2
2
|
|
3
3
|
The Foreign Exchange currency rates looker-upper. Potato style.
|
4
4
|
|
5
|
-
Uses last daily feed from European Central Bank
|
5
|
+
Uses last daily feed from [European Central Bank](http://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml), and exposes a simple interface to get the conversion rates for one currency to another on a given day.
|
6
6
|
|
7
7
|
An example of this gem in use can be found at [FxPotatoWeb](https://fxpotatoweb.herokuapp.com/). Source code for the site is [here](https://github.com/Angry-Potato/fxpotatoweb).
|
8
8
|
|
9
9
|
[Available on RubyGems.org](https://rubygems.org/gems/fxpotato)
|
10
|
+
[And on DockerHub](https://hub.docker.com/r/angrypotato/fx-potato/)
|
10
11
|
|
11
12
|
## Installation
|
12
13
|
|
@@ -24,6 +25,22 @@ Or install it yourself as:
|
|
24
25
|
|
25
26
|
$ gem install fxpotato
|
26
27
|
|
28
|
+
Or to just play around with the CLI, using docker, pull the latest image:
|
29
|
+
|
30
|
+
$ docker pull angrypotato/fx-potato
|
31
|
+
|
32
|
+
And run it like this:
|
33
|
+
|
34
|
+
```
|
35
|
+
$ docker run angrypotato/fx-potato:latest fxpotato
|
36
|
+
Commands:
|
37
|
+
fxpotato getrate BASE TARGET # Gets the foreign exchange rate for the give...
|
38
|
+
fxpotato help [COMMAND] # Describe available commands or one specific...
|
39
|
+
|
40
|
+
$ docker run angrypotato/fx-potato:latest fxpotato getrate GBP USD -d 2017-06-02
|
41
|
+
Exchange rate from GBP(0.87268) to USD(1.1217) on 2017-06-02: 1.2853508731722967
|
42
|
+
```
|
43
|
+
|
27
44
|
### Configuration
|
28
45
|
FxPotato takes rates from the [ECB website](http://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml). It then saves this data into a `rates.xml` file under the `data` directory in the root of your project. To configure either of those destinations, set the corresponding environment variables:
|
29
46
|
`FXPOTATO_DATA_DIR` and `DATA_FILE`.
|
@@ -90,6 +107,8 @@ fxpotato getrate GBP USD -d 2017-06-02
|
|
90
107
|
|
91
108
|
The `-d` option is not required, and will default to today if not specified.
|
92
109
|
|
110
|
+
Or you can use `fxpotato help getrate` to get slightly more detailed help.
|
111
|
+
|
93
112
|
## Development
|
94
113
|
To run tests, run the rake task `rake test`, this will run unit and feature tests. If you have docker installed, you can run all tests in a container using the rake task `rake docker_test`. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
95
114
|
|
data/lib/fxpotato/version.rb
CHANGED