def _parse_version_range()

in src/advisor/parsers/ruby_gem_parser.py [0:0]


    def _parse_version_range(self, versions: list[str]):
        """Cycle through a list of versions and find the lowest one"""
        lowest_version = None
        for version in versions:
            match = re.search(self.SEMVER_RE, version)
            if match:
                this_version = match.group(0)
                if VersionComparer.is_valid(this_version):
                    if not lowest_version or VersionComparer.compare(lowest_version, this_version) == 1:
                        lowest_version = this_version
        
        return lowest_version