Skip to content

Commit

Permalink
Goodbye API! Hello apiato
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoudz committed Mar 23, 2017
1 parent cdd7152 commit 13c8e27
Show file tree
Hide file tree
Showing 52 changed files with 148 additions and 146 deletions.
12 changes: 6 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -52,14 +52,14 @@ BROADCAST_DRIVER=log
MAIL_ENABLED=true
MAIL_DRIVER=smtp
MAIL_FROM_ADDRESS=[email protected]
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=[email protected]
MAIL_TO_SUPPORT_NAME="Hello API Support"
MAIL_TO_SUPPORT_NAME="apiato Support"

ELOQUENT_QUERY_CACHE=false
ELOQUENT_QUERY_CACHE_TIME=60
Expand Down
10 changes: 5 additions & 5 deletions .env.travis
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,11 +27,11 @@ FRACTAL_SERIALIZER=DataArray
MAIL_ENABLED=false
MAIL_DRIVER=smtp
[email protected]
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
[email protected]
MAIL_TO_SUPPORT_NAME="Hello API Support"
MAIL_TO_SUPPORT_NAME="apiato Support"
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
];

Expand Down Expand Up @@ -50,7 +50,7 @@ public function testUserLoginExistingUser_()
public function testUserLoginExistingUserUsingGetRequest_()
{
$data = [
'email' => 'hello@mail.dev',
'email' => 'apiato@mail.dev',
'password' => 'secret',
];

Expand Down Expand Up @@ -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',
];

Expand All @@ -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',
];

Expand All @@ -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',
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<body>
<div class="container">
<div class="content">
<div class="title">Hello Admin</div>
<div class="title">Apiato Admin</div>
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion app/Containers/Authentication/UI/WEB/Views/login.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Hello API</title>
<title>apiato</title>
<style>
@import url(https://fonts.googleapis.com/css?family=Roboto:300);
Expand Down
4 changes: 2 additions & 2 deletions app/Containers/Authentication/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "porto-sap/authentication",
"description": "Porto-SAP Container for Hello-API.",
"name": "apiato/authentication",
"description": "apiato Container.",
"require": {
"tymon/jwt-auth": "0.5.*"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function testAssignUserToRoleWithRealId_()
$response = $this->makeCall($data);

// assert response status is correct. Note: this will return 200 if `HASH_ID=false` in the .env
if(\Config::get('hello.hash-id')){
if(\Config::get('apiato.hash-id')){
$this->assertEquals('400', $response->getStatusCode());

$this->assertResponseContainKeyValue([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function testRevokeUserFromRoleWithRealId_()


// assert response status is correct. Note: this will return 200 if `HASH_ID=false` in the .env
if(\Config::get('hello.hash-id')){
if(\Config::get('apiato.hash-id')){
$this->assertEquals('400', $response->getStatusCode());

$this->assertResponseContainKeyValue([
Expand Down
4 changes: 2 additions & 2 deletions app/Containers/Authorization/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "porto-sap/authorization",
"description": "Porto-SAP Container for Hello-API.",
"name": "apiato/authorization",
"description": "apiato Container.",
"require": {
"spatie/laravel-permission": "1.9.*"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@
"name":"Afghanistan",
"full_name":"Islamic Republic of Afghanistan",
"iso_3166_2":"AF",
"country_flag":"http:\/\/api.hello.dev\/assets\/flags\/AF.png"
"country_flag":"http:\/\/api.apiato.dev\/assets\/flags\/AF.png"
},
{
"type":"country",
"id":8,
"name":"Albania",
"full_name":"Republic of Albania",
"iso_3166_2":"AL",
"country_flag":"http:\/\/api.hello.dev\/assets\/flags\/AL.png"
"country_flag":"http:\/\/api.apiato.dev\/assets\/flags\/AL.png"
},
{
"type":"country",
"id":12,
"name":"Algeria",
"full_name":"People\u2019s Democratic Republic of Algeria",
"iso_3166_2":"DZ",
"country_flag":"http:\/\/api.hello.dev\/assets\/flags\/DZ.png"
"country_flag":"http:\/\/api.apiato.dev\/assets\/flags\/DZ.png"
}
...
]
Expand Down
4 changes: 2 additions & 2 deletions app/Containers/Country/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "porto-sap/country",
"description": "Porto-SAP Container for Hello-API.",
"name": "apiato/country",
"description": "apiato Container.",
"require": {
"webpatser/laravel-countries": "1.5.*"
}
Expand Down
4 changes: 2 additions & 2 deletions app/Containers/Debugger/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "porto-sap/debugger",
"description": "Porto-SAP Container for Hello-API.",
"name": "apiato/debugger",
"description": "apiato Container.",
"require": {
"jenssegers/agent": "^2.4"
}
Expand Down
8 changes: 4 additions & 4 deletions app/Containers/Documentation/ApiDocJs/private/apidoc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "Hello API",
"description": "Hello API (Private API) Documentation",
"title": "Welcome to Hello API",
"name": "apiato",
"description": "apiato (Private API) Documentation",
"title": "Welcome to apiato",
"version": "1.0.0",
"url" : "http://api.hello.dev",
"url" : "http://api.apiato.dev",
"template": {
"withCompare": true,
"withGenerator": true
Expand Down
8 changes: 4 additions & 4 deletions app/Containers/Documentation/ApiDocJs/public/apidoc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "Hello API",
"description": "Hello API (Public API) Documentation",
"title": "Welcome to Hello API",
"name": "apiato",
"description": "apiato (Public API) Documentation",
"title": "Welcome to apiato",
"version": "1.0.0",
"url" : "http://api.hello.dev",
"url" : "http://api.apiato.dev",
"template": {
"withCompare": true,
"withGenerator": true
Expand Down
4 changes: 2 additions & 2 deletions app/Containers/Documentation/Tasks/RenderTemplatesTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public function run()
$this->headerMarkdownContent = file_get_contents(app_path(self::TEMPLATE_PATH . 'header.template.md'));

$this->replace('api.domain.dev', Config::get('api.domain'));
$this->replace('{{rate-limit-expires}}', Config::get('hello.api.limit_expires'));
$this->replace('{{rate-limit}}', Config::get('hello.api.limit'));
$this->replace('{{rate-limit-expires}}', Config::get('apiato.api.limit_expires'));
$this->replace('{{rate-limit}}', Config::get('apiato.api.limit'));
$this->replace('{{token-expires}}', $this->minutesToTimeDisplay(Config::get('jwt.ttl')));
$this->replace('{{token-expires-minutes}}', Config::get('jwt.ttl'));
$this->replace('{{pagination-limit}}', Config::get('repository.pagination.limit'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

return [

'welcome' => 'أهلا بك في Hello API',
'welcome' => 'أهلا بك في apiato',

];
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

return [

'welcome' => 'Welcome to Hello API',
'welcome' => 'Welcome to apiato',

];
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

return [

'welcome' => 'Bienvenido a Hello API',
'welcome' => 'Bienvenido a apiato',

];
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

return [

'welcome' => 'Bienvenue chez Hello API',
'welcome' => 'Bienvenue chez apiato',

];
4 changes: 2 additions & 2 deletions app/Containers/Settings/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "porto-sap/settings",
"description": "Porto-SAP Container for Hello-API.",
"name": "apiato/settings",
"description": "apiato Container.",
"require": {

}
Expand Down
4 changes: 2 additions & 2 deletions app/Containers/Socialauth/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "porto-sap/social-auth",
"description": "Porto-SAP Container for Hello-API.",
"name": "apiato/social-auth",
"description": "apiato Container.",
"require": {
"laravel/socialite": "^2.0"
}
Expand Down
4 changes: 2 additions & 2 deletions app/Containers/Stripe/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "porto-sap/stripe",
"description": "Porto-SAP Container for Hello-API.",
"name": "apiato/stripe",
"description": "apiato Container for apiato.",
"require": {
"cartalyst/stripe-laravel": "6.0.*"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function handle(UserCreatedEvent $event)
{
// $this->welcomeEmail->to($event->user->email, $event->user->name)->send([
// 'name' => $event->user->name,
// 'appName' => 'Hello API'
// 'appName' => 'apiato'
// ]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"data":{
"id":0,
"name":"Mahmoud Zalt",
"email":"hello@mail.dev",
"email":"apiato@mail.dev",
"confirmed":null,
"nickname":null,
"gender":null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"data":{
"id":0,
"name":"Mahmoud Zalt",
"email":"hello@mail.dev",
"email":"apiato@mail.dev",
"confirmed":null,
"nickname":null,
"gender":null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"data":{
"id":0,
"name":"Mahmoud Zalt",
"email":"hello@mail.dev",
"email":"apiato@mail.dev",
"confirmed":null,
"nickname":null,
"gender":null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CreateAdminTest extends TestCase
public function testCreateAdmin_()
{
$data = [
'email' => 'hello@admin.dev',
'email' => 'apiato@admin.dev',
'name' => 'admin',
'password' => 'secret',
];
Expand Down
Loading

0 comments on commit 13c8e27

Please sign in to comment.