Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (66 sloc) 1.95 KB
require 'rubygems'
require 'rake'
require 'lib/enforcer'
task :default => [:test, :features]
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "enforcer"
gem.version = Enforcer::VERSION
gem.summary = %Q{A simple way to manage permissions on GitHub}
gem.email = "nquaranto@thoughtbot.com"
gem.homepage = "http://github.com/thoughtbot/enforcer"
gem.authors = ["Nick Quaranto"]
gem.add_runtime_dependency("httparty")
gem.add_runtime_dependency("octopi")
gem.add_runtime_dependency("json")
gem.add_development_dependency("shoulda")
gem.add_development_dependency("rr")
gem.add_development_dependency("cucumber")
gem.add_development_dependency("fakeweb")
end
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
end
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
if File.exist?('VERSION.yml')
config = YAML.load(File.read('VERSION.yml'))
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
else
version = ""
end
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "enforcer #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
begin
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "--format progress"
end
rescue LoadError
desc 'Cucumber rake task not available'
task :features do
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
end
end