Sha256: 0bf30e653871bbcb19dc39a9b7f245d9bdc0b314851ff913b44272fdcf64549a

Contents?: true

Size: 650 Bytes

Versions: 53

Compression:

Stored size: 650 Bytes

Contents

desc "add copyright to all .rb files in the distribution"
task :copyright do
  ignore = File.readlines('License.txt').
    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

53 entries across 53 versions & 2 rubygems

Version Path
bougyman-freeswitcher-0.1.4 tasks/copyright.rake
bougyman-freeswitcher-0.3.0 tasks/copyright.rake
bougyman-freeswitcher-0.3.1 tasks/copyright.rake
bougyman-freeswitcher-0.4.0 tasks/copyright.rake
bougyman-freeswitcher-0.4.1 tasks/copyright.rake
bougyman-freeswitcher-0.4.2 tasks/copyright.rake
freeswitcher-0.8.0 tasks/copyright.rake
freeswitcher-0.7.1 tasks/copyright.rake
freeswitcher-0.7.0 tasks/copyright.rake
freeswitcher-0.6.18 tasks/copyright.rake
freeswitcher-0.6.17 tasks/copyright.rake
freeswitcher-0.6.16 tasks/copyright.rake
freeswitcher-0.6.15 tasks/copyright.rake
freeswitcher-0.6.14 tasks/copyright.rake
freeswitcher-0.6.13 tasks/copyright.rake
freeswitcher-0.6.12 tasks/copyright.rake
freeswitcher-0.6.11 tasks/copyright.rake
freeswitcher-0.6.10 tasks/copyright.rake
freeswitcher-0.6.9 tasks/copyright.rake
freeswitcher-0.6.8 tasks/copyright.rake