Sha256: 45f13251d8d104be8bfbc3200e3158ebc19d4205f64265df56aae0ee6662e5bf
Contents?: true
Size: 911 Bytes
Versions: 8
Compression:
Stored size: 911 Bytes
Contents
module GitCompound module Repository # GitVersion represents tagged version inside Git repository # class GitVersion attr_reader :tag, :sha, :version def initialize(tag, sha) @tag = tag @sha = sha @version = tag.sub(/^v/, '') end def to_gem_version Gem::Version.new(@version) end def valid? @tag.match(/^v?#{Gem::Version::VERSION_PATTERN}$/) end def matches?(requirement) dependency = Gem::Dependency.new('component', requirement) dependency.match?('component', to_gem_version, true) end def <=>(other) to_gem_version <=> other.to_gem_version end def ==(other) case other when String version == other when GitVersion version == other.version else false end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems