3 Commits

Author SHA1 Message Date
nullthoughts
8a987b89c5 Update namespace 2020-03-17 14:01:56 -04:00
nullthoughts
552bc8fba8 Update namespace 2020-03-17 13:55:24 -04:00
nullthoughts
7b89add86e Update namespace from distinctm to nullthoughts 2020-03-17 13:51:26 -04:00
14 changed files with 37 additions and 37 deletions

View File

@@ -1,11 +1,11 @@
{ {
"name": "distinctm/laravel-data-sync", "name": "nullthoughts/laravel-data-sync",
"description": "Laravel utility to keep records synced between environments through source control", "description": "Laravel utility to keep records synced between environments through source control",
"license": "MIT", "license": "MIT",
"authors": [ "authors": [
{ {
"name": "distinctm", "name": "nullthoughts",
"email": "jani@marketdistinctly.com" "email": "jani@nullincorporated.com"
} }
], ],
"require": { "require": {
@@ -16,18 +16,18 @@
}, },
"autoload": { "autoload": {
"psr-4" : { "psr-4" : {
"distinctm\\LaravelDataSync\\": "src/" "nullthoughts\\LaravelDataSync\\": "src/"
} }
}, },
"autoload-dev": { "autoload-dev": {
"psr-4" : { "psr-4" : {
"distinctm\\LaravelDataSync\\Tests\\": "tests/" "nullthoughts\\LaravelDataSync\\Tests\\": "tests/"
} }
}, },
"extra": { "extra": {
"laravel": { "laravel": {
"providers": [ "providers": [
"distinctm\\LaravelDataSync\\DataSyncBaseServiceProvider" "nullthoughts\\LaravelDataSync\\DataSyncBaseServiceProvider"
] ]
} }
} }

View File

@@ -1,6 +1,6 @@
<p align="center"> <p align="center">
<a href="https://packagist.org/packages/distinctm/laravel-data-sync" target="_blank"><img src="https://poser.pugx.org/distinctm/laravel-data-sync/d/total.svg" alt="Total Downloads"></a> <a href="https://packagist.org/packages/nullthoughts/laravel-data-sync" target="_blank"><img src="https://poser.pugx.org/nullthoughts/laravel-data-sync/d/total.svg" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/distinctm/laravel-data-sync" target="_blank"><img src="https://poser.pugx.org/distinctm/laravel-data-sync/v/stable.svg" alt="Latest Stable Version"></a> <a href="https://packagist.org/packages/nullthoughts/laravel-data-sync" target="_blank"><img src="https://poser.pugx.org/nullthoughts/laravel-data-sync/v/stable.svg" alt="Latest Stable Version"></a>
<a href="https://travis-ci.com/nullthoughts/laravel-data-sync"><img src="https://api.travis-ci.com/nullthoughts/laravel-data-sync.svg?branch=master" alt="Travis CI Build Status: Master"></a> <a href="https://travis-ci.com/nullthoughts/laravel-data-sync"><img src="https://api.travis-ci.com/nullthoughts/laravel-data-sync.svg?branch=master" alt="Travis CI Build Status: Master"></a>
</p> </p>
@@ -11,7 +11,7 @@ Laravel utility to keep records synchronized between environments through source
## Installation ## Installation
You can install this package via composer: You can install this package via composer:
```bash ```bash
composer require distinctm/laravel-data-sync composer require nullthoughts/laravel-data-sync
``` ```
Or add this line in your `composer.json`, inside of the `require` section: Or add this line in your `composer.json`, inside of the `require` section:
@@ -19,14 +19,14 @@ Or add this line in your `composer.json`, inside of the `require` section:
``` json ``` json
{ {
"require": { "require": {
"distinctm/laravel-data-sync": "^1.0", "nullthoughts/laravel-data-sync": "^1.0",
} }
} }
``` ```
then run ` composer install ` then run ` composer install `
## Usage ## Usage
- Run `php artisan vendor:publish --provider="distinctm\LaravelDataSync\DataSyncBaseServiceProvider" --tag="data-sync-config"` to publish config file. Specify directory for sync data files (default is a new sync directory in the project root) - Run `php artisan vendor:publish --provider="nullthoughts\LaravelDataSync\DataSyncBaseServiceProvider" --tag="data-sync-config"` to publish config file. Specify directory for sync data files (default is a new sync directory in the project root)
- Create a JSON file for each model, using the model name as the filename. Example: Product.json would update the Product model - Create a JSON file for each model, using the model name as the filename. Example: Product.json would update the Product model
- Use nested arrays in place of hardcoded IDs for relationships - Use nested arrays in place of hardcoded IDs for relationships
- Run `php artisan data:sync` (or `php artisan data:sync --model={model}` with the model flag to specify a model) - Run `php artisan data:sync` (or `php artisan data:sync --model={model}` with the model flag to specify a model)

View File

@@ -1,8 +1,8 @@
<?php <?php
namespace distinctm\LaravelDataSync\Console\Commands; namespace nullthoughts\LaravelDataSync\Console\Commands;
use distinctm\LaravelDataSync\Updater; use nullthoughts\LaravelDataSync\Updater;
use Illuminate\Console\Command; use Illuminate\Console\Command;
class Sync extends Command class Sync extends Command

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace distinctm\LaravelDataSync; namespace nullthoughts\LaravelDataSync;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace distinctm\LaravelDataSync\Exceptions; namespace nullthoughts\LaravelDataSync\Exceptions;
use Exception; use Exception;
use Throwable; use Throwable;

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace distinctm\LaravelDataSync\Exceptions; namespace nullthoughts\LaravelDataSync\Exceptions;
use Exception; use Exception;

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace distinctm\LaravelDataSync\Exceptions; namespace nullthoughts\LaravelDataSync\Exceptions;
use Exception; use Exception;

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace distinctm\LaravelDataSync\Exceptions; namespace nullthoughts\LaravelDataSync\Exceptions;
use Exception; use Exception;
use Throwable; use Throwable;

View File

@@ -1,11 +1,11 @@
<?php <?php
namespace distinctm\LaravelDataSync; namespace nullthoughts\LaravelDataSync;
use distinctm\LaravelDataSync\Exceptions\ErrorUpdatingModelException; use nullthoughts\LaravelDataSync\Exceptions\ErrorUpdatingModelException;
use distinctm\LaravelDataSync\Exceptions\FileDirectoryNotFoundException; use nullthoughts\LaravelDataSync\Exceptions\FileDirectoryNotFoundException;
use distinctm\LaravelDataSync\Exceptions\NoCriteriaException; use nullthoughts\LaravelDataSync\Exceptions\NoCriteriaException;
use distinctm\LaravelDataSync\Exceptions\NoRecordsInvalidJSONException; use nullthoughts\LaravelDataSync\Exceptions\NoRecordsInvalidJSONException;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\File;
use Illuminate\Support\Str; use Illuminate\Support\Str;
@@ -19,7 +19,7 @@ class Updater
* @param string|null $path * @param string|null $path
* @param string|null $model * @param string|null $model
* *
* @throws \distinctm\LaravelDataSync\Exceptions\FileDirectoryNotFoundException * @throws \nullthoughts\LaravelDataSync\Exceptions\FileDirectoryNotFoundException
*/ */
public function __construct($path = null, $model = null) public function __construct($path = null, $model = null)
{ {
@@ -52,7 +52,7 @@ class Updater
* *
* @param string $file * @param string $file
* *
* @throws \distinctm\LaravelDataSync\Exceptions\NoRecordsInvalidJSONException * @throws \nullthoughts\LaravelDataSync\Exceptions\NoRecordsInvalidJSONException
* *
* @return \Illuminate\Support\Collection * @return \Illuminate\Support\Collection
*/ */
@@ -81,7 +81,7 @@ class Updater
* *
* @param $path * @param $path
* *
* @throws \distinctm\LaravelDataSync\Exceptions\FileDirectoryNotFoundException * @throws \nullthoughts\LaravelDataSync\Exceptions\FileDirectoryNotFoundException
* *
* @return string * @return string
*/ */
@@ -148,7 +148,7 @@ class Updater
* *
* @param stdClass $record * @param stdClass $record
* *
* @throws \distinctm\LaravelDataSync\Exceptions\NoCriteriaException * @throws \nullthoughts\LaravelDataSync\Exceptions\NoCriteriaException
* *
* @return \Illuminate\Support\Collection * @return \Illuminate\Support\Collection
*/ */
@@ -206,7 +206,7 @@ class Updater
* *
* @param string $file * @param string $file
* *
* @throws \distinctm\LaravelDataSync\Exceptions\NoRecordsInvalidJSONException * @throws \nullthoughts\LaravelDataSync\Exceptions\NoRecordsInvalidJSONException
* *
* @return \Illuminate\Support\Collection * @return \Illuminate\Support\Collection
*/ */

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace distinctm\LaravelDataSync\Tests; namespace nullthoughts\LaravelDataSync\Tests;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace distinctm\LaravelDataSync\Tests; namespace nullthoughts\LaravelDataSync\Tests;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace distinctm\LaravelDataSync\Tests; namespace nullthoughts\LaravelDataSync\Tests;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;

View File

@@ -1,9 +1,9 @@
<?php <?php
namespace distinctm\LaravelDataSync\Tests; namespace nullthoughts\LaravelDataSync\Tests;
use distinctm\LaravelDataSync\Exceptions\ErrorUpdatingModelException; use nullthoughts\LaravelDataSync\Exceptions\ErrorUpdatingModelException;
use distinctm\LaravelDataSync\Tests\fakes\UpdaterFake; use nullthoughts\LaravelDataSync\Tests\fakes\UpdaterFake;
use Exception; use Exception;
class UpdaterTest extends TestCase class UpdaterTest extends TestCase

View File

@@ -1,15 +1,15 @@
<?php <?php
namespace distinctm\LaravelDataSync\Tests\Fakes; namespace nullthoughts\LaravelDataSync\Tests\Fakes;
use distinctm\LaravelDataSync\Updater; use nullthoughts\LaravelDataSync\Updater;
use Illuminate\Support\Str; use Illuminate\Support\Str;
class UpdaterFake extends Updater class UpdaterFake extends Updater
{ {
protected function getModel(string $name) protected function getModel(string $name)
{ {
return '\\distinctm\\LaravelDataSync\\Tests\\'.Str::studly( return '\\nullthoughts\\LaravelDataSync\\Tests\\'.Str::studly(
pathinfo($name, PATHINFO_FILENAME) pathinfo($name, PATHINFO_FILENAME)
); );
} }