Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Don't allow to use bundler/capistrano with cap 3.x #2597

Merged
merged 1 commit into from Aug 16, 2013

Conversation

kirs
Copy link
Contributor

@kirs kirs commented Aug 14, 2013

Capistrano 3.x has separate gem for bundler integration (capistrano/bundler) and I think it would be useful to stop Capistrano 3.x users from requiring this task.

@@ -4,6 +4,9 @@
# Bundler will be activated after each new deployment.
require 'bundler/deployment'

if Gem::Version.new(Capistrano::Version).release < Gem::Version.new("3.0")
raise StandardError.new("For Capistrano 3.x integration, please check http://github.com/capistrano/bundler")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/check/use/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this StandardError instead of the default RuntimeError?

@xaviershay
Copy link
Contributor

Great idea.

@kirs
Copy link
Contributor Author

kirs commented Aug 15, 2013

@xaviershay fixed!

@@ -4,6 +4,10 @@
# Bundler will be activated after each new deployment.
require 'bundler/deployment'

if Gem::Version.new(Capistrano::Version).release < Gem::Version.new("3.0")
raise RuntimeError.new("For Capistrano 3.x integration, please use http://github.com/capistrano/bundler")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I wasn't clear, now this is equivalent to: raise "For Cap 3...", no need to reference RuntimeError explicitly.

@kirs
Copy link
Contributor Author

kirs commented Aug 16, 2013

@xaviershay fixed!

@@ -4,6 +4,10 @@
# Bundler will be activated after each new deployment.
require 'bundler/deployment'

if Gem::Version.new(Capistrano::Version).release < Gem::Version.new("3.0")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, shouldn't this conditional be the other way around? Didn't see that before.

CapVersion >= 3?

@kirs
Copy link
Contributor Author

kirs commented Aug 16, 2013

@xaviershay sorry, my fault. Fixed

@xaviershay
Copy link
Contributor

Merged, thanks!

@xaviershay
Copy link
Contributor

(build breakage is transient)

xaviershay added a commit that referenced this pull request Aug 16, 2013
Don't allow to use bundler/capistrano with cap 3.x
@xaviershay xaviershay merged commit 80655dc into rubygems:master Aug 16, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants