2017 © Pedro Peláez
 

magento-module mothership_magerun

Mothership Magerun Extensions for Magento

image

mothership/mothership_magerun

Mothership Magerun Extensions for Magento

  • Tuesday, September 12, 2017
  • by Mothership
  • Repository
  • 4 Watchers
  • 4 Stars
  • 339 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 6 Open issues
  • 50 Versions
  • 1 % Grown

The README.md

Mothership Magerun Addons

, (*1)

Dependency Status Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

========================= This repository contains a list of extensions, which might be useful for your development workflow., (*3)

Command Description Requirements
mothership:base:environment:dump
mothership:base:environment:import
mothership:base:feed:export mothership/feed_export
mothership:base:fixtures:product Creates a yaml fixture file for ecomDev PHPunit test
mothership:base:images:clean Remove unused images from the catalog/product directory
mothership:base:images:dummy For each missing image, create a dummy file Create a dummy file
mothership:base:images:missing Identify missing images
mothership:base:images:resize Resize images
mothership:base:reports:observerstimes
mothership:base:workflow:list mothership/state_machine
mothership:base:workflow:render mothership/state_machine, graphviz
mothership:base:workflow:run Runs a state machine defined by a workflow mothership/state_machine

Installation

There are currently three different ways to include the magerun-components. I will describe every method. Please check the offical documentation for further questions. The preferred method imho should be the composer way., (*4)

Method 1 - the easiest one

This method needs you to have a home folder where all the custom modules will be located., (*5)

  • Execute the following snippet
mkdir -p ~/.n98-magerun/modules/
  • Clone the repository or symlink it. I prefer the symlink way as all my repositories are checked out in one place but this is up to you. The following example will clone the directory directly.
cd ~/.n98-magerun/modules/
git clone https://github.com/mothership-gmbh/magerun_mothership.git

Method 2 - still easy, but more environment specific

While there is one way to centralize all your modules i prefer to have environment specific modules., (*6)

  • To achieve this, you just need to create a folder within your Magento project folder.
// replace MAGENTO_ROOT with your directory
mkdir -p MAGENTO_ROOT/lib/n98-magerun/modules

The next step is the same like before. Just clone and/or symlink the repository., (*7)

cd MAGENTO_ROOT/lib/n98-magerun/modules
git clone https://github.com/mothership-gmbh/magerun_mothership.git

Method 3 - composer.json

just add this require to your composer.json. Please check the latest tagged version by yourself., (*8)

"require": 
{
    "mothership/mothership_magerun":"<latest_tagged_version>"
}

Commands

mothership:environment:dump

Dump all settings from the table core_config_data matching a given regular expression. Depends on a configuration file., (*9)

mothership:env:dump --

read more ..., (*10)

mothership:environment:import

Import the configuration settings by overwriting the existing configurations. There is one example file settings.example.php. Just copy the file as settings.php and customize the settings for your needs., (*11)

  • File Structure, (*12)

    You need to have some files in the directory Mothership\Environment\resource. They should be named like environment_anyname. If there is more then one file, name it like your environments. Please define one file as a fallback., (*13)

read more ..., (*14)

mothership:images:create-dummy

This command will create an image file for each entry in the table catalog_product_entity_media_gallery. Just ensure, that you have one file called dummy.jpg in your media directory. This can be useful if you have to deal with large product data but do not want to download a gigazillion large directory., (*15)

For more fun, use the official Mothership Image., (*16)

Logo, (*17)

mothership:images:resize

Handy command, to minify the base-images. This will create a new directory named after the --dir parameter and create a smaller version of all existing images. Please be aware that in case you have a new image file with the same name, this command will not recognize that. In this case remove the existing file from the resized image directory and rerun the command, (*18)

magerun typehype:images:resize --dir=thumbnails --size=100, (*19)

mothership:reports:observerstimes

This is a magerun command to create a csv reports to find all the events and relative observers called for each Magento page called in the browser during navigation., (*20)

More doc, (*21)

magerun mothership:reports:observerstimes

mothership:workflow:render

Super fancy graph generator! Instead of running our state machines, you can also render them for easier debugging., (*22)

The graph creation depends on graphviz, so ensure that you have installed it first, so that you can run the dot command. Use apt-get install graphviz in debian environments., (*23)

magerun mothership:workflow:render --config=Demo.yaml

The created graph will look like this one. Check the source file, (*24)

Logo, (*25)

And yes, you can run this workflow exactly like displayed in the graph. Check the next command., (*26)

mothership:workflow:run

Run a workflow from the directory <root>/app/etc/mothership/workflows. This feature is very powerful and is being used in a lot of scenarios with a lot of complexity. It basically depends on Mothership State Machine and is a helper to run a finite state machine in a Magento environment., (*27)

magerun mothership:workflow:run --config=yourworkflow.yaml
magerun mothership:workflow:run --config=yourworkflow.yaml --help
magerun mothership:workflow:run --config=yourworkflow.yaml --interactive
magerun mothership:workflow:run --config=yourworkflow.yaml --queue

In additition to the plain PHP state machine implementation, this command has the following features:, (*28)

  • Parses a new node in the workflow definition file.
  • Interactive mode: Each option can be set with a dialog.
  • Queue: Use the queue php-resque to run workflows in the background.

More doc, (*29)

The Versions

14/09 2016
02/03 2016

v1.0.13

1.0.13.0 https://www.mothership.de

Mothership Magerun Extensions for Magento

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Don Bosco van Hoi

26/02 2016

dev-#9_fix_observerstimes_for_magento1.9.2.3

dev-#9_fix_observerstimes_for_magento1.9.2.3 https://www.mothership.de

Mothership Admin Panel for Magento

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Don Bosco van Hoi

25/02 2016

dev-#7_set_travis

dev-#7_set_travis https://www.mothership.de

Mothership Admin Panel for Magento

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Don Bosco van Hoi

23/02 2016
22/02 2016
22/02 2016
19/02 2016
18/02 2016
17/02 2016
17/02 2016
17/02 2016
16/02 2016
16/02 2016
16/02 2016
15/02 2016
15/02 2016
20/01 2016

dev-#6_tracking_methods_arguments

dev-#6_tracking_methods_arguments https://www.mothership.de

Mothership Admin Panel for Magento

  Sources   Download

GPL-3.0

The Requires

 

by Don Bosco van Hoi