Skip to content

Commit

Permalink
Renames Sailing to Sailon
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaize Kaye committed Apr 18, 2024
1 parent 16b465b commit a6bad01
Show file tree
Hide file tree
Showing 45 changed files with 66 additions and 66 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/uselagoon/sailinglagoon/discussions/new?category=q-a
url: https://github.com/uselagoon/sailonlagoon/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/uselagoon/sailinglagoon/discussions/new?category=ideas
url: https://github.com/uselagoon/sailonlagoon/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/uselagoon/sailinglagoon/security/policy
url: https://github.com/uselagoon/sailonlagoon/security/policy
about: Learn how to notify us for sensitive bugs
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Changelog

All notable changes to `sailinglagoon` will be documented in this file.
All notable changes to `sailonlagoon` will be documented in this file.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Welcome to Sail on Lagoon! We appreciate your interest in contributing to this p

### Reporting Issues

If you encounter a bug or have a feature request, please [open an issue](https://github.com/bomoko/sailinglagoon/issues) on GitHub. Before creating a new issue, search existing ones to avoid duplicates.
If you encounter a bug or have a feature request, please [open an issue](https://github.com/uselagoon/sailonlagoon/issues) on GitHub. Before creating a new issue, search existing ones to avoid duplicates.

When reporting an issue, include:

Expand Down Expand Up @@ -40,6 +40,6 @@ All PRs will be reviewed by project maintainers. Feedback and discussions may oc

## Resources

- [Issue Tracker](https://github.com/bomoko/sailinglagoon/issues)
- [Issue Tracker](https://github.com/uselagoon/sailonlagoon/issues)
- [License](LICENSE)

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Sail on Lagoon

[![Latest Version on Packagist](https://img.shields.io/packagist/v/bomoko/sailinglagoon.svg?style=flat-square)](https://packagist.org/packages/bomoko/sailinglagoon)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/bomoko/sailinglagoon/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/bomoko/sailinglagoon/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/bomoko/sailinglagoon/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/bomoko/sailinglagoon/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/bomoko/sailinglagoon.svg?style=flat-square)](https://packagist.org/packages/bomoko/sailinglagoon)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/uselagoon/sailonlagoon.svg?style=flat-square)](https://packagist.org/packages/uselagoon/sailonlagoon)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/uselagoon/sailonlagoon/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/uselagoon/sailonlagoon/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/uselagoon/sailonlagoon/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/uselagoon/sailonlagoon/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/uselagoon/sailonlagoon.svg?style=flat-square)](https://packagist.org/packages/uselagoon/sailonlagoon)

Sail on Lagoon is a Laravel extension that simplifies the process of Lagoonizing Laravel sites
that are already using Laravel Sail to generate their docker-compose setup.
Expand All @@ -16,7 +16,7 @@ The assumption is that you've already set up your Laravel development environmen
Once you have your Laravel site running locally, you can install `Sail on Lagoon` via composer:

```bash
composer require bomoko/sailinglagoon
composer require uselagoon/sailonlagoon
```

To use Sail on Lagoon, run the following Artisan command:
Expand Down Expand Up @@ -59,7 +59,7 @@ Please review [our security policy](../../security/policy) on how to report secu

## Credits

- [Blaize Kaye](https://github.com/bomoko)
- [Blaize Kaye](https://github.com/uselagoon)
- [All Contributors](../../contributors)

## License
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": [
"uselagoon",
"laravel",
"sailinglagoon"
"sailonlagoon"
],
"homepage": "https://github.com/uselagoon/sailonlagoon",
"license": "MIT",
Expand All @@ -30,19 +30,19 @@
},
"autoload": {
"psr-4": {
"Uselagoon\\Sailinglagoon\\": "src/",
"Uselagoon\\Sailinglagoon\\Database\\Factories\\": "database/factories/"
"Uselagoon\\Sailonlagoon\\": "src/",
"Uselagoon\\Sailonlagoon\\Database\\Factories\\": "database/factories/"
}
},
"autoload-dev": {
"psr-4": {
"Uselagoon\\Sailinglagoon\\Tests\\": "tests/",
"Uselagoon\\Sailonlagoon\\Tests\\": "tests/",
"Workbench\\App\\": "workbench/app/"
}
},
"scripts": {
"post-autoload-dump": "@composer run prepare",
"clear": "@php vendor/bin/testbench package:purge-sailinglagoon --ansi",
"clear": "@php vendor/bin/testbench package:purge-sailonlagoon --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": [
"@composer run prepare",
Expand All @@ -68,10 +68,10 @@
"extra": {
"laravel": {
"providers": [
"Uselagoon\\Sailinglagoon\\SailinglagoonServiceProvider"
"Uselagoon\\Sailonlagoon\\SailonlagoonServiceProvider"
],
"aliases": {
"Sailinglagoon": "Uselagoon\\Sailinglagoon\\Facades\\Sailinglagoon"
"Sailonlagoon": "Uselagoon\\Sailonlagoon\\Facades\\Sailonlagoon"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Uselagoon\Sailinglagoon\Commands;
namespace Uselagoon\Sailonlagoon\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Collection;
Expand All @@ -9,7 +9,7 @@

use function Illuminate\Filesystem\join_paths;

class SailinglagoonCommand extends Command
class SailonlagoonCommand extends Command
{

protected $dockerComposeName = "lagoon-docker-compose.yml";
Expand Down Expand Up @@ -118,7 +118,7 @@ public function handle()
}

//Let's build the service list and then parse
$stubsRootPath = join_paths(__DIR__, "sailingLagoonAssets/stubs");
$stubsRootPath = join_paths(__DIR__, "sailonLagoonAssets/stubs");
$yamlFile = file_get_contents(join_paths($stubsRootPath, "docker-compose.stub"));

$dockerComposeFile = $this->generateDockerCompose($services, $stubsRootPath, $yamlFile);
Expand All @@ -131,7 +131,7 @@ public function handle()

// Let's now do the same for env stubs

$stubsRootPath = join_paths(__DIR__, "sailingLagoonAssets/envstubs");
$stubsRootPath = join_paths(__DIR__, "sailonLagoonAssets/envstubs");
$stubContents = "";
foreach ($services as $serviceName) {
$stubPath = join_paths($stubsRootPath, $serviceName.".stub");
Expand All @@ -144,15 +144,15 @@ public function handle()
}

// now let's copy the files we require to build everything to .lagoon
$copySource = join_paths(__DIR__, "sailingLagoonAssets", "Lagoon");
$copySource = join_paths(__DIR__, "sailonLagoonAssets", "Lagoon");
$copyDest = join_paths(base_path(), "lagoon");

if(File::copyDirectory($copySource, $copyDest)) {
$this->info("Successfully copied Lagoon assets to .lagoon");
}

// Let's generate the .lagoon.yml file
$lagoonYml = file_get_contents(join_paths(__DIR__, "sailingLagoonAssets",".lagoon.yml"));
$lagoonYml = file_get_contents(join_paths(__DIR__, "sailonLagoonAssets",".lagoon.yml"));
$replacements = [
'%projectName%' => $projectName,
];
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SailingLagoon Assets
# SailonLagoon Assets

This directory contains all the files needed to build any of the images etc.
built by the resulting docker-compose.yml for Lagoon.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sailing Lagoon Stubs
# Sailon Lagoon Stubs

Essentially inspired by (stolen from?) Sail's implementation,
this directory contains a number of stubs used to generate the Lagoon specific docker-compose file.
Expand Down
16 changes: 0 additions & 16 deletions src/Facades/Sailinglagoon.php

This file was deleted.

16 changes: 16 additions & 0 deletions src/Facades/Sailonlagoon.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Uselagoon\Sailonlagoon\Facades;

use Illuminate\Support\Facades\Facade;

/**
* @see \Uselagoon\Sailonlagoon\Sailonlagoon
*/
class Sailonlagoon extends Facade
{
protected static function getFacadeAccessor()
{
return \Uselagoon\Sailonlagoon\Sailonlagoon::class;
}
}
7 changes: 0 additions & 7 deletions src/Sailinglagoon.php

This file was deleted.

7 changes: 7 additions & 0 deletions src/Sailonlagoon.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Uselagoon\Sailonlagoon;

class Sailonlagoon
{
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace Uselagoon\Sailinglagoon;
namespace Uselagoon\Sailonlagoon;

use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Uselagoon\Sailinglagoon\Commands\SailinglagoonCommand;
use Uselagoon\Sailonlagoon\Commands\SailonlagoonCommand;

class SailinglagoonServiceProvider extends PackageServiceProvider
class SailonlagoonServiceProvider extends PackageServiceProvider
{
public function configurePackage(Package $package): void
{
Expand All @@ -16,7 +16,7 @@ public function configurePackage(Package $package): void
* More info: https://github.com/spatie/laravel-package-tools
*/
$package
->name('sailinglagoon')
->hasCommand(SailinglagoonCommand::class);
->name('sailonlagoon')
->hasCommand(SailonlagoonCommand::class);
}
}
2 changes: 1 addition & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

use Uselagoon\Sailinglagoon\Tests\TestCase;
use Uselagoon\Sailonlagoon\Tests\TestCase;

uses(TestCase::class)->in(__DIR__);
10 changes: 5 additions & 5 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Uselagoon\Sailinglagoon\Tests;
namespace Uselagoon\Sailonlagoon\Tests;

use Illuminate\Database\Eloquent\Factories\Factory;
use Orchestra\Testbench\TestCase as Orchestra;
use Uselagoon\Sailinglagoon\SailinglagoonServiceProvider;
use Uselagoon\Sailonlagoon\SailonlagoonServiceProvider;

class TestCase extends Orchestra
{
Expand All @@ -13,14 +13,14 @@ protected function setUp(): void
parent::setUp();

Factory::guessFactoryNamesUsing(
fn (string $modelName) => 'Uselagoon\\Sailinglagoon\\Database\\Factories\\'.class_basename($modelName).'Factory'
fn (string $modelName) => 'Uselagoon\\Sailonlagoon\\Database\\Factories\\'.class_basename($modelName).'Factory'
);
}

protected function getPackageProviders($app)
{
return [
SailinglagoonServiceProvider::class,
SailonlagoonServiceProvider::class,
];
}

Expand All @@ -29,7 +29,7 @@ public function getEnvironmentSetUp($app)
config()->set('database.default', 'testing');

/*
$migration = include __DIR__.'/../database/migrations/create_sailinglagoon_table.php.stub';
$migration = include __DIR__.'/../database/migrations/create_sailonlagoon_table.php.stub';
$migration->up();
*/
}
Expand Down
10 changes: 5 additions & 5 deletions tests/Unit/GenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@


use Symfony\Component\Yaml\Yaml;
use Uselagoon\Sailinglagoon\Commands\SailinglagoonCommand;
use Uselagoon\Sailonlagoon\Commands\SailonlagoonCommand;
use function Illuminate\Filesystem\join_paths;

it('will allow us to remove unused services', function () {
$sailingLagoonCommand = new SailinglagoonCommand();
$sailonLagoonCommand = new SailonlagoonCommand();

$serviceList = collect(["cli", "php", "mariadb"]);
$services = [
Expand All @@ -15,17 +15,17 @@
]
];

$newServices = $sailingLagoonCommand->removeUnusedServiceDependencies($services, $serviceList);
$newServices = $sailonLagoonCommand->removeUnusedServiceDependencies($services, $serviceList);

expect($newServices["first"]["depends_on"])->not()->toContain("shouldntexist");
expect($newServices["first"]["depends_on"])->toContain("cli");
});

it("should successfully generate a docker-compose.yaml given stubs", function() {
$sailingLagoonCommand = new SailinglagoonCommand();
$sailonLagoonCommand = new SailonlagoonCommand();
$serviceList = collect(["cli", "mariadb"]);
$yamlFile = file_get_contents(join_paths(__DIR__, "assets/stubs", "docker-compose.stub"));
$dockerCompose = $sailingLagoonCommand->generateDockerCompose($serviceList,
$dockerCompose = $sailonLagoonCommand->generateDockerCompose($serviceList,
join_paths(__DIR__, "assets/stubs"), $yamlFile);

$yamlOutput = Yaml::dump($dockerCompose, 5);
Expand Down

0 comments on commit a6bad01

Please sign in to comment.