Skip to content
Permalink
Browse files

Init

  • Loading branch information...
pactode committed Mar 4, 2019
0 parents commit 90fc28b310cc0f4614198539f9c5db7767fc683c
Showing with 243 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +18 −0 .scrutinizer.yml
  3. +4 −0 .styleci.yml
  4. +18 −0 .travis.yml
  5. +7 −0 CHANGELOG.md
  6. +21 −0 LICENSE.md
  7. +44 −0 README.md
  8. +47 −0 composer.json
  9. +22 −0 phpunit.xml.dist
  10. +16 −0 tests/ExampleTest.php
  11. +44 −0 tests/TestCase.php
@@ -0,0 +1,2 @@
vendor
composer.lock
@@ -0,0 +1,18 @@
filter:
excluded_paths: [tests/*]

checks:
php:
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: false
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
@@ -0,0 +1,4 @@
preset: laravel

disabled:
- single_class_element_per_statement
@@ -0,0 +1,18 @@
language: php

php:
- 7.1
- 7.2
- 7.3

env:
matrix:
- COMPOSER_FLAGS="--prefer-lowest"
- COMPOSER_FLAGS=""

before_script:
- travis_retry composer self-update
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source

script:
- vendor/bin/phpunit
@@ -0,0 +1,7 @@
# Changelog

All notable changes to `laravel-janitor` will be documented in this file

## 1.0.0 - ???

- Initial release!
@@ -0,0 +1,21 @@
# The MIT License (MIT)

Copyright (c) Signifly <info@signifly.com>

> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
@@ -0,0 +1,44 @@
# Easily add login proxy to your Laravel API

[![Latest Version on Packagist](https://img.shields.io/packagist/v/signifly/laravel-janitor.svg?style=flat-square)](https://packagist.org/packages/signifly/laravel-janitor)
[![Build Status](https://img.shields.io/travis/signifly/laravel-janitor/master.svg?style=flat-square)](https://travis-ci.org/signifly/laravel-janitor)
[![StyleCI](https://styleci.io/repos/117567334/shield?branch=master)](https://styleci.io/repos/117567334)
[![Quality Score](https://img.shields.io/scrutinizer/g/signifly/laravel-janitor.svg?style=flat-square)](https://scrutinizer-ci.com/g/signifly/laravel-janitor)
[![Total Downloads](https://img.shields.io/packagist/dt/signifly/laravel-janitor.svg?style=flat-square)](https://packagist.org/packages/signifly/laravel-janitor)

The `signifly/laravel-janitor` package allows you to easily add a login proxy to your Laravel API.

Below is a small example of how to use it.

TO DO

## Documentation
Until further documentation is provided, please have a look at the tests.

## Installation

You can install the package via composer:

```bash
$ composer require signifly/laravel-janitor
```

The package will automatically register itself.

## Testing
```bash
$ composer test
```

## Security

If you discover any security issues, please email dev@signifly.com instead of using the issue tracker.

## Credits

- [Morten Poul Jensen](https://github.com/pactode)
- [All contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
@@ -0,0 +1,47 @@
{
"name": "signifly/laravel-janitor",
"description": "Easily add login proxy to your Laravel API.",
"homepage": "https://github.com/signifly/laravel-janitor",
"license": "MIT",
"authors": [
{
"name": "Morten Poul Jensen",
"email": "mpj@signifly.com",
"role": "Developer"
}
],
"require": {
"php": "^7.1",
"illuminate/database": "~5.5.43|~5.6.0|~5.7.0|~5.8.0",
"illuminate/http": "~5.5.43|~5.6.0|~5.7.0|~5.8.0",
"illuminate/support": "~5.5.43|~5.6.0|~5.7.0|~5.8.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0|^7.0|^8.0",
"orchestra/testbench": "~3.5.0|~3.6.0|~3.7.0|~3.8.0"
},
"autoload": {
"psr-4": {
"Signifly\\Janitor\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Signifly\\Janitor\\Test\\": "tests"
}
},
"scripts": {
"test": "vendor/bin/phpunit"
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
],
"aliases": {
}
}
}
}
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Signifly Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
</phpunit>
@@ -0,0 +1,16 @@
<?php
namespace Signifly\Janitor\Test;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase
{
use RefreshDatabase;
/** @test */
public function it_saves_to_config()
{
$this->assertTrue(true);
}
}
@@ -0,0 +1,44 @@
<?php
namespace Signifly\Janitor\Test;
use Illuminate\Database\Schema\Blueprint;
use Orchestra\Testbench\TestCase as Orchestra;
abstract class TestCase extends Orchestra
{
public function setUp()
{
parent::setUp();
$this->setUpDatabase();
}
public function getEnvironmentSetUp($app)
{
$app['config']->set('database.default', 'sqlite');
$app['config']->set('database.connections.sqlite', [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
]);
$app['config']->set('app.key', 'base64:9e0yNQB60wgU/cqbP09uphPo3aglW3iQJy+u4JQgnQE=');
}
protected function setUpDatabase()
{
$this->createUsersTable();
}
protected function createUsersTable()
{
$this->app['db']->connection()->getSchemaBuilder()->create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email');
$table->json('config')->nullable();
$table->json('extras')->nullable();
$table->timestamps();
});
}
}

0 comments on commit 90fc28b

Please sign in to comment.
You can’t perform that action at this time.