mirror of
https://github.com/rspec/rspec-metagem.git
synced 2022-11-09 12:09:29 -05:00
81 lines
2.2 KiB
Ruby
81 lines
2.2 KiB
Ruby
require 'rubygems'
|
|
require 'rake'
|
|
|
|
begin
|
|
require 'jeweler'
|
|
Jeweler::Tasks.new do |gem|
|
|
gem.name = "rspec-meta"
|
|
gem.summary = "pulls in the other rspec gems"
|
|
gem.email = "dchelimsky@gmail.com;chad.humphries@gmail.com"
|
|
gem.homepage = "http://github.com/rspec/meta"
|
|
gem.authors = ["David Chelimsky", "Chad Humphries"]
|
|
gem.add_dependency "rspec-core", "0.0.0"
|
|
gem.add_dependency "rspec-expectations", "0.0.0"
|
|
gem.add_dependency "rspec-mocks", "0.0.0"
|
|
# 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'
|
|
task :spec do
|
|
system <<-COMMANDS
|
|
cd ../core &&
|
|
echo '================================'
|
|
echo 'Running spec/core suite . . .'
|
|
echo '================================'
|
|
rake spec &&
|
|
cd ../mocks &&
|
|
echo '================================'
|
|
echo 'Running spec/mocks suite . . .'
|
|
echo '================================'
|
|
rake spec &&
|
|
cd ../expectations &&
|
|
echo '================================'
|
|
echo 'Running spec/expectations suite . . .'
|
|
echo '================================'
|
|
rake spec
|
|
COMMANDS
|
|
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
|
|
|
|
namespace :git do
|
|
[:status, :pull, :push, :reset].each do |key|
|
|
command = key == :reset ? "reset --hard" : key.to_s
|
|
desc "git #{command} on all the repos"
|
|
task key do
|
|
["../meta","../core","../expectations", "../mocks"].each do |repo|
|
|
puts
|
|
puts "=" * 50
|
|
puts "running git #{command} on #{repo}:"
|
|
puts "=" * 50
|
|
puts `cd #{repo} && git #{command}`
|
|
end
|
|
end
|
|
end
|
|
end
|