Sha256: 4f7e48048ace89ad767054c89aefb80c11117a729e3516ac9104ae7325811cb3

Contents?: true

Size: 467 Bytes

Versions: 32

Compression:

Stored size: 467 Bytes

Contents

# frozen_string_literal: true

module Puppet::Util::Package::Version
  class Gem < ::Gem::Version
    def self.parse(version)
      raise ValidationFailure, version unless version.is_a? String
      raise ValidationFailure, version unless version =~ ANCHORED_VERSION_PATTERN

      new(version)
    end

    class ValidationFailure < ArgumentError
      def initialize(version)
        super("#{version} is not a valid ruby gem version.")
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
puppet-8.10.0 lib/puppet/util/package/version/gem.rb
puppet-8.10.0-x86-mingw32 lib/puppet/util/package/version/gem.rb
puppet-8.10.0-x64-mingw32 lib/puppet/util/package/version/gem.rb
puppet-8.10.0-universal-darwin lib/puppet/util/package/version/gem.rb
puppet-8.9.0 lib/puppet/util/package/version/gem.rb
puppet-8.9.0-x86-mingw32 lib/puppet/util/package/version/gem.rb
puppet-8.9.0-x64-mingw32 lib/puppet/util/package/version/gem.rb
puppet-8.9.0-universal-darwin lib/puppet/util/package/version/gem.rb
puppet-8.8.1 lib/puppet/util/package/version/gem.rb
puppet-8.8.1-x86-mingw32 lib/puppet/util/package/version/gem.rb
puppet-8.8.1-x64-mingw32 lib/puppet/util/package/version/gem.rb
puppet-8.8.1-universal-darwin lib/puppet/util/package/version/gem.rb
puppet-8.7.0 lib/puppet/util/package/version/gem.rb
puppet-8.7.0-x86-mingw32 lib/puppet/util/package/version/gem.rb
puppet-8.7.0-x64-mingw32 lib/puppet/util/package/version/gem.rb
puppet-8.7.0-universal-darwin lib/puppet/util/package/version/gem.rb
puppet-8.6.0 lib/puppet/util/package/version/gem.rb
puppet-8.6.0-x86-mingw32 lib/puppet/util/package/version/gem.rb
puppet-8.6.0-x64-mingw32 lib/puppet/util/package/version/gem.rb
puppet-8.6.0-universal-darwin lib/puppet/util/package/version/gem.rb