lib/dockistrano/service.rb
def tag_with_fallback
      fallback_tags = [tag, "develop", "master", "latest"]

      begin
        tag_suggestion = fallback_tags.shift
        final_tag = tag_suggestion if available_tags_local.include?(tag_suggestion)
      end while !final_tag and fallback_tags.any?

      if final_tag
        final_tag
      else
        raise NoTagFoundForImage.new("No tag found for image #{image_name}, wanted tag #{tag}, available tags: #{available_tags_local}")
      end
    end
# Returns the tag that is available with fallback.
Returns the tag that is available with fallback.
Returns the tag that is available with fallback .
def tag_with_fallback
      fallback_tags = [tag, "develop", "master", "latest"]
      begin
        tag_suggestion = fallback_tags.shift
        final_tag = tag_suggestion if available_tags_local.include?(tag_suggestion)
      end while !final_tag and fallback_tags.any?
      if final_tag
        final_tag
      else
        raise NoTagFoundForImage.new("No tag found for image #{image_name}, wanted tag #{tag}, available tags: #{available_tags_local}")
      end
    end
def tag_with_fallback fallback_tags = [ tag , "develop" , "master" , "latest" ] begin tag_suggestion = fallback_tags . shift final_tag = tag_suggestion if available_tags_local . include? ( tag_suggestion ) end while ! final_tag and fallback_tags . any? if final_tag final_tag else raise NoTagFoundForImage . new ( "No tag found for image #{image_name}, wanted tag #{tag}, available tags: #{available_tags_local}" ) end end
Returns the tag that is available with fallback.
Returns the tag that is available with fallback .