Permalink
Browse files

* Add PHPCpd package

* Fix pear package version checking
  • Loading branch information...
1 parent 67505c8 commit a287e39dce9238bab34c94624ca5381103461152 root committed Oct 12, 2011
Showing with 15 additions and 2 deletions.
  1. +1 −0 manifests/role/ci.pp
  2. +6 −2 modules/php/lib/puppet/provider/package/pear.rb
  3. +8 −0 modules/php/manifests/pear/phpcpd.pp
View
@@ -5,6 +5,7 @@
include php
include php::pear::phpunit
include php::pear::phing
+ include php::pear::phpcpd
include php::pear::php_codesniffer_standards_kohana
include php::pecl::xdebug
@@ -101,8 +101,12 @@ def install(useversion = true)
def latest
# This always gets the latest version available.
version = ''
- command = [command(:pearcmd), "remote-info", @resource[:name]]
- list = execute(command).collect do |set|
+ if (@resource[:source])
+ command = [command(:pearcmd), "remote-info", "#{@resource[:source]}/#{@resource[:name]}"]
+ else
+ command = [command(:pearcmd), "remote-info", @resource[:name]]
+ end
+ list = execute(command).collect do |set|
if set =~ /^Latest/
version = set.split[1]
end
@@ -0,0 +1,8 @@
+class php::pear::phpcpd {
+ package {
+ "phpcpd":
+ provider => "pear",
+ source => "phpunit",
+ ensure => "1.3.2";
+ }
+}

0 comments on commit a287e39

Please sign in to comment.