Skip to content

Commit

Permalink
Merge 73287cb into 384f5a3
Browse files Browse the repository at this point in the history
  • Loading branch information
mugoh committed Oct 26, 2018
2 parents 384f5a3 + 73287cb commit 9797567
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 5 deletions.
1 change: 1 addition & 0 deletions .coverage
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!coverage.py: This is a private format, don't read it directly!{"lines":{"/root/Documents/save_me/storeManager/app/__init__.py":[1],"/root/Documents/save_me/storeManager/app/tests/__init__.py":[1],"/root/Documents/save_me/storeManager/app/tests/test_basic.py":[2,3,4,5,6,7,8,10,13,14,35,41,48,55,65,76,98,122,141,165,201,223,224,227,238,252,262,282,302,328,340,15,16,17,19,20,23,24,25,29,30,31,32,44,46,68,69,72,73,58,59,62,63,128,129,130,131,132,133,134,135,138,139,82,83,84,85,86,87,88,89,91,92,95,96,104,105,106,107,108,109,110,111,113,114,116,118,120,147,148,149,150,151,152,153,154,155,157,158,161,162,163,172,173,174,175,176,177,178,179,181,182,186,187,191,194,195,196,198,199,206,207,208,209,210,211,212,213,215,216,217,220,36,37,38,51,52,329,330,331,332,335,336,305,306,307,308,310,311,312,314,315,316,319,320,324,325,225,266,267,268,269,270,271,272,273,275,280,286,287,288,289,290,291,292,293,295,300,228,229,230,231,234,235,255,256,257,260,244,245,246,249,250],"/root/Documents/save_me/storeManager/app/app.py":[2,3,4,5,7,8,9,10,14,15,18,19,20,23,24,25,26,27,28,30,31,35,36,39,40,41,44,45,46,47,48,49,51,52,59,60,61,62,63,64,69,70,71,72,73,74,75,81,82,84,85,86,91,92,93,94,95,96,101,102,103,104,105,111,112,113,116,117,125,127,128,129,131,132,134,135,137,138,140,141,146,150,151,155,163,171,179,187,188,190,245,250,286,287,290,301,309,326,340,341,342,368,374,394,395,396,416,426,442,455,456,457,460,461,462,463,173,174,196,197,198,199,200,203,204,205,207,208,209,211,212,213,217,218,219,220,222,223,224,226,227,228,230,231,232,234,236,237,239,240,241,243,247,157,158,291,292,293,294,295,296,297,299,302,304,307,251,254,255,256,257,258,259,260,261,262,263,264,265,266,270,272,273,274,279,282,283,181,182,183,305,327,328,331,333,336,310,311,314,317,320,321,324,315,343,344,345,346,349,350,351,354,355,357,358,361,362,363,366,370,371,397,398,399,402,403,406,407,410,411,414,417,419,423,165,166,167,376,379,380,381,382,383,384,387,390,391,420,444,446,448,451,428,430,432,434,435,439,431],"/root/Documents/save_me/storeManager/app/tests/test_basic_.py":[1,2,3,4,5,6,7,9,12,13,41,53,63,71,78,90,116,134,158,193,218,219,231,245,256,282,292,312,14,15,16,18,19,22,24,25,27,28,29,31,32,33,37,38,83,84,86,88,45,47,49,51,74,75,56,57,60,61,67,68,121,122,123,124,125,126,127,128,131,132,96,97,98,99,100,102,103,104,106,107,110,112,114,164,165,166,167,168,169,170,171,173,174,178,179,183,186,187,188,190,191,140,141,142,143,144,145,146,147,148,150,151,154,155,156,199,200,201,202,203,204,205,206,208,209,210,213,215,246,247,248,249,252,253,259,260,261,262,264,265,266,268,269,270,273,274,278,279,285,286,287,290,220,221,222,223,226,228,237,238,239,242,243,296,297,298,299,300,301,302,303,305,310,316,317,318,319,320,321,322,323,325,326]}}
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ install:

script:
- coverage run -m pytest
- py.test --cov=project
- py.test --cov=app

after_success:
- coveralls

script:
- pytest
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn app.app:my_app --preload --workers 4
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# storeManager

[![Build Status](https://travis-ci.com/hogum/storeManager.svg?branch=master)](https://travis-ci.com/hogum/storeManager)
[![Coverage Status](https://coveralls.io/repos/github/hogum/storeManager/badge.svg?branch=project-app)](https://coveralls.io/github/hogum/storeManager?branch=project-app)

[![Coverage Status](https://coveralls.io/repos/github/hogum/storeManager/badge.svg)](https://coveralls.io/github/hogum/storeManager)

[![Code Climate](https://codeclimate.com/github/codeclimate/codeclimate/badges/gpa.svg)](https://codeclimate.com/github/hogum/storeManager)

Expand All @@ -11,7 +11,21 @@
A web application to help store managers maintain their inventories and manage sale records.


Try on Heroku: https://store-man90.herokuapp.com/stman/api/v1.0/products

/stman/api/v1.0/sales
GET sales
POST sale

/stman/api/v1.0/sales/<int:sales_record>
GET sale
PUT sale
DELETE sale

/stman/api/v1.0/products
GET products, POST product

stman/api/v1.0/products/id
GET product, PUT, DELETE

[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
11 changes: 11 additions & 0 deletions app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import os
from flask import Flask

my_app = Flask(__name__)
#my_app.config.from_object(os.environ['APP_SETTINGS'])

my_app_settings = os.getenv(
'APP_SETTINGS',
'app.config.DevelopmentConfig'
)
my_app.config.from_object(my_app_settings)
24 changes: 24 additions & 0 deletions app/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
basedir = os.path.abspath(os.path.dirname(__file__))


class Config(object):
DEBUG = False
TESTING = False
CSRF_ENABLED = True
SECRET_KEY = 'secrtet-key-secrete'


class ProductionConfig(Config):
DEBUG = False


class StagingConfig(Config):
DEVELOPMENT = True
DEBUG = True


class DevelopmentConfig(Config):
DEVELOPMENT = True
DEBUG = True

12 changes: 12 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
aniso8601==3.0.2
atomicwrites==1.2.1
attrs==18.2.0
certifi==2018.10.15
chardet==3.0.4
Click==7.0
Expand All @@ -8,11 +10,21 @@ docopt==0.6.2
Flask==1.0.2
Flask-HTTPAuth==3.2.4
Flask-RESTful==0.3.6
gunicorn==19.9.0
idna==2.7
itsdangerous==0.24
Jinja2==2.10
MarkupSafe==1.0
mock==2.0.0
more-itertools==4.3.0
pbr==5.0.0
pluggy==0.8.0
py==1.7.0
pytest==3.9.1
pytest-cov==2.6.0
python-coveralls==2.9.1
pytz==2018.5
PyYAML==3.13
requests==2.20.0
six==1.11.0
urllib3==1.24
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9797567

Please sign in to comment.