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

77 lines
2 KiB
Text
Raw Normal View History

2009-06-29 12:18:55 -04:00
require 'rubygems'
require 'rake'
require 'fileutils'
require 'pathname'
2009-06-29 12:18:55 -04:00
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", ">= 2.0.0.a1"
# gem.add_dependency "rspec-expectations", ">= 2.0.0.a1"
# gem.add_dependency "rspec-mocks", ">= 2.0.0.a1"
# gem.add_development_dependency 'git'
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
2009-10-09 10:23:59 -04:00
# Jeweler::GemcutterTasks.new
2009-06-29 12:18:55 -04:00
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
def run_command(command)
base_rspec2_path = Pathname.new(Dir.pwd.split('meta').first)
['meta', 'core', 'expectations', 'mocks'].each do |dir|
path = base_rspec2_path.join(dir)
puts "====================================="
puts "Running [#{command}] in #{path}"
puts "====================================="
FileUtils.cd(path) do
system command
end
puts
end
end
2009-09-21 22:10:37 -05:00
task :clobber do
rm_rf 'pkg'
end
2009-06-29 13:55:31 -04:00
task :spec do
run_command 'rake'
2009-06-29 12:18:55 -04:00
end
task :default => :spec
2009-06-29 14:08:54 -04:00
namespace :git do
{ :status => nil,
:pull => '--rebase',
:push => nil,
:reset => '--hard',
:diff => nil
}.each do |command, options|
2009-06-29 14:49:02 -04:00
desc "git #{command} on all the repos"
task command => :clone do
run_command "git #{command} #{options}".strip
2009-06-29 14:08:54 -04:00
end
end
task :st => :status
desc "git clone all the repos the first time"
task :clone do
base_rspec2_path = Pathname.new(Dir.pwd.split('meta').first)
FileUtils.cd(base_rspec2_path) do
['core', 'expectations', 'mocks'].each do |repo|
unless File.exists?(repo)
system "git clone git://github.com/rspec/#{repo}.git"
end
end
end
end
2009-06-29 14:08:54 -04:00
end