Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
colintucker committed Jan 3, 2018
2 parents 24f8d9b + 3ea2704 commit 5c3a52d
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
73 changes: 72 additions & 1 deletion src/Dev/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ class Installer
'default-locale' => 'en_GB',
'default-database' => '{app-name}',
'default-vendor' => 'vendor',
'default-author-name' => 'My Name',
'default-author-email' => 'name@example.com',
'default-author-company' => 'My Company',
'default-author-homepage' => 'https://www.example.com',
'default-project-link' => 'https://bitbucket.org/{repo-name}',
'default-license-name' => 'BSD-3-Clause',
'default-license-link' => 'https://opensource.org/licenses/BSD-3-Clause',
'default-repo-name' => '{vendor}/app-{app-name}',
'default-repo-url' => 'git@bitbucket.org:{repo-name}.git',
'default-user' => 'serverpilot',
Expand All @@ -94,8 +101,12 @@ class Installer
'format-default' => ' (default "%s")',
'use-colors' => true,
'files' => [
'app/_config/config.yml',
'app/_config.php',
'app/_config/config.yml',
'app/code/Page.php',
'app/code/PageController.php',
'app/src/Pages/HomePage.php',
'app/src/Pages/HomePageController.php',
'deploy.php',
'deploy.yml'
],
Expand Down Expand Up @@ -236,6 +247,38 @@ public function onPostCreateProject()
$data
);

// Obtain Author Name:

$data['author-name'] = $this->ask(
'Author name',
$this->getConfig('default-author-name'),
$data
);

// Obtain Author Email:

$data['author-email'] = $this->ask(
'Author email',
$this->getConfig('default-author-email'),
$data
);

// Obtain Author Company:

$data['author-company'] = $this->ask(
'Author company',
$this->getConfig('default-author-company'),
$data
);

// Obtain Author Homepage:

$data['author-homepage'] = $this->ask(
'Author homepage',
$this->getConfig('default-author-homepage'),
$data
);

// Obtain Repository Name:

$data['repo-name'] = $this->ask(
Expand All @@ -252,6 +295,30 @@ public function onPostCreateProject()
$data
);

// Obtain Project Link:

$data['project-link'] = $this->ask(
'Project link',
$this->getConfig('default-project-link'),
$data
);

// Obtain License Name:

$data['license-name'] = $this->ask(
'License name',
$this->getConfig('default-license-name'),
$data
);

// Obtain License Link:

$data['license-link'] = $this->ask(
'License link',
$this->getConfig('default-license-link'),
$data
);

// Obtain Repository Branches:

$data['branch-staging'] = $this->ask(
Expand Down Expand Up @@ -330,6 +397,10 @@ public function onPostCreateProject()
$data
);

// Define Year:

$data['year'] = date('Y');

// Write Namespace and Data:

$result = false;
Expand Down
4 changes: 4 additions & 0 deletions src/Extensions/Lists/ListItemExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ public function getListItemButtons()

}

if (isset($spec['show']) && !$this->owner->{$spec['show']}) {
continue;
}

$href = isset($spec['href']) ? $spec['href'] : null;

if ($href) {
Expand Down

0 comments on commit 5c3a52d

Please sign in to comment.