Skip to content

Commit 4058bfb

Browse files
author
Amjad Mohamed
committed
Merged with cordoval/composer
1 parent 62e1792 commit 4058bfb

File tree

6 files changed

+62
-5
lines changed

6 files changed

+62
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
composer.lock
2+
vendor/*
3+
!vendor/vendors.php

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: php
2+
3+
php:
4+
- 5.3
5+
- 5.4
6+
7+
before_script: php vendor/vendors.php
8+
9+
script: "php ./scripts/phpspec-composer.php spec/"
10+
11+
notifications:
12+
email:
13+
- cordoval@gmail.com
14+
- phpspec-dev@googlegroups.com
15+
irc:
16+
- "irc.freenode.org#phpspec"

composer.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "phpspec/phpspec",
3+
"description": "PHPSpec: The BDD Specification Library",
4+
"keywords": ["bdd", "spec", "test"],
5+
"homepage": "http://phpspec.net",
6+
"license": "MIT",
7+
"authors": [
8+
{
9+
"name": "PHPSpec Team",
10+
"homepage": "https://github.com/phpspec/phpspec/contributors"
11+
}
12+
],
13+
"bin": ["scripts/phpspec-composer.php"],
14+
"autoload": {
15+
"psr-0": { "PHPSpec\\": "src/" }
16+
},
17+
"require": {
18+
"php": ">=5.3.2",
19+
"mockery/mockery": "0.7.*"
20+
}
21+
}

scripts/phpspec-composer.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/php
2+
<?php
3+
/**
4+
* PHPSpec Composer Script
5+
*/
6+
ini_set('display_errors', 1);
7+
error_reporting(E_ALL|E_STRICT);
8+
9+
require_once 'vendor/.composer/autoload.php';
10+
set_include_path(__DIR__.'/../src' . PATH_SEPARATOR . get_include_path());
11+
$phpspec = new \PHPSpec\PHPSpec($argv);
12+
$phpspec->execute();
13+

spec/SpecHelper.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<?php
22

3-
require_once 'Mockery/Loader.php';
4-
require_once 'Hamcrest/Hamcrest.php';
5-
$loader = new \Mockery\Loader;
6-
$loader->register();
7-
83
\PHPSpec\PHPSpec::setTestingPHPSpec(true);
94

105
defined('THIS_REQUIRED_ATTRIBUTE_IS_IGNORED_BY_CONSTRUCTOR') or

vendor/vendors.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
set_time_limit(0);
5+
6+
echo "> Downloading composer\n";
7+
system(sprintf('wget http://getcomposer.org/composer.phar'));
8+
echo "> Running composer install\n";
9+
system(sprintf('php composer.phar install'));

0 commit comments

Comments
 (0)