Sha256: a79b12ef2426a462afbb5d83719253ef16d53e30563c38a5522f6b0000d3f1ef
Contents?: true
Size: 776 Bytes
Versions: 3
Compression:
Stored size: 776 Bytes
Contents
require 'rake' require 'spec/rake/spectask' require 'bundler/gem_tasks' desc 'Default: Run all specs.' task :default => 'all:spec' namespace :all do desc "Run specs on all spec apps" task :spec do for_each_directory_of('spec/**/Rakefile') do |directory| env = "SPEC=../../#{ENV['SPEC']} " if ENV['SPEC'] system("cd #{directory} && #{env} bundle exec rake spec") end end desc "Bundle all spec apps" task :bundle do for_each_directory_of('spec/**/Gemfile') do |directory| system("cd #{directory} && bundle install") end end end def for_each_directory_of(path, &block) Dir[path].sort.each do |rakefile| directory = File.dirname(rakefile) puts '', "\033[44m#{directory}\033[0m", '' block.call(directory) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
has_defaults-0.4.2 | Rakefile |
has_defaults-0.4.1 | Rakefile |
has_defaults-0.4.0 | Rakefile |