Minor tweaks

This commit is contained in:
Hakan Ensari 2018-10-18 13:31:59 +01:00
parent e7fe4d8f44
commit 7d171ac7be
10 changed files with 18 additions and 44 deletions

View File

@ -1,5 +1,6 @@
.*
Dockerfile
LICENSE
assets
spec
*.yml

View File

@ -1,10 +1,17 @@
require:
- rubocop-sequel
AllCops:
TargetRubyVersion: 2.5
Documentation:
Enabled: false
Metrics/BlockLength:
ExcludedMethods: ['dataset_module', 'describe', 'helpers']
Metrics/AbcSize:
Max: 20.45
Metrics/MethodLength:
Max: 13

View File

@ -29,7 +29,7 @@ group :test do
gem 'minitest'
gem 'minitest-around'
gem 'rack-test'
gem 'rubocop'
gem 'rubocop-sequel'
gem 'vcr'
gem 'webmock'
end

View File

@ -60,6 +60,8 @@ GEM
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
rubocop-sequel (0.0.6)
rubocop (~> 0.55, >= 0.55)
ruby-progressbar (1.10.0)
rufus-scheduler (3.5.2)
fugit (~> 1.1, >= 1.1.5)
@ -110,7 +112,7 @@ DEPENDENCIES
rack-test
rake
redcarpet
rubocop
rubocop-sequel
rufus-scheduler
sass
sequel_pg
@ -125,4 +127,4 @@ RUBY VERSION
ruby 2.5.1p57
BUNDLED WITH
1.16.4
1.16.6

View File

@ -2,9 +2,9 @@
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/hakanensari/frankfurter)
Frankfurter is a free and open source API for current and historical foreign exchange rates. It tracks data published by the European Central Bank. Rates are updated around 4PM CET every working day.
Frankfurter is a free and open source API for current and historical foreign exchange rates. It tracks data published by the European Central Bank. Rates update around 4PM CET every working day.
A public instance runs on `https://frankfurter.app`. You can also self-host with Heroku or Docker.
Use our public instance or self host with Heroku or Docker.
## Examples
@ -72,29 +72,3 @@ fetch('/latest?from=GBP&to=USD')
```
Cache data whenever possible.
## Deployment
To build locally, type
```bash
docker-compose up -d
```
Now you can access the API at `http://localhost:8080`.
In production, create a [`.env`](.env.example) file and run with
```bash
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
```
To update to a newer image, run
```bash
docker-compose -f docker-compose.yml -f docker-compose.prod.yml pull
```
Within a few minutes, you will access the API at `https://yourdomain.com/`.
[![Travis](https://travis-ci.org/hakanensari/frankfurter.svg)](https://travis-ci.org/hakanensari/frankfurter)

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 KiB

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100" viewBox="0 0 100 100"><g><g transform="translate(50 50) scale(0.69 0.69) rotate(0) translate(-50 -50)" style="fill:#000000;"><svg fill="#000000" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 99.6 99.6" style="enable-background:new 0 0 99.6 99.6;" xml:space="preserve"><style type="text/css">
.st0{display:none;}
</style><g><path d="M72.8,8.2c-0.5,0.4-1,0.8-1.5,1.3L10.8,72.3c-0.5,0.5-1,1.1-1.4,1.7c-1.3-1.6-1.9-3.5-1.9-5.4c0-2.2,0.8-4.3,2.4-6 L61.4,9.1C64.5,6,69.3,5.6,72.8,8.2z"></path><path d="M91.2,36.3L38.1,91.5c-2.9,3-7.6,3.1-10.6,0.2l-1.7-1.6l0-0.1c0.6-0.4,1.3-0.9,1.8-1.5l60.5-62.8c0.5-0.5,0.9-1,1.2-1.5 l1.7,1.6C94,28.6,94.1,33.4,91.2,36.3z"></path><path d="M85.7,11.3c-1.7-1.6-3.8-2.4-6-2.4c-1.7,0-3.4,0.5-4.8,1.5c-0.5,0.3-1,0.7-1.4,1.2L12.9,74.4c-0.5,0.5-0.9,1.1-1.2,1.7 c-0.8,1.4-1.2,2.9-1.2,4.5c0,2.3,1,4.5,2.6,6.1c3,2.9,7.6,3.2,10.9,0.9c0.5-0.3,0.9-0.7,1.4-1.1L86,23.6c0.3-0.3,0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>

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -82,14 +82,6 @@ body {
font-size: 20px;
font-weight: bold;
}
p:last-child {
display: none;
}
}
code:not(.hljs) {
color: #8f1911;
}
.hljs {

View File

@ -44,11 +44,6 @@
<i class="fas fa-file-alt fa-fw fa-lg"></i><span class="d-none d-sm-inline">Data sets</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://www.producthunt.com/posts/frankfurter" target="_blank">
<i class="fab fa-product-hunt fa-fw fa-lg"></i><span class="d-none d-sm-inline">Product Hunt</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://status.frankfurter.app/" target="_blank">
<i class="fas fa-signature fa-fw fa-lg"></i><span class="d-none d-sm-inline">Status</span>