Sha256: da31833ed310beab385e8a352a5502812db5acd78d5f6e40d23adab191e850fc

Contents?: true

Size: 822 Bytes

Versions: 4

Compression:

Stored size: 822 Bytes

Contents

module Sprinkle
  module Installers
    # The Yum package installer installs RPM packages.
    # 
    # == Example Usage
    #
    # Installing the magic_beans RPM via Yum. Its all the craze these days.
    #
    #   package :magic_beans do
    #     yum 'magic_beans'
    #     verify { has_yum 'magic_beans' }
    #   end
    #
    # You may also specify multiple rpms as arguments or an array:
    #
    #   package :magic_beans do
    #     yum "magic_beans", "magic_sauce"
    #   end
    class Yum < PackageInstaller

      auto_api

      verify_api do
        def has_yum(package)
          @commands << "yum list installed #{package} | grep ^#{package}"
        end
      end

      protected

        def install_commands #:nodoc:
          "yum install #{@packages.join(' ')} -y"
        end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sprinkle-0.5.1.1 lib/sprinkle/installers/yum.rb
sprinkle-0.5.1 lib/sprinkle/installers/yum.rb
sprinkle-0.5.0 lib/sprinkle/installers/yum.rb
sprinkle-0.5.0.rc1 lib/sprinkle/installers/yum.rb