Don't allow to use bundler/capistrano with cap 3.x #2597
Conversation
@@ -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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/check/use/
There was a problem hiding this comment.
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
?
Great idea. |
@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") |
There was a problem hiding this comment.
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.
@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") |
There was a problem hiding this comment.
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
?
@xaviershay sorry, my fault. Fixed |
Merged, thanks! |
(build breakage is transient) |
Don't allow to use bundler/capistrano with cap 3.x
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.