%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/states/composer.pyc

�
���^c@@s�dZddlmZmZmZddlmZd�Zddddddddde	de
dd�
Zddddddddde	ddd�ZdS(	u
Installation of Composer Packages
=================================

These states manage the installed packages for composer for PHP. Note that
either composer is installed and accessible via a bin directory or you can pass
the location of composer in the state.

.. code-block:: yaml

    get-composer:
      cmd.run:
        - name: 'CURL=`which curl`; $CURL -sS https://getcomposer.org/installer | php'
        - unless: test -f /usr/local/bin/composer
        - cwd: /root/

    install-composer:
      cmd.wait:
        - name: mv /root/composer.phar /usr/local/bin/composer
        - cwd: /root/
        - watch:
          - cmd: get-composer

    /path/to/project:
      composer.installed:
        - no_dev: true
        - require:
          - cmd: install-composer


    # Without composer installed in your PATH
    # Note: composer.phar must be executable for state to work properly
    /path/to/project:
      composer.installed:
        - composer: /path/to/composer.phar
        - php: /usr/local/bin/php
        - no_dev: true
i(tabsolute_importtprint_functiontunicode_literals(t
SaltExceptioncC@s
dtkS(uC
    Only load if the composer module is available in __salt__
    ucomposer.install(t__salt__(((s8/usr/lib/python2.7/site-packages/salt/states/composer.pyt__virtual__.su/rootcC@s�i|d6d!d6dd6id6}td|�}|tkr\|r\t|d<d|d<|Stdtkr�|tkr�d}nd	}d
j|�|d<idj||�d6d
j|�d6|d<d!|d<|Sy\td|d|d|d|d|d|d|d|d|d|	d|
d|d|
�}Wn4tk
rg}t|d<dj||�|d<|SXt|d<|
tkr�d|d<n*d|d<i|dd6|d d 6|d<|S("u�
    Verify that the correct versions of composer dependencies are present.

    name
        Directory location of the ``composer.json`` file.

    composer
        Location of the ``composer.phar`` file. If not set composer will
        just execute ``composer`` as if it is installed globally.
        (i.e. ``/path/to/composer.phar``)

    php
        Location of the php executable to use with composer.
        (i.e. ``/usr/bin/php``)

    user
        Which system user to run composer as.

        .. versionadded:: 2014.1.4

    prefer_source
        ``--prefer-source`` option of composer.

    prefer_dist
        ``--prefer-dist`` option of composer.

    no_scripts
        ``--no-scripts`` option of composer.

    no_plugins
        ``--no-plugins`` option of composer.

    optimize
        ``--optimize-autoloader`` option of composer. Recommended for production.

    no_dev
        ``--no-dev`` option for composer. Recommended for production.

    quiet
        ``--quiet`` option for composer. Whether or not to return output from composer.

    composer_home
        ``$COMPOSER_HOME`` environment variable

    always_check
        If ``True``, *always* run ``composer install`` in the directory.  This is the
        default behavior.  If ``False``, only run ``composer install`` if there is no
        vendor directory present.

    env
        A list of environment variables to be set prior to execution.
    unameuresultuucommentuchangesucomposer.did_composer_installu)Composer already installed this directoryutestunot u#The state of "{0}" will be changed.u'composer install has {0}been run in {1}uoldu#composer install will be run in {0}unewucomposer.installtcomposertphptrunast
prefer_sourcetprefer_distt
no_scriptst
no_pluginstoptimizetno_devtquiett
composer_hometenvu&Error executing composer in '{0}': {1}uFComposer install completed successfully, output silenced by quiet flagu'Composer install completed successfullyustderrustdoutN(tNoneRtFalsetTruet__opts__tformatR(tnameRRtuserR	R
RRR
RRRtalways_checkRtrettdid_installtinstall_statustcallterr((s8/usr/lib/python2.7/site-packages/salt/states/composer.pyt	installed5sVB"

	





c
C@s�i|d6d d6dd6id6}
td|�}|rJdj|�}ndj|�}td	tkr�d
j|�|
d<i|d6dj|�d
6|
d<d |
d<|
Sy\td|d|d|d|d|d|d|d|d|d|	d|
d|d|�}Wn4tk
r=}t|
d<dj||�|
d<|
SXt|
d<|
tkrad|
d<n*d|
d<i|dd6|dd6|
d<|
S(!u�
    Composer update the directory to ensure we have the latest versions
    of all project dependencies.

    name
        Directory location of the ``composer.json`` file.

    composer
        Location of the ``composer.phar`` file. If not set composer will
        just execute ``composer`` as if it is installed globally.
        (i.e. /path/to/composer.phar)

    php
        Location of the php executable to use with composer.
        (i.e. ``/usr/bin/php``)

    user
        Which system user to run composer as.

        .. versionadded:: 2014.1.4

    prefer_source
        ``--prefer-source`` option of composer.

    prefer_dist
        ``--prefer-dist`` option of composer.

    no_scripts
        ``--no-scripts`` option of composer.

    no_plugins
        ``--no-plugins`` option of composer.

    optimize
        ``--optimize-autoloader`` option of composer. Recommended for production.

    no_dev
        ``--no-dev`` option for composer. Recommended for production.

    quiet
        ``--quiet`` option for composer. Whether or not to return output from composer.

    composer_home
        ``$COMPOSER_HOME`` environment variable

    env
        A list of environment variables to be set prior to execution.
    unameuresultuucommentuchangesucomposer.did_composer_installu,composer install has not yet been run in {0}u$composer install has been run in {0}utestu#The state of "{0}" will be changed.uoldu*composer install/update will be run in {0}unewucomposer.updateRRRR	R
RRR
RRRRu&Error executing composer in '{0}': {1}uEComposer update completed successfully, output silenced by quiet flagu&Composer update completed successfullyustderrustdoutN(RRRRRRR(RRRRR	R
RRR
RRRRRtis_installedt
old_statusRR((s8/usr/lib/python2.7/site-packages/salt/states/composer.pytupdate�sN="





N(
t__doc__t
__future__RRRtsalt.exceptionsRRRRRRR"(((s8/usr/lib/python2.7/site-packages/salt/states/composer.pyt<module>'s8	x

Zerion Mini Shell 1.0