From 13c8e27b8bc18c14acf56ed5eb65e59a9c2d720e Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Wed, 22 Mar 2017 23:58:17 -0400 Subject: [PATCH] Goodbye API! Hello apiato --- .env.example | 12 ++--- .env.travis | 10 ++-- .../Providers/MiddlewareServiceProvider.php | 2 +- .../UI/API/Tests/Functional/UserLoginTest.php | 18 +++---- .../UI/WEB/Tests/Functional/UserLoginTest.php | 2 +- .../WEB/Tests/Functional/UserLogoutTest.php | 2 +- .../UI/WEB/Views/dashboard.blade.php | 2 +- .../UI/WEB/Views/login.blade.php | 2 +- app/Containers/Authentication/composer.json | 4 +- .../Tests/Functional/AssignUserToRoleTest.php | 2 +- .../Functional/RevokeUserFromRoleTest.php | 2 +- app/Containers/Authorization/composer.json | 4 +- .../Routes/ListAllCountries.v1.private.php | 6 +-- app/Containers/Country/composer.json | 4 +- app/Containers/Debugger/composer.json | 4 +- .../ApiDocJs/private/apidoc.json | 8 +-- .../Documentation/ApiDocJs/public/apidoc.json | 8 +-- .../Tasks/RenderTemplatesTask.php | 4 +- .../Resources/Languages/ar/messages.php | 2 +- .../Resources/Languages/en/messages.php | 2 +- .../Resources/Languages/es/messages.php | 2 +- .../Resources/Languages/fr/messages.php | 2 +- app/Containers/Settings/composer.json | 4 +- app/Containers/Socialauth/composer.json | 4 +- app/Containers/Stripe/composer.json | 4 +- .../Handlers/UserCreatedEventHandler.php | 2 +- .../UI/API/Routes/RefreshUser.v1.private.php | 2 +- .../UI/API/Routes/RegisterUser.v1.private.php | 2 +- .../UI/API/Routes/UpdateUser.v1.private.php | 2 +- .../API/Tests/Functional/CreateAdminTest.php | 2 +- .../API/Tests/Functional/RegisterUserTest.php | 22 ++++---- app/Containers/User/composer.json | 4 +- .../Welcome/UI/CLI/Commands/SayWelcome.php | 2 +- .../UI/WEB/Tests/Acceptance/WelcomeTest.php | 2 +- .../UI/WEB/Views/welcome-page.blade.php | 2 +- app/Containers/Welcome/composer.json | 4 +- app/Ship/Engine/Butlers/ContainersButler.php | 2 +- app/Ship/Engine/Butlers/ShipButler.php | 2 +- app/Ship/Engine/Loaders/RoutesLoaderTrait.php | 4 +- app/Ship/Engine/Traits/FractalTrait.php | 2 +- app/Ship/Engine/Traits/HashIdTrait.php | 6 +-- .../Configs/{hello.php => apiato.php} | 0 app/Ship/Features/Configs/hashids.php | 4 +- .../Tests/PhpUnit/TestsRequestHelperTrait.php | 2 +- composer.json | 13 +++-- composer.lock | 6 +-- config/app.php | 2 +- config/cache.php | 2 +- config/mail.php | 2 +- phpunit.xml | 2 +- public/api-rendered-markdowns/header.md | 30 +++++------ readme.md | 53 +++++++++---------- 52 files changed, 148 insertions(+), 146 deletions(-) rename app/Ship/Features/Configs/{hello.php => apiato.php} (100%) diff --git a/.env.example b/.env.example index 98938478d..8b22cc154 100644 --- a/.env.example +++ b/.env.example @@ -6,8 +6,8 @@ REQUESTS_DEBUG=false QUERIES_DEBUG=false HASH_ID=false -APP_FULL_URL=http://hello.dev -API_DOMAIN=api.hello.dev +APP_FULL_URL=http://apiato.dev +API_DOMAIN=api.apiato.dev APP_KEY=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX JWT_SECRET=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX @@ -17,8 +17,8 @@ JWT_REFRESH=20160 JWT_BLACKLIST_ENABLED=true API_STRICT=false -API_SUBTYPE=hello -API_NAME="Hello API" +API_SUBTYPE=apiato +API_NAME="apiato" API_VERSION=v1 API_DEFAULT_FORMAT=json API_LIMIT=100 @@ -52,14 +52,14 @@ BROADCAST_DRIVER=log MAIL_ENABLED=true MAIL_DRIVER=smtp MAIL_FROM_ADDRESS=test@test.test -MAIL_FROM_NAME="Hello API" +MAIL_FROM_NAME="apiato" MAIL_HOST=mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null MAIL_TO_SUPPORT_ADDRESS=test@test.com -MAIL_TO_SUPPORT_NAME="Hello API Support" +MAIL_TO_SUPPORT_NAME="apiato Support" ELOQUENT_QUERY_CACHE=false ELOQUENT_QUERY_CACHE_TIME=60 diff --git a/.env.travis b/.env.travis index d9d506316..733d4c1a3 100755 --- a/.env.travis +++ b/.env.travis @@ -3,10 +3,10 @@ HASH_ID=true APP_KEY= -APP_FULL_URL=http://hello.dev -API_DOMAIN=api.hello.dev +APP_FULL_URL=http://apiato.dev +API_DOMAIN=api.apiato.dev -API_NAME="Hello API" +API_NAME="apiato" DB_CONNECTION=mysql DB_HOST=localhost @@ -27,11 +27,11 @@ FRACTAL_SERIALIZER=DataArray MAIL_ENABLED=false MAIL_DRIVER=smtp MAIL_FROM_ADDRESS=test@test.test -MAIL_FROM_NAME="Hello API" +MAIL_FROM_NAME="apiato" MAIL_HOST=mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null MAIL_TO_SUPPORT_ADDRESS=test@test.com -MAIL_TO_SUPPORT_NAME="Hello API Support" +MAIL_TO_SUPPORT_NAME="apiato Support" diff --git a/app/Containers/Authentication/Providers/MiddlewareServiceProvider.php b/app/Containers/Authentication/Providers/MiddlewareServiceProvider.php index 2b0ee0c4a..1ca1e2a67 100644 --- a/app/Containers/Authentication/Providers/MiddlewareServiceProvider.php +++ b/app/Containers/Authentication/Providers/MiddlewareServiceProvider.php @@ -44,7 +44,7 @@ class MiddlewareServiceProvider extends MiddlewareProvider 'jwt.auth' => GetUserFromToken::class, 'jwt.refresh' => RefreshToken::class, - // Hello API User Authentication middleware for Web Pages + // apiato User Authentication middleware for Web Pages 'web.auth' => WebAuthentication::class, ]; diff --git a/app/Containers/Authentication/UI/API/Tests/Functional/UserLoginTest.php b/app/Containers/Authentication/UI/API/Tests/Functional/UserLoginTest.php index 42bb29953..0000e1b64 100755 --- a/app/Containers/Authentication/UI/API/Tests/Functional/UserLoginTest.php +++ b/app/Containers/Authentication/UI/API/Tests/Functional/UserLoginTest.php @@ -19,8 +19,8 @@ class UserLoginTest extends TestCase public function testUserLoginExistingUser_() { $userDetails = [ - 'email' => 'hello@mail.dev', - 'name' => 'Hello', + 'email' => 'apiato@mail.dev', + 'name' => 'Apiato', 'password' => 'secret', ]; @@ -50,7 +50,7 @@ public function testUserLoginExistingUser_() public function testUserLoginExistingUserUsingGetRequest_() { $data = [ - 'email' => 'hello@mail.dev', + 'email' => 'apiato@mail.dev', 'password' => 'secret', ]; @@ -88,8 +88,8 @@ public function testUserLoginNonExistingUser_() public function testUserLoginExistingUserWithoutEmail_() { $userDetails = [ - 'email' => 'hello@mail.dev', - 'name' => 'Hello', + 'email' => 'apiato@mail.dev', + 'name' => 'Apiato', 'password' => 'secret', ]; @@ -114,8 +114,8 @@ public function testUserLoginExistingUserWithoutEmail_() public function testUserLoginExistingUserWithoutPassword_() { $userDetails = [ - 'email' => 'hello@mail.dev', - 'name' => 'Hello', + 'email' => 'apiato@mail.dev', + 'name' => 'Apiato', 'password' => 'secret', ]; @@ -140,8 +140,8 @@ public function testUserLoginExistingUserWithoutPassword_() public function testUserLoginExistingUserWithoutEmailAndPassword_() { $userDetails = [ - 'email' => 'hello@mail.dev', - 'name' => 'Hello', + 'email' => 'apiato@mail.dev', + 'name' => 'Apiato', 'password' => 'secret', ]; diff --git a/app/Containers/Authentication/UI/WEB/Tests/Functional/UserLoginTest.php b/app/Containers/Authentication/UI/WEB/Tests/Functional/UserLoginTest.php index fbadd4209..6d1a467f5 100644 --- a/app/Containers/Authentication/UI/WEB/Tests/Functional/UserLoginTest.php +++ b/app/Containers/Authentication/UI/WEB/Tests/Functional/UserLoginTest.php @@ -28,7 +28,7 @@ public function testWebUserLogin_() // login success and redirect to welcome view $this->seePageIs('/dashboard') - ->see('Hello Admin'); + ->see('Apiato Admin'); } public function testWebUserLoginWithInvalidCredentials() diff --git a/app/Containers/Authentication/UI/WEB/Tests/Functional/UserLogoutTest.php b/app/Containers/Authentication/UI/WEB/Tests/Functional/UserLogoutTest.php index bdafd9fa2..23acf47c2 100644 --- a/app/Containers/Authentication/UI/WEB/Tests/Functional/UserLogoutTest.php +++ b/app/Containers/Authentication/UI/WEB/Tests/Functional/UserLogoutTest.php @@ -27,7 +27,7 @@ public function testWebUserLogout() // login success and redirect to welcome view $this->seePageIs('/dashboard') - ->see('Hello Admin'); + ->see('Apiato Admin'); // trigger the logout request $response = $this->post($this->endpoint); diff --git a/app/Containers/Authentication/UI/WEB/Views/dashboard.blade.php b/app/Containers/Authentication/UI/WEB/Views/dashboard.blade.php index 529a40976..86eb181cc 100755 --- a/app/Containers/Authentication/UI/WEB/Views/dashboard.blade.php +++ b/app/Containers/Authentication/UI/WEB/Views/dashboard.blade.php @@ -38,7 +38,7 @@
-
Hello Admin
+
Apiato Admin
diff --git a/app/Containers/Authentication/UI/WEB/Views/login.blade.php b/app/Containers/Authentication/UI/WEB/Views/login.blade.php index 2dcd8405d..afa3a5aa7 100755 --- a/app/Containers/Authentication/UI/WEB/Views/login.blade.php +++ b/app/Containers/Authentication/UI/WEB/Views/login.blade.php @@ -1,7 +1,7 @@ - Hello API + apiato