slagyr / mmcopyrights

Adds copyright headers to all the source files in a directory

This URL has Read+Write access

mmcopyrights / Rakefile
100644 33 lines (28 sloc) 0.976 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require 'rake'
require 'spec/rake/spectask'
require 'rake/gempackagetask'
 
task :default => :spec
 
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
  t.spec_files = FileList['spec/**/*.rb']
  t.rcov = false
end
 
begin
  require 'jeweler'
  Jeweler::Tasks.new do |s|
    s.name = "mmcopyrights"
    s.summary = "MM Copyrights"
    s.email = "micah@8thlight.com"
    s.homepage = "http://github.com/slagyr/mmcopyrights"
    s.description = "Add copyright comments to all your source files"
    s.authors = ["Micah Martin"]
  end
rescue LoadError
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
 
task :copyrights do
  require 'mmcopyrights'
  copyright = "Copyright © 2009 Micah Martin.\nMM Copyrights and all included source files are distributed under terms of the GNU LGPL."
  MM::Copyrights.process('lib', "rb", "#-", copyright)
  MM::Copyrights.process('spec', "rb", "#-", copyright)
end