Skip to content
Browse files

Merged with cordoval/composer

  • Loading branch information...
1 parent 62e1792 commit 4058bfb4c91ce9de8967a0643df128b8ac78f9b9 Amjad Mohamed committed Mar 11, 2012
Showing with 62 additions and 5 deletions.
  1. +3 −0 .gitignore
  2. +16 −0 .travis.yml
  3. +21 −0 composer.json
  4. +13 −0 scripts/phpspec-composer.php
  5. +0 −5 spec/SpecHelper.php
  6. +9 −0 vendor/vendors.php
View
3 .gitignore
@@ -0,0 +1,3 @@
+composer.lock
+vendor/*
+!vendor/vendors.php
View
16 .travis.yml
@@ -0,0 +1,16 @@
+language: php
+
+php:
+ - 5.3
+ - 5.4
+
+before_script: php vendor/vendors.php
+
+script: "php ./scripts/phpspec-composer.php spec/"
+
+notifications:
+ email:
+ - cordoval@gmail.com
+ - phpspec-dev@googlegroups.com
+ irc:
+ - "irc.freenode.org#phpspec"
View
21 composer.json
@@ -0,0 +1,21 @@
+{
+ "name": "phpspec/phpspec",
+ "description": "PHPSpec: The BDD Specification Library",
+ "keywords": ["bdd", "spec", "test"],
+ "homepage": "http://phpspec.net",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "PHPSpec Team",
+ "homepage": "https://github.com/phpspec/phpspec/contributors"
+ }
+ ],
+ "bin": ["scripts/phpspec-composer.php"],
+ "autoload": {
+ "psr-0": { "PHPSpec\\": "src/" }
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "mockery/mockery": "0.7.*"
+ }
+}
View
13 scripts/phpspec-composer.php
@@ -0,0 +1,13 @@
+#!/usr/bin/php
+<?php
+/**
+ * PHPSpec Composer Script
+ */
+ini_set('display_errors', 1);
+error_reporting(E_ALL|E_STRICT);
+
+require_once 'vendor/.composer/autoload.php';
+set_include_path(__DIR__.'/../src' . PATH_SEPARATOR . get_include_path());
+$phpspec = new \PHPSpec\PHPSpec($argv);
+$phpspec->execute();
+
View
5 spec/SpecHelper.php
@@ -1,10 +1,5 @@
<?php
-require_once 'Mockery/Loader.php';
-require_once 'Hamcrest/Hamcrest.php';
-$loader = new \Mockery\Loader;
-$loader->register();
-
\PHPSpec\PHPSpec::setTestingPHPSpec(true);
defined('THIS_REQUIRED_ATTRIBUTE_IS_IGNORED_BY_CONSTRUCTOR') or
View
9 vendor/vendors.php
@@ -0,0 +1,9 @@
+#!/usr/bin/env php
+<?php
+
+set_time_limit(0);
+
+echo "> Downloading composer\n";
+system(sprintf('wget http://getcomposer.org/composer.phar'));
+echo "> Running composer install\n";
+system(sprintf('php composer.phar install'));

0 comments on commit 4058bfb

Please sign in to comment.
Something went wrong with that request. Please try again.