summaryrefslogtreecommitdiff
path: root/lib/bundler/plugin
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-01 23:29:38 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-01 23:29:38 +0000
commitbe7b5929126cb3e696ef222339237faba9b8fe5a (patch)
tree51eae376f93c09bc82dde5a657a91df2c89062e4 /lib/bundler/plugin
parentae49dbd392083f69026f2a0fff4a1d5f42d172a7 (diff)
Update bundled bundler to 1.16.0.
* lib/bundler, spec/bundler: Merge bundler-1.16.0. * common.mk: rspec examples of bundler-1.16.0 needs require option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/bundler/plugin')
-rw-r--r--lib/bundler/plugin/api/source.rb11
-rw-r--r--lib/bundler/plugin/installer.rb13
-rw-r--r--lib/bundler/plugin/source_list.rb15
3 files changed, 23 insertions, 16 deletions
diff --git a/lib/bundler/plugin/api/source.rb b/lib/bundler/plugin/api/source.rb
index 5d3f58df92..586477efb5 100644
--- a/lib/bundler/plugin/api/source.rb
+++ b/lib/bundler/plugin/api/source.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
+
require "uri"
-require "digest/sha1"
module Bundler
module Plugin
@@ -271,7 +271,7 @@ module Bundler
end
def uri_hash
- Digest::SHA1.hexdigest(uri)
+ SharedHelpers.digest(:SHA1).hexdigest(uri)
end
# Note: Do not override if you don't know what you are doing.
@@ -293,6 +293,13 @@ module Bundler
def bundler_plugin_api_source?
true
end
+
+ # @private
+ # This API on source might not be stable, and for now we expect plugins
+ # to download all specs in `#specs`, so we implement the method for
+ # compatibility purposes and leave it undocumented (and don't support)
+ # overriding it)
+ def double_check_for(*); end
end
end
end
diff --git a/lib/bundler/plugin/installer.rb b/lib/bundler/plugin/installer.rb
index a50d0ceedd..5379c38979 100644
--- a/lib/bundler/plugin/installer.rb
+++ b/lib/bundler/plugin/installer.rb
@@ -13,12 +13,13 @@ module Bundler
def install(names, options)
version = options[:version] || [">= 0"]
-
- if options[:git]
- install_git(names, version, options)
- else
- sources = options[:source] || Bundler.rubygems.sources
- install_rubygems(names, version, sources)
+ Bundler.settings.temporary(:lockfile_uses_separate_rubygems_sources => false, :disable_multisource => false) do
+ if options[:git]
+ install_git(names, version, options)
+ else
+ sources = options[:source] || Bundler.rubygems.sources
+ install_rubygems(names, version, sources)
+ end
end
end
diff --git a/lib/bundler/plugin/source_list.rb b/lib/bundler/plugin/source_list.rb
index 33f5e5afbd..f0e212205f 100644
--- a/lib/bundler/plugin/source_list.rb
+++ b/lib/bundler/plugin/source_list.rb
@@ -5,13 +5,6 @@ module Bundler
# approptiate options to be used with Source classes for plugin installation
module Plugin
class SourceList < Bundler::SourceList
- def initialize
- @path_sources = []
- @git_sources = []
- @rubygems_aggregate = Plugin::Installer::Rubygems.new
- @rubygems_sources = []
- end
-
def add_git_source(options = {})
add_source_to_list Plugin::Installer::Git.new(options), git_sources
end
@@ -21,7 +14,13 @@ module Bundler
end
def all_sources
- path_sources + git_sources + rubygems_sources
+ path_sources + git_sources + rubygems_sources + [metadata_source]
+ end
+
+ private
+
+ def rubygems_aggregate_class
+ Plugin::Installer::Rubygems
end
end
end