def bump(oldversion, level)
      major = minor = patch = 0
      if oldversion =~ /^(\d+)\.(\d+)\.(\d+)$/
        major = Regexp.last_match(1).to_i
        minor = Regexp.last_match(2).to_i
        patch = Regexp.last_match(3).to_i
      end
      case level.to_sym
      when :major
        major += 1
        minor = 0
        patch = 0
      when :minor
        minor += 1
        patch = 0
      when :patch
        patch += 1
      end
      version = [major, minor, patch].compact.join('.')
      version
    end
def bump(oldversion, level)
      major = minor = patch = 0
      if oldversion =~ /^(\d+)\.(\d+)\.(\d+)$/
        major = Regexp.last_match(1).to_i
        minor = Regexp.last_match(2).to_i
        patch = Regexp.last_match(3).to_i
      end
      case level.to_sym
      when :major
        major += 1
        minor = 0
        patch = 0
      when :minor
        minor += 1
        patch = 0
      when :patch
        patch += 1
      end
      version = [major, minor, patch].compact.join('.')
      version
    end
Return a new version number based on
 @param oldversion the old version (format: x.y.z)
 @param level      the level of bumping (either :major, :minor, :patch)