public
Description: Yet Another Planet Refactoring
Homepage: http://intertwingly.net/blog/2007/12/19/Yet-Another-Planet-Refactoring
Clone URL: git://github.com/rubys/mars.git
mars / Rakefile.rb
100644 61 lines (52 sloc) 1.278 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
task :default => [:test]
 
desc "Run the unit tests"
task :test do
  ruby "-rubygems", "test.rb"
end
 
desc "Test for Mars prerequisites"
task :prereqs do
  ruby "-rubygems", "prereqs.rb"
end
 
desc "Clean up published files"
task :clean do
  CLEAN_FILES = FileList['./*.xml', './*.html']
  CLEAN_FILES.each do |fn|
    rm fn
  end
  rmdir "images"
end
 
desc "Clean up all files"
task :clean_all do
  CLEAN_ALL_FILES = FileList['./*.xml', './*.html', './*.haml', './*.xslt', './*.ini', './*.css', './*.ico', './*.js', './images/*', "source/*", "http/*", "entry/*"]
  CLEAN_ALL_FILES.each do |fn|
    rm fn
  end
  rmdir "images"
  rmdir "source"
  rmdir "http"
  rmdir "entry"
end
 
desc "Clean up cache files"
task :clean_cache do
  CLEAN_CACHE_FILES = FileList[ "source/*", "http/*", "entry/*"]
  CLEAN_CACHE_FILES.each do |fn|
    rm fn
  end
  rmdir "source"
  rmdir "http"
  rmdir "entry"
end
 
desc "Install config files for haml/intertwingly example"
task :setup do
  FileList['./themes/intertwingly/*'].each do |f| cp "#{f}", "." end
  mkdir "images"
  mv "feed-icon-10x10.png", "images"
end
 
desc "Run planet for haml example"
task :planet do
  ruby "planet.rb", "basic.ini"
end
 
desc "Splice planet for haml example"
task :splice do
  ruby "splice.rb", "basic.ini"
end