rubygems-update 2.6.10 → 2.6.11

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubygems-update might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8c92c832ef9ee468263f9ed601e77a1fe1544df8
4
- data.tar.gz: e0564deb664a4c72dc115a15bc0eed6af67505fa
2
+ SHA256:
3
+ metadata.gz: a3145b3347290a8137e8aafa35a0c28e7a2df9cf50129a35f8e99c4e37dfbad9
4
+ data.tar.gz: e9c34d66185f10c358e6bfb47d1a55828f3433d16eb1c1dddb127c36fcab297d
5
5
  SHA512:
6
- metadata.gz: 5f309ad05bf0c71ec039b0624f4b55a3445bce516219d0bab7919ff3a789ee90bd039c2bbaed973320d80b9b3fd73dbb45995bfd5fee7e92f1ecdd3a34916192
7
- data.tar.gz: 37c4f20bedf66dd0dd5ad5c0b434dad8cc96c0656362228c081f062a882d46d8c877d34ce0898412056c3143a52ccdcc094f4f9883f31338f3c8409b7b5f618e
6
+ metadata.gz: 9e27f2aa64535ebc313e5ede961eccb6b671ee65d42730ab84b200df57a3f819ef5f379d9c5041ee80d6127d8fad2a03c9661ecf1042fe712f9767178d883e43
7
+ data.tar.gz: 19aeb548def6a0b6a274e5281f1b840a8de35d026c31ff4d9bb1f827808b58758f6a1fe9d72688a8c02043cecae13912c5894832a27889ebbe0f8974190c1208
@@ -54,7 +54,7 @@ type of the issue or pull request.
54
54
  * <b>cleanup</b> - Generally for a pull request that improves the code base without
55
55
  fixing a bug or implementing a feature.
56
56
  * <b>major bump</b> - This issue or pull request requires a major version bump
57
- * <b>administrative</b> - This issue relates to adminstrative tasks that need to
57
+ * <b>administrative</b> - This issue relates to administrative tasks that need to
58
58
  take place as it relates to rubygems
59
59
 
60
60
  Bug report and Bugfix have the same color. And feature implementation and
@@ -1,5 +1,18 @@
1
1
  # coding: UTF-8
2
2
 
3
+ === 2.6.11 / 2017-03-16
4
+
5
+ Bug fixes:
6
+
7
+ * Fixed broken tests on ruby-head. Pull request #1841 by
8
+ SHIBATA Hiroshi.
9
+ * Update vendored Molinillo to 0.5.7. Pull request #1859 by Samuel
10
+ Giddins.
11
+ * Avoid activating Ruby 2.5 default gems when possible. Pull request #1843
12
+ by Samuel Giddins.
13
+ * Use improved resolver sorting algorithm. Pull request #1856 by
14
+ Samuel Giddins.
15
+
3
16
  === 2.6.10 / 2017-01-23
4
17
 
5
18
  Bug fixes:
@@ -2370,7 +2383,7 @@ http://rubygems.org is now the default source for downloading gems.
2370
2383
  You may have sources set via ~/.gemrc, so you should replace
2371
2384
  http://gems.rubyforge.org with http://rubygems.org
2372
2385
 
2373
- http://gems.rubyforge.org will continue to work for the forseeable future.
2386
+ http://gems.rubyforge.org will continue to work for the foreseeable future.
2374
2387
 
2375
2388
  New features:
2376
2389
 
@@ -2415,12 +2428,12 @@ New features:
2415
2428
  * `gem server` now supports --bind. Patch #27357 by Bruno Michel.
2416
2429
  * `gem rdoc` no longer overwrites built documentation. Use --overwrite
2417
2430
  force rebuilding. Patch #25982 by Akinori MUSHA.
2418
- * Captial letters are now allowed in prerelease versions.
2431
+ * Capital letters are now allowed in prerelease versions.
2419
2432
 
2420
2433
  Bug fixes:
2421
2434
 
2422
2435
  * Development deps are no longer added to rubygems-update gem so older
2423
- versions can update sucessfully.
2436
+ versions can update successfully.
2424
2437
  * Installer bugs:
2425
2438
  * Prerelease gems can now depend on non-prerelease gems.
2426
2439
  * Development dependencies are ignored unless explicitly needed. Bug #27608
@@ -2840,7 +2853,7 @@ Major New Features Include:
2840
2853
  * Bulk update threshold can be specified (-B, --bulk-threshold)
2841
2854
  * New `gem fetch` command
2842
2855
  * `gem` now has "really verbose" output when you specify -v
2843
- * Improved stubs and `gem.bat` on mswin, including better compatiblity
2856
+ * Improved stubs and `gem.bat` on mswin, including better compatibility
2844
2857
  with the One-Click Installer.
2845
2858
 
2846
2859
  Other Changes Include:
@@ -2903,7 +2916,7 @@ Bug Fixes Include:
2903
2916
  * The source cache files may now be dropped with the "gem sources
2904
2917
  --clear-all" command. (This command may require root is the system
2905
2918
  source cache is in a root protected area).
2906
- * Several sub-commands were accidently dropped from the "gem" command.
2919
+ * Several sub-commands were accidentally dropped from the "gem" command.
2907
2920
  These commands have been restored.
2908
2921
 
2909
2922
  === 0.9.3 / 2007-05-10
@@ -2913,7 +2926,7 @@ Bug Fixes Include:
2913
2926
  The ZLib library on Windows will occasionally complains about a buffer error
2914
2927
  when unpacking gems. The Gems software has a workaround for that problem, but
2915
2928
  the workaround was only enabled for versions of ZLib 1.2.1 or earlier. We
2916
- have received several reports of the error occuring with ZLib 1.2.3, so we
2929
+ have received several reports of the error occurring with ZLib 1.2.3, so we
2917
2930
  have permanently enabled the work around on all versions.
2918
2931
 
2919
2932
  === 0.9.2 / 2007-02-05
@@ -2954,7 +2967,7 @@ Major Enhancments include:
2954
2967
 
2955
2968
  Minor enhancements include:
2956
2969
 
2957
- * Verison 0.0.0 is now a valid gem version.
2970
+ * Version 0.0.0 is now a valid gem version.
2958
2971
  * Better detection of missing SSL functionality.
2959
2972
  * SSL is not required if the security policy does not require
2960
2973
  signature checking.
@@ -2973,7 +2986,7 @@ Bug Fixes:
2973
2986
  * Fixed bug where the wrong executables could be uninstalled (Eric
2974
2987
  Hodel).
2975
2988
  * Fixed bug where gem unpack occasionally unpacked the wrong gem.
2976
- * Fixed bug where a fatal error occured when permissions on .gemrc
2989
+ * Fixed bug where a fatal error occurred when permissions on .gemrc
2977
2990
  were too restrictive (reported by Luca Pireddu).
2978
2991
  * Fixed prefix handling for native expressions (patch by Aaron Patterson).
2979
2992
  * Fixed several Upgrade => Update typos.
@@ -2999,7 +3012,7 @@ Bug Fixes:
2999
3012
 
3000
3013
  === 0.8.10 / 2005-03-27
3001
3014
 
3002
- * In multi-user environments, it is common to supply mulitple versions of gems
3015
+ * In multi-user environments, it is common to supply multiple versions of gems
3003
3016
  (for example Rails), allowing individual users to select the version of the
3004
3017
  gem they desire. This allows a user to be insulated from updates to that
3005
3018
  gem. RubyGems 0.8.10 fixes a problem where gems could occasionally become
@@ -3221,7 +3234,7 @@ See ChangeLog
3221
3234
 
3222
3235
  === 0.4.0 / 2004-05-30
3223
3236
 
3224
- * Minor bug fixes including Windows compatability issues
3237
+ * Minor bug fixes including Windows compatibility issues
3225
3238
 
3226
3239
  === 0.3.0 / 2004-04-30
3227
3240
 
@@ -32,7 +32,7 @@ receive any updates.
32
32
  Security releases will be made for RubyGems version series that were included
33
33
  in a Ruby release.
34
34
 
35
- For example, RubyGems 2.0.x will recieve security fixes until Ruby 2.0.0
35
+ For example, RubyGems 2.0.x will receive security fixes until Ruby 2.0.0
36
36
  reaches end-of-life.
37
37
 
38
38
  == Release Policies
@@ -10,7 +10,7 @@ require 'rbconfig'
10
10
  require 'thread'
11
11
 
12
12
  module Gem
13
- VERSION = "2.6.10"
13
+ VERSION = "2.6.11"
14
14
  end
15
15
 
16
16
  # Must be first since it unloads the prelude from 1.9.2
@@ -1,5 +1,4 @@
1
1
  # frozen_string_literal: true
2
- require 'strscan'
3
2
  require 'rubygems/request_set/lockfile/parser'
4
3
 
5
4
  class Gem::RequestSet::Lockfile::Tokenizer
@@ -58,6 +57,7 @@ class Gem::RequestSet::Lockfile::Tokenizer
58
57
  private
59
58
 
60
59
  def tokenize input
60
+ require 'strscan'
61
61
  s = StringScanner.new input
62
62
 
63
63
  until s.eos? do
@@ -4,9 +4,6 @@ require 'rubygems/exceptions'
4
4
  require 'rubygems/util'
5
5
  require 'rubygems/util/list'
6
6
 
7
- require 'uri'
8
- require 'net/http'
9
-
10
7
  ##
11
8
  # Given a set of Gem::Dependency objects as +needed+ and a way to query the
12
9
  # set of available specs via +set+, calculates a set of ActivationRequest
@@ -256,6 +253,44 @@ class Gem::Resolver
256
253
  @soft_missing
257
254
  end
258
255
 
256
+ def sort_dependencies(dependencies, activated, conflicts)
257
+ dependencies.sort_by do |dependency|
258
+ name = name_for(dependency)
259
+ [
260
+ activated.vertex_named(name).payload ? 0 : 1,
261
+ amount_constrained(dependency),
262
+ conflicts[name] ? 0 : 1,
263
+ activated.vertex_named(name).payload ? 0 : search_for(dependency).count,
264
+ ]
265
+ end
266
+ end
267
+
268
+ SINGLE_POSSIBILITY_CONSTRAINT_PENALTY = 1_000_000
269
+ private_constant :SINGLE_POSSIBILITY_CONSTRAINT_PENALTY if defined?(private_constant)
270
+
271
+ # returns an integer \in (-\infty, 0]
272
+ # a number closer to 0 means the dependency is less constraining
273
+ #
274
+ # dependencies w/ 0 or 1 possibilities (ignoring version requirements)
275
+ # are given very negative values, so they _always_ sort first,
276
+ # before dependencies that are unconstrained
277
+ def amount_constrained(dependency)
278
+ @amount_constrained ||= {}
279
+ @amount_constrained[dependency.name] ||= begin
280
+ name_dependency = Gem::Dependency.new(dependency.name)
281
+ dependency_request_for_name = Gem::Resolver::DependencyRequest.new(name_dependency, dependency.requester)
282
+ all = @set.find_all(dependency_request_for_name).size
283
+
284
+ if all <= 1
285
+ all - SINGLE_POSSIBILITY_CONSTRAINT_PENALTY
286
+ else
287
+ search = search_for(dependency).size
288
+ search - all
289
+ end
290
+ end
291
+ end
292
+ private :amount_constrained
293
+
259
294
  end
260
295
 
261
296
  ##
@@ -98,18 +98,27 @@ module Gem::Resolver::Molinillo
98
98
  "#{self.class}:#{vertices.values.inspect}"
99
99
  end
100
100
 
101
+ # @param [Hash] options options for dot output.
101
102
  # @return [String] Returns a dot format representation of the graph
102
- def to_dot
103
+ def to_dot(options = {})
104
+ edge_label = options.delete(:edge_label)
105
+ raise ArgumentError, "Unknown options: #{options.keys}" unless options.empty?
106
+
103
107
  dot_vertices = []
104
108
  dot_edges = []
105
109
  vertices.each do |n, v|
106
110
  dot_vertices << " #{n} [label=\"{#{n}|#{v.payload}}\"]"
107
111
  v.outgoing_edges.each do |e|
108
- dot_edges << " #{e.origin.name} -> #{e.destination.name} [label=\"#{e.requirement}\"]"
112
+ label = edge_label ? edge_label.call(e) : e.requirement
113
+ dot_edges << " #{e.origin.name} -> #{e.destination.name} [label=#{label.to_s.dump}]"
109
114
  end
110
115
  end
116
+
117
+ dot_vertices.uniq!
111
118
  dot_vertices.sort!
119
+ dot_edges.uniq!
112
120
  dot_edges.sort!
121
+
113
122
  dot = dot_vertices.unshift('digraph G {').push('') + dot_edges.push('}')
114
123
  dot.join("\n")
115
124
  end
@@ -123,7 +132,8 @@ module Gem::Resolver::Molinillo
123
132
  vertices.each do |name, vertex|
124
133
  other_vertex = other.vertex_named(name)
125
134
  return false unless other_vertex
126
- return false unless other_vertex.successors.map(&:name).to_set == vertex.successors.map(&:name).to_set
135
+ return false unless vertex.payload == other_vertex.payload
136
+ return false unless other_vertex.successors.to_set == vertex.successors.to_set
127
137
  end
128
138
  end
129
139
 
@@ -23,8 +23,8 @@ module Gem::Resolver::Molinillo
23
23
  # (see Action#down)
24
24
  def down(graph)
25
25
  edge = make_edge(graph)
26
- edge.origin.outgoing_edges.delete(edge)
27
- edge.destination.incoming_edges.delete(edge)
26
+ delete_first(edge.origin.outgoing_edges, edge)
27
+ delete_first(edge.destination.incoming_edges, edge)
28
28
  end
29
29
 
30
30
  # @!group AddEdgeNoCircular
@@ -53,6 +53,13 @@ module Gem::Resolver::Molinillo
53
53
  @destination = destination
54
54
  @requirement = requirement
55
55
  end
56
+
57
+ private
58
+
59
+ def delete_first(array, item)
60
+ return unless index = array.index(item)
61
+ array.delete_at(index)
62
+ end
56
63
  end
57
64
  end
58
65
  end
@@ -10,7 +10,7 @@ module Gem::Resolver::Molinillo
10
10
  # @return [Object] the payload the vertex holds
11
11
  attr_accessor :payload
12
12
 
13
- # @return [Arrary<Object>] the explicit requirements that required
13
+ # @return [Array<Object>] the explicit requirements that required
14
14
  # this vertex
15
15
  attr_reader :explicit_requirements
16
16
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Gem::Resolver::Molinillo
3
3
  # The version of Gem::Resolver::Molinillo.
4
- VERSION = '0.5.5'.freeze
4
+ VERSION = '0.5.7'.freeze
5
5
  end
@@ -48,7 +48,7 @@ module Gem::Resolver::Molinillo
48
48
  if debug?
49
49
  debug_info = yield
50
50
  debug_info = debug_info.inspect unless debug_info.is_a?(String)
51
- output.puts debug_info.split("\n").map { |s| ' ' * depth + s }
51
+ output.puts debug_info.split("\n").map { |s| ' ' * depth + s }
52
52
  end
53
53
  end
54
54
 
@@ -52,7 +52,7 @@ module Gem::Resolver::Molinillo
52
52
  @base = base
53
53
  @states = []
54
54
  @iteration_counter = 0
55
- @parent_of = {}
55
+ @parents_of = Hash.new { |h, k| h[k] = [] }
56
56
  end
57
57
 
58
58
  # Resolves the {#original_requested} dependencies into a full dependency
@@ -105,7 +105,7 @@ module Gem::Resolver::Molinillo
105
105
 
106
106
  handle_missing_or_push_dependency_state(initial_state)
107
107
 
108
- debug { "Starting resolution (#{@started_at})" }
108
+ debug { "Starting resolution (#{@started_at})\nUser-requested dependencies: #{original_requested}" }
109
109
  resolver_ui.before_resolution
110
110
  end
111
111
 
@@ -178,14 +178,14 @@ module Gem::Resolver::Molinillo
178
178
  # Unwinds the states stack because a conflict has been encountered
179
179
  # @return [void]
180
180
  def unwind_for_conflict
181
- debug(depth) { "Unwinding for conflict: #{requirement}" }
181
+ debug(depth) { "Unwinding for conflict: #{requirement} to #{state_index_for_unwind / 2}" }
182
182
  conflicts.tap do |c|
183
183
  sliced_states = states.slice!((state_index_for_unwind + 1)..-1)
184
184
  raise VersionConflict.new(c) unless state
185
185
  activated.rewind_to(sliced_states.first || :initial_state) if sliced_states
186
186
  state.conflicts = c
187
187
  index = states.size - 1
188
- @parent_of.reject! { |_, i| i >= index }
188
+ @parents_of.each { |_, a| a.reject! { |i| i >= index } }
189
189
  end
190
190
  end
191
191
 
@@ -214,7 +214,7 @@ module Gem::Resolver::Molinillo
214
214
  # to the list of requirements.
215
215
  def parent_of(requirement)
216
216
  return unless requirement
217
- return unless index = @parent_of[requirement]
217
+ return unless index = @parents_of[requirement].last
218
218
  return unless parent_state = @states[index]
219
219
  parent_state.requirement
220
220
  end
@@ -356,16 +356,25 @@ module Gem::Resolver::Molinillo
356
356
  # Ensures there are no orphaned successors to the given {vertex}.
357
357
  # @param [DependencyGraph::Vertex] vertex the vertex to fix up.
358
358
  # @return [void]
359
- def fixup_swapped_children(vertex)
359
+ def fixup_swapped_children(vertex) # rubocop:disable Metrics/CyclomaticComplexity
360
360
  payload = vertex.payload
361
361
  deps = dependencies_for(payload).group_by(&method(:name_for))
362
362
  vertex.outgoing_edges.each do |outgoing_edge|
363
- @parent_of[outgoing_edge.requirement] = states.size - 1
363
+ requirement = outgoing_edge.requirement
364
+ parent_index = @parents_of[requirement].last
364
365
  succ = outgoing_edge.destination
365
366
  matching_deps = Array(deps[succ.name])
367
+ dep_matched = matching_deps.include?(requirement)
368
+
369
+ # only push the current index when it was originally required by the
370
+ # same named spec
371
+ if parent_index && states[parent_index].name == name
372
+ @parents_of[requirement].push(states.size - 1)
373
+ end
374
+
366
375
  if matching_deps.empty? && !succ.root? && succ.predecessors.to_a == [vertex]
367
376
  debug(depth) { "Removing orphaned spec #{succ.name} after swapping #{name}" }
368
- succ.requirements.each { |r| @parent_of.delete(r) }
377
+ succ.requirements.each { |r| @parents_of.delete(r) }
369
378
 
370
379
  removed_names = activated.detach_vertex_named(succ.name).map(&:name)
371
380
  requirements.delete_if do |r|
@@ -373,9 +382,14 @@ module Gem::Resolver::Molinillo
373
382
  # so it's safe to delete only based upon name here
374
383
  removed_names.include?(name_for(r))
375
384
  end
376
- elsif !matching_deps.include?(outgoing_edge.requirement)
385
+ elsif !dep_matched
386
+ debug(depth) { "Removing orphaned dependency #{requirement} after swapping #{name}" }
387
+ # also reset if we're removing the edge, but only if its parent has
388
+ # already been fixed up
389
+ @parents_of[requirement].push(states.size - 1) if @parents_of[requirement].empty?
390
+
377
391
  activated.delete_edge(outgoing_edge)
378
- requirements.delete(outgoing_edge.requirement)
392
+ requirements.delete(requirement)
379
393
  end
380
394
  end
381
395
  end
@@ -395,13 +409,18 @@ module Gem::Resolver::Molinillo
395
409
  # @return [Boolean] whether the current spec is satisfied as a new
396
410
  # possibility.
397
411
  def new_spec_satisfied?
412
+ unless requirement_satisfied_by?(requirement, activated, possibility)
413
+ debug(depth) { 'Unsatisfied by requested spec' }
414
+ return false
415
+ end
416
+
398
417
  locked_requirement = locked_requirement_named(name)
399
- requested_spec_satisfied = requirement_satisfied_by?(requirement, activated, possibility)
418
+
400
419
  locked_spec_satisfied = !locked_requirement ||
401
420
  requirement_satisfied_by?(locked_requirement, activated, possibility)
402
- debug(depth) { 'Unsatisfied by requested spec' } unless requested_spec_satisfied
403
421
  debug(depth) { 'Unsatisfied by locked spec' } unless locked_spec_satisfied
404
- requested_spec_satisfied && locked_spec_satisfied
422
+
423
+ locked_spec_satisfied
405
424
  end
406
425
 
407
426
  # @param [String] requirement_name the spec name to search for
@@ -417,7 +436,7 @@ module Gem::Resolver::Molinillo
417
436
  # @return [void]
418
437
  def activate_spec
419
438
  conflicts.delete(name)
420
- debug(depth) { 'Activated ' + name + ' at ' + possibility.to_s }
439
+ debug(depth) { "Activated #{name} at #{possibility}" }
421
440
  activated.set_payload(name, possibility)
422
441
  require_nested_dependencies_for(possibility)
423
442
  end
@@ -432,7 +451,8 @@ module Gem::Resolver::Molinillo
432
451
  nested_dependencies.each do |d|
433
452
  activated.add_child_vertex(name_for(d), nil, [name_for(activated_spec)], d)
434
453
  parent_index = states.size - 1
435
- @parent_of[d] ||= parent_index
454
+ parents = @parents_of[d]
455
+ parents << parent_index if parents.empty?
436
456
  end
437
457
 
438
458
  push_state_for_requirements(requirements + nested_dependencies, !nested_dependencies.empty?)
@@ -21,6 +21,7 @@ class Gem::Resolver::Set
21
21
  attr_accessor :prerelease
22
22
 
23
23
  def initialize # :nodoc:
24
+ require 'uri'
24
25
  @prerelease = false
25
26
  @remote = true
26
27
  @errors = []
@@ -54,4 +55,3 @@ class Gem::Resolver::Set
54
55
  end
55
56
 
56
57
  end
57
-
@@ -1334,7 +1334,7 @@ Also, a list:
1334
1334
  end
1335
1335
 
1336
1336
  ##
1337
- # create_gemspec creates gem specification in given +direcotry+ or '.'
1337
+ # create_gemspec creates gem specification in given +directory+ or '.'
1338
1338
  # for the given +name+ and +version+.
1339
1339
  #
1340
1340
  # Yields the +specification+ to the block, if given
@@ -1434,14 +1434,6 @@ class TestGem < Gem::TestCase
1434
1434
 
1435
1435
  install_specs a, b, c
1436
1436
 
1437
- path = File.join @tempdir, "gem.deps.rb"
1438
-
1439
- File.open path, "w" do |f|
1440
- f.puts "gem 'a'"
1441
- f.puts "gem 'b'"
1442
- f.puts "gem 'c'"
1443
- end
1444
-
1445
1437
  path = File.join(@tempdir, "gd-tmp")
1446
1438
  install_gem a, :install_dir => path
1447
1439
  install_gem b, :install_dir => path
@@ -1450,10 +1442,27 @@ class TestGem < Gem::TestCase
1450
1442
  ENV['GEM_PATH'] = path
1451
1443
  ENV['RUBYGEMS_GEMDEPS'] = "-"
1452
1444
 
1453
- out = `#{Gem.ruby.dup.untaint} -I "#{LIB_PATH.untaint}" -rubygems -e "p Gem.loaded_specs.values.map(&:full_name).sort"`
1454
- out.sub!(/, "openssl-#{Gem::Version::VERSION_PATTERN}"/, "")
1445
+ path = File.join @tempdir, "gem.deps.rb"
1446
+ cmd = [Gem.ruby.dup.untaint, "-I#{LIB_PATH.untaint}", "-rubygems"]
1447
+ if RUBY_VERSION < '1.9'
1448
+ cmd << "-e 'puts Gem.loaded_specs.values.map(&:full_name).sort'"
1449
+ cmd = cmd.join(' ')
1450
+ else
1451
+ cmd << "-eputs Gem.loaded_specs.values.map(&:full_name).sort"
1452
+ end
1453
+
1454
+ File.open path, "w" do |f|
1455
+ f.puts "gem 'a'"
1456
+ end
1457
+ out0 = IO.popen(cmd, &:read).split(/\n/)
1458
+
1459
+ File.open path, "a" do |f|
1460
+ f.puts "gem 'b'"
1461
+ f.puts "gem 'c'"
1462
+ end
1463
+ out = IO.popen(cmd, &:read).split(/\n/)
1455
1464
 
1456
- assert_equal '["a-1", "b-1", "c-1"]', out.strip
1465
+ assert_equal ["b-1", "c-1"], out - out0
1457
1466
  end
1458
1467
 
1459
1468
  def test_looks_for_gemdeps_files_automatically_on_start_in_parent_dir
@@ -1465,14 +1474,6 @@ class TestGem < Gem::TestCase
1465
1474
 
1466
1475
  install_specs a, b, c
1467
1476
 
1468
- path = File.join @tempdir, "gem.deps.rb"
1469
-
1470
- File.open path, "w" do |f|
1471
- f.puts "gem 'a'"
1472
- f.puts "gem 'b'"
1473
- f.puts "gem 'c'"
1474
- end
1475
-
1476
1477
  path = File.join(@tempdir, "gd-tmp")
1477
1478
  install_gem a, :install_dir => path
1478
1479
  install_gem b, :install_dir => path
@@ -1482,14 +1483,30 @@ class TestGem < Gem::TestCase
1482
1483
  ENV['RUBYGEMS_GEMDEPS'] = "-"
1483
1484
 
1484
1485
  Dir.mkdir "sub1"
1485
- out = Dir.chdir "sub1" do
1486
- `#{Gem.ruby.dup.untaint} -I "#{LIB_PATH.untaint}" -rubygems -e "p Gem.loaded_specs.values.map(&:full_name).sort"`
1486
+
1487
+ path = File.join @tempdir, "gem.deps.rb"
1488
+ cmd = [Gem.ruby.dup.untaint, "-Csub1", "-I#{LIB_PATH.untaint}", "-rubygems"]
1489
+ if RUBY_VERSION < '1.9'
1490
+ cmd << "-e 'puts Gem.loaded_specs.values.map(&:full_name).sort'"
1491
+ cmd = cmd.join(' ')
1492
+ else
1493
+ cmd << "-eputs Gem.loaded_specs.values.map(&:full_name).sort"
1494
+ end
1495
+
1496
+ File.open path, "w" do |f|
1497
+ f.puts "gem 'a'"
1498
+ end
1499
+ out0 = IO.popen(cmd, &:read).split(/\n/)
1500
+
1501
+ File.open path, "a" do |f|
1502
+ f.puts "gem 'b'"
1503
+ f.puts "gem 'c'"
1487
1504
  end
1488
- out.sub!(/, "openssl-#{Gem::Version::VERSION_PATTERN}"/, "")
1505
+ out = IO.popen(cmd, &:read).split(/\n/)
1489
1506
 
1490
1507
  Dir.rmdir "sub1"
1491
1508
 
1492
- assert_equal '["a-1", "b-1", "c-1"]', out.strip
1509
+ assert_equal ["b-1", "c-1"], out - out0
1493
1510
  end
1494
1511
 
1495
1512
  def test_register_default_spec
@@ -521,11 +521,11 @@ class TestGemResolver < Gem::TestCase
521
521
  assert_equal req('>= 0'), dependency.requirement
522
522
 
523
523
  activated = e.conflict.activated
524
- assert_equal 'c-2', activated.full_name
524
+ assert_equal 'c-1', activated.full_name
525
525
 
526
- assert_equal dep('c', '>= 2'), activated.request.dependency
526
+ assert_equal dep('c', '= 1'), activated.request.dependency
527
527
 
528
- assert_equal [dep('c', '= 1'), dep('c', '>= 2')],
528
+ assert_equal [dep('c', '>= 2'), dep('c', '= 1')],
529
529
  e.conflict.conflicting_dependencies
530
530
  end
531
531
 
@@ -68,6 +68,7 @@ File.open(version_file, "w") {|f| f.write(version_contents) }
68
68
  confirm "Update changelog"
69
69
  sh("git", "commit", "-am", "Version #{version} with changelog")
70
70
  sh("rake", "release", "VERSION=#{version}")
71
+ sh("git", "push")
71
72
  sh("git", "checkout", "master")
72
73
  sh("git", "pull")
73
74
  unless system("git", "merge", "v#{version}", "--no-edit")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygems-update
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.10
4
+ version: 2.6.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-01-24 00:00:00.000000000 Z
13
+ date: 2017-03-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: builder
@@ -800,7 +800,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
800
800
  version: '0'
801
801
  requirements: []
802
802
  rubyforge_project:
803
- rubygems_version: 2.6.9
803
+ rubygems_version: 2.6.10
804
804
  signing_key:
805
805
  specification_version: 4
806
806
  summary: RubyGems is a package management framework for Ruby