Sha256: c34c594ab380e04b2a8642b3213db81b8c0563aa0bd14f2f5e28c6810173da00

Contents?: true

Size: 699 Bytes

Versions: 12

Compression:

Stored size: 699 Bytes

Contents

module Sprinkle
  module Installers
    # The Deb installer installs deb packages sourced from a remote URL
    # 
    # == Example Usage
    #
    # Installing the magic_beans deb.
    #
    #   package :magic_beans do
    #     deb 'http://debs.example.com/magic_beans.deb'
    #   end
    #
    class Deb < PackageInstaller
      
      auto_api

      protected

        def install_commands #:nodoc:
          [
					"wget -cq --directory-prefix=/tmp #{@packages.join(' ')}", 
					"dpkg -i #{@packages.collect{|p| "/tmp/#{package_name(p)}"}.join(" ")}"
					]
        end
        
      private
      
        def package_name(url)
          url.split('/').last
        end

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sprinkle-0.7.1.1 lib/sprinkle/installers/deb.rb
sprinkle-0.7.1 lib/sprinkle/installers/deb.rb
sprinkle-0.7 lib/sprinkle/installers/deb.rb
sprinkle-0.6.2 lib/sprinkle/installers/deb.rb
sprinkle-0.6.1.1 lib/sprinkle/installers/deb.rb
sprinkle-0.6.1 lib/sprinkle/installers/deb.rb
sprinkle-0.6.0 lib/sprinkle/installers/deb.rb
sprinkle-0.5.2 lib/sprinkle/installers/deb.rb
sprinkle-0.5.1.1 lib/sprinkle/installers/deb.rb
sprinkle-0.5.1 lib/sprinkle/installers/deb.rb
sprinkle-0.5.0 lib/sprinkle/installers/deb.rb
sprinkle-0.5.0.rc1 lib/sprinkle/installers/deb.rb