diff options
Diffstat (limited to 'lib/bundler/source')
-rw-r--r-- | lib/bundler/source/gemspec.rb | 13 | ||||
-rw-r--r-- | lib/bundler/source/path.rb | 8 | ||||
-rw-r--r-- | lib/bundler/source/rubygems.rb | 1 |
3 files changed, 20 insertions, 2 deletions
diff --git a/lib/bundler/source/gemspec.rb b/lib/bundler/source/gemspec.rb new file mode 100644 index 00000000..37e9a439 --- /dev/null +++ b/lib/bundler/source/gemspec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true +module Bundler + class Source + class Gemspec < Path + attr_reader :gemspec + + def initialize(options) + super + @gemspec = options["gemspec"] + end + end + end +end diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index bfead5c3..bbdd30b1 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -60,8 +60,8 @@ module Bundler end def eql?(other) - other.instance_of?(Path) && - expanded_path == expand(other.path) && + return unless other.class == Path || other.class == Gemspec + expanded_path == expand(other.path) && version == other.version end @@ -111,6 +111,10 @@ module Bundler Bundler.root end + def is_a_path? + instance_of?(Path) + end + private def expanded_path diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 369de4fc..a7721de8 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -27,6 +27,7 @@ module Bundler end def remote! + @specs = nil @allow_remote = true end |