public
Description: A small blog + wiki engine built on Sinatra + Stone
Homepage:
Clone URL: git://github.com/bomberstudios/bliki.git
bliki / Rakefile
100644 56 lines (49 sloc) 1.365 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
require 'rubygems'
require 'lib/tools/import'
require "lib/tools/configuration"
require "yaml"
require 'rexml/document'
require 'time'
require 'pp'
 
task :clean do
  %x(rm -Rf datastore)
end
 
task :test do
  %x(mkdir db) unless File.exist?("db")
  %x(mkdir db/test) unless File.exist?("db/test")
  Dir.glob("test/test_*.rb").each do |file|
    sh("ruby #{file}")
  end
end
 
task :install do
  sh("sudo gem install rack rdiscount haml builder feedvalidator validatable english mongrel daemons")
  sh("git submodule init")
  sh("git submodule update")
end
 
desc "Create initial configuration"
task :configure do
  Bliki::Configuration::configure "config.sample.yml", "config.yml"
end
 
namespace :import do
  begin
    require 'lib/stone/lib/stone'
  rescue LoadError
    false
  end
  desc "Clean imported data in DB=environment (default: development)"
  task :clean do
    %x(rm -Rf db/#{ENV['DB'] || 'development'}/*)
  end
  desc "Import posts from WordPress in DB=environment (default: development)"
  task :wordpress => :clean do
    import_wordpress_content(ENV['FILE'] || "db/wordpress.xml", ENV['DB'] || 'development')
  end
  desc "Import comments from WordPress XML in DB=environment (default: development)"
  task :comments => :clean do
    import_wordpress_comments()
  end
  # task :models do
  # update_model_files
  # end
end
 
task :default => :test