From b51ba544f87bd877881fee1862f8cc2066d78094 Mon Sep 17 00:00:00 2001 From: Maurizio Brioschi Date: Thu, 25 Feb 2016 11:56:15 +0100 Subject: [PATCH 01/41] removed compatibility with php 5.3 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 67503a6..f90a409 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: php sudo: true php: - - 5.3 - 5.4 - 5.5 - 5.6 From d57a87dcb5700b4db0575945052b6e300f02d8c9 Mon Sep 17 00:00:00 2001 From: Maurizio Brioschi Date: Thu, 25 Feb 2016 12:03:21 +0100 Subject: [PATCH 02/41] Skip some Magento versions --- .travis.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index f90a409..2220028 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,13 +9,6 @@ php: env: matrix: - - MAGENTO_VERSION="magento-mirror-1.6.2.0" INSTALL_SAMPLE_DATA=yes - - MAGENTO_VERSION="magento-mirror-1.7.0.2" INSTALL_SAMPLE_DATA=yes - - MAGENTO_VERSION="magento-mirror-1.8.1.0" INSTALL_SAMPLE_DATA=yes - # Do not download sample data of 1.9 -> The file is too big - - MAGENTO_VERSION="magento-mirror-1.9.0.1" INSTALL_SAMPLE_DATA=no - - MAGENTO_VERSION="magento-mirror-1.9.1.1" INSTALL_SAMPLE_DATA=no - - MAGENTO_VERSION="magento-mirror-1.9.2.1" INSTALL_SAMPLE_DATA=no - MAGENTO_VERSION="magento-mirror-1.9.2.2" INSTALL_SAMPLE_DATA=no - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no From 25ea2e3425d9c191b1b6ba72932982f7dc0be56b Mon Sep 17 00:00:00 2001 From: Maurizio Brioschi Date: Thu, 25 Feb 2016 16:14:26 +0100 Subject: [PATCH 03/41] add --no-dev for composer At the moment we don't have unit test, so phpunit will exits with code 2, that it's a error. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2220028..645ff73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ env: - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no before_script: - - composer install + - composer install --no-dev #install modman #- sudo wget http://module-manager.googlecode.com/files/modman-1.1.1 #- sudo cp modman-1.1.1 /usr/local/bin/modman From dd15ca6bcfcda044f340f3b52c19cc374f6e3ae4 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Mon, 29 Feb 2016 18:51:50 +0100 Subject: [PATCH 04/41] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ef103f5..cd3b9f4 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "php": ">=5.4", "magento-hackathon/magento-composer-installer": "*", "symfony/yaml": "2.7", - "mothership/state_machine": ">=v1.0 <2.0", + "mothership/state_machine": "v1.1.*", "firegento/psr0autoloader": "dev-master" }, "require-dev": { From ce9c713db37a3e23c1a6d018cb3a6814ddd59a9d Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 10:34:29 +0100 Subject: [PATCH 05/41] Update .travis.yml Disabled wrong tags --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 645ff73..2220028 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ env: - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no before_script: - - composer install --no-dev + - composer install #install modman #- sudo wget http://module-manager.googlecode.com/files/modman-1.1.1 #- sudo cp modman-1.1.1 /usr/local/bin/modman From a064c6e44fc500b3120777b3b5c3de0ef59c3370 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 10:48:34 +0100 Subject: [PATCH 06/41] Added TestStand --- .travis.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2220028..26cf760 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,4 @@ language: php -sudo: true php: - 5.4 @@ -12,15 +11,5 @@ env: - MAGENTO_VERSION="magento-mirror-1.9.2.2" INSTALL_SAMPLE_DATA=no - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no -before_script: - - composer install - #install modman - #- sudo wget http://module-manager.googlecode.com/files/modman-1.1.1 - #- sudo cp modman-1.1.1 /usr/local/bin/modman - #- sudo chmod +x /usr/local/bin/modman #needs to be executable - #- cd "${MAGENTO_VERSION}" - #- modman init - #- modman deploy-all - -#script: -# - phpunit --coverage-text +script: + - curl -sSL https://raw.githubusercontent.com/AOEpeople/MageTestStand/master/setup.sh | bash \ No newline at end of file From 1452bc6c43eb7fbab1ead54bd6cc5d3c88ca6954 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 12:46:13 +0100 Subject: [PATCH 07/41] Added test suite --- composer.json | 15 ++++-- modman | 5 +- phpunit.xml.dist | 33 ++++++++++++ .../Command/Environment/EnvironmentsTest.php | 23 +++++++++ .../Magerun/Base/Command/PHPUnit/TestCase.php | 51 +++++++++++++++++++ tests/bootstrap.php | 19 +++++++ 6 files changed, 141 insertions(+), 5 deletions(-) create mode 100644 phpunit.xml.dist create mode 100644 tests/Mothership/Magerun/Base/Command/Environment/EnvironmentsTest.php create mode 100644 tests/Mothership/Magerun/Base/Command/PHPUnit/TestCase.php create mode 100644 tests/bootstrap.php diff --git a/composer.json b/composer.json index cd3b9f4..4ec96bd 100644 --- a/composer.json +++ b/composer.json @@ -7,13 +7,15 @@ "require": { "php": ">=5.4", "magento-hackathon/magento-composer-installer": "*", - "symfony/yaml": "2.7", + "symfony/yaml": "~2.7", "mothership/state_machine": "v1.1.*", "firegento/psr0autoloader": "dev-master" }, "require-dev": { "phpunit/phpunit": "~4.8", - "escapestudios/symfony2-coding-standard": "~2.0" + "escapestudios/symfony2-coding-standard": "~2.0", + "n98/magerun": "dev-master", + "composer/composer": "1.0.*@dev" }, "repositories": [ { @@ -30,10 +32,15 @@ ], "autoload": { "psr-4": { - "Mothership\\Magerun\\": "www/lib/Mothership/Magerun" + "Mothership\\Magerun\\": "htdocs/lib/Mothership/Magerun" + } + }, + "autoload-dev": { + "psr-4": { + "Mothership\\Magerun\\Base\\": ["htdocs/lib/n98-magerun/modules/mothership_addons/src", "htdocs/tests/Mothership/Magerun/Base"] } }, "extra": { - "magento-root-dir": "root" + "magento-root-dir": "htdocs" } } diff --git a/modman b/modman index d4d6875..1d0c627 100644 --- a/modman +++ b/modman @@ -7,4 +7,7 @@ src/app/code/local/Mothership/Addons app/code/local/M src/media/feeds/readme.md media/feeds/readme.md src/lib/Mothership/Magerun lib/Mothership/Magerun -src/shell/queue.php shell/queue.php \ No newline at end of file +src/shell/queue.php shell/queue.php + +tests tests +phpunit.xml.dist phpunit.xml.dist \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..4e7d9f1 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,33 @@ + + + + ./tests + tests/N98/Magento/Command/Installer/UninstallCommandTest.php + + + ./tests/N98/Magento/Command/Installer/UninstallCommandTest.php + + + + + ./src + + tests/bootstrap.php + + + + \ No newline at end of file diff --git a/tests/Mothership/Magerun/Base/Command/Environment/EnvironmentsTest.php b/tests/Mothership/Magerun/Base/Command/Environment/EnvironmentsTest.php new file mode 100644 index 0000000..1fd5769 --- /dev/null +++ b/tests/Mothership/Magerun/Base/Command/Environment/EnvironmentsTest.php @@ -0,0 +1,23 @@ +getApplication(); + $application->add(new DumpCommand()); + $command = $this->getApplication()->find('mothership:base:environment:dump'); + + $commandTester = new CommandTester($command); + $commandTester->execute(['command' => $command->getName()]); + + $this->assertContains('Cache config cleaned', $commandTester->getDisplay()); + } +} \ No newline at end of file diff --git a/tests/Mothership/Magerun/Base/Command/PHPUnit/TestCase.php b/tests/Mothership/Magerun/Base/Command/PHPUnit/TestCase.php new file mode 100644 index 0000000..cf726ea --- /dev/null +++ b/tests/Mothership/Magerun/Base/Command/PHPUnit/TestCase.php @@ -0,0 +1,51 @@ +application === null) { + $root = $this->getTestMagentoRoot(); + + $this->application = $this->getMock( + 'N98\Magento\Application', + array('getMagentoRootFolder') + ); + $loader = require __DIR__ . '/../../../../../../../../vendor/autoload.php'; + $this->application->setAutoloader($loader); + $this->application->expects($this->any())->method('getMagentoRootFolder')->will($this->returnValue($root)); + + spl_autoload_unregister(array(\Varien_Autoload::instance(), 'autoload')); + + $this->application->init(); + $this->application->initMagento(); + if ($this->application->getMagentoMajorVersion() == Application::MAGENTO_MAJOR_VERSION_1) { + spl_autoload_unregister(array(\Varien_Autoload::instance(), 'autoload')); + } + } + + return $this->application; + } +} \ No newline at end of file diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..51ab579 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,19 @@ + +setUseIncludePath(true); +$paths = array( + $base . '/app/code/local', + $base . '/app/code/community', + $base . '/app/code/core', + $base . '/lib', +); +set_include_path(implode(PATH_SEPARATOR, $paths) . PATH_SEPARATOR . get_include_path()); +unset($paths, $base); \ No newline at end of file From 0a8a2ed0fe237d614e92a0cd2e3ce7d20e39e270 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 12:57:25 +0100 Subject: [PATCH 08/41] Added Protect suffix for modman --- phpunit.xml.dist => phpunit.xml.dist.PROTECT | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename phpunit.xml.dist => phpunit.xml.dist.PROTECT (100%) diff --git a/phpunit.xml.dist b/phpunit.xml.dist.PROTECT similarity index 100% rename from phpunit.xml.dist rename to phpunit.xml.dist.PROTECT From c8f174a829cbaa015696ea8b1cbae10b75f0feb2 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 13:01:20 +0100 Subject: [PATCH 09/41] Updated modman --- modman | 2 +- phpunit.xml.dist.PROTECT => phpunit.xml.dist | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename phpunit.xml.dist.PROTECT => phpunit.xml.dist (100%) diff --git a/modman b/modman index 1d0c627..6417efd 100644 --- a/modman +++ b/modman @@ -10,4 +10,4 @@ src/lib/Mothership/Magerun lib/Mothership/M src/shell/queue.php shell/queue.php tests tests -phpunit.xml.dist phpunit.xml.dist \ No newline at end of file +phpunit.xml.dist phpunit.xml.dist.PROTECT \ No newline at end of file diff --git a/phpunit.xml.dist.PROTECT b/phpunit.xml.dist similarity index 100% rename from phpunit.xml.dist.PROTECT rename to phpunit.xml.dist From 0b44acb88a73ed138746fb8428b5d3e18e2e2121 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 13:06:36 +0100 Subject: [PATCH 10/41] Renamed phpunit file --- .travis.yml | 16 ++++++++++------ modman | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26cf760..0a6c100 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,14 +2,18 @@ language: php php: - 5.4 - - 5.5 - - 5.6 - - 7.0 +# - 5.5 +# - 5.6 +# - 7.0 + + +allow_failures: + - php: 5.4 + - php: hhvm env: - matrix: - - MAGENTO_VERSION="magento-mirror-1.9.2.2" INSTALL_SAMPLE_DATA=no - - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no + - MAGENTO_VERSION="magento-mirror-1.9.2.2" INSTALL_SAMPLE_DATA=no + - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no script: - curl -sSL https://raw.githubusercontent.com/AOEpeople/MageTestStand/master/setup.sh | bash \ No newline at end of file diff --git a/modman b/modman index 6417efd..b58a679 100644 --- a/modman +++ b/modman @@ -10,4 +10,4 @@ src/lib/Mothership/Magerun lib/Mothership/M src/shell/queue.php shell/queue.php tests tests -phpunit.xml.dist phpunit.xml.dist.PROTECT \ No newline at end of file +phpunit.xml.dist phpunit.xml \ No newline at end of file From 1e05893effc78a133281a0a20e960b96fdf35466 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 13:20:29 +0100 Subject: [PATCH 11/41] All builds should be able to pass --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0a6c100..63b1591 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ php: allow_failures: - php: 5.4 - php: hhvm + - env: MAGENTO_VERSION="magento-mirror-1.9.2.2" INSTALL_SAMPLE_DATA=no + - env: MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no env: - MAGENTO_VERSION="magento-mirror-1.9.2.2" INSTALL_SAMPLE_DATA=no From 9946319fa6a87ba73e82f77bd859b51f9b027b9b Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 13:28:12 +0100 Subject: [PATCH 12/41] Changed build script --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 63b1591..45e6b76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ env: - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no script: - - curl -sSL https://raw.githubusercontent.com/AOEpeople/MageTestStand/master/setup.sh | bash \ No newline at end of file + - curl -sSL https://github.com/mothership-gmbh/MageTestStand.git | bash \ No newline at end of file From 29fe0bac7ce4c4fd19cfcb535d8daf7cb8277939 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 13:33:01 +0100 Subject: [PATCH 13/41] fixed location --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 45e6b76..c05f3c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ env: - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no script: - - curl -sSL https://github.com/mothership-gmbh/MageTestStand.git | bash \ No newline at end of file + - curl -sSL https://raw.githubusercontent.com/mothership-gmbh/MageTestStand/master/setup.sh | bash \ No newline at end of file From 9623273afbdbe2c24628a04095d539c056d3616e Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 13:50:48 +0100 Subject: [PATCH 14/41] The composer installer should now install the psr-0 module as well --- .travis.yml | 2 +- composer.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c05f3c2..63b1591 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ env: - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no script: - - curl -sSL https://raw.githubusercontent.com/mothership-gmbh/MageTestStand/master/setup.sh | bash \ No newline at end of file + - curl -sSL https://raw.githubusercontent.com/AOEpeople/MageTestStand/master/setup.sh | bash \ No newline at end of file diff --git a/composer.json b/composer.json index 4ec96bd..4c19569 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,8 @@ "phpunit/phpunit": "~4.8", "escapestudios/symfony2-coding-standard": "~2.0", "n98/magerun": "dev-master", - "composer/composer": "1.0.*@dev" + "composer/composer": "1.0.*@dev", + "aoepeople/composer-installers": "*" }, "repositories": [ { From 89a0315e830d5b8c7610d36ffbf283903e7a5ebc Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 14:04:26 +0100 Subject: [PATCH 15/41] Run plain phpunit --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 63b1591..a99eb35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ env: - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no script: - - curl -sSL https://raw.githubusercontent.com/AOEpeople/MageTestStand/master/setup.sh | bash \ No newline at end of file + - curl -sSL https://raw.githubusercontent.com/azngeek/MageTestStand/patch-1/install.sh | bash \ No newline at end of file From 5e589c2010709f51e1901ec6db0cf0bfe4ea4e08 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 14:24:48 +0100 Subject: [PATCH 16/41] Added custom travis script --- .travis.yml | 2 +- _deploy/travis.sh | 91 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 _deploy/travis.sh diff --git a/.travis.yml b/.travis.yml index a99eb35..b37abc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ env: - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no script: - - curl -sSL https://raw.githubusercontent.com/azngeek/MageTestStand/patch-1/install.sh | bash \ No newline at end of file + - ./_deploy/travis.sh | bash \ No newline at end of file diff --git a/_deploy/travis.sh b/_deploy/travis.sh new file mode 100644 index 0000000..e081649 --- /dev/null +++ b/_deploy/travis.sh @@ -0,0 +1,91 @@ +#!/bin/bash + +# Get absolute path to main directory +ABSPATH=$(cd "${0%/*}" 2>/dev/null; echo "${PWD}/${0##*/}") +SOURCE_DIR=`dirname "${ABSPATH}"` + +if [ -z $MAGENTO_DB_HOST ]; then MAGENTO_DB_HOST="localhost"; fi +if [ -z $MAGENTO_DB_PORT ]; then MAGENTO_DB_PORT="3306"; fi +if [ -z $MAGENTO_DB_USER ]; then MAGENTO_DB_USER="root"; fi +if [ -z $MAGENTO_DB_PASS ]; then MAGENTO_DB_PASS=""; fi +if [ -z $MAGENTO_DB_NAME ]; then MAGENTO_DB_NAME="mageteststand"; fi +if [ -z $MAGENTO_DB_ALLOWSAME ]; then MAGENTO_DB_ALLOWSAME="0"; fi + +echo +echo "---------------------" +echo "- AOE MageTestStand -" +echo "---------------------" +echo +echo "Installing ${MAGENTO_VERSION} in ${SOURCE_DIR}/htdocs" +echo "using Database Credentials:" +echo " Host: ${MAGENTO_DB_HOST}" +echo " Port: ${MAGENTO_DB_PORT}" +echo " User: ${MAGENTO_DB_USER}" +echo " Pass: [hidden]" +echo " Main DB: ${MAGENTO_DB_NAME}" +echo " Test DB: ${MAGENTO_DB_NAME}_test" +echo " Allow same db: ${MAGENTO_DB_ALLOWSAME}" +echo + + + + +cd ${SOURCE_DIR} + +# Download composer +php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php +php composer-setup.php +php composer.phar self-update +bash < <(curl -s -L https://raw.github.com/colinmollenhour/modman/master/modman-installer) +wget http://files.magerun.net/n98-magerun-latest.phar +chmod +x ./n98-magerun-latest.phar + + +if [ ! -f htdocs/app/etc/local.xml ] ; then + + # Create main database + MYSQLPASS="" + if [ ! -z $MAGENTO_DB_PASS ]; then MYSQLPASS="-p${MAGENTO_DB_PASS}"; fi + mysql -u${MAGENTO_DB_USER} ${MYSQLPASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}\`; CREATE DATABASE \`${MAGENTO_DB_NAME}\`;" + + sed -i -e s/MAGENTO_DB_HOST/${MAGENTO_DB_HOST}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit + sed -i -e s/MAGENTO_DB_PORT/${MAGENTO_DB_PORT}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit + sed -i -e s/MAGENTO_DB_USER/${MAGENTO_DB_USER}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit + sed -i -e s/MAGENTO_DB_PASS/${MAGENTO_DB_PASS}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit + sed -i -e s/MAGENTO_DB_ALLOWSAME/${MAGENTO_DB_ALLOWSAME}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit + + if [ $MAGENTO_DB_ALLOWSAME == "0" ] ; then + # Create test database + mysql -u${MAGENTO_DB_USER} ${MYSQLPASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}_test\`; CREATE DATABASE \`${MAGENTO_DB_NAME}_test\`;" + sed -i -e s/MAGENTO_DB_NAME/${MAGENTO_DB_NAME}_test/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit + else + sed -i -e s/MAGENTO_DB_NAME/${MAGENTO_DB_NAME}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit + fi + + tools/n98-magerun.phar install \ + --dbHost="${MAGENTO_DB_HOST}" --dbUser="${MAGENTO_DB_USER}" --dbPass="${MAGENTO_DB_PASS}" --dbName="${MAGENTO_DB_NAME}" --dbPort="${MAGENTO_DB_PORT}" \ + --installSampleData=yes \ + --useDefaultConfigParams=yes \ + --magentoVersionByName="${MAGENTO_VERSION}" \ + --installationFolder="${SOURCE_DIR}/htdocs" \ + --baseUrl="http://magento.local/" || { echo "Installing Magento failed"; exit 1; } + + mysql -u${MAGENTO_DB_USER} -p${MAGENTO_DB_PASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}\`; CREATE DATABASE \`${MAGENTO_DB_NAME}\`;" +fi + +composer.phar self-update + + +modman deploy-all --force + +n98-magerun-latest.phar --root-dir=htdocs config:set dev/template/allow_symlink 1 +n98-magerun-latest.phar --root-dir=htdocs sys:setup:run +n98-magerun-latest.phar --root-dir=htdocs cache:flush + +n98-magerun-latest.phar cache:clean +n98-magerun-latest.phar sys:module:list +export N98_MAGERUN_TEST_MAGENTO_ROOT=${BUILDENV}/htdocs + + +cd ${BUILDENV}/htdocs +phpunit --debug --verbose \ No newline at end of file From 001e719613eb6ae08c691d9070096d300b956ead Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 14:30:02 +0100 Subject: [PATCH 17/41] Changed script location --- .travis.yml | 3 +-- _deploy/travis.sh | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index b37abc9..98f6d48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,5 +17,4 @@ env: - MAGENTO_VERSION="magento-mirror-1.9.2.2" INSTALL_SAMPLE_DATA=no - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no -script: - - ./_deploy/travis.sh | bash \ No newline at end of file +script: _deploy/travis.sh \ No newline at end of file diff --git a/_deploy/travis.sh b/_deploy/travis.sh index e081649..a74a45a 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -33,9 +33,7 @@ echo cd ${SOURCE_DIR} # Download composer -php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php -php composer-setup.php -php composer.phar self-update +composer self-update bash < <(curl -s -L https://raw.github.com/colinmollenhour/modman/master/modman-installer) wget http://files.magerun.net/n98-magerun-latest.phar chmod +x ./n98-magerun-latest.phar From 34d372b20a8726664ef88b9a157e6458964bf0c4 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 14:33:00 +0100 Subject: [PATCH 18/41] fix --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 98f6d48..8638106 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,12 @@ php: # - 5.6 # - 7.0 +before_install: + - chmod +x _deploy/travis.sh + + +before_script: + - composer self-update allow_failures: - php: 5.4 From 2886d0b6c1d723d133d14b78d5f31908f2da86f1 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 14:37:20 +0100 Subject: [PATCH 19/41] fix --- _deploy/travis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index a74a45a..70dbbca 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -60,7 +60,7 @@ if [ ! -f htdocs/app/etc/local.xml ] ; then sed -i -e s/MAGENTO_DB_NAME/${MAGENTO_DB_NAME}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit fi - tools/n98-magerun.phar install \ + n98-magerun-latest.phar install \ --dbHost="${MAGENTO_DB_HOST}" --dbUser="${MAGENTO_DB_USER}" --dbPass="${MAGENTO_DB_PASS}" --dbName="${MAGENTO_DB_NAME}" --dbPort="${MAGENTO_DB_PORT}" \ --installSampleData=yes \ --useDefaultConfigParams=yes \ From 8555e1760b298f7e8f8a27772f3ca4346eefa5e9 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 14:45:40 +0100 Subject: [PATCH 20/41] fix --- .travis.yml | 5 +---- _deploy/travis.sh | 14 ++++++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8638106..a2860b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,7 @@ php: before_install: - chmod +x _deploy/travis.sh - - -before_script: - - composer self-update + - travis_retry composer self-update allow_failures: - php: 5.4 diff --git a/_deploy/travis.sh b/_deploy/travis.sh index 70dbbca..9eff3fa 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -35,6 +35,8 @@ cd ${SOURCE_DIR} # Download composer composer self-update bash < <(curl -s -L https://raw.github.com/colinmollenhour/modman/master/modman-installer) + +cd ${SOURCE_DIR} wget http://files.magerun.net/n98-magerun-latest.phar chmod +x ./n98-magerun-latest.phar @@ -60,7 +62,7 @@ if [ ! -f htdocs/app/etc/local.xml ] ; then sed -i -e s/MAGENTO_DB_NAME/${MAGENTO_DB_NAME}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit fi - n98-magerun-latest.phar install \ + ./n98-magerun-latest.phar install \ --dbHost="${MAGENTO_DB_HOST}" --dbUser="${MAGENTO_DB_USER}" --dbPass="${MAGENTO_DB_PASS}" --dbName="${MAGENTO_DB_NAME}" --dbPort="${MAGENTO_DB_PORT}" \ --installSampleData=yes \ --useDefaultConfigParams=yes \ @@ -76,12 +78,12 @@ composer.phar self-update modman deploy-all --force -n98-magerun-latest.phar --root-dir=htdocs config:set dev/template/allow_symlink 1 -n98-magerun-latest.phar --root-dir=htdocs sys:setup:run -n98-magerun-latest.phar --root-dir=htdocs cache:flush +./n98-magerun-latest.phar --root-dir=htdocs config:set dev/template/allow_symlink 1 +./n98-magerun-latest.phar --root-dir=htdocs sys:setup:run +./n98-magerun-latest.phar --root-dir=htdocs cache:flush -n98-magerun-latest.phar cache:clean -n98-magerun-latest.phar sys:module:list +./n98-magerun-latest.phar cache:clean +./n98-magerun-latest.phar sys:module:list export N98_MAGERUN_TEST_MAGENTO_ROOT=${BUILDENV}/htdocs From c57692e0803f12320bfd5021d1b2d7f8807921b3 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 15:01:28 +0100 Subject: [PATCH 21/41] changed magento version --- .travis.yml | 6 +++--- _deploy/travis.sh | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a2860b4..702e76f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,11 +13,11 @@ before_install: allow_failures: - php: 5.4 - php: hhvm - - env: MAGENTO_VERSION="magento-mirror-1.9.2.2" INSTALL_SAMPLE_DATA=no - - env: MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no + - env: MAGENTO_VERSION="magento-mirror-1.8.1.0" INSTALL_SAMPLE_DATA=yes + - env: MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=yes env: - - MAGENTO_VERSION="magento-mirror-1.9.2.2" INSTALL_SAMPLE_DATA=no + - MAGENTO_VERSION="magento-mirror-1.8.1.0" INSTALL_SAMPLE_DATA=no - MAGENTO_VERSION="magento-mirror-1.9.2.3" INSTALL_SAMPLE_DATA=no script: _deploy/travis.sh \ No newline at end of file diff --git a/_deploy/travis.sh b/_deploy/travis.sh index 9eff3fa..d11c702 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -70,6 +70,7 @@ if [ ! -f htdocs/app/etc/local.xml ] ; then --installationFolder="${SOURCE_DIR}/htdocs" \ --baseUrl="http://magento.local/" || { echo "Installing Magento failed"; exit 1; } + mysql -u${MAGENTO_DB_USER} -p${MAGENTO_DB_PASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}\`; CREATE DATABASE \`${MAGENTO_DB_NAME}\`;" fi From 342dd7c313a32907856191a449a7e7611bad8ff3 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 15:05:13 +0100 Subject: [PATCH 22/41] fix --- _deploy/travis.sh | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index d11c702..8bd5023 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -1,4 +1,6 @@ #!/bin/bash +set -e +set -x # Get absolute path to main directory ABSPATH=$(cd "${0%/*}" 2>/dev/null; echo "${PWD}/${0##*/}") @@ -6,14 +8,14 @@ SOURCE_DIR=`dirname "${ABSPATH}"` if [ -z $MAGENTO_DB_HOST ]; then MAGENTO_DB_HOST="localhost"; fi if [ -z $MAGENTO_DB_PORT ]; then MAGENTO_DB_PORT="3306"; fi -if [ -z $MAGENTO_DB_USER ]; then MAGENTO_DB_USER="root"; fi -if [ -z $MAGENTO_DB_PASS ]; then MAGENTO_DB_PASS=""; fi +if [ -z $MAGENTO_DB_USER ]; then MAGENTO_DB_USER="test"; fi +if [ -z $MAGENTO_DB_PASS ]; then MAGENTO_DB_PASS="test"; fi if [ -z $MAGENTO_DB_NAME ]; then MAGENTO_DB_NAME="mageteststand"; fi if [ -z $MAGENTO_DB_ALLOWSAME ]; then MAGENTO_DB_ALLOWSAME="0"; fi echo echo "---------------------" -echo "- AOE MageTestStand -" +echo "- Mothership local -" echo "---------------------" echo echo "Installing ${MAGENTO_VERSION} in ${SOURCE_DIR}/htdocs" @@ -43,25 +45,6 @@ chmod +x ./n98-magerun-latest.phar if [ ! -f htdocs/app/etc/local.xml ] ; then - # Create main database - MYSQLPASS="" - if [ ! -z $MAGENTO_DB_PASS ]; then MYSQLPASS="-p${MAGENTO_DB_PASS}"; fi - mysql -u${MAGENTO_DB_USER} ${MYSQLPASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}\`; CREATE DATABASE \`${MAGENTO_DB_NAME}\`;" - - sed -i -e s/MAGENTO_DB_HOST/${MAGENTO_DB_HOST}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit - sed -i -e s/MAGENTO_DB_PORT/${MAGENTO_DB_PORT}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit - sed -i -e s/MAGENTO_DB_USER/${MAGENTO_DB_USER}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit - sed -i -e s/MAGENTO_DB_PASS/${MAGENTO_DB_PASS}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit - sed -i -e s/MAGENTO_DB_ALLOWSAME/${MAGENTO_DB_ALLOWSAME}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit - - if [ $MAGENTO_DB_ALLOWSAME == "0" ] ; then - # Create test database - mysql -u${MAGENTO_DB_USER} ${MYSQLPASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}_test\`; CREATE DATABASE \`${MAGENTO_DB_NAME}_test\`;" - sed -i -e s/MAGENTO_DB_NAME/${MAGENTO_DB_NAME}_test/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit - else - sed -i -e s/MAGENTO_DB_NAME/${MAGENTO_DB_NAME}/g .modman/Aoe_TestSetup/app/etc/local.xml.phpunit - fi - ./n98-magerun-latest.phar install \ --dbHost="${MAGENTO_DB_HOST}" --dbUser="${MAGENTO_DB_USER}" --dbPass="${MAGENTO_DB_PASS}" --dbName="${MAGENTO_DB_NAME}" --dbPort="${MAGENTO_DB_PORT}" \ --installSampleData=yes \ @@ -70,7 +53,6 @@ if [ ! -f htdocs/app/etc/local.xml ] ; then --installationFolder="${SOURCE_DIR}/htdocs" \ --baseUrl="http://magento.local/" || { echo "Installing Magento failed"; exit 1; } - mysql -u${MAGENTO_DB_USER} -p${MAGENTO_DB_PASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}\`; CREATE DATABASE \`${MAGENTO_DB_NAME}\`;" fi From 565caa22deb9ed61e7dcda7249835935bfa30f15 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 15:08:09 +0100 Subject: [PATCH 23/41] fix --- _deploy/travis.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index 8bd5023..266673a 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -45,6 +45,12 @@ chmod +x ./n98-magerun-latest.phar if [ ! -f htdocs/app/etc/local.xml ] ; then + # Create main database + MYSQLPASS="" + if [ ! -z $MAGENTO_DB_PASS ]; then MYSQLPASS="-p${MAGENTO_DB_PASS}"; fi + mysql -u${MAGENTO_DB_USER} ${MYSQLPASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}\`; CREATE DATABASE \`${MAGENTO_DB_NAME}\`;" + + ./n98-magerun-latest.phar install \ --dbHost="${MAGENTO_DB_HOST}" --dbUser="${MAGENTO_DB_USER}" --dbPass="${MAGENTO_DB_PASS}" --dbName="${MAGENTO_DB_NAME}" --dbPort="${MAGENTO_DB_PORT}" \ --installSampleData=yes \ From 84522848a77f0a99e165a39e487f873551abc5dc Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 15:11:58 +0100 Subject: [PATCH 24/41] fix --- _deploy/travis.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index 266673a..d5228bf 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -8,8 +8,8 @@ SOURCE_DIR=`dirname "${ABSPATH}"` if [ -z $MAGENTO_DB_HOST ]; then MAGENTO_DB_HOST="localhost"; fi if [ -z $MAGENTO_DB_PORT ]; then MAGENTO_DB_PORT="3306"; fi -if [ -z $MAGENTO_DB_USER ]; then MAGENTO_DB_USER="test"; fi -if [ -z $MAGENTO_DB_PASS ]; then MAGENTO_DB_PASS="test"; fi +if [ -z $MAGENTO_DB_USER ]; then MAGENTO_DB_USER="root"; fi +if [ -z $MAGENTO_DB_PASS ]; then MAGENTO_DB_PASS=""; fi if [ -z $MAGENTO_DB_NAME ]; then MAGENTO_DB_NAME="mageteststand"; fi if [ -z $MAGENTO_DB_ALLOWSAME ]; then MAGENTO_DB_ALLOWSAME="0"; fi @@ -50,7 +50,6 @@ if [ ! -f htdocs/app/etc/local.xml ] ; then if [ ! -z $MAGENTO_DB_PASS ]; then MYSQLPASS="-p${MAGENTO_DB_PASS}"; fi mysql -u${MAGENTO_DB_USER} ${MYSQLPASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}\`; CREATE DATABASE \`${MAGENTO_DB_NAME}\`;" - ./n98-magerun-latest.phar install \ --dbHost="${MAGENTO_DB_HOST}" --dbUser="${MAGENTO_DB_USER}" --dbPass="${MAGENTO_DB_PASS}" --dbName="${MAGENTO_DB_NAME}" --dbPort="${MAGENTO_DB_PORT}" \ --installSampleData=yes \ @@ -62,7 +61,7 @@ if [ ! -f htdocs/app/etc/local.xml ] ; then mysql -u${MAGENTO_DB_USER} -p${MAGENTO_DB_PASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}\`; CREATE DATABASE \`${MAGENTO_DB_NAME}\`;" fi -composer.phar self-update +composer install modman deploy-all --force From 664a4d89e4cdbb832d15d22f15948997544893ad Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 15:18:19 +0100 Subject: [PATCH 25/41] fix --- _deploy/travis.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index d5228bf..4b70c66 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -57,11 +57,9 @@ if [ ! -f htdocs/app/etc/local.xml ] ; then --magentoVersionByName="${MAGENTO_VERSION}" \ --installationFolder="${SOURCE_DIR}/htdocs" \ --baseUrl="http://magento.local/" || { echo "Installing Magento failed"; exit 1; } - - mysql -u${MAGENTO_DB_USER} -p${MAGENTO_DB_PASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}\`; CREATE DATABASE \`${MAGENTO_DB_NAME}\`;" fi -composer install +composer self-update modman deploy-all --force From fbc07ecf4414496908a731dadaaa3350a7d4bd49 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 15:27:31 +0100 Subject: [PATCH 26/41] fix --- _deploy/.basedir | 1 + _deploy/travis.sh | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 _deploy/.basedir diff --git a/_deploy/.basedir b/_deploy/.basedir new file mode 100644 index 0000000..d476989 --- /dev/null +++ b/_deploy/.basedir @@ -0,0 +1 @@ +htdocs \ No newline at end of file diff --git a/_deploy/travis.sh b/_deploy/travis.sh index 4b70c66..edcdd6a 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -2,6 +2,22 @@ set -e set -x +# most of the script is based on the fantastic https://github.com/AOEpeople/MageTestStand project + +# create a temporary directory +BUILDENV=`mktemp -d /tmp/mothership.XXXXXXXX` + +echo "Using build directory ${BUILDENV}" + + +mkdir -p ${BUILDENV}/.modman/mothership_magerun + +cp -rf . "${BUILDENV}/.modman/mothership_magerun" + +# Start building everything +cp -f ${CWD}/composer.json ${BUILDENV} +cp -f ${CWD}/_deploy/.basedir ${BUILDENV}/.modman + # Get absolute path to main directory ABSPATH=$(cd "${0%/*}" 2>/dev/null; echo "${PWD}/${0##*/}") SOURCE_DIR=`dirname "${ABSPATH}"` @@ -59,9 +75,12 @@ if [ ! -f htdocs/app/etc/local.xml ] ; then --baseUrl="http://magento.local/" || { echo "Installing Magento failed"; exit 1; } fi +# run composer update and install all requirements composer self-update +composer install - +# run modman and first debug +ls -lisah ${SOURCE_DIR} modman deploy-all --force ./n98-magerun-latest.phar --root-dir=htdocs config:set dev/template/allow_symlink 1 From 8ffc1f3bc363660dfeb9ecafd0fca565763cdc3e Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 15:32:01 +0100 Subject: [PATCH 27/41] fix --- _deploy/travis.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index edcdd6a..bed8b52 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -6,8 +6,10 @@ set -x # create a temporary directory BUILDENV=`mktemp -d /tmp/mothership.XXXXXXXX` +CWD=$(pwd) -echo "Using build directory ${BUILDENV}" +echo "BUILD = ${BUILDENV}" +echo "CWD = ${CWD}" mkdir -p ${BUILDENV}/.modman/mothership_magerun @@ -15,7 +17,7 @@ mkdir -p ${BUILDENV}/.modman/mothership_magerun cp -rf . "${BUILDENV}/.modman/mothership_magerun" # Start building everything -cp -f ${CWD}/composer.json ${BUILDENV} +cp -f ${CWD}/composer.json ${BUILDENV} cp -f ${CWD}/_deploy/.basedir ${BUILDENV}/.modman # Get absolute path to main directory From e33198f43a57676c38cc119f4439def438d10121 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 15:36:49 +0100 Subject: [PATCH 28/41] fix --- _deploy/travis.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index bed8b52..1286bb7 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -50,13 +50,13 @@ echo -cd ${SOURCE_DIR} +cd ${BUILDENV} # Download composer composer self-update bash < <(curl -s -L https://raw.github.com/colinmollenhour/modman/master/modman-installer) -cd ${SOURCE_DIR} +cd ${BUILDENV} wget http://files.magerun.net/n98-magerun-latest.phar chmod +x ./n98-magerun-latest.phar @@ -82,7 +82,7 @@ composer self-update composer install # run modman and first debug -ls -lisah ${SOURCE_DIR} +ls -lisah ${BUILDENV} modman deploy-all --force ./n98-magerun-latest.phar --root-dir=htdocs config:set dev/template/allow_symlink 1 From 1af71a302cf6fe26679160235788d2faa0e3c3a7 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 15:42:06 +0100 Subject: [PATCH 29/41] replaced secure protocol --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4c19569..3ec6c40 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "repositories": [ { "type": "composer", - "url": "http://packages.firegento.com" + "url": "https://packages.firegento.com/" } ], "authors": [ From 713ac8869581b8b2f5c20ba07cf291efd41a7111 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 15:48:16 +0100 Subject: [PATCH 30/41] fix --- _deploy/travis.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index 1286bb7..d3dea22 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -73,7 +73,7 @@ if [ ! -f htdocs/app/etc/local.xml ] ; then --installSampleData=yes \ --useDefaultConfigParams=yes \ --magentoVersionByName="${MAGENTO_VERSION}" \ - --installationFolder="${SOURCE_DIR}/htdocs" \ + --installationFolder="${BUILDENV}/htdocs" \ --baseUrl="http://magento.local/" || { echo "Installing Magento failed"; exit 1; } fi @@ -95,4 +95,5 @@ export N98_MAGERUN_TEST_MAGENTO_ROOT=${BUILDENV}/htdocs cd ${BUILDENV}/htdocs +ls -lisah ${BUILDENV}/htdocs phpunit --debug --verbose \ No newline at end of file From 147e60067c05102e6e62b07b48dad3fa0041de39 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 16:22:49 +0100 Subject: [PATCH 31/41] added debugging for autoloader --- _deploy/travis.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index d3dea22..232de74 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -96,4 +96,9 @@ export N98_MAGERUN_TEST_MAGENTO_ROOT=${BUILDENV}/htdocs cd ${BUILDENV}/htdocs ls -lisah ${BUILDENV}/htdocs + +ls -lisah ${BUILDENV}/vendor/ +cat ${BUILDENV}/vendor/autoload.php +cat ${BUILDENV}/vendor/composer/autoload_psr4.php + phpunit --debug --verbose \ No newline at end of file From 64856b8cdf2653e598a73f1e2fd20da0216963fe Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 16:30:24 +0100 Subject: [PATCH 32/41] Added github token --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 702e76f..836d1e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,13 @@ php: # - 5.6 # - 7.0 +## Update composer and run the appropriate composer command +before_script: + - composer self-update -q + - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi; + before_install: - chmod +x _deploy/travis.sh - - travis_retry composer self-update allow_failures: - php: 5.4 From eed0b7b628746969d7934af7e1e2806f5f340c9a Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 16:34:51 +0100 Subject: [PATCH 33/41] Fix --- _deploy/travis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index 232de74..d5417ff 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -83,7 +83,7 @@ composer install # run modman and first debug ls -lisah ${BUILDENV} -modman deploy-all --force +modman deploy-all --force --copy ./n98-magerun-latest.phar --root-dir=htdocs config:set dev/template/allow_symlink 1 ./n98-magerun-latest.phar --root-dir=htdocs sys:setup:run From 9eff12ec52e3ada72f470ab69509e54ee7d65965 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 16:41:38 +0100 Subject: [PATCH 34/41] Changed phpunit call --- _deploy/travis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index d5417ff..1e8ae41 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -101,4 +101,4 @@ ls -lisah ${BUILDENV}/vendor/ cat ${BUILDENV}/vendor/autoload.php cat ${BUILDENV}/vendor/composer/autoload_psr4.php -phpunit --debug --verbose \ No newline at end of file +../vendor/phpunit/phpunit/phpunit --verbose --debug --config=phpunit.xml \ No newline at end of file From 4577241e606f5e0f45ca9849bdb94313d5ad894c Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 16:53:09 +0100 Subject: [PATCH 35/41] Changed paths so that tests will run from cwd now --- tests/bootstrap.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 51ab579..6fe9e98 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,19 +1,21 @@ setUseIncludePath(true); $paths = array( - $base . '/app/code/local', - $base . '/app/code/community', - $base . '/app/code/core', - $base . '/lib', + $base.'/app/code/local', + $base.'/app/code/community', + $base.'/app/code/core', + $base.'/lib', ); -set_include_path(implode(PATH_SEPARATOR, $paths) . PATH_SEPARATOR . get_include_path()); -unset($paths, $base); \ No newline at end of file +set_include_path(implode(PATH_SEPARATOR, $paths).PATH_SEPARATOR.get_include_path()); +unset($paths, $base); From 6ddd3186cd89372f325d88e56e380e9e5b7e8b28 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 17:07:21 +0100 Subject: [PATCH 36/41] removed copy flag --- _deploy/travis.sh | 2 +- .../Magerun/Base/Command/Environment/EnvironmentsTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/_deploy/travis.sh b/_deploy/travis.sh index 1e8ae41..1411de4 100644 --- a/_deploy/travis.sh +++ b/_deploy/travis.sh @@ -83,7 +83,7 @@ composer install # run modman and first debug ls -lisah ${BUILDENV} -modman deploy-all --force --copy +modman deploy-all --force ./n98-magerun-latest.phar --root-dir=htdocs config:set dev/template/allow_symlink 1 ./n98-magerun-latest.phar --root-dir=htdocs sys:setup:run diff --git a/tests/Mothership/Magerun/Base/Command/Environment/EnvironmentsTest.php b/tests/Mothership/Magerun/Base/Command/Environment/EnvironmentsTest.php index 1fd5769..95af93c 100644 --- a/tests/Mothership/Magerun/Base/Command/Environment/EnvironmentsTest.php +++ b/tests/Mothership/Magerun/Base/Command/Environment/EnvironmentsTest.php @@ -11,6 +11,7 @@ class EnvironmentsTest extends TestCase public function testExecute() { + $this->markTestSkipped('Not used at the moment'); $application = $this->getApplication(); $application->add(new DumpCommand()); $command = $this->getApplication()->find('mothership:base:environment:dump'); From 1d919a28934c305bc8a5bf0c16b961b3691c71c0 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 18:45:51 +0100 Subject: [PATCH 37/41] Added tests for workflow --- modman | 2 + src/app/etc/mothership/workflows/Example.yaml | 87 ++++++++++ .../Mothership/Magerun/Workflows/Example.php | 149 ++++++++++++++++++ .../Base/Command/Workflow/ListCommandTest.php | 37 +++++ .../Base/Command/Workflow/RunCommandTest.php | 36 +++++ 5 files changed, 311 insertions(+) create mode 100644 src/app/etc/mothership/workflows/Example.yaml create mode 100644 src/lib/Mothership/Magerun/Workflows/Example.php create mode 100644 tests/Mothership/Magerun/Base/Command/Workflow/ListCommandTest.php create mode 100644 tests/Mothership/Magerun/Base/Command/Workflow/RunCommandTest.php diff --git a/modman b/modman index b58a679..1eda4b0 100644 --- a/modman +++ b/modman @@ -1,6 +1,8 @@ src/lib/n98-magerun/modules/mothership_addons lib/n98-magerun/modules/mothership_addons src/app/etc/mothership/environments/environment_vm.php.example app/etc/mothership/environments/environment_vm.php.example +src/app/etc/mothership/workflows/Example.yaml app/etc/mothership/workflows/Example.yaml + src/app/etc/modules/Mothership_Addons.xml app/etc/modules/Mothership_Addons.xml src/app/code/local/Mothership/Addons app/code/local/Mothership/Addons diff --git a/src/app/etc/mothership/workflows/Example.yaml b/src/app/etc/mothership/workflows/Example.yaml new file mode 100644 index 0000000..fc810e3 --- /dev/null +++ b/src/app/etc/mothership/workflows/Example.yaml @@ -0,0 +1,87 @@ +#class of the model +class: + name: Mothership\Magerun\Workflows\Example + args: [] + +#definition of the states and transition...the order establishes the transition from one state to another +#the name of each state is NOT case sensitive +states: + + # initialize the logging and stuff + start: + type: initial + + second_state: + type: normal + transitions_from: [start] + transitions_to: [second_state] + + load_document: + type: normal + transitions_from: [second_state] + transitions_to: [load_document] + + has_images: + type: normal + transitions_from: [load_document] + transitions_to: [has_images] + + download_directory_exist: + type: normal + transitions_from: [has_images] + transitions_to: [download_directory_exist] + + product_has_media_gallery: + type: normal + transitions_from: [download_directory_exist] + transitions_to: [product_has_media_gallery] + + create_media_gallery: + type: normal + transitions_from: [{status: product_has_media_gallery, result: false}] + transitions_to: [create_media_gallery] + + get_images: + type: normal + transitions_from: [{status: product_has_media_gallery, result: true}, create_media_gallery] + transitions_to: [get_images] + + process_images: + type: normal + transitions_from: [get_images, {status: has_more, result: true}] + transitions_to: [process_images] + + original_image_exist_as_copy: + type: normal + transitions_from: [process_images] + transitions_to: [original_image_exist_as_copy] + + hash_equals_original: + type: normal + transitions_from: [{status: original_image_exist_as_copy, result: true}] + transitions_to: [copy_equals_original] + + remove_existing: + type: normal + transitions_from: [{status: hash_equals_original, result: false}] + transitions_to: [is_new] + + download_original: + type: normal + transitions_from: [{status: original_image_exist_as_copy, result: false}, remove_existing] + transitions_to: [download_original] + + assign_image: + type: normal + transitions_from: [{status: hash_equals_original, result: true}, download_original] + transitions_to: [assign_image] + + has_more: + type: normal + transitions_from: [assign_image] + transitions_to: [has_more] + + finish: + type: final + transitions_from: [{status: has_more, result: false}] + transitions_to: [finish] \ No newline at end of file diff --git a/src/lib/Mothership/Magerun/Workflows/Example.php b/src/lib/Mothership/Magerun/Workflows/Example.php new file mode 100644 index 0000000..023e9f8 --- /dev/null +++ b/src/lib/Mothership/Magerun/Workflows/Example.php @@ -0,0 +1,149 @@ + + * @copyright 2016 Mothership GmbH + * + * @link http://www.mothership.de/ + * + * Use this job for a general purpose + * + */ +class Example extends WorkflowAbstract +{ + public function second_state() + { + } + + public function load_document() + { + } + + /** + * If there is no image, throw an exception. + * + * + * @throws \Exception + */ + public function has_images() + { + } + + /** + * If the download directory does not exist, then create it. + */ + public function download_directory_exist() + { + } + + /** + * Every product needs to have a media gallery. + * + * @return bool + */ + public function product_has_media_gallery() + { + return (rand(0, 1) == 1) ? true : false; + } + + /** + * Create the media gallery. + */ + public function create_media_gallery() + { + } + + /** + * Get all images and set the pointer to the first item. + */ + public function get_images() + { + //$this->_collection = end($this->_images->parse($this->_document)); + for ($i = 0; $i <= 100; ++$i) { + $this->_collection[] = ['test']; + } + $this->_pointer = 0; + } + + /** + * Set the pointer to the current image. + */ + public function process_images() + { + } + + /** + * Check that the current image exist as a copy. + * + * @return bool + */ + public function original_image_exist_as_copy() + { + return (rand(0, 1) == 1) ? true : false; + } + + /** + * The image also needs to have the same checksum and the original one. + * + * @return bool + * + * @throws \Exception + */ + public function hash_equals_original() + { + return (rand(0, 1) == 1) ? true : false; + } + + /** + * Remove existing images. + */ + public function remove_existing() + { + } + + /** + * Download from the Intex FTP. + * + * + * @throws \Exception + */ + public function download_original() + { + } + + public function assign_image_straight() + { + } + + public function assign_image() + { + } + + public function has_more() + { + if ($this->_pointer + 1 == count($this->_collection)) { + return false; + } + ++$this->_pointer; + + return true; + } + + public function finish() + { + } +} diff --git a/tests/Mothership/Magerun/Base/Command/Workflow/ListCommandTest.php b/tests/Mothership/Magerun/Base/Command/Workflow/ListCommandTest.php new file mode 100644 index 0000000..c5523e7 --- /dev/null +++ b/tests/Mothership/Magerun/Base/Command/Workflow/ListCommandTest.php @@ -0,0 +1,37 @@ + + * @copyright 2016 Mothership GmbH + * + * @link http://www.mothership.de/ + */ +class ListCommandTest extends TestCase +{ + public function testExecute() + { + $this->markTestSkipped('Interactive'); + $application = $this->getApplication(); + $application->add(new ListCommand()); + $command = $this->getApplication()->find('mothership:base:workflow:run'); + + $commandTester = new CommandTester($command); + $commandTester->execute(['command' => $command->getName(), 'config' => 'Demo.yaml']); + + $this->assertContains('Cache config cleaned', $commandTester->getDisplay()); + } +} diff --git a/tests/Mothership/Magerun/Base/Command/Workflow/RunCommandTest.php b/tests/Mothership/Magerun/Base/Command/Workflow/RunCommandTest.php new file mode 100644 index 0000000..e502838 --- /dev/null +++ b/tests/Mothership/Magerun/Base/Command/Workflow/RunCommandTest.php @@ -0,0 +1,36 @@ + + * @copyright 2016 Mothership GmbH + * + * @link http://www.mothership.de/ + */ +class RunCommandTest extends TestCase +{ + public function testExecute() + { + $application = $this->getApplication(); + $application->add(new ListCommand()); + $command = $this->getApplication()->find('mothership:base:workflow:run'); + + $commandTester = new CommandTester($command); + $commandTester->execute(['command' => $command->getName(), '--config' => 'Example.yaml']); + + $this->assertContains('Option "Example.yaml" set', $commandTester->getDisplay()); + } +} From bba7132efee4c33dd02248e737e7e7c2e51d9588 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 18:52:16 +0100 Subject: [PATCH 38/41] matched a command so that it is now compatible with the interface --- .../src/Mothership/Magerun/Base/Command/Workflow/RunCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/n98-magerun/modules/mothership_addons/src/Mothership/Magerun/Base/Command/Workflow/RunCommand.php b/src/lib/n98-magerun/modules/mothership_addons/src/Mothership/Magerun/Base/Command/Workflow/RunCommand.php index 7dd79ce..9ce6783 100644 --- a/src/lib/n98-magerun/modules/mothership_addons/src/Mothership/Magerun/Base/Command/Workflow/RunCommand.php +++ b/src/lib/n98-magerun/modules/mothership_addons/src/Mothership/Magerun/Base/Command/Workflow/RunCommand.php @@ -136,7 +136,7 @@ protected function configure() * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output */ - protected function interact($input, $output) + protected function interact(InputInterface $input, OutputInterface $output) { if ($input->hasOption('interactive') && $input->getOption('interactive')) { From 72c0d245c337a20eda4562cc544cd8c5ccbe8915 Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Tue, 1 Mar 2016 19:06:46 +0100 Subject: [PATCH 39/41] Added some scripts for local environments --- _deploy/deploy_local.sh | 97 +++++++++++++++++++++++++++++++++++++++++ _deploy/reload.sh | 23 ++++++++++ 2 files changed, 120 insertions(+) create mode 100644 _deploy/deploy_local.sh create mode 100644 _deploy/reload.sh diff --git a/_deploy/deploy_local.sh b/_deploy/deploy_local.sh new file mode 100644 index 0000000..cbf1360 --- /dev/null +++ b/_deploy/deploy_local.sh @@ -0,0 +1,97 @@ +#!/bin/bash +set -e +set -x + +function cleanup { + if [ -z $SKIP_CLEANUP ]; then + echo "Removing build directory ${BUILDENV}" + #rm -rf "${BUILDENV}" + fi +} + +trap cleanup EXIT + +BUILDENV="/srv/extension.vm"; + +MAGENTO_DB_HOST="127.0.0.1"; +MAGENTO_DB_PORT="3306"; +MAGENTO_DB_USER="super"; +MAGENTO_DB_PASS="super123"; +MAGENTO_DB_NAME="extension"; +MAGENTO_DB_ALLOWSAME="0"; + +CWD=$(pwd) + + +# Use the local mothership patched one +MAGENTO_VERSION=magento-mirror-1.8.1.0 + +# +if [ -d "${BUILDENV}/htdocs" ] ; then + rm -rf ${BUILDENV}/htdocs +fi + +mkdir -p ${BUILDENV}/htdocs + + +echo "Using build directory ${BUILDENV}" + + + +if [ -d "${BUILDENV}/.modman/extension" ] ; then + rm -rf "${BUILDENV}/.modman/extension" +fi + +mkdir -p ${BUILDENV}/.modman/extension + +cp -rf . "${BUILDENV}/.modman/extension" + +# Start building everything +cp -f ${CWD}/composer.json ${BUILDENV} +cp -f ${CWD}/_deploy/.basedir ${BUILDENV}/.modman + +# Get absolute path to main directory +ABSPATH=$(cd "${0%/*}" 2>/dev/null; echo "${PWD}/${0##*/}") +SOURCE_DIR=`dirname "${ABSPATH}"` + +echo ${SOURCE_DIR} + +echo +echo "-------------------------------" +echo "- Mothership local deployment -" +echo "-------------------------------" +echo + +cd /tmp + +mysql -u${MAGENTO_DB_USER} -p${MAGENTO_DB_PASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}\`; CREATE DATABASE \`${MAGENTO_DB_NAME}\`;" + +# Install Magento with sample data +magerun install \ + --dbHost="${MAGENTO_DB_HOST}" --dbUser="${MAGENTO_DB_USER}" --dbPass="${MAGENTO_DB_PASS}" --dbName="${MAGENTO_DB_NAME}" --dbPort="${MAGENTO_DB_PORT}" \ + --installSampleData=yes \ + --useDefaultConfigParams=yes \ + --magentoVersionByName="${MAGENTO_VERSION}" \ + --installationFolder="${BUILDENV}/htdocs" \ + --baseUrl="http://extension.vm/" || { echo "Installing Magento failed"; exit 1; } + + +cd ${BUILDENV} + +php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php +php composer-setup.php + +php composer.phar install +modman deploy-all --force + +# After running composer, we will have all the files needed. Now +#cp ${CWD}/phpunit.xml.dist "${BUILDENV}/htdocs/phpunit.xml.dist" + +magerun cache:clean +magerun sys:module:list |grep Mothership + +export N98_MAGERUN_TEST_MAGENTO_ROOT=${BUILDENV}/htdocs + +cd ${BUILDENV}/htdocs +phpunit --group Mothership --debug --verbose + diff --git a/_deploy/reload.sh b/_deploy/reload.sh new file mode 100644 index 0000000..e11b1ba --- /dev/null +++ b/_deploy/reload.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e +set -x + + +BUILDENV="/srv/extension.vm"; + +cp -f composer.json ${BUILDENV} +cp -f _deploy/.basedir ${BUILDENV}/.modman + +if [ -d "${BUILDENV}/.modman/extension" ] ; then + rm -rf "${BUILDENV}/.modman/extension" +fi + +cp -rf . "${BUILDENV}/.modman/extension" + +cd ${BUILDENV} +php composer.phar install +modman deploy-all --force + +magerun cache:clean +magerun sys:module:list |grep Mothership +export N98_MAGERUN_TEST_MAGENTO_ROOT=${BUILDENV}/htdocs \ No newline at end of file From c5d7d7102e4f43fa2eb9abeb725156eaaf26e90a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Maximilian=20Mu=CC=88ller?= Date: Wed, 2 Mar 2016 15:54:31 +0100 Subject: [PATCH 40/41] correct module name --- src/app/code/local/Mothership/Addons/etc/system.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/code/local/Mothership/Addons/etc/system.xml b/src/app/code/local/Mothership/Addons/etc/system.xml index 9b0678a..5b62b7d 100644 --- a/src/app/code/local/Mothership/Addons/etc/system.xml +++ b/src/app/code/local/Mothership/Addons/etc/system.xml @@ -1,14 +1,14 @@ - + 100 - + mothership 10 From 32f08ead4acf807ac7f2c54d1f925ca2f4edbdcf Mon Sep 17 00:00:00 2001 From: Don Bosco van Hoi Date: Wed, 2 Mar 2016 16:57:08 +0100 Subject: [PATCH 41/41] changed some configuration keys --- .travis.yml | 4 ++-- readme.md | 10 +++++++++- .../Magerun/Base/Command/Workflow/RunCommand.php | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 836d1e9..c907740 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ language: php php: - 5.4 -# - 5.5 + - 5.5 # - 5.6 -# - 7.0 + - 7.0 ## Update composer and run the appropriate composer command before_script: diff --git a/readme.md b/readme.md index 4719d17..d5f3936 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,14 @@ #Mothership Magerun Addons -![](https://travis-ci.org/mothership-gmbh/magerun_mothership.svg?branch=develop) +![](https://travis-ci.org/mothership-gmbh/magerun_mothership.svg) + + +[![Dependency Status](https://www.versioneye.com/user/projects/56d70789d71695003e63118a/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56d70789d71695003e63118a) +[![Latest Stable Version](https://poser.pugx.org/mothership/mothership_magerun/v/stable)](https://packagist.org/packages/mothership/mothership_magerun) +[![Total Downloads](https://poser.pugx.org/mothership/mothership_magerun/downloads)](https://packagist.org/packages/mothership/mothership_magerun) +[![Latest Unstable Version](https://poser.pugx.org/mothership/mothership_magerun/v/unstable)](https://packagist.org/packages/mothership/mothership_magerun) +[![License](https://poser.pugx.org/mothership/mothership_magerun/license)](https://packagist.org/packages/mothership/mothership_magerun) + ========================= This repository contains a list of extensions, which might be useful for your development workflow. diff --git a/src/lib/n98-magerun/modules/mothership_addons/src/Mothership/Magerun/Base/Command/Workflow/RunCommand.php b/src/lib/n98-magerun/modules/mothership_addons/src/Mothership/Magerun/Base/Command/Workflow/RunCommand.php index 9ce6783..5d63d30 100644 --- a/src/lib/n98-magerun/modules/mothership_addons/src/Mothership/Magerun/Base/Command/Workflow/RunCommand.php +++ b/src/lib/n98-magerun/modules/mothership_addons/src/Mothership/Magerun/Base/Command/Workflow/RunCommand.php @@ -204,8 +204,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $this->printCommand($args, $output); // TODO: Check if queue is enabled - \Resque::setBackend(\Mage::getStoreConfig('mothership_intex/queue/host')); - \Resque::enqueue(\Mage::getStoreConfig('mothership_intex/queue/name'), '\Mothership\Magerun\Queue\Jobs\General', $args, true); + \Resque::setBackend(\Mage::getStoreConfig('mothership_magerun/queue/host')); + \Resque::enqueue(\Mage::getStoreConfig('mothership_magerun/queue/name'), '\Mothership\Magerun\Queue\Jobs\General', $args, true); } else { $stateMachine = new \Mothership\StateMachine\StateMachine($input_path . '/' . $filename); $stateMachine->run($this->getArguments($input, $output));