Module: Vlad
- Defined in:
- lib/vlad.rb
Overview
Vlad the Deployer - Pragmatic application deployment automation, without mercy.
Please read doco/getting_started.txt or rubyhitsquad.com/
Basic scenario:
-
rake vlad:setup (first time only)
-
rake vlad:update
-
rake vlad:migrate (optional)
-
rake vlad:start
Defined Under Namespace
Classes: CommandFailedError, ConfigurationError, Darcs, Error, FetchError, Git, Mercurial, Perforce, Subversion
Constant Summary collapse
- VERSION =
This is the version of Vlad you are running.
'2.0.0'
Class Method Summary collapse
-
.load(options = {}) ⇒ Object
Loads tasks file
tasks_file
and various recipe styles as a hash of category/style pairs.
Class Method Details
.load(options = {}) ⇒ Object
Loads tasks file tasks_file
and various recipe styles as a hash of category/style pairs. Recipes default to:
:app => :passenger
:config => 'config/deploy.rb'
:core => :core
:scm => :subversion
:web => :apache
You can override individual values and/or set to nil to deactivate. :config will get loaded last to ensure that user variables override default values.
And by all means, feel free to skip this entirely if it doesn’t fit for you. All it does is a fancy-pants require. Require whatever files you need as you see fit straight from your Rakefile. YAY for simple and clean!
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/vlad.rb', line 59 def self.load = {} = {:config => } if String === order = [:core, :app, :config, :scm, :web] order += .keys - order recipes = { :app => :passenger, :config => 'config/deploy.rb', :core => :core, :scm => :subversion, :web => :apache, }.merge() order.each do |flavor| recipe = recipes[flavor] next if recipe.nil? or flavor == :config require "vlad/#{recipe}" end Kernel.load recipes[:config] Kernel.load "config/deploy_#{ENV['to']}.rb" if ENV['to'] end |