Skip to content

Commit

Permalink
fixes travis integration, makes tests easier to run
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittjoh committed Jul 20, 2012
1 parent 63bfca3 commit ff29b3d
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 29 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
phpunit.xml
composer.lock
vendor/

9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: php

php:
- 5.3
- 5.4

before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
JMSI18nRoutingBundle
===================
JMSI18nRoutingBundle [![Build Status](https://secure.travis-ci.org/schmittjoh/JMSI18nRoutingBundle.png?branch=master)](http://travis-ci.org/schmittjoh/JMSI18nRoutingBundle)
====================

Documentation:
[Resources/doc](http://jmsyst.com/bundles/JMSI18nRoutingBundle)
Expand All @@ -10,4 +10,4 @@ Code License:


Documentation License:
[Resources/doc/LICENSE](https://github.com/schmittjoh/JMSI18nRoutingBundle/blob/master/Resources/doc/LICENSE)
[Resources/doc/LICENSE](https://github.com/schmittjoh/JMSI18nRoutingBundle/blob/master/Resources/doc/LICENSE)
33 changes: 7 additions & 26 deletions Tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
<?php

spl_autoload_register(function($class) {
if (0 !== strpos($class, 'JMS\I18nRoutingBundle')) {
return;
}

if (is_file($path = dirname(__DIR__).str_replace('\\', '/', substr($class, strlen('JMS\I18nRoutingBundle'))).'.php')) {
require_once $path;
}
});
use Doctrine\Common\Annotations\AnnotationRegistry;

if (isset($_SERVER['autoload_file'])) {
require_once $_SERVER['autoload_file'];

return;
}

// this file searches for the autoload file of your project, and includes it
$dir = __DIR__;
$lastDir = null;
while (($dir = dirname($dir)) && $dir !== $lastDir) {
$lastDir = $dir;

if (file_exists($file = $dir.'/app/autoload.php')) {
require_once $file;
return;
call_user_func(function() {
if ( ! is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) {
throw new \RuntimeException('Could not find vendor/autoload.php. Did you run "composer install --dev"?');
}
}

throw new RuntimeException('Could not locate the project\'s autoload.php. If your bundle is not inside a project, you need to replace this bootstrap file.');
$loader = require $autoloadFile;
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
});
15 changes: 15 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,25 @@
"email": "schmittjoh@gmail.com"
}
],
"minimum-stability": "dev",
"require": {
"symfony/framework-bundle": "2.*",
"jms/translation-bundle": "*"
},
"require-dev": {
"symfony/css-selector": "2.*",
"symfony/http-kernel": "2.*",
"symfony/validator": "2.*",
"symfony/browser-kit": "2.*",
"symfony/finder": "2.*",
"symfony/form": "2.*",
"symfony/yaml": "2.*",
"symfony/process": "2.*",
"symfony/class-loader": "2.*",
"symfony/twig-bundle": "2.*",
"sensio/framework-extra-bundle": "*",
"jms/di-extra-bundle": "*"
},
"autoload": {
"psr-0": { "JMS\\I18nRoutingBundle": "" }
},
Expand Down

0 comments on commit ff29b3d

Please sign in to comment.