%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/gem.pyo

�
���^c
@@s�dZddlmZmZmZddlZddlZddlZej	e
�Zd�Zddddeeeddd�	Zdddd�Zddd�Zddd�ZdS(	u�
Installation of Ruby modules packaged as gems
=============================================

A state module to manage rubygems. Gems can be set up to be installed
or removed. This module will use RVM or rbenv if they are installed. In that case,
you can specify what ruby version and gemset to target.

.. code-block:: yaml

    addressable:
      gem.installed:
        - user: rvm
        - ruby: jruby@jgemset
i(tabsolute_importtunicode_literalstprint_functionNcC@s
dtkS(u:
    Only load if gem module is available in __salt__
    ugem.list(t__salt__(((s3/usr/lib/python2.7/site-packages/salt/states/gem.pyt__virtual__sc
C@s6i|d6dd6dd6id6}
|dk	retdd|�pQtdd|�retjd	�ntd
||d|d|�}||krb|dk	rbtjd|�}|r1|j�}
tjd
d||d�j�}tj|
d|�j�}t	j
j||
|�r_t|
d<d|
d<|
Sq�t
|�||kr�t|
d<d|
d<|
Sn0||kr�|dkr�t|
d<d|
d<|
Stdr�dj|�|
d<|
Std|d|d|d|d|d|d|d|d|d|	�	rt|
d<d|
d|<d|
d<nt|
d<d|
d<|
S(u_
    Make sure that a gem is installed.

    name
        The name of the gem to install

    ruby: None
        Only for RVM or rbenv installations: the ruby version and gemset to
        target.

    gem_bin: None
        Custom ``gem`` command to run instead of the default.
        Use this to install gems to a non-default ruby install. If you are
        using rvm or rbenv use the ruby argument instead.

    user: None
        The user under which to run the ``gem`` command

        .. versionadded:: 0.17.0

    version : None
        Specify the version to install for the gem.
        Doesn't play nice with multiple gems at once

    rdoc : False
        Generate RDoc documentation for the gem(s).

    ri : False
        Generate RI documentation for the gem(s).

    pre_releases : False
        Install pre-release version of gem(s) if available.

    proxy : None
        Use the specified HTTP proxy server for all outgoing traffic.
        Format: http://hostname[:port]

    source : None
        Use the specified HTTP gem source server to download gem.
        Format: http://hostname[:port]
    unameuresultuucommentuchangesurvm.is_installedtrunasurbenv.is_installeduAUse of argument ruby found, but neither rvm or rbenv is installedugem.listtgem_binu(>=|>|<|<=)u	default: iu)Installed Gem meets version requirements.uGem is already installed.utestu%The gem {0} would have been installedugem.installtrubytversiontrdoctritpre_releasestproxytsourceu	InstalleduGem was successfully installeduCould not install gem.N(tNoneRtlogtwarningtretmatchtgrouptsubtstriptsalttutilstcompare_versionstTruetstrt__opts__tformattFalse(tnameRRtuserRR	R
RRR
trettgemsRtcmprtinstalled_versiontdesired_version((s3/usr/lib/python2.7/site-packages/salt/states/gem.pyt	installed!sX3"3
#	







	



cC@s�i|d6dd6dd6id6}|td||d|d|�kr_t|d<d	|d<|Std
r�dj|�|d<|Std||d|d|�r�t|d<d
|d|<d|d<nt|d<d|d<|S(u�
    Make sure that a gem is not installed.

    name
        The name of the gem to uninstall

    gem_bin : None
        Full path to ``gem`` binary to use.

    ruby : None
        If RVM or rbenv are installed, the ruby version and gemset to use.
        Ignored if ``gem_bin`` is specified.

    user: None
        The user under which to run the ``gem`` command

        .. versionadded:: 0.17.0
    unameuresultuucommentuchangesugem.listRRuGem is not installed.utestu#The gem {0} would have been removedu
gem.uninstalluRemoveduGem was successfully removed.uCould not remove gem.N(RRRRRR(RRRRR ((s3/usr/lib/python2.7/site-packages/salt/states/gem.pytremoved�s"%






cC@s�i|d6dd6dd6id6}|td|d|�krVt|d<d|d<|Std	rwd
j|�|d<|Stdd|d
|d|�r�t|d<d|d|<d|d<nt|d<d|d<|S(u0
    Make sure that a gem source is added.

    name
        The URL of the gem source to be added

    ruby: None
        For RVM or rbenv installations: the ruby version and gemset to target.

    user: None
        The user under which to run the ``gem`` command

        .. versionadded:: 0.17.0
    unameuresultuucommentuchangesugem.sources_listRuGem source is already added.utestu)The gem source {0} would have been added.ugem.sources_addt
source_uriRu	Installedu"Gem source was successfully added.uCould not add gem source.N(RRRRRR(RRRR ((s3/usr/lib/python2.7/site-packages/salt/states/gem.pytsources_add�s"






cC@s�i|d6dd6dd6id6}|td|d|�krVt|d<d|d<|Std	rnd
|d<|Stdd|d
|d|�r�t|d<d|d|<d|d<nt|d<d|d<|S(u4
    Make sure that a gem source is removed.

    name
        The URL of the gem source to be removed

    ruby: None
        For RVM or rbenv installations: the ruby version and gemset to target.

    user: None
        The user under which to run the ``gem`` command

        .. versionadded:: 0.17.0
    unameuresultuucommentuchangesugem.sources_listRuGem source is already removed.utestu'The gem source would have been removed.ugem.sources_removeR'RuRemovedu$Gem source was successfully removed.uCould not remove gem source.N(RRRRR(RRRR ((s3/usr/lib/python2.7/site-packages/salt/states/gem.pytsources_remove�s"







(t__doc__t
__future__RRRt
salt.utilsRRtloggingt	getLoggert__name__RRRRR%R&R(R)(((s3/usr/lib/python2.7/site-packages/salt/states/gem.pyt<module>s$	c'"

Zerion Mini Shell 1.0