rubygems-update 3.2.5 → 3.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +50 -0
- data/Manifest.txt +2 -0
- data/Rakefile +15 -14
- data/bundler/CHANGELOG.md +73 -0
- data/bundler/lib/bundler.rb +1 -1
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +1 -0
- data/bundler/lib/bundler/cli/cache.rb +1 -0
- data/bundler/lib/bundler/cli/gem.rb +12 -0
- data/bundler/lib/bundler/definition.rb +66 -56
- data/bundler/lib/bundler/dep_proxy.rb +15 -8
- data/bundler/lib/bundler/dsl.rb +38 -25
- data/bundler/lib/bundler/feature_flag.rb +0 -2
- data/bundler/lib/bundler/fetcher.rb +0 -1
- data/bundler/lib/bundler/gem_helper.rb +8 -6
- data/bundler/lib/bundler/gem_version_promoter.rb +2 -2
- data/bundler/lib/bundler/index.rb +6 -5
- data/bundler/lib/bundler/inline.rb +1 -0
- data/bundler/lib/bundler/installer.rb +0 -17
- data/bundler/lib/bundler/installer/standalone.rb +15 -0
- data/bundler/lib/bundler/lazy_specification.rb +9 -18
- data/bundler/lib/bundler/lockfile_parser.rb +12 -8
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +6 -12
- data/bundler/lib/bundler/man/bundle-config.1.ronn +11 -18
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/plugin.rb +1 -0
- data/bundler/lib/bundler/plugin/installer.rb +8 -9
- data/bundler/lib/bundler/resolver.rb +110 -80
- data/bundler/lib/bundler/resolver/spec_group.rb +56 -44
- data/bundler/lib/bundler/rubygems_ext.rb +16 -0
- data/bundler/lib/bundler/settings.rb +1 -2
- data/bundler/lib/bundler/shared_helpers.rb +2 -2
- data/bundler/lib/bundler/source/git.rb +1 -1
- data/bundler/lib/bundler/source/rubygems.rb +10 -2
- data/bundler/lib/bundler/source_list.rb +34 -25
- data/bundler/lib/bundler/spec_set.rb +5 -4
- data/bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +11 -5
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +2 -2
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +11 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +11 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +5 -6
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +4 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +5 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +9 -8
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +5 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +5 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems.rb +3 -3
- data/lib/rubygems/command.rb +1 -0
- data/lib/rubygems/dependency.rb +5 -1
- data/lib/rubygems/ext/builder.rb +2 -1
- data/lib/rubygems/installer_uninstaller_utils.rb +6 -1
- data/lib/rubygems/platform.rb +0 -4
- data/lib/rubygems/requirement.rb +1 -1
- data/lib/rubygems/resolver/index_specification.rb +4 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +0 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +11 -5
- data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +2 -2
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb +11 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +11 -7
- data/lib/rubygems/specification.rb +13 -11
- data/lib/rubygems/test_case.rb +5 -6
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/data/null-required-ruby-version.gemspec.rz +0 -0
- data/test/rubygems/test_gem.rb +85 -8
- data/test/rubygems/test_gem_commands_outdated_command.rb +18 -0
- data/test/rubygems/test_gem_dependency_installer.rb +27 -18
- data/test/rubygems/test_gem_ext_builder.rb +24 -0
- data/test/rubygems/test_gem_installer.rb +2 -0
- data/test/rubygems/test_gem_platform.rb +8 -0
- data/test/rubygems/test_gem_requirement.rb +35 -1
- data/test/rubygems/test_gem_specification.rb +10 -15
- data/test/rubygems/test_gem_stream_ui.rb +1 -1
- data/test/rubygems/test_gem_util.rb +4 -4
- metadata +5 -3
@@ -59,7 +59,7 @@ module Bundler::Molinillo
|
|
59
59
|
# @param [Set<Vertex>] vertices the set to add the predecessors to
|
60
60
|
# @return [Set<Vertex>] the vertices of {#graph} where `self` is a
|
61
61
|
# {#descendent?}
|
62
|
-
def _recursive_predecessors(vertices =
|
62
|
+
def _recursive_predecessors(vertices = new_vertex_set)
|
63
63
|
incoming_edges.each do |edge|
|
64
64
|
vertex = edge.origin
|
65
65
|
next unless vertices.add?(vertex)
|
@@ -85,7 +85,7 @@ module Bundler::Molinillo
|
|
85
85
|
# @param [Set<Vertex>] vertices the set to add the successors to
|
86
86
|
# @return [Set<Vertex>] the vertices of {#graph} where `self` is an
|
87
87
|
# {#ancestor?}
|
88
|
-
def _recursive_successors(vertices =
|
88
|
+
def _recursive_successors(vertices = new_vertex_set)
|
89
89
|
outgoing_edges.each do |edge|
|
90
90
|
vertex = edge.destination
|
91
91
|
next unless vertices.add?(vertex)
|
@@ -128,7 +128,7 @@ module Bundler::Molinillo
|
|
128
128
|
|
129
129
|
# Is there a path from `self` to `other` following edges in the
|
130
130
|
# dependency graph?
|
131
|
-
# @return
|
131
|
+
# @return whether there is a path following edges within this {#graph}
|
132
132
|
def path_to?(other)
|
133
133
|
_path_to?(other)
|
134
134
|
end
|
@@ -138,7 +138,7 @@ module Bundler::Molinillo
|
|
138
138
|
# @param [Vertex] other the vertex to check if there's a path to
|
139
139
|
# @param [Set<Vertex>] visited the vertices of {#graph} that have been visited
|
140
140
|
# @return [Boolean] whether there is a path to `other` from `self`
|
141
|
-
def _path_to?(other, visited =
|
141
|
+
def _path_to?(other, visited = new_vertex_set)
|
142
142
|
return false unless visited.add?(self)
|
143
143
|
return true if equal?(other)
|
144
144
|
successors.any? { |v| v._path_to?(other, visited) }
|
@@ -147,12 +147,18 @@ module Bundler::Molinillo
|
|
147
147
|
|
148
148
|
# Is there a path from `other` to `self` following edges in the
|
149
149
|
# dependency graph?
|
150
|
-
# @return
|
150
|
+
# @return whether there is a path following edges within this {#graph}
|
151
151
|
def ancestor?(other)
|
152
152
|
other.path_to?(self)
|
153
153
|
end
|
154
154
|
|
155
155
|
alias is_reachable_from? ancestor?
|
156
|
+
|
157
|
+
def new_vertex_set
|
158
|
+
require 'set'
|
159
|
+
Set.new
|
160
|
+
end
|
161
|
+
private :new_vertex_set
|
156
162
|
end
|
157
163
|
end
|
158
164
|
end
|
@@ -34,7 +34,7 @@ module Bundler::Molinillo
|
|
34
34
|
|
35
35
|
# An error caused by attempting to fulfil a dependency that was circular
|
36
36
|
#
|
37
|
-
# @note This exception will be thrown
|
37
|
+
# @note This exception will be thrown if and only if a {Vertex} is added to a
|
38
38
|
# {DependencyGraph} that has a {DependencyGraph::Vertex#path_to?} an
|
39
39
|
# existing {DependencyGraph::Vertex}
|
40
40
|
class CircularDependencyError < ResolverError
|
@@ -121,7 +121,7 @@ module Bundler::Molinillo
|
|
121
121
|
t = ''.dup
|
122
122
|
depth = 2
|
123
123
|
tree.each do |req|
|
124
|
-
t << ' ' * depth << req
|
124
|
+
t << ' ' * depth << printable_requirement.call(req)
|
125
125
|
unless tree.last == req
|
126
126
|
if spec = conflict.activated_by_name[name_for(req)]
|
127
127
|
t << %( was resolved to #{version_for_spec.call(spec)}, which)
|
@@ -45,6 +45,17 @@ module Bundler::Molinillo
|
|
45
45
|
true
|
46
46
|
end
|
47
47
|
|
48
|
+
# Determines whether two arrays of dependencies are equal, and thus can be
|
49
|
+
# grouped.
|
50
|
+
#
|
51
|
+
# @param [Array<Object>] dependencies
|
52
|
+
# @param [Array<Object>] other_dependencies
|
53
|
+
# @return [Boolean] whether `dependencies` and `other_dependencies` should
|
54
|
+
# be considered equal.
|
55
|
+
def dependencies_equal?(dependencies, other_dependencies)
|
56
|
+
dependencies == other_dependencies
|
57
|
+
end
|
58
|
+
|
48
59
|
# Returns the name for the given `dependency`.
|
49
60
|
# @note This method should be 'pure', i.e. the return value should depend
|
50
61
|
# only on the `dependency` parameter.
|
@@ -329,11 +329,11 @@ module Bundler::Molinillo
|
|
329
329
|
|
330
330
|
# Look for past conflicts that could be unwound to affect the
|
331
331
|
# requirement tree for the current conflict
|
332
|
+
all_reqs = last_detail_for_current_unwind.all_requirements
|
333
|
+
all_reqs_size = all_reqs.size
|
332
334
|
relevant_unused_unwinds = unused_unwind_options.select do |alternative|
|
333
|
-
|
334
|
-
|
335
|
-
alternative.requirements_unwound_to_instead
|
336
|
-
next if intersecting_requirements.empty?
|
335
|
+
diff_reqs = all_reqs - alternative.requirements_unwound_to_instead
|
336
|
+
next if diff_reqs.size == all_reqs_size
|
337
337
|
# Find the highest index unwind whilst looping through
|
338
338
|
current_detail = alternative if alternative > current_detail
|
339
339
|
alternative
|
@@ -344,8 +344,12 @@ module Bundler::Molinillo
|
|
344
344
|
state.unused_unwind_options += unwind_details.reject { |detail| detail.state_index == -1 }
|
345
345
|
|
346
346
|
# Update the requirements_unwound_to_instead on any relevant unused unwinds
|
347
|
-
relevant_unused_unwinds.each
|
348
|
-
|
347
|
+
relevant_unused_unwinds.each do |d|
|
348
|
+
(d.requirements_unwound_to_instead << current_detail.state_requirement).uniq!
|
349
|
+
end
|
350
|
+
unwind_details.each do |d|
|
351
|
+
(d.requirements_unwound_to_instead << current_detail.state_requirement).uniq!
|
352
|
+
end
|
349
353
|
|
350
354
|
current_detail
|
351
355
|
end
|
@@ -803,7 +807,7 @@ module Bundler::Molinillo
|
|
803
807
|
|
804
808
|
possibilities.reverse_each do |possibility|
|
805
809
|
dependencies = dependencies_for(possibility)
|
806
|
-
if current_possibility_set && current_possibility_set.dependencies
|
810
|
+
if current_possibility_set && dependencies_equal?(current_possibility_set.dependencies, dependencies)
|
807
811
|
current_possibility_set.possibilities.unshift(possibility)
|
808
812
|
else
|
809
813
|
possibility_sets.unshift(PossibilitySet.new(dependencies, [possibility]))
|
@@ -1,7 +1,7 @@
|
|
1
|
-
require "set"
|
2
1
|
require_relative "thor/base"
|
3
2
|
|
4
3
|
class Bundler::Thor
|
4
|
+
$thor_runner ||= false
|
5
5
|
class << self
|
6
6
|
# Allows for custom "Command" package naming.
|
7
7
|
#
|
@@ -323,7 +323,7 @@ class Bundler::Thor
|
|
323
323
|
# ==== Parameters
|
324
324
|
# Symbol ...:: A list of commands that should be affected.
|
325
325
|
def stop_on_unknown_option!(*command_names)
|
326
|
-
stop_on_unknown_option
|
326
|
+
@stop_on_unknown_option = stop_on_unknown_option | command_names
|
327
327
|
end
|
328
328
|
|
329
329
|
def stop_on_unknown_option?(command) #:nodoc:
|
@@ -337,7 +337,7 @@ class Bundler::Thor
|
|
337
337
|
# ==== Parameters
|
338
338
|
# Symbol ...:: A list of commands that should be affected.
|
339
339
|
def disable_required_check!(*command_names)
|
340
|
-
disable_required_check
|
340
|
+
@disable_required_check = disable_required_check | command_names
|
341
341
|
end
|
342
342
|
|
343
343
|
def disable_required_check?(command) #:nodoc:
|
@@ -347,12 +347,12 @@ class Bundler::Thor
|
|
347
347
|
protected
|
348
348
|
|
349
349
|
def stop_on_unknown_option #:nodoc:
|
350
|
-
@stop_on_unknown_option ||=
|
350
|
+
@stop_on_unknown_option ||= []
|
351
351
|
end
|
352
352
|
|
353
353
|
# help command has the required check disabled by default.
|
354
354
|
def disable_required_check #:nodoc:
|
355
|
-
@disable_required_check ||=
|
355
|
+
@disable_required_check ||= [:help]
|
356
356
|
end
|
357
357
|
|
358
358
|
# The method responsible for dispatching given the args.
|
@@ -398,7 +398,6 @@ class Bundler::Thor
|
|
398
398
|
# the namespace should be displayed as arguments.
|
399
399
|
#
|
400
400
|
def banner(command, namespace = nil, subcommand = false)
|
401
|
-
$thor_runner ||= false
|
402
401
|
command.formatted_usage(self, $thor_runner, subcommand).split("\n").map do |formatted_usage|
|
403
402
|
"#{basename} #{formatted_usage}"
|
404
403
|
end.join("\n")
|
@@ -251,7 +251,8 @@ class Bundler::Thor
|
|
251
251
|
# path<String>:: path of the file to be changed
|
252
252
|
# flag<Regexp|String>:: the regexp or string to be replaced
|
253
253
|
# replacement<String>:: the replacement, can be also given as a block
|
254
|
-
# config<Hash>:: give :verbose => false to not log the status
|
254
|
+
# config<Hash>:: give :verbose => false to not log the status, and
|
255
|
+
# :force => true, to force the replacement regardles of runner behavior.
|
255
256
|
#
|
256
257
|
# ==== Example
|
257
258
|
#
|
@@ -262,9 +263,10 @@ class Bundler::Thor
|
|
262
263
|
# end
|
263
264
|
#
|
264
265
|
def gsub_file(path, flag, *args, &block)
|
265
|
-
return unless behavior == :invoke
|
266
266
|
config = args.last.is_a?(Hash) ? args.pop : {}
|
267
267
|
|
268
|
+
return unless behavior == :invoke || config.fetch(:force, false)
|
269
|
+
|
268
270
|
path = File.expand_path(path, destination_root)
|
269
271
|
say_status :gsub, relative_to_original_destination_root(path), config.fetch(:verbose, true)
|
270
272
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Bundler::Thor
|
2
|
-
Correctable = if defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable)
|
2
|
+
Correctable = if defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable) # rubocop:disable Naming/ConstantName
|
3
3
|
# In order to support versions of Ruby that don't have keyword
|
4
4
|
# arguments, we need our own spell checker class that doesn't take key
|
5
5
|
# words. Even though this code wouldn't be hit because of the check
|
@@ -30,7 +30,11 @@ class Bundler::Thor
|
|
30
30
|
|
31
31
|
arguments.each do |argument|
|
32
32
|
if !argument.default.nil?
|
33
|
-
|
33
|
+
begin
|
34
|
+
@assigns[argument.human_name] = argument.default.dup
|
35
|
+
rescue TypeError # Compatibility shim for un-dup-able Fixnum in Ruby < 2.4
|
36
|
+
@assigns[argument.human_name] = argument.default
|
37
|
+
end
|
34
38
|
elsif argument.required?
|
35
39
|
@non_assigned_required << argument
|
36
40
|
end
|
@@ -133,15 +133,16 @@ class Bundler::Thor
|
|
133
133
|
|
134
134
|
protected
|
135
135
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
136
|
+
def assign_result!(option, result)
|
137
|
+
if option.repeatable && option.type == :hash
|
138
|
+
(@assigns[option.human_name] ||= {}).merge!(result)
|
139
|
+
elsif option.repeatable
|
140
|
+
(@assigns[option.human_name] ||= []) << result
|
141
|
+
else
|
142
|
+
@assigns[option.human_name] = result
|
143
|
+
end
|
143
144
|
end
|
144
|
-
|
145
|
+
|
145
146
|
# Check if the current value in peek is a registered switch.
|
146
147
|
#
|
147
148
|
# Two booleans are returned. The first is true if the current value
|
@@ -94,6 +94,8 @@ class Bundler::Thor
|
|
94
94
|
# say("I know you knew that.")
|
95
95
|
#
|
96
96
|
def say(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
|
97
|
+
return if quiet?
|
98
|
+
|
97
99
|
buffer = prepare_message(message, *color)
|
98
100
|
buffer << "\n" if force_new_line && !message.to_s.end_with?("\n")
|
99
101
|
|
@@ -230,8 +232,9 @@ class Bundler::Thor
|
|
230
232
|
paras = message.split("\n\n")
|
231
233
|
|
232
234
|
paras.map! do |unwrapped|
|
233
|
-
|
234
|
-
|
235
|
+
words = unwrapped.split(" ")
|
236
|
+
counter = words.first.length
|
237
|
+
words.inject do |memo, word|
|
235
238
|
word = word.gsub(/\n\005/, "\n").gsub(/\005/, "\n")
|
236
239
|
counter = 0 if word.include? "\n"
|
237
240
|
if (counter + word.length + 1) < width
|
@@ -97,7 +97,11 @@ class Bundler::Thor
|
|
97
97
|
protected
|
98
98
|
|
99
99
|
def can_display_colors?
|
100
|
-
|
100
|
+
are_colors_supported? && !are_colors_disabled?
|
101
|
+
end
|
102
|
+
|
103
|
+
def are_colors_supported?
|
104
|
+
stdout.tty? && ENV["TERM"] != "dumb"
|
101
105
|
end
|
102
106
|
|
103
107
|
def are_colors_disabled?
|
data/lib/rubygems.rb
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
require 'rbconfig'
|
9
9
|
|
10
10
|
module Gem
|
11
|
-
VERSION = "3.2.
|
11
|
+
VERSION = "3.2.10".freeze
|
12
12
|
end
|
13
13
|
|
14
14
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -275,7 +275,7 @@ module Gem
|
|
275
275
|
|
276
276
|
unless spec = specs.first
|
277
277
|
msg = "can't find gem #{dep} with executable #{exec_name}"
|
278
|
-
if
|
278
|
+
if dep.filters_bundler? && bundler_message = Gem::BundlerVersionFinder.missing_version_message
|
279
279
|
msg = bundler_message
|
280
280
|
end
|
281
281
|
raise Gem::GemNotFoundException, msg
|
@@ -469,7 +469,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
469
469
|
next if File.exist? subdir
|
470
470
|
begin
|
471
471
|
FileUtils.mkdir_p subdir, **options
|
472
|
-
rescue
|
472
|
+
rescue SystemCallError
|
473
473
|
end
|
474
474
|
end
|
475
475
|
ensure
|
data/lib/rubygems/command.rb
CHANGED
data/lib/rubygems/dependency.rb
CHANGED
@@ -277,7 +277,7 @@ class Gem::Dependency
|
|
277
277
|
requirement.satisfied_by?(spec.version) && env_req.satisfied_by?(spec.version)
|
278
278
|
end.map(&:to_spec)
|
279
279
|
|
280
|
-
Gem::BundlerVersionFinder.filter!(matches) if
|
280
|
+
Gem::BundlerVersionFinder.filter!(matches) if filters_bundler?
|
281
281
|
|
282
282
|
if platform_only
|
283
283
|
matches.reject! do |spec|
|
@@ -295,6 +295,10 @@ class Gem::Dependency
|
|
295
295
|
@requirement.specific?
|
296
296
|
end
|
297
297
|
|
298
|
+
def filters_bundler?
|
299
|
+
name == "bundler".freeze && !specific?
|
300
|
+
end
|
301
|
+
|
298
302
|
def to_specs
|
299
303
|
matches = matching_specs true
|
300
304
|
|
data/lib/rubygems/ext/builder.rb
CHANGED
@@ -28,13 +28,14 @@ class Gem::Ext::Builder
|
|
28
28
|
unless make_program
|
29
29
|
make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make'
|
30
30
|
end
|
31
|
+
make_program = Shellwords.split(make_program)
|
31
32
|
|
32
33
|
destdir = 'DESTDIR=%s' % ENV['DESTDIR']
|
33
34
|
|
34
35
|
['clean', '', 'install'].each do |target|
|
35
36
|
# Pass DESTDIR via command line to override what's in MAKEFLAGS
|
36
37
|
cmd = [
|
37
|
-
make_program,
|
38
|
+
*make_program,
|
38
39
|
destdir,
|
39
40
|
target,
|
40
41
|
].reject(&:empty?)
|
@@ -6,11 +6,16 @@
|
|
6
6
|
module Gem::InstallerUninstallerUtils
|
7
7
|
|
8
8
|
def regenerate_plugins_for(spec, plugins_dir)
|
9
|
+
plugins = spec.plugins
|
10
|
+
return if plugins.empty?
|
11
|
+
|
12
|
+
require 'pathname'
|
13
|
+
|
9
14
|
spec.plugins.each do |plugin|
|
10
15
|
plugin_script_path = File.join plugins_dir, "#{spec.name}_plugin#{File.extname(plugin)}"
|
11
16
|
|
12
17
|
File.open plugin_script_path, 'wb' do |file|
|
13
|
-
file.puts "
|
18
|
+
file.puts "require_relative '#{Pathname.new(plugin).relative_path_from(Pathname.new(plugins_dir))}'"
|
14
19
|
end
|
15
20
|
|
16
21
|
verbose plugin_script_path
|
data/lib/rubygems/platform.rb
CHANGED
data/lib/rubygems/requirement.rb
CHANGED
@@ -35,9 +35,12 @@ class Gem::Resolver::IndexSpecification < Gem::Resolver::Specification
|
|
35
35
|
|
36
36
|
##
|
37
37
|
# The required_ruby_version constraint for this specification
|
38
|
+
#
|
39
|
+
# A fallback is included because when generated, some marshalled specs have it
|
40
|
+
# set to +nil+.
|
38
41
|
|
39
42
|
def required_ruby_version
|
40
|
-
spec.required_ruby_version
|
43
|
+
spec.required_ruby_version || Gem::Requirement.default
|
41
44
|
end
|
42
45
|
|
43
46
|
##
|
@@ -26,6 +26,13 @@ module Gem::Resolver::Molinillo
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
# (see Gem::Resolver::Molinillo::SpecificationProvider#dependencies_equal?)
|
30
|
+
def dependencies_equal?(dependencies, other_dependencies)
|
31
|
+
with_no_such_dependency_error_handling do
|
32
|
+
specification_provider.dependencies_equal?(dependencies, other_dependencies)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
29
36
|
# (see Gem::Resolver::Molinillo::SpecificationProvider#name_for)
|
30
37
|
def name_for(dependency)
|
31
38
|
with_no_such_dependency_error_handling do
|