Fetching contributors…
Cannot retrieve contributors at this time
59 lines (48 sloc) 2.07 KB
require 'rubygems'
require 'rake'
require 'jeweler' do |gem| = "cuke4php"
gem.summary = %Q{Implementation of the Cucumber wire protocol for PHP projects}
gem.description = %Q{Using this protocol it is possible to directly interact with PHP code at any level without the need for a web server. To accomplish this, when cucumber is running against a directory containing feature files and it cannot resolve a particular step definition, it will ask a known wire server (as defined in a .wire file) to interpret and run those steps.}
gem.authors = ["Kevin Olbrich", "Alessandro Dal Grande"] = ["", ""]
gem.homepage = ""
gem.files.exclude 'phpdoc'
gem.has_rdoc = false
gem.requirements << "PHP 5.2+"
gem.requirements << "PHPUnit 3.0+"
gem.post_install_message =<<eos
Please install PHPUnit >= 3.0 if you've not already done it!
Add PEAR channels:
pear channel-discover
pear channel-discover
pear channel-discover
Install PHPUnit:
pear install phpunit/PHPUnit
Optional: Use PEAR/Net_Server for a remote forking server implementation
(requires PHP with pcntl extensions)
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
require 'cucumber/rake/task'
task :default => [:features, :phpunit]
desc "Run Cucumber features for Cuke4php"
task :features do
sh "bin/cuke4php -p #{ENV['PROFILE'] || 'default'} features"
desc "Generate PhpDocs -- requires PhpDocumentor"
task :phpdoc do
sh "rm -rf phpdoc/"
sh "phpdoc -f *.php -d ./lib -t phpdoc/ --title Cuke4Php -dn Cuke4Php -dc Cuke4Php -it @one,@two,@wire"
desc "Run PHPUnit tests"
task :phpunit do
sh "phpunit tests"