Sha256: cdd764c419e3caaceedb22703c1c850f42287e6b4909a29f0ff1b89f321b598b

Contents?: true

Size: 1.04 KB

Versions: 48

Compression:

Stored size: 1.04 KB

Contents

module Sprinkle
  module Installers
    # = OpenSolaris Package Installer
    #
    # The Pkg package installer installs OpenSolaris packages.
    # 
    # == Example Usage
    #
    # Installing the magic_beans package.
    #
    #   package :magic_beans do
    #     opensolaris_pkg 'magic_beans'
    #   end
    #
    # You may also specify multiple packages as an array:
    #
    #   package :magic_beans do
    #     opensolaris_pkg %w(magic_beans magic_sauce)
    #   end
    #
    # == Note
    # If you are using capistrano as the deployment method
    # you will need to add the following lines to your deploy.rb
    # set :sudo, 'pfexec'
    # set :sudo_prompt, ''
    class OpensolarisPkg < 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:
          "pkg install #{@packages.join(' ')}"
        end

    end
  end
end

Version data entries

48 entries across 48 versions & 10 rubygems

Version Path
lachlan-sprinkle-0.0.6 lib/sprinkle/installers/opensolaris_pkg.rb
lachlan-sprinkle-0.0.7 lib/sprinkle/installers/opensolaris_pkg.rb
lachlan-sprinkle-0.0.8 lib/sprinkle/installers/opensolaris_pkg.rb
lachlan-sprinkle-0.0.9 lib/sprinkle/installers/opensolaris_pkg.rb
mdwan-sprinkle-0.2.2 lib/sprinkle/installers/opensolaris_pkg.rb
mdwan-sprinkle-0.2.3 lib/sprinkle/installers/opensolaris_pkg.rb
trevorturk-sprinkle-0.2.2 lib/sprinkle/installers/opensolaris_pkg.rb
trevorturk-sprinkle-0.2.6 lib/sprinkle/installers/opensolaris_pkg.rb
sprinkle-0.4.2 lib/sprinkle/installers/opensolaris_pkg.rb
sprinkle-0.4.1 lib/sprinkle/installers/opensolaris_pkg.rb
sprinkle-0.4.0 lib/sprinkle/installers/opensolaris_pkg.rb
sprinkle-0.3.6 lib/sprinkle/installers/opensolaris_pkg.rb
sprinkle-0.3.5 lib/sprinkle/installers/opensolaris_pkg.rb
dhill-sprinkle-0.3.3.1 lib/sprinkle/installers/opensolaris_pkg.rb
sprinkle-0.3.4 lib/sprinkle/installers/opensolaris_pkg.rb
sprinkle-0.3.3 lib/sprinkle/installers/opensolaris_pkg.rb
sprinkle-0.3.2 lib/sprinkle/installers/opensolaris_pkg.rb
powcloud-sprinkle-0.3.4 lib/sprinkle/installers/opensolaris_pkg.rb
powcloud-sprinkle-0.3.0 lib/sprinkle/installers/opensolaris_pkg.rb
sprinkle-0.3.1 lib/sprinkle/installers/opensolaris_pkg.rb