From fbb2344895ce45f8de30cc20b91e3ac5149ffdc7 Mon Sep 17 00:00:00 2001 From: Yun Xu Date: Thu, 10 Aug 2017 07:55:38 -0700 Subject: [PATCH 1/5] fix cov report --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index dcebb050..4c69cbaa 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,9 @@ deps = beautifulsoup4 gunicorn commands = - pytest tests --cov sanic --cov-report term-missing {posargs} + pytest tests --cov sanic --cov-report= {posargs} + coverage combine --append + coverage report -m [testenv:flake8] deps = From 756bd191810df48341f95e234ace411c763833ba Mon Sep 17 00:00:00 2001 From: Yun Xu Date: Thu, 10 Aug 2017 08:39:02 -0700 Subject: [PATCH 2/5] do not fail if no files for coverage combine --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 4c69cbaa..ff43a139 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ deps = gunicorn commands = pytest tests --cov sanic --cov-report= {posargs} - coverage combine --append + - coverage combine --append coverage report -m [testenv:flake8] From 2587f6753d20fa9791b19fc0725b8e4f8090b01d Mon Sep 17 00:00:00 2001 From: dongweiming Date: Tue, 15 Aug 2017 22:04:25 +0800 Subject: [PATCH 3/5] Fix blueprint doc --- docs/sanic/blueprints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sanic/blueprints.md b/docs/sanic/blueprints.md index b4fd06d7..5be33cb6 100644 --- a/docs/sanic/blueprints.md +++ b/docs/sanic/blueprints.md @@ -172,7 +172,7 @@ takes the format `.`. For example: ```python @blueprint_v1.route('/') async def root(request): - url = app.url_for('v1.post_handler', post_id=5) # --> '/v1/post/5' + url = request.app.url_for('v1.post_handler', post_id=5) # --> '/v1/post/5' return redirect(url) From dd241bd6facbc3543133df5066d7c0277c1ae0a4 Mon Sep 17 00:00:00 2001 From: jiaxiaolei Date: Fri, 18 Aug 2017 17:00:34 +0800 Subject: [PATCH 4/5] docs(README): Make it clear and easy to read. --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 410bd0b8..b410ddcf 100644 --- a/README.rst +++ b/README.rst @@ -31,13 +31,13 @@ Hello World Example Installation ------------ -- ``python -m pip install sanic`` +- ``pip install sanic`` To install sanic without uvloop or json using bash, you can provide either or both of these environmental variables using any truthy string like `'y', 'yes', 't', 'true', 'on', '1'` and setting the NO_X to true will stop that features installation. -- ``SANIC_NO_UVLOOP=true SANIC_NO_UJSON=true python -m pip install sanic`` +- ``SANIC_NO_UVLOOP=true SANIC_NO_UJSON=true pip install sanic`` Documentation From a55efc832d19d4f67c061ecaf38798b56615e112 Mon Sep 17 00:00:00 2001 From: pkuphy Date: Sat, 19 Aug 2017 01:03:54 +0800 Subject: [PATCH 5/5] fix typo --- docs/sanic/middleware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sanic/middleware.md b/docs/sanic/middleware.md index b2e8b45a..1a7f9d86 100644 --- a/docs/sanic/middleware.md +++ b/docs/sanic/middleware.md @@ -4,7 +4,7 @@ Middleware are functions which are executed before or after requests to the server. They can be used to modify the *request to* or *response from* user-defined handler functions. -Additionally, Sanic providers listeners which allow you to run code at various points of your application's lifecycle. +Additionally, Sanic provides listeners which allow you to run code at various points of your application's lifecycle. ## Middleware