Added a PHP script to create new examples (tests) via command line #71

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
@mogria
Contributor

mogria commented Jan 8, 2012

Example of use:
$ php create_example.php my_new_example
/path/to/repo/examples/my_new_example
/path/to/repo/examples/my_new_example/my_new_example.mustache
/path/to/repo/examples/my_new_example/my_new_example.txt
/path/to/repo/examples/my_new_example/MyNewExample.php
$ cd examples/my_new_example/
$ ls
my_new_example.mustache MyNewExample.php my_new_example.txt
$ cat MyNewExample.php
<?php

class MyNewExample extends Mustache {

}
Added a PHP script to create new examples (tests) via command line
Example of use:
    $ php create_example.php my_new_example
    /path/to/repo/examples/my_new_example
    /path/to/repo/examples/my_new_example/my_new_example.mustache
    /path/to/repo/examples/my_new_example/my_new_example.txt
    /path/to/repo/examples/my_new_example/MyNewExample.php
    $ cd examples/my_new_example/
    $ ls
    my_new_example.mustache  MyNewExample.php  my_new_example.txt
    $ cat MyNewExample.php
    <?php

    class MyNewExample extends Mustache {

    }
@bobthecow

This comment has been minimized.

Show comment Hide comment
@bobthecow

bobthecow Jan 8, 2012

Owner

Looks good. Move it to a bin/ subdirectory and add a #! line to the front of this and I'll merge it.

Owner

bobthecow commented Jan 8, 2012

Looks good. Move it to a bin/ subdirectory and add a #! line to the front of this and I'll merge it.

@mogria

This comment has been minimized.

Show comment Hide comment
@mogria

mogria Jan 8, 2012

Contributor

For which path should i add as #!-line? On my Ubuntu 11.10 it's #!/usr/bin/php. But on other systems this may change.

Contributor

mogria commented Jan 8, 2012

For which path should i add as #!-line? On my Ubuntu 11.10 it's #!/usr/bin/php. But on other systems this may change.

@bobthecow

This comment has been minimized.

Show comment Hide comment
@bobthecow

bobthecow Jan 8, 2012

Owner

Use /usr/bin/env php... That will cover almost everyone, and anyone else can still use php bin/create_example.php

Owner

bobthecow commented Jan 8, 2012

Use /usr/bin/env php... That will cover almost everyone, and anyone else can still use php bin/create_example.php

@mogria

This comment has been minimized.

Show comment Hide comment
@mogria

mogria Jan 8, 2012

Contributor

I added the commit ;-)

Contributor

mogria commented Jan 8, 2012

I added the commit ;-)

@bobthecow

This comment has been minimized.

Show comment Hide comment
@bobthecow

bobthecow Jan 8, 2012

Owner

Thanks! Your changes have been merged into the dev branch and will go in the next release.

Owner

bobthecow commented Jan 8, 2012

Thanks! Your changes have been merged into the dev branch and will go in the next release.

@bobthecow bobthecow closed this Jan 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment