Sha256: 2228ac211fb0be4c1528c19683bf48cd18abab0bcd8aa9f0c09d2cfbfe745f55

Contents?: true

Size: 586 Bytes

Versions: 4

Compression:

Stored size: 586 Bytes

Contents

require 'corundum/tasklib'

module Corundum
  class GemspecSanity < TaskLib
    def default_namespace
      :gemspec_sanity
    end

    def default_configuration(toolkit)
      setting(:gemspec, toolkit.gemspec)
    end

    def define
      in_namespace do
        task :files_exist do
          missing = gemspec.files.find_all do |path|
            not File::exists?(path)
          end

          fail "Files mentioned in gemspec are missing: #{missing.join(", ")}" unless missing.empty?
        end
      end

      task :preflight => in_namespace(:files_exist)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
corundum-0.0.6 lib/corundum/gemspec_sanity.rb
corundum-0.0.5 lib/corundum/gemspec_sanity.rb
corundum-0.0.3 lib/corundum/gemspec_sanity.rb
corundum-0.0.2 lib/corundum/gemspec_sanity.rb