From bb9a2e975e4657d2f03d93b4d9595160e8190566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 7 Sep 2013 16:23:13 +0200 Subject: [PATCH] Rename the basic_auth example to rest_basic_auth --- examples/README.md | 6 +++--- examples/{basic_auth => rest_basic_auth}/README.md | 0 .../src/rest_basic_auth.app.src} | 4 ++-- .../src/rest_basic_auth_app.erl} | 4 ++-- .../src/rest_basic_auth_sup.erl} | 2 +- .../{basic_auth => rest_basic_auth}/src/toppage_handler.erl | 0 6 files changed, 8 insertions(+), 8 deletions(-) rename examples/{basic_auth => rest_basic_auth}/README.md (100%) rename examples/{basic_auth/src/basic_auth.app.src => rest_basic_auth/src/rest_basic_auth.app.src} (77%) rename examples/{basic_auth/src/basic_auth_app.erl => rest_basic_auth/src/rest_basic_auth_app.erl} (85%) rename examples/{basic_auth/src/basic_auth_sup.erl => rest_basic_auth/src/rest_basic_auth_sup.erl} (92%) rename examples/{basic_auth => rest_basic_auth}/src/toppage_handler.erl (100%) diff --git a/examples/README.md b/examples/README.md index 0e20d5f3..013313ad 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,9 +1,6 @@ Cowboy Examples =============== - * [basic_auth](./basic_auth): - basic HTTP authorization with REST - * [chunked_hello_world](./chunked_hello_world): demonstrates chunked data transfer with two one-second delays @@ -34,6 +31,9 @@ Cowboy Examples * [markdown_middleware](./markdown_middleware): static file handler with markdown preprocessor + * [rest_basic_auth](./rest_basic_auth): + basic HTTP authorization with REST + * [rest_hello_world](./rest_hello_world): return the data type that matches the request type (ex: html, text, json) diff --git a/examples/basic_auth/README.md b/examples/rest_basic_auth/README.md similarity index 100% rename from examples/basic_auth/README.md rename to examples/rest_basic_auth/README.md diff --git a/examples/basic_auth/src/basic_auth.app.src b/examples/rest_basic_auth/src/rest_basic_auth.app.src similarity index 77% rename from examples/basic_auth/src/basic_auth.app.src rename to examples/rest_basic_auth/src/rest_basic_auth.app.src index cbf4ea19..d715b6a0 100644 --- a/examples/basic_auth/src/basic_auth.app.src +++ b/examples/rest_basic_auth/src/rest_basic_auth.app.src @@ -1,6 +1,6 @@ %% Feel free to use, reuse and abuse the code in this file. -{application, basic_auth, [ +{application, rest_basic_auth, [ {description, "Cowboy Basic HTTP Authorization example."}, {vsn, "1"}, {modules, []}, @@ -10,6 +10,6 @@ stdlib, cowboy ]}, - {mod, {basic_auth_app, []}}, + {mod, {rest_basic_auth_app, []}}, {env, []} ]}. diff --git a/examples/basic_auth/src/basic_auth_app.erl b/examples/rest_basic_auth/src/rest_basic_auth_app.erl similarity index 85% rename from examples/basic_auth/src/basic_auth_app.erl rename to examples/rest_basic_auth/src/rest_basic_auth_app.erl index 24c766e5..c19349d7 100644 --- a/examples/basic_auth/src/basic_auth_app.erl +++ b/examples/rest_basic_auth/src/rest_basic_auth_app.erl @@ -1,7 +1,7 @@ %% Feel free to use, reuse and abuse the code in this file. %% @private --module(basic_auth_app). +-module(rest_basic_auth_app). -behaviour(application). %% API. @@ -19,7 +19,7 @@ start(_Type, _Args) -> {ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [ {env, [{dispatch, Dispatch}]} ]), - basic_auth_sup:start_link(). + rest_basic_auth_sup:start_link(). stop(_State) -> ok. diff --git a/examples/basic_auth/src/basic_auth_sup.erl b/examples/rest_basic_auth/src/rest_basic_auth_sup.erl similarity index 92% rename from examples/basic_auth/src/basic_auth_sup.erl rename to examples/rest_basic_auth/src/rest_basic_auth_sup.erl index 6219b5f2..f6ce67cb 100644 --- a/examples/basic_auth/src/basic_auth_sup.erl +++ b/examples/rest_basic_auth/src/rest_basic_auth_sup.erl @@ -1,7 +1,7 @@ %% Feel free to use, reuse and abuse the code in this file. %% @private --module(basic_auth_sup). +-module(rest_basic_auth_sup). -behaviour(supervisor). %% API. diff --git a/examples/basic_auth/src/toppage_handler.erl b/examples/rest_basic_auth/src/toppage_handler.erl similarity index 100% rename from examples/basic_auth/src/toppage_handler.erl rename to examples/rest_basic_auth/src/toppage_handler.erl