Skip to content

Commit

Permalink
simplified tag format fetching a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeremyanin committed Oct 31, 2011
1 parent f1d32a0 commit 4015dd8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/capistrano/tagging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
namespace :tagging do

def tag(options = {})
tag_format = exists?(:tag_format) && fetch(:tag_format)
return (tag_format || ':rails_env_:release').gsub(/:([a-z_]+[^_:])/i) do |match|
return (fetch(:tag_format, false) || ':rails_env_:release').gsub(/:([a-z_]+[^_:])/i) do |match|
method = $1.to_sym
match = options[method] || (exists?(method) && fetch(method)) || (respond_to?(method) && send(method)) || ''
end
Expand Down

0 comments on commit 4015dd8

Please sign in to comment.