Sha256: de947318ac8226ba9a0a0cca4cc8e1835835b844c82049613dc6240623777fed

Contents?: true

Size: 721 Bytes

Versions: 1

Compression:

Stored size: 721 Bytes

Contents

require 'rake/tasklib'

module Rake::Funnel::Tasks
  class SideBySideSpecs < Rake::TaskLib
    include Rake::Funnel::Support::SideBySideSpecs

    attr_accessor :name, :projects, :references, :specs, :enabled

    def initialize(name = :compile)
      @name = name

      @projects = %w(**/*.csproj **/*.vbproj **/*.fsproj)
      @references = []
      @specs = %w(*Specs.cs **/*Specs.cs *Tests.cs **/*Tests.cs)
      @enabled = false

      yield self if block_given?
      define
    end

    private
    def define
      task name do
        next unless enabled
        Remover.remove({ projects: projects, references: references, specs: specs })
      end

      self
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rake-funnel-0.1.0.pre lib/rake/funnel/tasks/side_by_side_specs.rb