diff --git a/Changelog b/Changelog index b17fc90ab..50d20160c 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2016-04-11 DariusIII + * Upd: Update composer.json and add initial update script. * Fix: Fix duplicated cart icon on details page * Chg: Remove most of the select all selectors from Gentele theme. * Upd: Update Omicron to use icheck from shared/assets folder. diff --git a/app/extensions/command/Update.php b/app/extensions/command/Update.php new file mode 100644 index 000000000..83c77c474 --- /dev/null +++ b/app/extensions/command/Update.php @@ -0,0 +1,123 @@ +. + * @author niel + * @copyright 2016 nZEDb + */ +namespace app\extensions\command; + +use \Exception; +use \lithium\console\command\Help; +use \newznab\utility\Git; + + +/** + * Update various aspects of your indexer. + * + * @package app\extensions\command + */ +class Update extends \app\extensions\console\Command +{ + private $gitBranch; + + private $gitTag; + + /** + * Constructor. + * + * @param array $config + */ + public function __construct(array $config = []) + { + $defaults = [ + 'request' => null, + 'response' => [], + 'classes' => $this->_classes + ]; + parent::__construct($config + $defaults); + } + + public function git() + { + /* + $git = new Git(); + $this->gitBranch = $git->getBranch(); + $this->gitTag = $git->tagLatest(); + */ + } + + public function nntmux() + { + try { + $this->composer(); + } catch (Exception $e) { + $this->error($e->getMessage()); + } + + } + + public function run($command = null) + { + if (!$command || !$this->request->args()) { + return $this->_help($command); + } + + if (!$command) { + return $this->_help($command); + } + + if ($this->_execute($command)) { + return true; + } + + $this->error("{$command} could not be created."); + + return false; + } + + protected function composer() + { + passthru('composer install'); + } + + /** + * Invokes the `Help` command. + * The invoked Help command will take over request and response objects of + * the originally invoked command. Thus the response of the Help command + * becomes the response of the original one. + * + * @return boolean + */ + protected function _help() + { + $help = new Help([ + 'request' => $this->request, + 'response' => $this->response, + 'classes' => $this->_classes + ]); + + return $help->run(get_class($this)); + } + + /** + * Class initializer. Parses template and sets up params that need to be filled. + * + * @return void + */ + protected function _init() + { + parent::_init(); + } +} diff --git a/composer.json b/composer.json index 02e78556e..23073988a 100755 --- a/composer.json +++ b/composer.json @@ -71,7 +71,7 @@ "bower-asset/animate.css":"~3.5.1", "bower-asset/bootstrap": "~3.3.6", "bower-asset/bootstrap-progressbar": "~0.9.0", - "bower-asset/font-awesome": "~4.5.0", + "bower-asset/font-awesome": "~4.5", "bower-asset/icheck": "~1.0.2", "bower-asset/jquery-2.2.x": "~2.2.1", "bower-asset/noty": "~2.3.8", diff --git a/composer.lock b/composer.lock index c8d7997bd..4bd4959e2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "a9a28ae34e622216a30da478db634f6a", - "content-hash": "217685cb220dc9bb1aef98d691b1f976", + "hash": "1f80bb3c9167f823fd98bd6898b4e305", + "content-hash": "bdac0624578eee3905c10f1f63cbbc68", "packages": [ { "name": "barracudanetworks/forkdaemon-php", @@ -155,16 +155,16 @@ }, { "name": "bower-asset/font-awesome", - "version": "v4.5.0", + "version": "v4.6.0", "source": { "type": "git", "url": "https://github.com/FortAwesome/Font-Awesome.git", - "reference": "fddd2c240452e6c8990c4ef75e0265b455aa7968" + "reference": "5697be912bc4aa455bfe343f50afdd41caae1a2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FortAwesome/Font-Awesome/zipball/fddd2c240452e6c8990c4ef75e0265b455aa7968", - "reference": "fddd2c240452e6c8990c4ef75e0265b455aa7968", + "url": "https://api.github.com/repos/FortAwesome/Font-Awesome/zipball/5697be912bc4aa455bfe343f50afdd41caae1a2f", + "reference": "5697be912bc4aa455bfe343f50afdd41caae1a2f", "shasum": "" }, "type": "bower-asset-library", diff --git a/nntmux.sh b/nntmux similarity index 100% rename from nntmux.sh rename to nntmux