Sha256: fc97ce468303784145ec7e1044eeaa815bb13f22670f78929da193c52100bb40

Contents?: true

Size: 1.25 KB

Versions: 100

Compression:

Stored size: 1.25 KB

Contents

# coding: utf-8
require 'rubygems'

require 'bundler/setup'
Bundler::GemHelper.install_tasks

require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
task :default => :spec

task :clobber_package do
  rm_r 'pkg' rescue nil
end

desc 'Delete all generated files'
task :clobber => [:clobber_package]

desc 'Test all Gemfiles from spec/*.gemfile'
task :test_all do
  require 'pty'
  require 'shellwords'
  cmd      = 'bundle update && bundle exec rake --trace'
  statuses = Dir.glob('./sprockets*.gemfile').map do |gemfile|
    Bundler.with_clean_env do
      env = { 'BUNDLE_GEMFILE' => gemfile }
      $stderr.puts "Testing #{ File.basename(gemfile) }:"
      $stderr.puts "  export BUNDLE_GEMFILE=#{ gemfile }"
      $stderr.puts "  #{ cmd }"
      PTY.spawn(env, cmd) do |r, _w, pid|
        begin
          r.each_line { |l| puts l }
        rescue Errno::EIO
          # Errno:EIO error means that the process has finished giving output.
        ensure
          ::Process.wait pid
        end
      end
      [$? && $?.exitstatus == 0, gemfile]
    end
  end
  failed = statuses.reject(&:first).map(&:last)
  if failed.empty?
    $stderr.puts "✓ Tests pass with all #{ statuses.size } gemfiles"
  else
    $stderr.puts "❌ FAILING #{ failed * "\n" }"
    exit 1
  end
end

Version data entries

100 entries across 100 versions & 2 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/autoprefixer-rails-9.4.8/Rakefile
autoprefixer-rails-9.4.9 Rakefile
autoprefixer-rails-9.4.8 Rakefile
autoprefixer-rails-9.4.7 Rakefile
autoprefixer-rails-9.4.6 Rakefile
autoprefixer-rails-9.4.5 Rakefile
autoprefixer-rails-9.4.4 Rakefile
autoprefixer-rails-9.4.3 Rakefile
autoprefixer-rails-9.4.2 Rakefile
autoprefixer-rails-9.4.1 Rakefile
autoprefixer-rails-9.4.0 Rakefile
autoprefixer-rails-9.3.1 Rakefile
autoprefixer-rails-9.3.0 Rakefile
autoprefixer-rails-9.2.1 Rakefile
autoprefixer-rails-9.2.0 Rakefile
autoprefixer-rails-9.1.4 Rakefile
autoprefixer-rails-9.1.3 Rakefile
autoprefixer-rails-9.1.2 Rakefile
autoprefixer-rails-9.1.1 Rakefile
autoprefixer-rails-9.1.0 Rakefile