Skip to content

Commit

Permalink
Initial structure
Browse files Browse the repository at this point in the history
  • Loading branch information
esbenp committed Jun 28, 2015
0 parents commit f700b4d
Show file tree
Hide file tree
Showing 13 changed files with 226 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src_dir: src
coverage_clover: build/logs/clover.xml
json_path: build/logs/coveralls-upload.json
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
composer.phar
composer.lock
vendor
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: php
install:
composer install
php:
- 5.5
- 5.6
- hhvm

script:
- mkdir -p build/logs
- php vendor/bin/phpunit -c phpunit.xml

after_script:
- php vendor/bin/coveralls -v
50 changes: 50 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
### Commit Message Format

[Angular.js commit message style](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#)

Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:

```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on github as well as in various git tools.

### Type
Must be one of the following:

* **feat**: A new feature
* **fix**: A bug fix
* **docs**: Documentation only changes
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
semi-colons, etc)
* **refactor**: A code change that neither fixes a bug or adds a feature
* **perf**: A code change that improves performance
* **test**: Adding missing tests
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
generation

### Scope
The scope could be anything specifying place of the commit change. For example `$location`,
`$browser`, `$compile`, `$rootScope`, `ngHref`, `ngClick`, `ngView`, etc...

### Subject
The subject contains succinct description of the change:

* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize first letter
* no dot (.) at the end

### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes"
The body should include the motivation for the change and contrast this with previous behavior.

### Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Esben Petersen

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.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Laravel Batch Request

[![Build Status](https://travis-ci.org/esbenp/laravel-package-boilerplate.svg)](https://travis-ci.org/esbenp/laravel-package-boilerplate) [![Coverage Status](https://coveralls.io/repos/esbenp/laravel-package-boilerplate/badge.svg?branch=master)](https://coveralls.io/r/esbenp/laravel-package-boilerplate?branch=master)

## Installation

```bash
composer require laravel-package-boilerplate 0.1.*
```
20 changes: 20 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "optimus/laravel-boilerplate",
"autoload": {
"psr-4": {
"Optimus\\LaravelBoilerplate\\": "src/"
}
},
"require": {
"laravel/framework": "~5.1"
},
"require-dev": {
"mockery/mockery": "0.9.*",
"orchestra/testbench": "~3.1",
"phpunit/phpunit": "~4.7",
"satooshi/php-coveralls": "dev-master@dev"
},
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT"
}
28 changes: 28 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
<filter>
<whitelist>
<directory>./src/</directory>
</whitelist>
</filter>
<testsuites>
<testsuite name="Optimus\LaravelBoilerplate Test Suite">
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
<php>
<env name="APP_ENV" value="testing"/>
</php>
</phpunit>
19 changes: 19 additions & 0 deletions src/Facade/Package.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Optimus\BatchRequest\Facade;

use Illuminate\Support\Facades\Facade;

/**
* @see \Optimus\BatchRequest\BatchRequest
*/
class Package extends Facade
{
/**
* @return string
*/
protected static function getFacadeAccessor()
{
return 'package';
}
}
39 changes: 39 additions & 0 deletions src/Provider/LaravelServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace Optimus\LaravelBoilerplate\Provider;

use Illuminate\Support\ServiceProvider as BaseProvider;

class LaravelServiceProvider extends BaseProvider {

public function register()
{
$this->loadConfig();
$this->registerAssets();
}

public function boot()
{
$this->loadLangFile();
}

private function registerAssets()
{
$this->publishes([
__DIR__.'/../config/package.php' => config_path('package.php')
]);
}

private function loadConfig()
{
if ($this->app['config']->get('package') === null) {
$this->app['config']->set('package', require __DIR__.'/../config/package.php');
}
}

private function loadLangFile()
{
$this->loadTranslationsFrom(__DIR__.'/../lang', 'package');
}

}
5 changes: 5 additions & 0 deletions src/config/package.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

return [

];
5 changes: 5 additions & 0 deletions src/lang/en/lang.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

return [

];
9 changes: 9 additions & 0 deletions tests/TestTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

class TestTest extends Orchestra\Testbench\TestCase {

public function testSomething() {
$this->assertTrue(true);
}

}

0 comments on commit f700b4d

Please sign in to comment.