2016-02-01 12:43:26 +00:00
|
|
|
# frozen_string_literal: true
|
2013-10-18 01:57:00 +00:00
|
|
|
##
|
|
|
|
# This represents a vendored source that is similar to an installed gem.
|
|
|
|
|
|
|
|
class Gem::Source::Vendor < Gem::Source::Installed
|
2013-11-10 17:51:40 +00:00
|
|
|
|
2013-11-19 00:34:13 +00:00
|
|
|
##
|
|
|
|
# Creates a new Vendor source for a gem that was unpacked at +path+.
|
|
|
|
|
|
|
|
def initialize path
|
|
|
|
@uri = path
|
|
|
|
end
|
|
|
|
|
|
|
|
def <=> other
|
|
|
|
case other
|
2013-11-30 23:27:52 +00:00
|
|
|
when Gem::Source::Lock then
|
|
|
|
-1
|
2013-11-19 00:34:13 +00:00
|
|
|
when Gem::Source::Vendor then
|
|
|
|
0
|
|
|
|
when Gem::Source then
|
|
|
|
1
|
|
|
|
else
|
|
|
|
nil
|
|
|
|
end
|
2013-11-10 17:51:40 +00:00
|
|
|
end
|
|
|
|
|
2013-10-18 01:57:00 +00:00
|
|
|
end
|
|
|
|
|