From ff953ca48cbcc906ef3476cfb2eb2fca47298fb0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Wed, 6 Jan 2016 13:56:49 -0500 Subject: [PATCH] lib/nitcorn: update examples as they don't need to check for tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- lib/nitcorn/examples/src/nitcorn_hello_world.nit | 3 --- lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit | 3 --- lib/nitcorn/examples/src/restful_annot.nit | 3 --- 3 files changed, 9 deletions(-) diff --git a/lib/nitcorn/examples/src/nitcorn_hello_world.nit b/lib/nitcorn/examples/src/nitcorn_hello_world.nit index a9e8f55..9eb1662 100644 --- a/lib/nitcorn/examples/src/nitcorn_hello_world.nit +++ b/lib/nitcorn/examples/src/nitcorn_hello_world.nit @@ -77,9 +77,6 @@ vh.routes.add new Route("/hello/:name", new ParamAction) # Serve everything else with a standard `FileServer` with a root at "www/hello_world/" vh.routes.add new Route(null, new FileServer("www/hello_world/")) -# Avoid executing when running tests -if "NIT_TESTING".environ == "true" then exit 0 - var factory = new HttpFactory.and_libevent factory.config.virtual_hosts.add vh factory.run diff --git a/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit b/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit index f154dab..13d9c81 100644 --- a/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit +++ b/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit @@ -18,9 +18,6 @@ import nitcorn -# Avoid executing when running tests -if "NIT_TESTING".environ == "true" then exit 0 - # Create the virtualhost for your nitcorn server var vh = new VirtualHost("localhost:8080") diff --git a/lib/nitcorn/examples/src/restful_annot.nit b/lib/nitcorn/examples/src/restful_annot.nit index 3657031..60cf488 100644 --- a/lib/nitcorn/examples/src/restful_annot.nit +++ b/lib/nitcorn/examples/src/restful_annot.nit @@ -39,9 +39,6 @@ var vh = new VirtualHost("localhost:8080") # Serve everything with our restful action vh.routes.add new Route(null, new MyAction) -# Avoid executing when running tests -if "NIT_TESTING".environ == "true" then exit 0 - var factory = new HttpFactory.and_libevent factory.config.virtual_hosts.add vh factory.run -- 1.7.9.5