Skip to content

Commit

Permalink
Merge pull request #26 from ripaclub/develop
Browse files Browse the repository at this point in the history
0.6.1
  • Loading branch information
leodido committed Aug 29, 2014
2 parents d8af672 + f70840e commit 2c965c7
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 53 deletions.
4 changes: 0 additions & 4 deletions .coveralls.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
vendor/
composer.lock
composer.phar
*.log
*.log
phpunit.xml
build/
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ php:
branches:
only:
- master
- develop

install:
- composer self-update && composer --version
- composer install --dev --prefer-source
- composer install --dev

before_script:
- tests/travis/sphinx-setup.sh

script:
- vendor/bin/phpunit -c tests/
- vendor/bin/phpunit

after_script:
- vendor/bin/coveralls -v
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover tests/build/logs/clover.xml
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

notifications:
email: false
25 changes: 9 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sphinx Search [![Build Status](https://travis-ci.org/ripaclub/sphinxsearch.png?branch=master)](https://travis-ci.org/ripaclub/sphinxsearch) [![Latest Stable Version](https://poser.pugx.org/ripaclub/sphinxsearch/v/stable.png)](https://packagist.org/packages/ripaclub/sphinxsearch) [![Coverage Status](https://coveralls.io/repos/ripaclub/sphinxsearch/badge.png?branch=master)](https://coveralls.io/r/ripaclub/sphinxsearch?branch=master) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/ripaclub/sphinxsearch/badges/quality-score.png?s=ee5fd3ec2556ba441dc3ca598cee7ebdb41daa3c)](https://scrutinizer-ci.com/g/ripaclub/sphinxsearch/) [![Analytics](https://ga-beacon.appspot.com/UA-49655829-1/ripaclub/sphinxsearch)](https://github.com/igrigorik/ga-beacon)
Sphinx Search [![Build Status](https://travis-ci.org/ripaclub/sphinxsearch.png?branch=master)](https://travis-ci.org/ripaclub/sphinxsearch) [![Latest Stable Version](https://poser.pugx.org/ripaclub/sphinxsearch/v/stable.png)](https://packagist.org/packages/ripaclub/sphinxsearch) [![Code Coverage](https://scrutinizer-ci.com/g/ripaclub/sphinxsearch/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/ripaclub/sphinxsearch/?branch=master) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/ripaclub/sphinxsearch/badges/quality-score.png?s=ee5fd3ec2556ba441dc3ca598cee7ebdb41daa3c)](https://scrutinizer-ci.com/g/ripaclub/sphinxsearch/)
=============

Sphinx Search library provides SphinxQL indexing and searching features.
Expand All @@ -16,6 +16,7 @@ Sphinx Search library provides SphinxQL indexing and searching features.
- [SQL Objects](#sql-objects)
- [Query expression](#query-expression)
- [Testing](#testing)
- [Code quality](#code-quality)

## Introduction

Expand Down Expand Up @@ -334,18 +335,12 @@ echo $select->getSqlString(new SphinxQL());
Testing
-------

The library source code (on master) is 100% covered by unit tests.
The library source code (**on master**) is 100% covered by unit tests.

Once installed development dependencies through composer you can run `phpunit`.

```
vendor/bin/phpunit -c tests/
```

After this you can inspect stats about code coverage.

```
vendor/bin/converalls -v
./vendor/bin/phpunit -c tests/
```

Code quality
Expand All @@ -354,23 +349,21 @@ Code quality
Run [phpmd](https://github.com/phpmd/phpmd).

```
vendor/bin/phpmd library/ text phpmd.xml
./vendor/bin/phpmd library/ text phpmd.xml.dist
```

Run [phpcs](https://github.com/squizlabs/PHP_CodeSniffer).

```
vendor/bin/phpcs --standard=PSR2 library/
./vendor/bin/phpcs --standard=PSR2 library/
```

Run [pdepend](https://github.com/pdepend/pdepend).

```
vendor/bin/pdepend --exclude=tests,vendor --summary-xml=pdepend.log library/
./vendor/bin/pdepend --exclude=tests,vendor --summary-xml=pdepend.log library/
```

Run [php-cs-fixer](https://github.com/fabpot/PHP-CS-Fixer).
---

```
vendor/bin/php-cs-fixer fix library/ --level=psr2
```
[![Analytics](https://ga-beacon.appspot.com/UA-49655829-1/ripaclub/sphinxsearch)](https://github.com/igrigorik/ga-beacon)
10 changes: 4 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
"zendframework/zend-servicemanager": ">=2.2"
},
"require-dev": {
"phpunit/phpunit": ">=4.0",
"phpmd/phpmd": "1.5.*",
"pdepend/pdepend": "1.1.*",
"squizlabs/php_codesniffer": "1.5.*",
"fabpot/php-cs-fixer": "*",
"satooshi/php-coveralls": "dev-master"
"phpunit/phpunit": "4.0.*",
"phpmd/phpmd": "2.0.*",
"pdepend/pdepend": "2.0.*",
"squizlabs/php_codesniffer": "1.5.*"
},
"authors": [
{
Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<phpunit bootstrap="tests/bootstrap.php" colors="true" verbose="true">
<testsuites>
<testsuite name="sphinxsearch Test Suite">
<directory>tests/SphinxSearchTest</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">library/</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
<log type="coverage-clover" target="./build/logs/clover.xml"/>
<log type="coverage-html" target="./build/report" charset="UTF-8" highlight="true" lowUpperBound="35" highLowerBound="70"/>
<log type="testdox-text" target="./build/testdox/testdox.txt"/>
</logging>
</phpunit>
13 changes: 12 additions & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,20 @@
* Sphinx Search
*
* @link https://github.com/ripaclub/sphinxsearch
* @copyright Copyright (c) 2014, Leonardo Di Donato <leodidonato at gmail dot com>, Leonardo Grasso <me at leonardograsso dot com>
* @copyright Copyright (c) 2014,
* Leonardo Di Donato <leodidonato at gmail dot com>
* Leonardo Grasso <me at leonardograsso dot com>
* @license http://opensource.org/licenses/BSD-2-Clause Simplified BSD License
*/

chdir(__DIR__);

// Set the decimal separator to "C" (i.e. minimal "C" locale)
setlocale(LC_NUMERIC, 'C');

if (!file_exists('../vendor/autoload.php')) {
throw new \RuntimeException('vendor/autoload.php not found. Run a composer install.');
}

$autoloader = include '../vendor/autoload.php';
$autoloader->add('SphinxSearchTest', __DIR__);
20 changes: 0 additions & 20 deletions tests/phpunit.xml

This file was deleted.

0 comments on commit 2c965c7

Please sign in to comment.