Sha256: c4bf171124c32af98b60c221d83b6a4ddfb086253a6c480cbbd2fff89cf8063c

Contents?: true

Size: 1.12 KB

Versions: 61

Compression:

Stored size: 1.12 KB

Contents

require 'find'

namespace :manifest do

  desc 'Verify the manifest'
  task :check do
    fn = PROJ.manifest_file + '.tmp'
    files = manifest_files

    File.open(fn, 'w') {|fp| fp.puts files}
    lines = %x(#{DIFF} -du #{PROJ.manifest_file} #{fn}).split("\n")
    if HAVE_FACETS_ANSICODE and ENV.has_key?('TERM')
      lines.map! do |line|
        case line
        when %r/^(-{3}|\+{3})/; nil
        when %r/^@/; ANSICode.blue line
        when %r/^\+/; ANSICode.green line
        when %r/^\-/; ANSICode.red line
        else line end
      end
    end
    puts lines.compact
    rm fn rescue nil
  end

  desc 'Create a new manifest'
  task :create do
    files = manifest_files
    unless test(?f, PROJ.manifest_file)
      files << PROJ.manifest_file
      files.sort!
    end
    File.open(PROJ.manifest_file, 'w') {|fp| fp.puts files}
  end

  task :assert do
    files = manifest_files
    manifest = File.read(PROJ.manifest_file).split($/)
    raise "ERROR: #{PROJ.manifest_file} is out of date" unless files == manifest
  end

end  # namespace :manifest

desc 'Alias to manifest:check'
task :manifest => 'manifest:check'

# EOF

Version data entries

61 entries across 55 versions & 29 rubygems

Version Path
TwP-webby-0.9.3 tasks/manifest.rake
blowmage-webby-0.9.4.1 tasks/manifest.rake
brianjlandau-doppelganger-0.8.0 tasks/manifest.rake
vigetlabs-acts_as_markup-1.3.0 tasks/manifest.rake
firetower-0.1.1 hookr/pkg/schleyfox-hookr-1.0.1/tasks/manifest.rake
firetower-0.1.1 hookr/tasks/manifest.rake
firetower-0.1.0 hookr/pkg/schleyfox-hookr-1.0.1/tasks/manifest.rake
firetower-0.1.0 hookr/tasks/manifest.rake
flt-1.3.0 tasks/manifest.rake
flt-1.2.1 tasks/manifest.rake
flt-1.2.0 tasks/manifest.rake
nio-0.2.5 tasks/manifest.rake
flt-1.1.2 tasks/manifest.rake
schleyfox-hookr-1.0.1 tasks/manifest.rake
flt-1.1.1 tasks/manifest.rake
flt-1.1.0 tasks/manifest.rake
nio-0.2.4 tasks/manifest.rake
flt-1.0.0 tasks/manifest.rake
float-formats-0.2.0 tasks/manifest.rake
ruby-decimal-0.1.0 tasks/manifest.rake