<NME> tasks.rb.rbt
<BEF> #!/usr/bin/env nake
# encoding: utf-8

begin
  require File.expand_path("../.bundle/environment", __FILE__)
rescue LoadError
  require "bundler"
  Bundler.setup
end

$LOAD_PATH.unshift(File.expand_path("../lib", __FILE__))

# Boot environment
# This task isn't useful as is, but a lot of Rango tasks expect this
# will exist and take an optional argument with name of environment

#load "pupu/tasks/pupu.nake"
load "rango/tasks/spec.nake"
load "rango/orm/tasks/<%= @orm %>.nake"

<% if @git_deployer %>
begin
load "rango/tasks/spec.nake"
<% unless @orm.eql?("mongomapper") %>
load "rango/orm/tasks/<%= @orm %>.nake"
<% end %>

<% if @git_deployer %>
begin
  load "git-deployer.nake"
  Task["deployer:setup"].config[:servers] = {
    server1: {
      user: "TODO",
      host: "TODO",
      repo: "/var/sources/<%= @name %>.git",
      path: "/var/www/<%= @name %>"
    }
  }
rescue LoadError
  warn "You have to install git-deployer gem if you want to deploy to remote servers!"
end
<% end %>

<% if @code_cleaner %>
begin
  load "code-cleaner.nake"
rescue LoadError
  abort "You have to install code-cleaner gem!"
else
  Task["hooks:whitespace:install"].tap do |task|
    task.config[:path] = "bin"
    task.config[:encoding] = "utf-8"
    task.config[:whitelist] = '(bin/[^/]+|.+\.(rb|rake|nake|thor|task))$'
    #task.config[:blacklist]
  end
end
<% end %>

<MSG> MongoMapper supported in stack generator (rango create stack blog --orm=mongomapper)

<DFF> @@ -16,7 +16,9 @@ end
 
 #load "pupu/tasks/pupu.nake"
 load "rango/tasks/spec.nake"
+<% unless @orm.eql?("mongomapper") %>
 load "rango/orm/tasks/<%= @orm %>.nake"
+<% end %>
 
 <% if @git_deployer %>
 begin

MongoMapper supported in stack generator (rango create stack blog --orm=mongomapper)