added static default command to Sismo\Project
merged branch havvg/feature/default-build-command (PR #30)

Commits
-------

7055f40 added static default command to Sismo\Project

Discussion
----------

add static default command to Sismo\Project

This allows to alter the default command for all newly created projects with just one line.

It's meant to be used in the config.file of Sismo to (for example) change the default options of the phpunit command to run or even change the test suite to run at all.

Example:

```php
<?php

$projects = array();
$notifier = new Sismo\GrowlNotifier('pa$$word');

\Sismo\Project::setDefaultCommand('phpunit --colors --strict');

$projects[] = new Sismo\GithubProject('Twig (Local)', '/Users/fabien/Twig', $notifier);
$projects[] = new Sismo\GithubProject('Twig', 'fabpot/Twig', $notifier);

return $projects;
```

---------------------------------------------------------------------------

by cordoval at 2011-09-24T01:09:47Z

I think this is the same problem I had, to change commands for the types of testings that I am currently doing, however @fabpot told me that we can call a generic script that can sit on the project folder of the git project? so I am trying to figure out how to do that, any hints? So this approach is better than touching the config.php, I say config.php should only be touched to add projects but not commands, like the apache sites file, only once

---------------------------------------------------------------------------

by cordoval at 2011-09-24T01:12:04Z

@havvg now I know this will never be merged as sismo is by definition tool agnostic and for the above reasons I posed.

I say @fabpot would do well in showing that sample of script he referred to, but for now I am thinking on its shape, sismo rocks!

---------------------------------------------------------------------------

by havvg at 2011-09-24T09:31:06Z

Yes I know.

However, I think it's worth to have something to alter the default command of Sismo instead of having the same three lines for every project configuration.

---------------------------------------------------------------------------

by cordoval at 2011-09-24T14:05:05Z

I agree too

---------------------------------------------------------------------------

by cordoval at 2011-09-24T20:14:13Z

hey @havvg, do you have gmail, add me to brainstorm sometime, I have an idea

I was successful in extracting a script into each project folder so that the command could be customized right on a file inside the project folder. Like I have extracted the What I think would be good to automate is to extract also the part of the configuration for each project. Wonder if @fabpot has done this already... so the scenario is like this:

we all have main folder web/ or sites/ where we put all our apps and map them to vhosts

so sismo perhaps can scan from the config.php a particular main folder $appsFolder and read inside a standard sismo_config.php per project, inside each there is the setup for the $project at hand and so that it can be inserted back into the closure project array or something ...

makes sense? It should be easy to implement but I am looking for better ideas because i do my mess.

Thanks!

---------------------------------------------------------------------------

by havvg at 2011-09-26T15:54:56Z

You already can do this with the given sismo config.file.

You only need to fill it with the list of projects to look into and the base logic for loading the expected file within each project.

---------------------------------------------------------------------------

by cordoval at 2011-09-26T16:15:08Z

what do you mean 'base logic' ...

---------------------------------------------------------------------------

by havvg at 2011-09-26T17:22:15Z

Actually, your idea is pretty cool, need to implement it. I will do this tomorrow and post the code!

---------------------------------------------------------------------------

by cordoval at 2011-09-26T17:26:25Z

glad to be understood :) yeah man, let me knwo I will be on the chat all day long

---------------------------------------------------------------------------

by havvg at 2011-09-26T17:28:58Z

Code will be there: https://github.com/havvg/SismoFinder

---------------------------------------------------------------------------

by cordoval at 2011-09-26T17:30:04Z

allow permissions to push, perhaps with this pace, I won't want to wait till tomorrow

---------------------------------------------------------------------------

by havvg at 2011-09-26T17:36:55Z

Done.

---------------------------------------------------------------------------

by havvg at 2012-01-04T19:41:19Z

@fabpot What are your thoughts on this PR?

---------------------------------------------------------------------------

by havvg at 2012-04-19T14:33:14Z

Rebased onto current master