%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/states/ |
Current File : //lib/python2.7/site-packages/salt/states/gem.pyc |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z e j e � Z d � Z d d d d e e e d d d � Z d d d d � Z d d d � Z d d d � Z d S( 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 ( t absolute_importt unicode_literalst print_functionNc C@ s d t k S( u: Only load if gem module is available in __salt__ u gem.list( t __salt__( ( ( s3 /usr/lib/python2.7/site-packages/salt/states/gem.pyt __virtual__ s c C@ s6 i | d 6d d 6d d 6i d 6} | d k re t d d | � pQ t d d | � re t j d � n t d | | d | d | �} | | k rb| d k rbt j d | � } | r1| j � } t j d d | | d � j � } t j | d | � j � } t j j | | | � r_t | d <d | d <| Sq�t | � | | k r�t | d <d | d <| Sn0 | | k r�| d k r�t | d <d | d <| St d r�d j | � | d <| St d | d | d | d | d | d | d | d | d | d | � rt | d <d | d | <d | d <n t | 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] u nameu resultu u commentu changesu rvm.is_installedt runasu rbenv.is_installeduA Use of argument ruby found, but neither rvm or rbenv is installedu gem.listt gem_binu (>=|>|<|<=)u default: i u) Installed Gem meets version requirements.u Gem is already installed.u testu% The gem {0} would have been installedu gem.installt rubyt versiont rdoct rit pre_releasest proxyt sourceu Installedu Gem was successfully installedu Could not install gem.N( t NoneR t logt warningt ret matcht groupt subt stript saltt utilst compare_versionst Truet strt __opts__t formatt False( t nameR R t userR R R R R R t rett gemsR t cmprt installed_versiont desired_version( ( s3 /usr/lib/python2.7/site-packages/salt/states/gem.pyt installed! sX 3"3 # c C@ s� i | d 6d d 6d d 6i d 6} | t d | | d | d | �k r_ t | d <d | d <| St d r� d j | � | d <| St d | | d | d | �r� t | d <d | d | <d | d <n t | 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 u nameu resultu u commentu changesu gem.listR R u Gem is not installed.u testu# The gem {0} would have been removedu gem.uninstallu Removedu Gem was successfully removed.u Could not remove gem.N( R R R R R R ( R R R R R ( ( s3 /usr/lib/python2.7/site-packages/salt/states/gem.pyt removed� s "% c C@ s� i | d 6d d 6d d 6i d 6} | t d | d | �k rV t | d <d | d <| St d rw d j | � | d <| St d d | d | d | � r� t | d <d | d | <d | d <n t | 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 u nameu resultu u commentu changesu gem.sources_listR u Gem source is already added.u testu) The gem source {0} would have been added.u gem.sources_addt source_uriR u Installedu"