2013-10-17 21:57:00 -04:00
|
|
|
##
|
|
|
|
# This represents a vendored source that is similar to an installed gem.
|
|
|
|
|
|
|
|
class Gem::Source::Vendor < Gem::Source::Installed
|
2013-11-10 12:51:40 -05:00
|
|
|
|
2013-11-18 19:34:13 -05: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 18:27:52 -05:00
|
|
|
when Gem::Source::Lock then
|
|
|
|
-1
|
2013-11-18 19:34:13 -05:00
|
|
|
when Gem::Source::Vendor then
|
|
|
|
0
|
|
|
|
when Gem::Source then
|
|
|
|
1
|
|
|
|
else
|
|
|
|
nil
|
|
|
|
end
|
2013-11-10 12:51:40 -05:00
|
|
|
end
|
|
|
|
|
2013-10-17 21:57:00 -04:00
|
|
|
end
|
|
|
|
|