Sha256: a88e618b99e668aed4e07a0d304f3c13e23576040747da3ccb5753b3fbe3dd27

Contents?: true

Size: 648 Bytes

Versions: 56

Compression:

Stored size: 648 Bytes

Contents

desc "add copyright to all .rb files in the distribution"
task :copyright do
  ignore = File.readlines('doc/LEGAL').
    select{|line| line.strip!; File.exist?(line)}.
    map{|file| File.expand_path(file)}

  puts "adding copyright to files that don't have it currently"
  puts PROJECT_COPYRIGHT
  puts

  Dir['{lib,test}/**/*{.rb}'].each do |file|
    file = File.expand_path(file)
    next if ignore.include? file
    lines = File.readlines(file).map{|l| l.chomp}
    unless lines.first(PROJECT_COPYRIGHT.size) == PROJECT_COPYRIGHT
      puts "#{file} seems to need attention, first 4 lines:"
      puts lines[0..3]
      puts
    end
  end
end

Version data entries

56 entries across 54 versions & 12 rubygems

Version Path
Pistos-ramaze-2009.04.08 tasks/copyright.rake
Pistos-ramaze-2009.06.12 tasks/copyright.rake
bougyman-autumn-3.1.1 tasks/copyright.rake
bougyman-autumn-3.1.10 tasks/copyright.rake
bougyman-autumn-3.1.11 tasks/copyright.rake
bougyman-autumn-3.1.3 tasks/copyright.rake
bougyman-autumn-3.1.4 tasks/copyright.rake
bougyman-autumn-3.1.6 tasks/copyright.rake
bougyman-autumn-3.1.7 tasks/copyright.rake
bougyman-autumn-3.1.8 tasks/copyright.rake
bougyman-autumn-3.1.9 tasks/copyright.rake
bougyman-name_parse-0.0.3 tasks/copyright.rake
bougyman-name_parse-0.0.4 tasks/copyright.rake
bougyman-name_parse-0.0.5 tasks/copyright.rake
deathsyn-seedling-0.0.1 tasks/copyright.rake
deathsyn-seedling-0.0.1 lib/templates/core/tasks/copyright.rake
manveru-makura-2009.05.27 tasks/copyright.rake
manveru-ramaze-2009.04.01 tasks/copyright.rake
manveru-ramaze-2009.04.08 tasks/copyright.rake
manveru-ramaze-2009.04.18 tasks/copyright.rake