1
0
Fork 0
mirror of https://github.com/rspec/rspec-metagem.git synced 2022-11-09 12:09:29 -05:00
rspec--rspec-metagem/Rakefile

82 lines
2.2 KiB
Text
Raw Normal View History

2009-06-29 12:18:55 -04:00
require 'rubygems'
require 'rake'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "rspec-meta"
2009-06-29 13:37:44 -04:00
gem.summary = "pulls in the other rspec gems"
2009-06-29 12:18:55 -04:00
gem.email = "dchelimsky@gmail.com;chad.humphries@gmail.com"
gem.homepage = "http://github.com/rspec/meta"
gem.authors = ["David Chelimsky", "Chad Humphries"]
2009-06-29 13:55:31 -04:00
gem.add_dependency "rspec-core", "0.0.0"
gem.add_dependency "rspec-expectations", "0.0.0"
gem.add_dependency "rspec-mocks", "0.0.0"
2009-06-29 12:18:55 -04:00
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
require 'spec/rake/spectask'
2009-06-29 13:55:31 -04:00
task :spec do
system <<-COMMANDS
cd ../core &&
2009-06-29 14:01:55 -04:00
echo '================================'
echo 'Running spec/core suite . . .'
echo '================================'
2009-06-29 13:55:31 -04:00
rake spec &&
cd ../mocks &&
2009-06-29 14:01:55 -04:00
echo '================================'
echo 'Running spec/mocks suite . . .'
echo '================================'
2009-06-29 13:55:31 -04:00
rake spec &&
cd ../expectations &&
2009-06-29 14:01:55 -04:00
echo '================================'
echo 'Running spec/expectations suite . . .'
echo '================================'
2009-06-29 13:55:31 -04:00
rake spec
COMMANDS
2009-06-29 12:18:55 -04:00
end
Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end
task :default => :spec
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 = "rspec-meta #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
2009-06-29 14:08:54 -04:00
namespace :git do
2009-06-29 16:28:26 -04:00
[:status, :pull, :push, :reset].each do |key|
command = key == :reset ? "reset --hard" : key.to_s
2009-06-29 14:49:02 -04:00
desc "git #{command} on all the repos"
2009-06-29 16:28:26 -04:00
task key do
2009-06-29 14:49:02 -04:00
["../meta","../core","../expectations", "../mocks"].each do |repo|
puts
puts "=" * 50
puts "running git #{command} on #{repo}:"
puts "=" * 50
puts `cd #{repo} && git #{command}`
end
2009-06-29 14:08:54 -04:00
end
end
end