public
Description: Puts 'u' back in blogging.
Homepage: http://utype.org
Clone URL: git://github.com/mariusz/utype.git
utype / Rakefile
100644 64 lines (53 sloc) 1.709 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
62
63
64
require 'rake'
require 'rake/rdoctask'
require 'rake/testtask'
require 'spec/rake/spectask'
require 'fileutils'
require 'merb-core'
require 'rubigen'
require 'merb-core/tasks/merb'
require 'merb-core/test/tasks/spectasks'
include FileUtils
 
#begin
# require 'vlad'
# Vlad.load :scm => "git"
#rescue LoadError
# # do nothing
#end
 
# Load the basic runtime dependencies; this will include
# any plugins and therefore plugin rake tasks.
init_env = ENV['MERB_ENV'] || 'rake'
Merb.load_dependencies(:environment => init_env)
     
# Get Merb plugins and dependencies
Merb::Plugins.rakefiles.each { |r| require r }
 
# Load any app level custom rakefile extensions from lib/tasks
tasks_path = File.join(File.dirname(__FILE__), "lib", "tasks")
rake_files = Dir["#{tasks_path}/*.rb"]
rake_files.each{|rake_file| load rake_file }
 
 
desc "start runner environment"
task :merb_env do
  Merb.start_environment(:environment => init_env, :adapter => 'runner')
end
 
##############################################################################
# ADD YOUR CUSTOM TASKS IN /lib/tasks
# NAME YOUR RAKE FILES file_name.rake
##############################################################################
 
namespace :utype do
  
  desc 'install utype'
  task :install => :merb_env do
    puts 'Installing utype...'
    Utype::App.install
  end
 
  namespace :components do
    desc 'install a component'
    task :install => :merb_env do
      name = ENV['NAME']
      if name.blank?
        puts 'Please run with a component name, like: rake utype:components:install NAME=your_component'
        return
      end
      puts %( Installing component "#{name}"... )
      ComponentInstallation.install(name)
    end
  end
  
end