lib/popcorn: lot of class renaming in examples and tests to avoid the `class X alread...
authorAlexandre Terrasa <alexandre@moz-code.org>
Thu, 11 May 2017 23:20:24 +0000 (19:20 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 17 May 2017 13:38:29 +0000 (09:38 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/popcorn/examples/handlers/tests/test_example_post_handler.nit
lib/popcorn/examples/middlewares/example_advanced_logger.nit
lib/popcorn/examples/middlewares/example_simple_error_handler.nit
lib/popcorn/examples/middlewares/example_simple_logger.nit
lib/popcorn/examples/middlewares/tests/test_example_advanced_logger.nit
lib/popcorn/examples/middlewares/tests/test_example_simple_error_handler.nit
lib/popcorn/examples/middlewares/tests/test_example_simple_logger.nit
lib/popcorn/examples/routing/example_router.nit
lib/popcorn/examples/routing/tests/test_example_router.nit

index e11318b..a1cbb13 100644 (file)
@@ -19,7 +19,7 @@ module test_example_post_handler is test_suite
 import pop_tests
 import example_post_handler
 
-class TestExampleQueryString
+class TestExamplePostHandler
        super TestPopcorn
 
        redef fun client_test do
index 4ca9120..a8ad514 100644 (file)
@@ -28,7 +28,7 @@ class RequestTimeHandler
        redef fun all(req, res) do req.timer = new Clock
 end
 
-class LogHandler
+class AdvancedLoggerHandler
        super Handler
 
        redef fun all(req, res) do
@@ -41,7 +41,7 @@ class LogHandler
        end
 end
 
-class HelloHandler
+class AnotherHandler
        super Handler
 
        redef fun get(req, res) do res.send "Hello World!"
@@ -49,6 +49,6 @@ end
 
 var app = new App
 app.use_before("/*", new RequestTimeHandler)
-app.use("/", new HelloHandler)
-app.use_after("/*", new LogHandler)
+app.use("/", new AnotherHandler)
+app.use_after("/*", new AdvancedLoggerHandler)
 app.listen("localhost", 3000)
index 16a5977..7d1b73c 100644 (file)
@@ -26,7 +26,7 @@ class SimpleErrorHandler
        end
 end
 
-class HelloHandler
+class SomeHandler
        super Handler
 
        redef fun get(req, res) do res.send "Hello World!"
@@ -34,6 +34,6 @@ end
 
 
 var app = new App
-app.use("/", new HelloHandler)
+app.use("/", new SomeHandler)
 app.use("/*", new SimpleErrorHandler)
 app.listen("localhost", 3000)
index 4052169..73aff4f 100644 (file)
 
 import popcorn
 
-class LogHandler
+class SimpleLoggerHandler
        super Handler
 
        redef fun all(req, res) do print "Request Logged"
 end
 
-class HelloHandler
+class MyOtherHandler
        super Handler
 
        redef fun get(req, res) do res.send "Hello World!"
@@ -30,6 +30,6 @@ end
 
 
 var app = new App
-app.use_before("/*", new LogHandler)
-app.use("/", new HelloHandler)
+app.use_before("/*", new SimpleLoggerHandler)
+app.use("/", new MyOtherHandler)
 app.listen("localhost", 3000)
index ba9911b..f870136 100644 (file)
@@ -30,8 +30,8 @@ class TestExampleAdvancedLogger
        fun test_example_advanced_logger do
                var app = new App
                app.use_before("/*", new RequestTimeHandler)
-               app.use("/", new HelloHandler)
-               app.use_after("/*", new LogHandler)
+               app.use("/", new AnotherHandler)
+               app.use_after("/*", new AdvancedLoggerHandler)
                run_test(app)
        end
 end
index 52dacb2..e45acad 100644 (file)
@@ -29,7 +29,7 @@ class TestExampleSimpleErrorHandler
 
        fun test_example_simple_error_handler do
                var app = new App
-               app.use("/", new HelloHandler)
+               app.use("/", new SomeHandler)
                app.use("/*", new SimpleErrorHandler)
                run_test(app)
        end
index 3780a75..b0c41f8 100644 (file)
@@ -29,8 +29,8 @@ class TestExampleSimpleLogger
 
        fun test_example_simple_logger do
                var app = new App
-               app.use_before("/*", new LogHandler)
-               app.use("/", new HelloHandler)
+               app.use_before("/*", new SimpleLoggerHandler)
+               app.use("/", new MyOtherHandler)
                run_test(app)
        end
 end
index 91aa3ab..facce99 100644 (file)
@@ -28,7 +28,7 @@ class UserLogger
        redef fun all(req, res) do print "User logged"
 end
 
-class UserHome
+class UserHomepage
        super Handler
 
        redef fun get(req, res) do res.send "User Home"
@@ -42,7 +42,7 @@ end
 
 var user_router = new Router
 user_router.use("/*", new UserLogger)
-user_router.use("/", new UserHome)
+user_router.use("/", new UserHomepage)
 user_router.use("/profile", new UserProfile)
 
 var app = new App
index 94cc78c..55d5ed9 100644 (file)
@@ -36,7 +36,7 @@ class TestExampleRouter
        fun test_example_router do
                var user_router = new Router
                user_router.use("/*", new UserLogger)
-               user_router.use("/", new UserHome)
+               user_router.use("/", new UserHomepage)
                user_router.use("/profile", new UserProfile)
                var app = new App
                app.use("/", new AppHome)