diff options
author | Asutosh Palai <asupalai@gmail.com> | 2016-06-07 21:37:44 +0530 |
---|---|---|
committer | Asutosh Palai <asupalai@gmail.com> | 2016-06-07 21:37:44 +0530 |
commit | f1d2abfb3cefa963df0089e0b858265a817b652c (patch) | |
tree | 3ce92da25b4698a41564b42e7fc4744a8df53678 /lib/bundler/source | |
parent | 81ea9335591768560dcc917a1d2e848ff938f11e (diff) | |
parent | 8d7b671909d9b75a9e1e64889f6ba45b302e3940 (diff) | |
download | bundler-f1d2abfb3cefa963df0089e0b858265a817b652c.tar.gz |
Merge branch 'master' into plugin
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 |