Sha256: 68c028c89fefd3b72636b07b7dab284aba9a118ed57569c4000c1a17240d1f0b
Contents?: true
Size: 1.27 KB
Versions: 15
Compression:
Stored size: 1.27 KB
Contents
# coding: utf-8 require 'fig/package_descriptor' require 'fig/statement' module Fig; end # Overrides one package version dependency with another. # # config whatever # override somedependency/3.2.6 # end # # indicates that, regardless of which version of somedependency the blah # package says it needs, the blah package will actually use v3.2.6. class Fig::Statement::Override < Fig::Statement attr_reader :package_name, :version # Centralized definition of requirements for descriptors for override # statements. def self.parse_descriptor(raw_string, options = {}) filled_in_options = {} filled_in_options.merge!(options) filled_in_options[:name] = :required filled_in_options[:version] = :required filled_in_options[:config] = :forbidden return Fig::PackageDescriptor.parse(raw_string, filled_in_options) end def initialize(line_column, source_description, package_name, version) super(line_column, source_description) @package_name = package_name @version = version end def statement_type() return 'override' end def deparse_as_version(deparser) return deparser.override(self) end def minimum_grammar_for_emitting_input() return [0] end def minimum_grammar_for_publishing() return [0] end end
Version data entries
15 entries across 15 versions & 1 rubygems