def condition_met?(condition)
      condition = condition.to_s.strip
      if condition == 'prod' || condition == 'production'
        production?

      elsif condition =~ /^>=\s*(.*)/
        tag = validate_condition!(condition, Regexp.last_match[1])
        # Force false in the case where a production and development
        # timestamp fall on the same date. Since the production tag
        # does not contain time information it is impossible to say
        # which one is greater
        if production? != tag.production? && timestamp? &&
           to_date == tag.to_date
          false
        else
          numeric >= tag.numeric && ((self.latest? || tag.latest?) || self.timestamp? == tag.timestamp?)
        end

      elsif condition =~ /^>\s*(.*)/
        tag = validate_condition!(condition, Regexp.last_match[1])
        if production? != tag.production? && timestamp? &&
           to_date == tag.to_date
          false
        else
          numeric > tag.numeric && ((self.latest? || tag.latest?) || self.timestamp? == tag.timestamp?)
        end

      elsif condition =~ /^<=\s*(.*)/
        tag = validate_condition!(condition, Regexp.last_match[1])
        numeric <= tag.numeric && ((self.latest? || tag.latest?) || self.timestamp? == tag.timestamp?)

      elsif condition =~ /^<\s*(.*)/
        tag = validate_condition!(condition, Regexp.last_match[1])
        numeric < tag.numeric && ((self.latest? || tag.latest?) || self.timestamp? == tag.timestamp?)

      elsif condition =~ /^==?\s*(.*)/
        tag = validate_condition!(condition, Regexp.last_match[1])
        self.orig_equal?(tag)

      else
        tag = validate_condition!(condition, condition)
        self.orig_equal?(tag)
      end
    end
def condition_met?(condition)
      condition = condition.to_s.strip
      if condition == 'prod' || condition == 'production'
        production?

      elsif condition =~ /^>=\s*(.*)/
        tag = validate_condition!(condition, Regexp.last_match[1])
        # Force false in the case where a production and development
        # timestamp fall on the same date. Since the production tag
        # does not contain time information it is impossible to say
        # which one is greater
        if production? != tag.production? && timestamp? &&
           to_date == tag.to_date
          false
        else
          numeric >= tag.numeric && ((self.latest? || tag.latest?) || self.timestamp? == tag.timestamp?)
        end

      elsif condition =~ /^>\s*(.*)/
        tag = validate_condition!(condition, Regexp.last_match[1])
        if production? != tag.production? && timestamp? &&
           to_date == tag.to_date
          false
        else
          numeric > tag.numeric && ((self.latest? || tag.latest?) || self.timestamp? == tag.timestamp?)
        end

      elsif condition =~ /^<=\s*(.*)/
        tag = validate_condition!(condition, Regexp.last_match[1])
        numeric <= tag.numeric && ((self.latest? || tag.latest?) || self.timestamp? == tag.timestamp?)

      elsif condition =~ /^<\s*(.*)/
        tag = validate_condition!(condition, Regexp.last_match[1])
        numeric < tag.numeric && ((self.latest? || tag.latest?) || self.timestamp? == tag.timestamp?)

      elsif condition =~ /^==?\s*(.*)/
        tag = validate_condition!(condition, Regexp.last_match[1])
        self.orig_equal?(tag)

      else
        tag = validate_condition!(condition, condition)
        self.orig_equal?(tag)
      end
    end
Returns true if the version fulfills the supplied condition.
 Example conditions:

   "v2.1.3"      # must equal the given version
   "= v2.1.3"    # alias for the above
   "> v2.1.3"    # must be greater than the given version
   ">= v2.1.3"   # must be greater than or equal to the given version
   "< v2.1.3"    # must be less than the given version
   "<= v2.1.3"   # must be less than or equal to the given version
   "production"  # must be a production tag