1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Merge Bundler 2.1.0.pre.1 as developed version from upstream.

a53709556b

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2019-04-14 06:01:35 +00:00
parent d636809c05
commit 68ddd4d300
290 changed files with 5820 additions and 6161 deletions

View file

@ -23,7 +23,7 @@ module Bundler
groups = Bundler.settings[:without]
group_list = [groups[0...-1].join(", "), groups[-1..-1]].
reject {|s| s.to_s.empty? }.join(" and ")
group_str = (groups.size == 1) ? "group" : "groups"
group_str = groups.size == 1 ? "group" : "groups"
"Gems in the #{group_str} #{group_list} were not installed."
end
@ -49,10 +49,6 @@ module Bundler
end
def self.ask_for_spec_from(specs)
if !$stdout.tty? && ENV["BUNDLE_SPEC_RUN"].nil?
raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
end
specs.each_with_index do |spec, index|
Bundler.ui.info "#{index.succ} : #{spec.name}", true
end
@ -72,7 +68,7 @@ module Bundler
end
def self.ensure_all_gems_in_lockfile!(names, locked_gems = Bundler.locked_gems)
locked_names = locked_gems.specs.map(&:name)
locked_names = locked_gems.specs.map(&:name).uniq
names.-(locked_names).each do |g|
raise GemNotFound, gem_not_found_message(g, locked_names)
end
@ -80,10 +76,12 @@ module Bundler
def self.configure_gem_version_promoter(definition, options)
patch_level = patch_level_options(options)
patch_level << :patch if patch_level.empty? && Bundler.settings[:prefer_patch]
raise InvalidOption, "Provide only one of the following options: #{patch_level.join(", ")}" unless patch_level.length <= 1
definition.gem_version_promoter.tap do |gvp|
gvp.level = patch_level.first || :major
gvp.strict = options[:strict] || options["update-strict"]
gvp.strict = options[:strict] || options["update-strict"] || options["filter-strict"]
end
end