<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
Task.new(:environment) do |task|
  task.hidden = true
  task.define do |environment = nil, options|
    RACK_ENV = environment || ENV["RACK_ENV"] || "development"
    require_relative "init.rb"
<% if @git_deployer %>
begin
  load "git-deployer.nake"
rescue LoadError
  abort "You have to install git-deployer gem!"
else
  Task["deployer:setup"].config[:user] = "botanicus"
  Task["deployer:setup"].config[:host] = "95.170.245.30"
  Task["deployer:setup"].config[:path] = "/var/www/megasamolepky.cz"
end
<% end %>

      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> Updated git-deployer setup

<DFF> @@ -21,12 +21,16 @@ load "rango/orm/tasks/<%= @orm %>.nake"
 <% 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
-  abort "You have to install git-deployer gem!"
-else
-  Task["deployer:setup"].config[:user] = "botanicus"
-  Task["deployer:setup"].config[:host] = "95.170.245.30"
-  Task["deployer:setup"].config[:path] = "/var/www/megasamolepky.cz"
+  warn "You have to install git-deployer gem if you want to deploy to remote servers!"
 end
 <% end %>
 

Updated git-deployer setup