Sha256: 060c1c92b890b21ce9cac0741c3ca44bdb7fdcb2f2c0285056e59bef81b2f73a

Contents?: true

Size: 1.09 KB

Versions: 11

Compression:

Stored size: 1.09 KB

Contents

require 'rake'
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

  namespace :bundle do

    desc "Bundle all spec apps"
    task :install do
      for_each_directory_of('spec/**/Gemfile') do |directory|
        system("cd #{directory} && bundle install")
      end
    end

    desc "Update a gem given by the GEM environment variable"
    task :update do
      gem = ENV['GEM'] or raise "Name the gem you wish to update by setting a environment variable GEM"
      for_each_directory_of('spec/**/Gemfile') do |directory|
        system("cd #{directory} && bundle update #{gem}")
      end
    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

11 entries across 11 versions & 3 rubygems

Version Path
controller_action_hud-0.0.5 Rakefile
controller_action_hud-0.0.3 Rakefile
controller_action_hud-0.0.2 Rakefile
controller_action_hud-0.0.1 Rakefile
query_diet-0.5.3 Rakefile
query_diet-0.5.2 Rakefile
query_diet-0.5.1 Rakefile
query_diet-0.5.0 Rakefile
assignable_values-0.5.1 Rakefile
query_diet-0.4.0 Rakefile
assignable_values-0.5.0 Rakefile