cleaning up bundler.
This commit is contained in:
parent
fb516f83ca
commit
326b5929e9
|
@ -138,17 +138,17 @@ public function make($arguments)
|
||||||
// with that name doesn't already exist. If it does, we'll bomb out and
|
// with that name doesn't already exist. If it does, we'll bomb out and
|
||||||
// notify the developer of the problem. Bundle names must be unique
|
// notify the developer of the problem. Bundle names must be unique
|
||||||
// since classes are prefixed with the name.
|
// since classes are prefixed with the name.
|
||||||
$options['name'] = $arguments[0];
|
$options['name'] = $name = $arguments[0];
|
||||||
|
|
||||||
if (Bundle::exists($options['name']))
|
if (Bundle::exists($name))
|
||||||
{
|
{
|
||||||
throw new \Exception("A bundle with that name already exists!");
|
throw new \Exception("That bundle already exists!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// The developer may specify a location to which the bundle should be
|
// The developer may specify a location to which the bundle should be
|
||||||
// installed. If a location is not specified, the bundle name will
|
// installed. If a location is not specified, the bundle name will
|
||||||
// be used as the default installation location.
|
// be used as the default installation location.
|
||||||
$location = Request::server('cli.location') ?: $options['name'];
|
$location = Request::server('cli.location') ?: $name;
|
||||||
|
|
||||||
$location = path('bundle').$location;
|
$location = path('bundle').$location;
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ public function make($arguments)
|
||||||
// immediately and the developer can start using it.
|
// immediately and the developer can start using it.
|
||||||
File::put($location.DS.'bundle'.EXT, $info);
|
File::put($location.DS.'bundle'.EXT, $info);
|
||||||
|
|
||||||
echo "Bundle [{$options['name']}] has been created!".PHP_EOL;
|
echo "Bundle [{$name}] has been created!".PHP_EOL;
|
||||||
|
|
||||||
$this->refresh();
|
$this->refresh();
|
||||||
}
|
}
|
||||||
|
@ -197,8 +197,7 @@ protected function get($bundles)
|
||||||
{
|
{
|
||||||
// First we'll call the bundle repository to gather the bundle data
|
// First we'll call the bundle repository to gather the bundle data
|
||||||
// array, which contains all of the information needed to install
|
// array, which contains all of the information needed to install
|
||||||
// the bundle into the application. We'll verify that the bundle
|
// the bundle into the application.
|
||||||
// exists and the API is responding for each bundle.
|
|
||||||
$response = $this->retrieve($bundle);
|
$response = $this->retrieve($bundle);
|
||||||
|
|
||||||
if ($response['status'] == 'not-found')
|
if ($response['status'] == 'not-found')
|
||||||
|
|
Loading…
Reference in New Issue