Skip to content

Commit

Permalink
Merge branch 'release/v1'
Browse files Browse the repository at this point in the history
  • Loading branch information
guto00741 committed Aug 13, 2018
2 parents 56e2fcc + 48989cf commit 65d026c
Show file tree
Hide file tree
Showing 9 changed files with 137 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/composer.lock
/phpunit.xml
/vendor
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
cakephp-cropper
# Cropper plugin for CakePHP

## Installation

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require your-name-here/Cropper
```
23 changes: 23 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "Futurando-Oficial/cakephp-cropper",
"description": "Cropper plugin for CakePHP",
"type": "cakephp-plugin",
"license": "MIT",
"require": {
"cakephp/cakephp": "^3.5"
},
"require-dev": {
"phpunit/phpunit": "^5.7.14|^6.0"
},
"autoload": {
"psr-4": {
"Cropper\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"cakephp-cropper\\Test\\": "tests/",
"Cake\\Test\\": "vendor/cakephp/cakephp/tests/"
}
}
}
12 changes: 12 additions & 0 deletions config/routes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
use Cake\Routing\RouteBuilder;
use Cake\Routing\Router;
use Cake\Routing\Route\DashedRoute;

Router::plugin(
'Cropper',
['path' => '/cropper'],
function (RouteBuilder $routes) {
$routes->fallbacks(DashedRoute::class);
}
);
36 changes: 36 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php"
>
<php>
<ini name="memory_limit" value="-1"/>
<ini name="apc.enable_cli" value="1"/>
</php>

<!-- Add any additional test suites you want to run here -->
<testsuites>
<testsuite name="Cropper">
<directory>tests/TestCase/</directory>
</testsuite>
</testsuites>

<!-- Setup a listener for fixtures -->
<listeners>
<listener class="\Cake\TestSuite\Fixture\FixtureInjector">
<arguments>
<object class="\Cake\TestSuite\Fixture\FixtureManager"/>
</arguments>
</listener>
</listeners>

<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>

</phpunit>
10 changes: 10 additions & 0 deletions src/Controller/AppController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Cropper\Controller;

use App\Controller\AppController as BaseController;

class AppController extends BaseController
{

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

namespace Cropper;

use Cake\Core\BasePlugin;

/**
* Plugin for Cropper
*/
class Plugin extends BasePlugin
{
}
30 changes: 30 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* Test suite bootstrap for Cropper.
*
* This function is used to find the location of CakePHP whether CakePHP
* has been installed as a dependency of the plugin, or the plugin is itself
* installed as a dependency of an application.
*/
$findRoot = function ($root) {
do {
$lastRoot = $root;
$root = dirname($root);
if (is_dir($root . '/vendor/cakephp/cakephp')) {
return $root;
}
} while ($root !== $lastRoot);

throw new Exception("Cannot find the root of the application, unable to run tests");
};
$root = $findRoot(__FILE__);
unset($findRoot);

chdir($root);

if (file_exists($root . '/config/bootstrap.php')) {
require $root . '/config/bootstrap.php';

return;
}
require $root . '/vendor/cakephp/cakephp/tests/bootstrap.php';
Empty file added webroot/empty
Empty file.

0 comments on commit 65d026c

Please sign in to comment.