Skip to content
Browse files

fixed tag formatting

  • Loading branch information...
1 parent a64af85 commit dfcb82dc55f68260e46e8c1578e1e192d2f515d8 @dimko committed
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/capistrano/tagging.rb
View
7 lib/capistrano/tagging.rb
@@ -12,12 +12,11 @@
namespace :tagging do
def tag(options = {})
- tag_format = (tag_format || ':rails_env_:release').gsub(/:([a-z_]+[^_:])/i) do |match|
+ tag_format = exists?(:tag_format) && fetch(:tag_format)
+ return (tag_format || ':rails_env_:release').gsub(/:([a-z_]+[^_:])/i) do |match|
method = $1.to_sym
- match = options[method] || send(method) || ''
+ match = options[method] || (exists?(method) && fetch(method)) || (respond_to?(method) && send(method)) || ''
end
-
- tag_format
end
desc "Place release tag into Git and push it to server."

0 comments on commit dfcb82d

Please sign in to comment.
Something went wrong with that request. Please try again.