rubygems-update 2.7.9 → 2.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6736c355ae1a7a8a8818d475210864d02a45fa719d077fa0fbdb3364f66516a8
4
- data.tar.gz: d1e05cf09f69a1138e938415d01efe56899cbd01566d7ec00e012d91435aa21e
3
+ metadata.gz: 7d5b46d3734b85b5918d8e3dc8a02b1ab011b0880bc5eaf1037c7d43f78bb172
4
+ data.tar.gz: 534d6caa35ce33777a04ec8c13c93a10a6fde6229ae888354dded07a73930fb7
5
5
  SHA512:
6
- metadata.gz: baefafb2d473d18a0261483e5210052a01a89be4332fd2329530d0f0340f6e9bf7c1c902d6e519d9212a33d3f942f6c905a685c61480cb06833df0773b4cfef5
7
- data.tar.gz: 9f3c018f865fbe4cf5f11efba601c40cd5b6bc470f1e782cfa7b9fdfa2a2f3b9e2df3bf563a0f857906f9757691cd335224358fb67e2b037097f711f3da5023e
6
+ metadata.gz: dbba7ff99a566c7932ebdd64c03f2b708aabfb81aff9bc4841a5aed3084e278ac04a90153ce304bc897431941baa5189cc120f45e668f5ae9fd70cbe0d0108df
7
+ data.tar.gz: 9e7761b5124571a60c3c6cc74658acb9ce1d2929e5ab06290248bc1ef41cf8026c2971b97808d39fb80ed4251c27b4ce5f2fafd3d1faf4b5d1b3d2576d871dcf
@@ -1,5 +1,15 @@
1
1
  # coding: UTF-8
2
2
 
3
+ === 2.7.10 / 2019-06-14
4
+
5
+ Minor enhancements:
6
+
7
+ * Fix bundler rubygems binstub not properly looking for bundler. Pull request #2426
8
+ by David Rodríguez.
9
+ * [BudlerVersionFinder] set .filter! and .compatible? to match only on major versions.
10
+ Pull request #2515 by Colby Swandale.
11
+ + Update for compatibilty with new minitest. Pull request #2118 by MSP-Greg.
12
+
3
13
  === 2.7.9 / 2019-03-05
4
14
 
5
15
  Security fixes:
@@ -4,7 +4,7 @@ module Bundler
4
4
  # Represents metadata from when the Bundler gem was built.
5
5
  module BuildMetadata
6
6
  # begin ivars
7
- @built_at = "2019-03-04".freeze
7
+ @built_at = "2019-06-14".freeze
8
8
  @git_commit_sha = "8a789f00b".freeze
9
9
  @release = false
10
10
  # end ivars
@@ -10,7 +10,7 @@ require 'rbconfig'
10
10
  require 'thread'
11
11
 
12
12
  module Gem
13
- VERSION = "2.7.9"
13
+ VERSION = "2.7.10"
14
14
  end
15
15
 
16
16
  # Must be first since it unloads the prelude from 1.9.2
@@ -270,12 +270,7 @@ module Gem
270
270
 
271
271
  return loaded if loaded && dep.matches_spec?(loaded)
272
272
 
273
- find_specs = proc { dep.matching_specs(true) }
274
- if dep.to_s == "bundler (>= 0.a)"
275
- specs = Gem::BundlerVersionFinder.without_filtering(&find_specs)
276
- else
277
- specs = find_specs.call
278
- end
273
+ specs = dep.matching_specs(true)
279
274
 
280
275
  specs = specs.find_all { |spec|
281
276
  spec.executables.include? exec_name
@@ -3,15 +3,6 @@
3
3
  require "rubygems/util"
4
4
 
5
5
  module Gem::BundlerVersionFinder
6
- @without_filtering = false
7
-
8
- def self.without_filtering
9
- without_filtering, @without_filtering = true, @without_filtering
10
- yield
11
- ensure
12
- @without_filtering = without_filtering
13
- end
14
-
15
6
  def self.bundler_version
16
7
  version, _ = bundler_version_with_reason
17
8
 
@@ -21,8 +12,6 @@ module Gem::BundlerVersionFinder
21
12
  end
22
13
 
23
14
  def self.bundler_version_with_reason
24
- return if @without_filtering
25
-
26
15
  if v = ENV["BUNDLER_VERSION"]
27
16
  return [v, "`$BUNDLER_VERSION`"]
28
17
  end
@@ -40,7 +29,7 @@ module Gem::BundlerVersionFinder
40
29
  return unless vr = bundler_version_with_reason
41
30
  <<-EOS
42
31
  Could not find 'bundler' (#{vr.first}) required by #{vr.last}.
43
- To update to the lastest version installed on your system, run `bundle update --bundler`.
32
+ To update to the latest version installed on your system, run `bundle update --bundler`.
44
33
  To install the missing version, run `gem install bundler:#{vr.first}`
45
34
  EOS
46
35
  end
@@ -48,20 +37,14 @@ To install the missing version, run `gem install bundler:#{vr.first}`
48
37
  def self.compatible?(spec)
49
38
  return true unless spec.name == "bundler".freeze
50
39
  return true unless bundler_version = self.bundler_version
51
- if bundler_version.segments.first >= 2
52
- spec.version == bundler_version
53
- else # 1.x
54
- spec.version.segments.first < 2
55
- end
40
+
41
+ spec.version.segments.first == bundler_version.segments.first
56
42
  end
57
43
 
58
44
  def self.filter!(specs)
59
45
  return unless bundler_version = self.bundler_version
60
- if bundler_version.segments.first >= 2
61
- specs.reject! { |spec| spec.version != bundler_version }
62
- else # 1.x
63
- specs.reject! { |spec| spec.version.segments.first >= 2}
64
- end
46
+
47
+ specs.reject! { |spec| spec.version.segments.first != bundler_version.segments.first }
65
48
  end
66
49
 
67
50
  def self.bundle_update_bundler_version
@@ -86,7 +86,7 @@ end
86
86
  #
87
87
  # Tests are always run at a safe level of 1.
88
88
 
89
- class Gem::TestCase < MiniTest::Unit::TestCase
89
+ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Unit::TestCase)
90
90
 
91
91
  extend Gem::Deprecate
92
92
 
@@ -209,6 +209,41 @@ class TestGem < Gem::TestCase
209
209
  assert_equal %w(a-1 b-2 c-1), loaded_spec_names
210
210
  end
211
211
 
212
+ def test_activate_bin_path_gives_proper_error_for_bundler
213
+ bundler = util_spec 'bundler', '2' do |s|
214
+ s.executables = ['bundle']
215
+ end
216
+
217
+ install_specs bundler
218
+
219
+ File.open("Gemfile.lock", "w") do |f|
220
+ f.write <<-L.gsub(/ {8}/, "")
221
+ GEM
222
+ remote: https://rubygems.org/
223
+ specs:
224
+
225
+ PLATFORMS
226
+ ruby
227
+
228
+ DEPENDENCIES
229
+
230
+ BUNDLED WITH
231
+ 9999
232
+ L
233
+ end
234
+
235
+ File.open("Gemfile", "w") { |f| f.puts('source "https://rubygems.org"') }
236
+
237
+ e = assert_raises Gem::GemNotFoundException do
238
+ load Gem.activate_bin_path("bundler", "bundle", ">= 0.a")
239
+ end
240
+
241
+ assert_includes e.message, "Could not find 'bundler' (9999) required by your #{File.expand_path("Gemfile.lock")}."
242
+ assert_includes e.message, "To update to the latest version installed on your system, run `bundle update --bundler`."
243
+ assert_includes e.message, "To install the missing version, run `gem install bundler:9999`"
244
+ refute_includes e.message, "can't find gem bundler (>= 0.a) with executable bundle"
245
+ end
246
+
212
247
  def test_self_bin_path_no_exec_name
213
248
  e = assert_raises ArgumentError do
214
249
  Gem.bin_path 'a'
@@ -1590,7 +1625,7 @@ class TestGem < Gem::TestCase
1590
1625
 
1591
1626
  assert_equal old_style, Gem.find_unresolved_default_spec("foo.rb")
1592
1627
  assert_equal old_style, Gem.find_unresolved_default_spec("bar.rb")
1593
- assert_equal nil, Gem.find_unresolved_default_spec("baz.rb")
1628
+ assert_nil Gem.find_unresolved_default_spec("baz.rb")
1594
1629
 
1595
1630
  Gem.clear_default_specs
1596
1631
 
@@ -1603,8 +1638,8 @@ class TestGem < Gem::TestCase
1603
1638
 
1604
1639
  assert_equal new_style, Gem.find_unresolved_default_spec("foo.rb")
1605
1640
  assert_equal new_style, Gem.find_unresolved_default_spec("bar.rb")
1606
- assert_equal nil, Gem.find_unresolved_default_spec("exec")
1607
- assert_equal nil, Gem.find_unresolved_default_spec("README")
1641
+ assert_nil Gem.find_unresolved_default_spec("exec")
1642
+ assert_nil Gem.find_unresolved_default_spec("README")
1608
1643
  end
1609
1644
 
1610
1645
  def test_default_gems_use_full_paths
@@ -88,20 +88,21 @@ class TestGemBundlerVersionFinder < Gem::TestCase
88
88
  bvf.stub(:bundler_version, v("2.1.1.1")) do
89
89
  assert bvf.compatible?(util_spec("foo"))
90
90
  assert bvf.compatible?(util_spec("bundler", "2.1.1.1"))
91
- refute bvf.compatible?(util_spec("bundler", "2.1.1.a"))
91
+ assert bvf.compatible?(util_spec("bundler", "2.1.1.a"))
92
+ assert bvf.compatible?(util_spec("bundler", "2.999"))
92
93
  refute bvf.compatible?(util_spec("bundler", "1.999"))
93
- refute bvf.compatible?(util_spec("bundler", "2.999"))
94
+ refute bvf.compatible?(util_spec("bundler", "3.0.0"))
94
95
  end
95
96
  end
96
97
 
97
98
  def test_filter
98
- versions = %w[1 1.0 1.0.1.1 2.a 3 3.0]
99
+ versions = %w[1 1.0 1.0.1.1 2 2.a 2.0 2.1.1 3 3.a 3.0 3.1.1]
99
100
  specs = versions.map { |v| util_spec("bundler", v) }
100
101
 
101
- assert_equal %w[1 1.0 1.0.1.1 2.a 3 3.0], util_filter_specs(specs).map(&:version).map(&:to_s)
102
+ assert_equal %w[1 1.0 1.0.1.1 2 2.a 2.0 2.1.1 3 3.a 3.0 3.1.1], util_filter_specs(specs).map(&:version).map(&:to_s)
102
103
 
103
104
  bvf.stub(:bundler_version, v("2.1.1.1")) do
104
- assert_empty util_filter_specs(specs).map(&:version).map(&:to_s)
105
+ assert_equal %w[2 2.a 2.0 2.1.1], util_filter_specs(specs).map(&:version).map(&:to_s)
105
106
  end
106
107
  bvf.stub(:bundler_version, v("1.1.1.1")) do
107
108
  assert_equal %w[1 1.0 1.0.1.1], util_filter_specs(specs).map(&:version).map(&:to_s)
@@ -110,10 +111,10 @@ class TestGemBundlerVersionFinder < Gem::TestCase
110
111
  assert_equal %w[1 1.0 1.0.1.1], util_filter_specs(specs).map(&:version).map(&:to_s)
111
112
  end
112
113
  bvf.stub(:bundler_version, v("2.a")) do
113
- assert_equal %w[2.a], util_filter_specs(specs).map(&:version).map(&:to_s)
114
+ assert_equal %w[2 2.a 2.0 2.1.1], util_filter_specs(specs).map(&:version).map(&:to_s)
114
115
  end
115
116
  bvf.stub(:bundler_version, v("3")) do
116
- assert_equal %w[3 3.0], util_filter_specs(specs).map(&:version).map(&:to_s)
117
+ assert_equal %w[3 3.a 3.0 3.1.1], util_filter_specs(specs).map(&:version).map(&:to_s)
117
118
  end
118
119
  end
119
120
 
@@ -114,8 +114,8 @@ class TestGemCommandManager < Gem::TestCase
114
114
  assert_equal :both, check_options[:domain]
115
115
  assert_equal true, check_options[:wrappers]
116
116
  assert_equal Gem::Requirement.default, check_options[:version]
117
- assert_equal nil, check_options[:install_dir]
118
- assert_equal nil, check_options[:bin_dir]
117
+ assert_nil check_options[:install_dir]
118
+ assert_nil check_options[:bin_dir]
119
119
 
120
120
  #check settings
121
121
  check_options = nil
@@ -48,7 +48,7 @@ class TestGemCommandsSigninCommand < Gem::TestCase
48
48
 
49
49
  assert_equal credentials[:rubygems_api_key], api_key
50
50
 
51
- assert_equal credentials[host], nil
51
+ assert_nil credentials[host]
52
52
  end
53
53
 
54
54
  def test_execute_with_host_supplied
@@ -238,7 +238,7 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase
238
238
  @cmd.handle_options %w[]
239
239
 
240
240
  assert_equal false, @cmd.options[:check_dev]
241
- assert_equal nil, @cmd.options[:install_dir]
241
+ assert_nil @cmd.options[:install_dir]
242
242
  assert_equal true, @cmd.options[:user_install]
243
243
  assert_equal Gem::Requirement.default, @cmd.options[:version]
244
244
  assert_equal false, @cmd.options[:vendor]
@@ -358,7 +358,7 @@ class TestGemDependency < Gem::TestCase
358
358
  dep.to_specs
359
359
  end
360
360
 
361
- assert_match "Could not find 'bundler' (3.5) required by reason.\nTo update to the lastest version installed on your system, run `bundle update --bundler`.\nTo install the missing version, run `gem install bundler:3.5`\n", e.message
361
+ assert_match "Could not find 'bundler' (3.5) required by reason.\nTo update to the latest version installed on your system, run `bundle update --bundler`.\nTo install the missing version, run `gem install bundler:3.5`\n", e.message
362
362
  end
363
363
 
364
364
  Gem::BundlerVersionFinder.stub(:bundler_version_with_reason, ["2.0.0.pre.1", "reason"]) do
@@ -16,11 +16,9 @@ class TestGemExtRakeBuilder < Gem::TestCase
16
16
  def test_class_build
17
17
  create_temp_mkrf_file('task :default')
18
18
  output = []
19
- realdir = nil # HACK /tmp vs. /private/tmp
20
19
 
21
20
  build_rake_in do |rake|
22
21
  Dir.chdir @ext do
23
- realdir = Dir.pwd
24
22
  Gem::Ext::RakeBuilder.build 'mkrf_conf.rb', nil, @dest_path, output
25
23
  end
26
24
 
@@ -38,11 +36,9 @@ class TestGemExtRakeBuilder < Gem::TestCase
38
36
  def test_class_build_with_args
39
37
  create_temp_mkrf_file('task :default')
40
38
  output = []
41
- realdir = nil # HACK /tmp vs. /private/tmp
42
39
 
43
40
  build_rake_in do |rake|
44
41
  Dir.chdir @ext do
45
- realdir = Dir.pwd
46
42
  non_empty_args_list = ['']
47
43
  Gem::Ext::RakeBuilder.build 'mkrf_conf.rb', nil, @dest_path, output, non_empty_args_list
48
44
  end
@@ -21,7 +21,7 @@ class TestGemInstaller < Gem::InstallerTestCase
21
21
  super
22
22
  common_installer_setup
23
23
 
24
- if __name__ =~ /^test_install(_|$)/ then
24
+ if (self.class.method_defined?(:__name__) ? __name__ : name) =~ /\Atest_install(_|\Z)/
25
25
  FileUtils.rm_r @spec.gem_dir
26
26
  FileUtils.rm_r @user_spec.gem_dir
27
27
  end
@@ -34,7 +34,7 @@ class TestGemInstaller < Gem::InstallerTestCase
34
34
 
35
35
  super
36
36
 
37
- Gem.configuration = @config
37
+ Gem.configuration = instance_variable_defined?(:@config) ? @config : nil
38
38
  end
39
39
 
40
40
  def test_app_script_text
@@ -663,7 +663,7 @@ gem 'other', version
663
663
  assert_path_exists installed_exec
664
664
 
665
665
  if symlink_supported?
666
- assert_send([File, :symlink?, installed_exec])
666
+ assert File.symlink?(installed_exec)
667
667
  return
668
668
  end
669
669
 
@@ -197,7 +197,7 @@ class TestGemResolverInstallerSet < Gem::TestCase
197
197
  def (set.remote_set).prefetch(_)
198
198
  raise "called"
199
199
  end
200
- assert_equal nil, set.prefetch(nil)
200
+ assert_nil set.prefetch(nil)
201
201
  end
202
202
 
203
203
  def test_prerelease_equals
@@ -1135,7 +1135,7 @@ dependencies: []
1135
1135
 
1136
1136
  data = Marshal.load Gem::Util.inflate(Gem.read_binary(path))
1137
1137
 
1138
- assert_equal nil, data.rubyforge_project
1138
+ assert_nil data.rubyforge_project
1139
1139
  end
1140
1140
 
1141
1141
  def test_emits_zulu_timestamps_properly
@@ -1156,7 +1156,7 @@ dependencies: []
1156
1156
  assert_equal "blah", spec.name
1157
1157
  assert_equal "1.3.5", spec.version.to_s
1158
1158
  assert_equal Gem::Platform::RUBY, spec.platform
1159
- assert_equal nil, spec.summary
1159
+ assert_nil spec.summary
1160
1160
  assert_equal [], spec.files
1161
1161
 
1162
1162
  assert_equal [], spec.test_files
@@ -1333,31 +1333,31 @@ dependencies: []
1333
1333
  @a2.bindir = nil
1334
1334
  @a2.executable = 'app'
1335
1335
 
1336
- assert_equal nil, @a2.bindir
1336
+ assert_nil @a2.bindir
1337
1337
  assert_equal %w[app lib/code.rb].sort, @a2.files
1338
1338
  end
1339
1339
 
1340
1340
  def test_extensions_equals_nil
1341
1341
  @a2.instance_variable_set(:@extensions, nil)
1342
- assert_equal nil, @a2.instance_variable_get(:@extensions)
1342
+ assert_nil @a2.instance_variable_get(:@extensions)
1343
1343
  assert_equal %w[lib/code.rb], @a2.files
1344
1344
  end
1345
1345
 
1346
1346
  def test_test_files_equals_nil
1347
1347
  @a2.instance_variable_set(:@test_files, nil)
1348
- assert_equal nil, @a2.instance_variable_get(:@test_files)
1348
+ assert_nil @a2.instance_variable_get(:@test_files)
1349
1349
  assert_equal %w[lib/code.rb], @a2.files
1350
1350
  end
1351
1351
 
1352
1352
  def test_executables_equals_nil
1353
1353
  @a2.instance_variable_set(:@executables, nil)
1354
- assert_equal nil, @a2.instance_variable_get(:@executables)
1354
+ assert_nil @a2.instance_variable_get(:@executables)
1355
1355
  assert_equal %w[lib/code.rb], @a2.files
1356
1356
  end
1357
1357
 
1358
1358
  def test_extra_rdoc_files_equals_nil
1359
1359
  @a2.instance_variable_set(:@extra_rdoc_files, nil)
1360
- assert_equal nil, @a2.instance_variable_get(:@extra_rdoc_files)
1360
+ assert_nil @a2.instance_variable_get(:@extra_rdoc_files)
1361
1361
  assert_equal %w[lib/code.rb], @a2.files
1362
1362
  end
1363
1363
 
@@ -2210,7 +2210,7 @@ dependencies: []
2210
2210
  end
2211
2211
 
2212
2212
  def test_allowed_push_host
2213
- assert_equal nil, @a1.metadata['allowed_push_host']
2213
+ assert_nil @a1.metadata['allowed_push_host']
2214
2214
  assert_equal 'https://privategemserver.com', @a3.metadata['allowed_push_host']
2215
2215
  end
2216
2216
 
@@ -3567,7 +3567,7 @@ end
3567
3567
 
3568
3568
  assert_equal a, Gem::Specification.find_inactive_by_path('foo')
3569
3569
  a.activate
3570
- assert_equal nil, Gem::Specification.find_inactive_by_path('foo')
3570
+ assert_nil Gem::Specification.find_inactive_by_path('foo')
3571
3571
  end
3572
3572
 
3573
3573
  def test_load_default_gem
@@ -55,7 +55,7 @@ class TestGemStreamUI < Gem::TestCase
55
55
 
56
56
  Timeout.timeout(0.1) do
57
57
  answer = @sui.ask("what is your favorite color?")
58
- assert_equal nil, answer
58
+ assert_nil answer
59
59
  end
60
60
  end
61
61
 
@@ -79,7 +79,7 @@ class TestGemStreamUI < Gem::TestCase
79
79
 
80
80
  Timeout.timeout(0.1) do
81
81
  answer = @sui.ask_for_password("what is the airspeed velocity of an unladen swallow?")
82
- assert_equal nil, answer
82
+ assert_nil answer
83
83
  end
84
84
  end
85
85
 
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.7.9
4
+ version: 2.7.10
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: 2019-03-04 00:00:00.000000000 Z
13
+ date: 2019-06-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: builder
@@ -102,14 +102,14 @@ dependencies:
102
102
  requirements:
103
103
  - - "~>"
104
104
  - !ruby/object:Gem::Version
105
- version: '3.17'
105
+ version: '3.18'
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - "~>"
111
111
  - !ruby/object:Gem::Version
112
- version: '3.17'
112
+ version: '3.18'
113
113
  description: ''
114
114
  email:
115
115
  - rubygems-developers@rubyforge.org
@@ -804,8 +804,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
804
804
  - !ruby/object:Gem::Version
805
805
  version: '0'
806
806
  requirements: []
807
- rubyforge_project:
808
- rubygems_version: 2.7.6
807
+ rubygems_version: 3.0.3
809
808
  signing_key:
810
809
  specification_version: 4
811
810
  summary: ''