Permalink
Browse files

Allow bundler/vlad to work in vlad deploy scripts

Fixes:
 Undefined Capistrano constant when using vlad
 Rake::FetchError on :default_roles

Closes #892, #903
  • Loading branch information...
1 parent 93fcbd7 commit 2bbc732e6fbdbef902c6967a312152fd203836c0 @ecoleman ecoleman committed with indirect Dec 6, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/bundler/deployment.rb
View
4 lib/bundler/deployment.rb
@@ -1,15 +1,15 @@
module Bundler
class Deployment
def self.define_task(context, task_method = :task, opts = {})
- if context.is_a?(Capistrano::Configuration)
+ if defined?(Capistrano) && context.is_a?(Capistrano::Configuration)
context_name = "capistrano"
role_default = "{:except => {:no_release => true}}"
else
context_name = "vlad"
role_default = "[:app]"
end
- roles = context.fetch(:bundle_roles, nil)
+ roles = context.fetch(:bundle_roles, false)
opts[:roles] = roles if roles
context.send :namespace, :bundle do

0 comments on commit 2bbc732

Please sign in to comment.