Skip to content
This repository has been archived by the owner on Feb 28, 2018. It is now read-only.

Commit

Permalink
Merge 5491488 into 69e03f4
Browse files Browse the repository at this point in the history
  • Loading branch information
cuducos committed Jan 8, 2018
2 parents 69e03f4 + 5491488 commit 84432b0
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 98 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-nginx
@@ -1,5 +1,5 @@
FROM nginx:1.13.3-alpine

COPY contrib/nginx.docker /etc/nginx/conf.d/default.conf
COPY contrib/nginx.conf /etc/nginx/conf.d/default.conf

RUN mkdir -p /code/staticfiles
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -6,7 +6,7 @@
[![Updates](https://pyup.io/repos/github/datasciencebr/jarbas/shield.svg)](https://pyup.io/repos/github/datasciencebr/jarbas/)
[![donate](https://img.shields.io/badge/donate-apoia.se-EB4A3B.svg)](https://apoia.se/serenata)

[Jarbas](http://jarbas.serenatadeamor.org/) is part of [Serenata de Amor](http://github.com/datasciencebr/serenata-de-amor) — we fight corruption with data science.
[Jarbas](http://jarbas.serenata.ai/) is part of [Serenata de Amor](http://github.com/datasciencebr/serenata-de-amor) — we fight corruption with data science.

Jarbas is in charge of making data from [CEAP](https://github.com/datasciencebr/serenata-de-amor/blob/master/CONTRIBUTING.md#more-about-the-quota-for-exercising-parliamentary-activity-ceap) more accessible. In the near future Jarbas will show what [Rosie](https://github.com/datasciencebr/rosie) thinks of each reimbursement made for our congresspeople.

Expand Down Expand Up @@ -199,6 +199,7 @@ There are two combinations in terms of With [Docker](https://docs.docker.com/eng
* manually generate JS after edits on Elm files
* manually run `collectstatic` command is static changes
* manually restarting server on change
* requires `VIRTUAL_HOST_WEB` envvar, e.g. `VIRTUAL_HOST_WEB=jarbas.serenata.ai docker-compose -f docker-compose.yml -f docker-compose.prod.yml …`

That said instructions here keep it simple and runs with the development set up. To swicth always add `-f docker-compose.yml -f docker-compose.prod.yml` after `docker-compose`.

Expand Down
41 changes: 0 additions & 41 deletions contrib/nginx

This file was deleted.

File renamed without changes.
45 changes: 0 additions & 45 deletions contrib/post-receive.sh

This file was deleted.

10 changes: 10 additions & 0 deletions docker-compose.prod.yml
Expand Up @@ -51,9 +51,15 @@ services:
tasks:
env_file:
- .env
networks:
- backend
environment:
- DEBUG=False

queue:
networks:
- backend

elm:
command: ["npm", "run", "assets"]
volumes:
Expand All @@ -62,10 +68,14 @@ services:
postgres:
expose:
- "5432"
networks:
- backend
command: ['-c', 'random_page_cost=1']

memcached:
image: memcached:1.5.1-alpine
networks:
- backend

nginx:
image: datasciencebr/jarbas-server
Expand Down
16 changes: 8 additions & 8 deletions jarbas/chamber_of_deputies/tests/test_tweets_command.py
Expand Up @@ -93,16 +93,16 @@ class TestMethods(TestCommand):

def test_get_document_id(self):
valid = (
'http://jarbas.serenatadeamor.org/#/documentId/666',
'http://jarbas.serenatadeamor.org/#/documentId/666/',
'http://jarbas.serenatadeamor.org/#/documentId/666/something/else',
'http://jarbas.serenatadeamor.org/#/something/else/documentId/666'
'http://jarbas.serenata.ai/#/documentId/666',
'http://jarbas.serenata.ai/#/documentId/666/',
'http://jarbas.serenata.ai/#/documentId/666/something/else',
'http://jarbas.serenata.ai/#/something/else/documentId/666'
)
invalid = (
'http://jarbas.serenatadeamor.org/#/document/666',
'http://jarbas.serenatadeamor.org/#/documentid/666/',
'http://jarbas.serenatadeamor.org/#/year/2015/',
'http://jarbas.serenatadeamor.org/#/'
'http://jarbas.serenata.ai/#/document/666',
'http://jarbas.serenata.ai/#/documentid/666/',
'http://jarbas.serenata.ai/#/year/2015/',
'http://jarbas.serenata.ai/#/'
)
self.assertTrue(all((Command.get_document_id(u) for u in valid)))
self.assertFalse(any((Command.get_document_id(u) for u in invalid)))
Expand Down
2 changes: 1 addition & 1 deletion jarbas/dashboard/templates/admin/base_site.html
Expand Up @@ -5,7 +5,7 @@
{% block title %}{{ title|rename_title }} | {{ site_title|default:_('Jarbas Dashboard') }}{% endblock %}

{% block extrahead %}
<script src="{% static 'dashboard.js' %}"> async></script>
<script src="{% static 'dashboard.js' %}" async></script>
<link rel="stylesheet" type="text/css" href="{% static 'dashboard.css' %}" />
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion jarbas/dashboard/tests/test_dashboard_admin.py
Expand Up @@ -108,7 +108,7 @@ def test_suspicious_widget_without_suspicion(self):

def test_receipt_url_widget(self):
widget = ReceiptUrlWidget()
url = 'https://jarbas.serenatadeamor.org'
url = 'https://jarbas.serenata.ai'
rendered = widget.render('Name', url)
self.assertIn('href="{}"'.format(url), rendered)
self.assertIn('>{}</a>'.format(url), rendered)
Expand Down

0 comments on commit 84432b0

Please sign in to comment.