seattlerb/vlad — pull request #22 by bmmchugh (2012-05-21 11:36:59+00:00)
Title: Load deploy_#{ENV['to']} from the same path as the config recipe

When a config path is given other than 'config/' and the 'to' variable is passed, Vlad will attempt to load "config/deploy_#{ENV['to']}".

Rakefile

require 'vlad'
Vlad.load(:config => 'other/deploy.rb')

Output

% rake vlad:debug to=somewhere
Loaded other/deploy.rb
rake abort!
cannot load such file -- config/deploy_somewhere.rb

This commit will load deploy_somewhere.rb from the same path as the config recipe.

% rake vlad:debug to=somewhere
Loaded other/deploy.rb
Loaded other/deploy_somewhere.rb