# File lib/versionomy/format_definitions/semver.rb, line 243 def self.create_semver_to_standard # We'll use a parsing conversion. Conversion::Parsing.new do # Handle the case where the semver version ends with a string # field, e.g. "1.0b". We want to treat this like "1.0b0" rather # than "1.0-2" since the semver semantic states that this is a # prerelease version. So we add 0 to the end of the parsed string # if it ends in a letter. to_modify_string do |str_, convert_params_| str_.gsub(/([[:alpha:]])\z/, '\10') end end end