From 4aa6b653076f538b836743f5f094cdc57051fcfa Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sun, 10 Sep 2017 20:07:29 +0200 Subject: Added travisci --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6b0f2b5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: python +python: + - "3.5" + - "3.6" + +install: + - pip install Flask +sudo: + - required +script: + python3 /lib/app.py -- cgit v1.2.3-18-g5258 From 1d8706c543fabbe37aafe96ea725cbdc98a0b931 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sun, 10 Sep 2017 21:07:47 +0200 Subject: fixed empty value --- lib/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app.py b/lib/app.py index 4226585..ba8b5d6 100644 --- a/lib/app.py +++ b/lib/app.py @@ -25,7 +25,7 @@ class Stout(Commands): try: with open(config['path'], 'rb') as fin: user = fin.readline().split() - if user[0] == '': + if user[0] is '': return '' else: return user[0].decode('utf-8') -- cgit v1.2.3-18-g5258 From a192199805c164d8b88c375942eecfd1afe3c17a Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sun, 10 Sep 2017 21:08:31 +0200 Subject: fixed travisci's file --- .travis.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b0f2b5..0572367 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,9 @@ python: install: - pip install Flask -sudo: - - required -script: - python3 /lib/app.py + +dist: + - trusty + +sudo: required + -- cgit v1.2.3-18-g5258 From 815af19f3b441ccb1cd5575802da384dfd10f6fe Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 11 Sep 2017 10:21:26 +0200 Subject: added requirements into travisci file --- .travis.yml | 7 +------ requirements.txt | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) create mode 100644 requirements.txt diff --git a/.travis.yml b/.travis.yml index 0572367..5c2d5db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,5 @@ python: - "3.6" install: - - pip install Flask - -dist: - - trusty - -sudo: required + - pip install -r requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e3e9a71 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Flask -- cgit v1.2.3-18-g5258 From 16822eda917dc99a6e0be5db8330d4401ca4fd23 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 11 Sep 2017 10:24:33 +0200 Subject: update travisci --- .travis.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5c2d5db..14380a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: python python: - - "3.5" - - "3.6" - -install: - - pip install -r requirements.txt - + - 3.6 + - nightly +script: + - pytest -- cgit v1.2.3-18-g5258 From cbd77f5172d93130a1039bcfbf79f5948d7ff667 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 11 Sep 2017 10:27:17 +0200 Subject: update travisci --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 14380a5..fc4ae20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - 3.6 - - nightly -script: - - pytest + - 3.5 +install: + - pip install -r requirements.txt -- cgit v1.2.3-18-g5258 From a56b6fc4c181d9c05842cff2a38aae0685e43b7e Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 11 Sep 2017 10:40:36 +0200 Subject: test travisci --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fc4ae20..79904d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,4 @@ language: python python: - 3.5 -install: - - pip install -r requirements.txt + -- cgit v1.2.3-18-g5258 From f024cfc27ead8a79cc647e009b7cf83b0231d49e Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 11 Sep 2017 10:43:32 +0200 Subject: test travisci2 --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index 79904d9..68fcf40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,15 @@ +sudo: false language: python python: - 3.5 +install: + - pip install -r requirements.txt + +script: + - echo "Ok" + +branches: + only: + - master + -- cgit v1.2.3-18-g5258 From 7af941a02b9c95faacf9455928bd831cbf2b3371 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 11 Sep 2017 10:47:41 +0200 Subject: added makefile --- .travis.yml | 2 +- Makefile | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml index 68fcf40..8a709f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ install: - pip install -r requirements.txt script: - - echo "Ok" + make branches: only: diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f5a7248 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +all: + python3 -m py_compile lib/app.py + python3 -m py_compile lib/web.py + -- cgit v1.2.3-18-g5258 From a16df1e220090964f3642eefe60c851d110834f6 Mon Sep 17 00:00:00 2001 From: Santo Date: Mon, 11 Sep 2017 17:35:34 +0200 Subject: Added TravisCI's badge on README file --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8c9f951..a0828eb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Build Status](https://travis-ci.org/dcariotti/Stout.svg?branch=master)](https://travis-ci.org/dcariotti/Stout) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/09f814cd759f4d7eaac5a650c8114fef)](https://www.codacy.com/app/dunkerC/Stout?utm_source=github.com&utm_medium=referral&utm_content=dcariotti/Stout&utm_campaign=Badge_Grade) ![logo](logo_stout.png) -- cgit v1.2.3-18-g5258 From feb342c9f9db644bb55ce39d569022892831fa90 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 12 Sep 2017 11:38:04 +0200 Subject: updated travici badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a0828eb..2e7fee9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/dcariotti/Stout.svg?branch=master)](https://travis-ci.org/dcariotti/Stout) +[![Build Status](https://travis-ci.org/dcariotti/stout.svg?branch=master)](https://travis-ci.org/dcariotti/stout) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/09f814cd759f4d7eaac5a650c8114fef)](https://www.codacy.com/app/dunkerC/Stout?utm_source=github.com&utm_medium=referral&utm_content=dcariotti/Stout&utm_campaign=Badge_Grade) ![logo](logo_stout.png) -- cgit v1.2.3-18-g5258 From 87efb422b03511c32b4f0087bac231a6c23b21d4 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Thu, 14 Sep 2017 18:22:23 +0200 Subject: added docker --- .gitignore | 1 + Dockerfile | 6 ++++++ README.md | 9 ++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore index 227cf83..1996fea 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /__pycache__ /lib/__pycache__ /lib/.data +/lib/*.pyc diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1e713e7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM alpine:3.4 +RUN apk add --update \ + python3 +COPY . /app +WORKDIR /app +CMD ["python3", "lib/app.py"] diff --git a/README.md b/README.md index 2e7fee9..da9ec57 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,14 @@ Ok > (🍺 ) (santo) ``` -## Screenshots +## Docker + +```bash +docker build -t stout:latest . +docker run -i --name Stout stout:latest +``` + +## Screenshots (flask) ![photo1](screenshots/first.png) ![photo2](screenshots/second.png) -- cgit v1.2.3-18-g5258