Skip to content

Loading…

Issue 872 #903

Closed
wants to merge 2 commits into from

2 participants

@now

These two commits implement solutions to issue 872.

Nikolai Weibull added some commits
Nikolai Weibull Fix check for Capistrano::Configuration
If we’re not using Capistrano, then Capistrano::Configuration won’t be
defined, so we need to check for its existence first.
91cdafe
Nikolai Weibull Use false for #fetch default
Vlad redefines #fetch in such a way that nil is used as the value for
“no argument given”.  This causes Vlad to raise a FetchError (without
any additional information) if the value couldn’t be found, which is
rather infuriating.
7b9a91b
@now

That is #872.

@indirect
Bundler member

Pulled the first pull request with this fix as 2bbc732. Thanks!

@leobessa leobessa pushed a commit that referenced this pull request
@ecoleman ecoleman Allow bundler/vlad to work in vlad deploy scripts
Fixes:
 Undefined Capistrano constant when using vlad
 Rake::FetchError on :default_roles

Closes #892, #903
2bbc732
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 15, 2010
  1. Fix check for Capistrano::Configuration

    Nikolai Weibull committed
    If we’re not using Capistrano, then Capistrano::Configuration won’t be
    defined, so we need to check for its existence first.
  2. Use false for #fetch default

    Nikolai Weibull committed
    Vlad redefines #fetch in such a way that nil is used as the value for
    “no argument given”.  This causes Vlad to raise a FetchError (without
    any additional information) if the value couldn’t be found, which is
    rather infuriating.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/bundler/deployment.rb
View
4 lib/bundler/deployment.rb
@@ -1,7 +1,7 @@
module Bundler
class Deployment
def self.define_task(context, task_method = :task, opts = {})
- if context.is_a?(Capistrano::Configuration)
+ if defined? Capistrano::Configuration and context.is_a? Capistrano::Configuration
context_name = "capistrano"
role_default = "{:except => {:no_release => true}}"
else
@@ -9,7 +9,7 @@ def self.define_task(context, task_method = :task, opts = {})
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
Something went wrong with that request. Please try again.