Skip to content

Commit

Permalink
Moving to SupervisorPHP
Browse files Browse the repository at this point in the history
  • Loading branch information
sagikazarmark committed Jan 13, 2015
1 parent c05ab4f commit 0ce446d
Show file tree
Hide file tree
Showing 48 changed files with 218 additions and 218 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013-2015 Indigo Development Team
Copyright (c) 2013-2015 Márk Sági-Kazár <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Indigo Supervisor Configuration
# Supervisor Configuration

[![Latest Version](https://img.shields.io/github/release/indigophp/supervisor-configuration.svg?style=flat-square)](https://github.com/indigophp/supervisor-configuration/releases)
[![Latest Version](https://img.shields.io/github/release/supervisorphp/configuration.svg?style=flat-square)](https://github.com/supervisorphp/configuration/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![Build Status](https://img.shields.io/travis/indigophp/supervisor-configuration.svg?style=flat-square)](https://travis-ci.org/indigophp/supervisor-configuration)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/indigophp/supervisor-configuration.svg?style=flat-square)](https://scrutinizer-ci.com/g/indigophp/supervisor-configuration)
[![Quality Score](https://img.shields.io/scrutinizer/g/indigophp/supervisor-configuration.svg?style=flat-square)](https://scrutinizer-ci.com/g/indigophp/supervisor-configuration)
[![HHVM Status](https://img.shields.io/hhvm/indigophp/supervisor-configuration.svg?style=flat-square)](http://hhvm.h4cc.de/package/indigophp/supervisor-configuration)
[![Total Downloads](https://img.shields.io/packagist/dt/indigophp/supervisor-configuration.svg?style=flat-square)](https://packagist.org/packages/indigophp/supervisor-configuration)
[![Dependency Status](https://img.shields.io/versioneye/d/php/indigophp:supervisor-configuration.svg?style=flat-square)](https://www.versioneye.com/php/indigophp:supervisor-configuration)
[![Build Status](https://img.shields.io/travis/supervisorphp/configuration.svg?style=flat-square)](https://travis-ci.org/supervisorphp/configuration)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/supervisorphp/configuration.svg?style=flat-square)](https://scrutinizer-ci.com/g/supervisorphp/configuration)
[![Quality Score](https://img.shields.io/scrutinizer/g/supervisorphp/configuration.svg?style=flat-square)](https://scrutinizer-ci.com/g/supervisorphp/configuration)
[![HHVM Status](https://img.shields.io/hhvm/supervisorphp/configuration.svg?style=flat-square)](http://hhvm.h4cc.de/package/supervisorphp/configuration)
[![Total Downloads](https://img.shields.io/packagist/dt/supervisorphp/configuration.svg?style=flat-square)](https://packagist.org/packages/supervisorphp/configuration)
[![Dependency Status](https://img.shields.io/versioneye/d/php/supervisorphp:configuration.svg?style=flat-square)](https://www.versioneye.com/php/supervisorphp:configuration)

**Manage Supervisor configuration in PHP.**

Expand All @@ -17,18 +17,18 @@
Via Composer

``` bash
$ composer require indigophp/supervisor-configuration
$ composer require supervisorphp/configuration
```

## Usage

Create a configuration using the builder.

``` php
use Indigo\Supervisor\Configuration;
use Indigo\Supervisor\Configuration\Section\Supervisord;
use Indigo\Supervisor\Configuration\Section\Program;
use Indigo\Supervisor\Configuration\Renderer;
use Supervisor\Configuration;
use Supervisor\Configuration\Section\Supervisord;
use Supervisor\Configuration\Section\Program;
use Supervisor\Configuration\Renderer;

$config = new Configuration;
$renderer = new Renderer;
Expand Down Expand Up @@ -69,8 +69,8 @@ $section = new Program('test', ['command' => 'cat']);
You can parse your existing configuration, and use it as a `Configuration` object.

``` php
use Indigo\Supervisor\Configuration;
use Indigo\Supervisor\Configuration\Parser\File;
use Supervisor\Configuration;
use Supervisor\Configuration\Parser\File;

$parser = new File('/etc/supervisor/supervisord.conf');

Expand All @@ -92,10 +92,10 @@ Available parsers:
You can use `Writer`s to write configuration to various destinations.

``` php
use Indigo\Supervisor\Configuration;
use Indigo\Supervisor\Configuration\Writer\File;
use Supervisor\Configuration;
use Supervisor\Configuration\Writer\File;

// As a second parameter you can optionally pass an instance of Indigo\Supervisor\Configuration\Renderer
// As a second parameter you can optionally pass an instance of Supervisor\Configuration\Renderer
$writer = new File('/etc/supervisor/supervisord.conf');

$configuration = new Configuration;
Expand Down Expand Up @@ -128,7 +128,7 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Credits

- [Márk Sági-Kazár](https://github.com/sagikazarmark)
- [All Contributors](https://github.com/indigophp/supervisor-configuration/contributors)
- [All Contributors](https://github.com/supervisorphp/configuration/contributors)


## License
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "indigophp/supervisor-configuration",
"name": "supervisorphp/configuration",
"description": "Manage Supervisor configuration in PHP",
"license": "MIT",
"keywords": ["supervisor", "configuration"],
Expand All @@ -24,13 +24,13 @@
},
"autoload": {
"psr-4": {
"Indigo\\Supervisor\\": "src/"
"Supervisor\\": "src/"
},
"files": ["src/functions.php"]
},
"autoload-dev": {
"psr-4": {
"Indigo\\Supervisor\\Stub\\": "stub/"
"Supervisor\\Stub\\": "stub/"
}
},
"extra": {
Expand Down
4 changes: 2 additions & 2 deletions phpspec.yml.ci
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
suites:
supervisor_suite:
namespace: Indigo\Supervisor
psr4_prefix: Indigo\Supervisor
namespace: Supervisor
psr4_prefix: Supervisor
extensions:
- PhpSpec\Extension\CodeCoverageExtension
formatter.name: pretty
Expand Down
4 changes: 2 additions & 2 deletions phpspec.yml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
suites:
supervisor_suite:
namespace: Indigo\Supervisor
psr4_prefix: Indigo\Supervisor
namespace: Supervisor
psr4_prefix: Supervisor
formatter.name: pretty
14 changes: 7 additions & 7 deletions spec/Configuration/Parser/FileSpec.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spec\Indigo\Supervisor\Configuration\Parser;
namespace spec\Supervisor\Configuration\Parser;

use Indigo\Supervisor\Configuration;
use Supervisor\Configuration;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

Expand All @@ -15,12 +15,12 @@ function let()

function it_is_initializable()
{
$this->shouldHaveType('Indigo\Supervisor\Configuration\Parser\File');
$this->shouldHaveType('Supervisor\Configuration\Parser\File');
}

function it_is_a_parser()
{
$this->shouldImplement('Indigo\Supervisor\Configuration\Parser');
$this->shouldImplement('Supervisor\Configuration\Parser');
}

function it_parses_configuration(Configuration $configuration)
Expand All @@ -34,20 +34,20 @@ function it_parses_configuration_into_a_new_instance()
{
$configuration = $this->parse();

$configuration->shouldHaveType('Indigo\Supervisor\Configuration');
$configuration->shouldHaveType('Supervisor\Configuration');
}

function it_throws_an_exception_when_invalid_file_given()
{
$this->beConstructedWith('/invalid');

$this->shouldThrow('Indigo\Supervisor\Exception\ParsingFailed')->duringParse();
$this->shouldThrow('Supervisor\Exception\ParsingFailed')->duringParse();
}

function it_throws_an_exception_when_parsing_failed()
{
$this->beConstructedWith(__DIR__.'/../../../resources/invalid.conf');

$this->shouldThrow('Indigo\Supervisor\Exception\ParsingFailed')->duringParse();
$this->shouldThrow('Supervisor\Exception\ParsingFailed')->duringParse();
}
}
10 changes: 5 additions & 5 deletions spec/Configuration/Parser/FilesystemSpec.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spec\Indigo\Supervisor\Configuration\Parser;
namespace spec\Supervisor\Configuration\Parser;

use Indigo\Supervisor\Configuration;
use Supervisor\Configuration;
use League\Flysystem\Filesystem as Flysystem;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand All @@ -18,12 +18,12 @@ function let(Flysystem $filesystem)

function it_is_initializable()
{
$this->shouldHaveType('Indigo\Supervisor\Configuration\Parser\Filesystem');
$this->shouldHaveType('Supervisor\Configuration\Parser\Filesystem');
}

function it_is_a_parser()
{
$this->shouldImplement('Indigo\Supervisor\Configuration\Parser');
$this->shouldImplement('Supervisor\Configuration\Parser');
}

function it_parses_configuration(Flysystem $filesystem, Configuration $configuration)
Expand All @@ -39,6 +39,6 @@ function it_throws_an_exception_when_invalid_file_given(Flysystem $filesystem)
$filesystem->has(null)->willReturn(false);
$this->beConstructedWith($filesystem, null);

$this->shouldThrow('Indigo\Supervisor\Exception\ParsingFailed')->duringParse();
$this->shouldThrow('Supervisor\Exception\ParsingFailed')->duringParse();
}
}
12 changes: 6 additions & 6 deletions spec/Configuration/Parser/TextSpec.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spec\Indigo\Supervisor\Configuration\Parser;
namespace spec\Supervisor\Configuration\Parser;

use Indigo\Supervisor\Configuration;
use Supervisor\Configuration;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

Expand All @@ -15,12 +15,12 @@ function let()

function it_is_initializable()
{
$this->shouldHaveType('Indigo\Supervisor\Configuration\Parser\Text');
$this->shouldHaveType('Supervisor\Configuration\Parser\Text');
}

function it_is_a_parser()
{
$this->shouldImplement('Indigo\Supervisor\Configuration\Parser');
$this->shouldImplement('Supervisor\Configuration\Parser');
}

function it_parses_configuration(Configuration $configuration)
Expand All @@ -34,13 +34,13 @@ function it_parses_configuration_into_a_new_instance()
{
$configuration = $this->parse();

$configuration->shouldHaveType('Indigo\Supervisor\Configuration');
$configuration->shouldHaveType('Supervisor\Configuration');
}

function it_throws_an_exception_when_parsing_failed()
{
$this->beConstructedWith('?{}|&~![()^"');

$this->shouldThrow('Indigo\Supervisor\Exception\ParsingFailed')->duringParse();
$this->shouldThrow('Supervisor\Exception\ParsingFailed')->duringParse();
}
}
8 changes: 4 additions & 4 deletions spec/Configuration/RendererSpec.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

namespace spec\Indigo\Supervisor\Configuration;
namespace spec\Supervisor\Configuration;

use Indigo\Supervisor\Configuration;
use Indigo\Supervisor\Configuration\Section;
use Supervisor\Configuration;
use Supervisor\Configuration\Section;
use PhpSpec\ObjectBehavior;

class RendererSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Indigo\Supervisor\Configuration\Renderer');
$this->shouldHaveType('Supervisor\Configuration\Renderer');
}

function it_renders_a_configuration(Configuration $configuration, Section $section)
Expand Down
4 changes: 2 additions & 2 deletions spec/Configuration/UtilSpec.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace spec\Indigo\Supervisor\Configuration;
namespace spec\Supervisor\Configuration;

use PhpSpec\ObjectBehavior;

class UtilSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Indigo\Supervisor\Configuration\Util');
$this->shouldHaveType('Supervisor\Configuration\Util');
}

function it_tests_a_byte_integer_representation()
Expand Down
12 changes: 6 additions & 6 deletions spec/Configuration/Writer/FileSpec.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace spec\Indigo\Supervisor\Configuration\Writer;
namespace spec\Supervisor\Configuration\Writer;

use Indigo\Supervisor\Configuration;
use Indigo\Supervisor\Configuration\Renderer;
use Supervisor\Configuration;
use Supervisor\Configuration\Renderer;
use PhpSpec\ObjectBehavior;

class FileSpec extends ObjectBehavior
Expand All @@ -15,12 +15,12 @@ function let()

function it_is_initializable()
{
$this->shouldHaveType('Indigo\Supervisor\Configuration\Writer\File');
$this->shouldHaveType('Supervisor\Configuration\Writer\File');
}

function it_is_a_writer()
{
$this->shouldImplement('Indigo\Supervisor\Configuration\Writer');
$this->shouldImplement('Supervisor\Configuration\Writer');
}

function it_writes_a_configuration_to_a_file(Renderer $renderer, Configuration $configuration)
Expand All @@ -36,6 +36,6 @@ function it_throws_an_exception_when_configuration_cannot_be_written(Renderer $r
$renderer->render($configuration)->willReturn('contents');
$this->beConstructedWith('', $renderer);

$this->shouldThrow('Indigo\Supervisor\Exception\WrittingFailed')->duringWrite($configuration);
$this->shouldThrow('Supervisor\Exception\WrittingFailed')->duringWrite($configuration);
}
}
12 changes: 6 additions & 6 deletions spec/Configuration/Writer/FilesystemSpec.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace spec\Indigo\Supervisor\Configuration\Writer;
namespace spec\Supervisor\Configuration\Writer;

use Indigo\Supervisor\Configuration;
use Indigo\Supervisor\Configuration\Renderer;
use Supervisor\Configuration;
use Supervisor\Configuration\Renderer;
use League\Flysystem\Filesystem as Flysystem;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand All @@ -17,12 +17,12 @@ function let(Flysystem $filesystem)

function it_is_initializable()
{
$this->shouldHaveType('Indigo\Supervisor\Configuration\Writer\Filesystem');
$this->shouldHaveType('Supervisor\Configuration\Writer\Filesystem');
}

function it_is_a_writer()
{
$this->shouldImplement('Indigo\Supervisor\Configuration\Writer');
$this->shouldImplement('Supervisor\Configuration\Writer');
}

function it_writes_a_configuration_to_a_file(Flysystem $filesystem, Renderer $renderer, Configuration $configuration)
Expand All @@ -40,6 +40,6 @@ function it_throws_an_exception_when_configuration_cannot_be_written(Flysystem $
$filesystem->put('file', 'contents')->willReturn(false);
$this->beConstructedWith($filesystem, 'file', $renderer);

$this->shouldThrow('Indigo\Supervisor\Exception\WrittingFailed')->duringWrite($configuration);
$this->shouldThrow('Supervisor\Exception\WrittingFailed')->duringWrite($configuration);
}
}
6 changes: 3 additions & 3 deletions spec/ConfigurationSpec.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace spec\Indigo\Supervisor;
namespace spec\Supervisor;

use Indigo\Supervisor\Configuration\Section;
use Supervisor\Configuration\Section;
use PhpSpec\ObjectBehavior;

class ConfigurationSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Indigo\Supervisor\Configuration');
$this->shouldHaveType('Supervisor\Configuration');
}

function it_returns_a_section(Section $supervisord)
Expand Down
Loading

0 comments on commit 0ce446d

Please sign in to comment.