summaryrefslogtreecommitdiff
path: root/lib/bundler/source.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/source.rb')
-rw-r--r--lib/bundler/source.rb26
1 files changed, 21 insertions, 5 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index a3f4b09cce..115dbd1378 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -7,20 +7,22 @@ module Bundler
autoload :Metadata, File.expand_path("source/metadata", __dir__)
autoload :Path, File.expand_path("source/path", __dir__)
autoload :Rubygems, File.expand_path("source/rubygems", __dir__)
+ autoload :RubygemsAggregate, File.expand_path("source/rubygems_aggregate", __dir__)
attr_accessor :dependency_names
+ attr_reader :checksum_store
+
def unmet_deps
specs.unmet_dependency_names
end
- def version_message(spec)
+ def version_message(spec, locked_spec = nil)
message = "#{spec.name} #{spec.version}"
message += " (#{spec.platform})" if spec.platform != Gem::Platform::RUBY && !spec.platform.nil?
- if Bundler.locked_gems
- locked_spec = Bundler.locked_gems.specs.find {|s| s.name == spec.name }
- locked_spec_version = locked_spec.version if locked_spec
+ if locked_spec
+ locked_spec_version = locked_spec.version
if locked_spec_version && spec.version != locked_spec_version
message += Bundler.ui.add_color(" (was #{locked_spec_version})", version_color(spec.version, locked_spec_version))
end
@@ -35,10 +37,16 @@ module Bundler
def local!; end
+ def local_only!; end
+
def cached!; end
def remote!; end
+ def add_dependency_names(names)
+ @dependency_names = Array(dependency_names) | Array(names)
+ end
+
# it's possible that gems from one source depend on gems from some
# other source, so now we download gemspecs and iterate over those
# dependencies, looking for gems we don't have info on yet.
@@ -48,6 +56,10 @@ module Bundler
specs.dependency_names
end
+ def spec_names
+ specs.spec_names
+ end
+
def include?(other)
other == self
end
@@ -56,6 +68,10 @@ module Bundler
"#<#{self.class}:0x#{object_id} #{self}>"
end
+ def identifier
+ to_s
+ end
+
def path?
instance_of?(Bundler::Source::Path)
end
@@ -86,7 +102,7 @@ module Bundler
end
def print_using_message(message)
- if !message.include?("(was ") && Bundler.feature_flag.suppress_install_using_messages?
+ if !message.include?("(was ")
Bundler.ui.debug message
else
Bundler.ui.info message