Skip to content

Commit

Permalink
Cleaned gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Chardonnet committed Apr 29, 2015
1 parent f92e359 commit 8e74b47
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@
/composer.lock
/phpunit.xml
/vendor
/.couscous
/.puli
56 changes: 56 additions & 0 deletions .puli/GeneratedPuliFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

namespace Puli;

use Puli\Discovery\Api\ResourceDiscovery;
use Puli\Discovery\KeyValueStoreDiscovery;
use Puli\Factory\PuliFactory;
use Puli\Repository\Api\ResourceRepository;
use Puli\Repository\FilesystemRepository;
use Webmozart\KeyValueStore\JsonFileStore;

/**
* Creates Puli's core services.
*
* This class was auto-generated by Puli.
*
* IMPORTANT: Before modifying the code below, set the "factory.auto-generate"
* configuration key to false:
*
* $ puli config factory.auto-generate false
*
* Otherwise any modifications will be overwritten!
*/
class GeneratedPuliFactory implements PuliFactory
{
/**
* Creates the resource repository.
*
* @return ResourceRepository The created resource repository.
*/
public function createRepository()
{
if (!file_exists(__DIR__.'/repository')) {
mkdir(__DIR__.'/repository', 0777, true);
}

$repo = new FilesystemRepository(__DIR__.'/repository', true);

return $repo;
}

/**
* Creates the resource discovery.
*
* @param ResourceRepository $repo The resource repository to read from.
*
* @return ResourceDiscovery The created resource discovery.
*/
public function createDiscovery(ResourceRepository $repo)
{
$store = new JsonFileStore(__DIR__.'/bindings.json', true);
$discovery = new KeyValueStoreDiscovery($repo, $store);

return $discovery;
}
}
1 change: 1 addition & 0 deletions .puli/bindings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}

0 comments on commit 8e74b47

Please sign in to comment.