Sha256: 78e4d48f0ab53fecfffa14537de19c9d5f4dfba445444a86ab3ae1b224887f51

Contents?: true

Size: 909 Bytes

Versions: 13

Compression:

Stored size: 909 Bytes

Contents

module Sprinkle
  	module Installers
      # = Pear package installed
      #
      # Installs the specified pear package
      # 
      # == Example Usage
      #
      #   package :php_stuff do
      #     pear 'PHP_Compat'
      #     verify { has_pear 'PHP_Compat' }
      #   end
  		class Pear < Installer
  			attr_accessor :package_name
        
        api do
          def pear(package, &block)
            install Pear.new(self, package, &block)
          end
        end
        
        verify_api do
          def has_pear(package)
            @commands << "pear list | grep \"#{package}\" | grep \"stable\""
          end
        end

  			def initialize(parent, package_name, &block) #:nodoc:
  				super parent, &block
  				@package_name = package_name
  			end

  			protected
  				def install_commands #:nodoc:
  					"pear install --alldeps #{@package_name}"
  				end

  		end
	end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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