Additional slug fixes with GPM (#44). Increased spaces in GPM CLI

This commit is contained in:
Djamil Legato
2015-08-12 10:41:47 -07:00
parent 42e6d587d8
commit 274ff3d8c0
3 changed files with 4 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ abstract class AbstractPackageCollection extends BaseCollection {
public function __construct($items)
{
foreach ($items as $name => $data) {
$data->set('slug', $name);
$this->items[$name] = new Package($data, $this->type);
}
}

View File

@@ -16,7 +16,7 @@ class Package extends BasePackage
$this->settings = $package->toArray();
$html_description = \Parsedown::instance()->line($this->description);
$this->data->set('slug', strtolower($this->name));
$this->data->set('slug', $package->slug);
$this->data->set('description_html', $html_description);
$this->data->set('description_plain', strip_tags($html_description));
$this->data->set('symlink', is_link(USER_DIR . $package_type . DS . $this->name));

View File

@@ -67,9 +67,9 @@ class IndexCommand extends Command
// index
str_pad($index++ + 1, 2, '0', STR_PAD_LEFT) . ". " .
// package name
"<cyan>" . str_pad($package->name, 15) . "</cyan> " .
"<cyan>" . str_pad($package->name, 20) . "</cyan> " .
// slug
"[" . str_pad($slug, 15, ' ', STR_PAD_BOTH) . "] " .
"[" . str_pad($slug, 20, ' ', STR_PAD_BOTH) . "] " .
// version details
$this->versionDetails($package)
);