Sha256: 288188d82ebaa0fee25db8b167b6ccac2c4790bfbcbd9b559ef97fc18a717805

Contents?: true

Size: 854 Bytes

Versions: 48

Compression:

Stored size: 854 Bytes

Contents

module Sprinkle
  module Installers
    # = Yum Package Installer
    #
    # 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'
    #   end
    #
    # You may also specify multiple rpms as an array:
    #
    #   package :magic_beans do
    #     yum %w(magic_beans magic_sauce)
    #   end
    class Yum < Installer
      attr_accessor :packages #:nodoc:

      def initialize(parent, packages, &block) #:nodoc:
        super parent, &block
        packages = [packages] unless packages.is_a? Array
        @packages = packages
      end

      protected

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

    end
  end
end

Version data entries

48 entries across 48 versions & 10 rubygems

Version Path
crafterm-sprinkle-0.2.1 lib/sprinkle/installers/yum.rb
crafterm-sprinkle-0.2.2 lib/sprinkle/installers/yum.rb
crafterm-sprinkle-0.2.3 lib/sprinkle/installers/yum.rb
crafterm-sprinkle-0.2.4 lib/sprinkle/installers/yum.rb
crafterm-sprinkle-0.2.5 lib/sprinkle/installers/yum.rb
crafterm-sprinkle-0.2.6 lib/sprinkle/installers/yum.rb
jemmyw-sprinkle-0.2.3 lib/sprinkle/installers/yum.rb
jemmyw-sprinkle-0.2.4 lib/sprinkle/installers/yum.rb
justsee-sprinkle-0.2.4 lib/sprinkle/installers/yum.rb
lachlan-sprinkle-0.0.1 lib/sprinkle/installers/yum.rb
lachlan-sprinkle-0.0.10 lib/sprinkle/installers/yum.rb
lachlan-sprinkle-0.0.11 lib/sprinkle/installers/yum.rb
lachlan-sprinkle-0.0.13 lib/sprinkle/installers/yum.rb
lachlan-sprinkle-0.0.14 lib/sprinkle/installers/yum.rb
lachlan-sprinkle-0.0.15 lib/sprinkle/installers/yum.rb
lachlan-sprinkle-0.0.16 lib/sprinkle/installers/yum.rb
lachlan-sprinkle-0.0.2 lib/sprinkle/installers/yum.rb
lachlan-sprinkle-0.0.3 lib/sprinkle/installers/yum.rb
lachlan-sprinkle-0.0.4 lib/sprinkle/installers/yum.rb
lachlan-sprinkle-0.0.5 lib/sprinkle/installers/yum.rb