Skip to content

Commit

Permalink
fixed #124
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik committed Feb 24, 2015
1 parent 5b713a5 commit 5b38585
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

#### 0.5.2

* [PhpServer] fixed passing arguments to server *2015-02-24*


#### 0.5.1

* [Exec] fixed execution of background jobs, processes persist till the end of PHP script *2015-01-27*
Expand Down
8 changes: 8 additions & 0 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,14 @@ public function tryOptbool($opts = ['silent|s' => false])
if (!$opts['silent']) $this->say("Hello, world");
}

public function tryServer()
{
$this->taskServer(8000)
->dir('site')
->arg('site/index.php')
->run();
}

public function tryInteractive()
{
new SomeTask();
Expand Down
7 changes: 1 addition & 6 deletions src/Task/Development/PhpServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ public function __construct($port)
$this->port = $port;
}

public static function init($port = 8000)
{
return new static($port);
}

public function host($host)
{
$this->host = $host;
Expand All @@ -55,7 +50,7 @@ public function dir($path)

public function getCommand()
{
return sprintf($this->command, $this->host, $this->port);
return sprintf($this->command . $this->arguments, $this->host, $this->port);
}

}

0 comments on commit 5b38585

Please sign in to comment.