Skip to content

Instantly share code, notes, and snippets.

@MrMaksimize
Created October 5, 2011 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrMaksimize/1264664 to your computer and use it in GitHub Desktop.
Save MrMaksimize/1264664 to your computer and use it in GitHub Desktop.
phpunit chef
# Author:: Mark Sonnabaum <mark.sonnabaum@acquia.com>
# Modifying Author:: Maksim Pecherskiy <max@allplayers.com>
# Recipe:: phpunit
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Install Drupal dev tools.
require_recipe "apt"
require_recipe "build-essential"
include_recipe "php"
execute "upgrade pear" do
command "pear channel-update pear.php.net"
command "pear upgrade PEAR"
command "sudo pear config-set auto_discover 1"
action :run
end
channels = %w{pear.phpunit.de components.ez.no pear.symfony-project.com}
channels.each do |chan|
php_pear_channel chan do
action [:discover, :update]
end
end
#php_pear "HTTP_Request2" do
php_pear "HTTP_Request" do
#preferred_state "beta"
preferred_state "stable"
action :install
end
php_pear "Net_Socket" do
action :install
preferred_state "stable"
end
php_pear "Net_URL" do #there is a net_url2
action :install
preferred_state "stable"
end
php_pear "Log" do
action :install
preferred_state "stable"
end
php_pear "XML_RPC2" do
action :install
end
execute "install phpunit" do
command "pear -d preferred_state=beta install --alldeps pear.phpunit.de/PHPUnit"
action :run
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment