rubygems-update 2.7.2 → 2.7.3

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: 3ea44a86262942cc9381a4c361b856716d959ea3f27d12d7f3a7cc37add42495
4
- data.tar.gz: 13f531a5157a93c69acd9cf69669026377a359baa67dc09b0c4ff34897238068
3
+ metadata.gz: cc0054d823436dc260e3e3365622dc5bc173ed4855a2f22fdcaac219929b080e
4
+ data.tar.gz: 6257d0503e5ca25f0601bec2600de2599c1815014fd866ae040313ded19be794
5
5
  SHA512:
6
- metadata.gz: 17d9721ea2535d7141f7df7685b991d99b9a1a6112a4e7e17c066e5041fe9f57b60fa36cc09d9c5b753a59a2cb2278b03d74de611629fbaa1abeb67b515d2323
7
- data.tar.gz: 12f6af1ed4585e46e6801094ce314bd1d0bcf62e8c471696008fa583ae437bf0f1719164b5957d3d3bc0215d561ff8c6a7c70506d60a7f91693c043641bde61d
6
+ metadata.gz: 0041f39fec2a3abb43bf7eca6d3c82f883ca760fb2b4d9b4cc0539d9fa6f3a0f1d80bca636f49ab2960478c921d4b8513e135ae62893c592aa5760d8a2b9226d
7
+ data.tar.gz: 5a2e0146149449fd9bb43e57efc2d0835e36fddff60a07ff5714d1f9737efe087505ba9fc40d256d155621c131a94f8e487255e17d67c105b46ac86eb6276d2a
@@ -1,5 +1,39 @@
1
1
  # coding: UTF-8
2
2
 
3
+ === 2.7.3
4
+
5
+ Minor enhancements:
6
+
7
+ * Removed needless version lock. Pull request #2074 by SHIBATA Hiroshi.
8
+ * Add --[no-]check-development option to cleanup command. Pull request
9
+ #2061 by Lin Jen-Shin (godfat).
10
+ * Merge glob pattern using braces. Pull request #2072 by Kazuhiro
11
+ NISHIYAMA.
12
+ * Removed warnings of unused variables. Pull request #2084 by SHIBATA
13
+ Hiroshi.
14
+ * Call SPDX.org using HTTPS. Pull request #2102 by Olle Jonsson.
15
+ * Remove multi load warning from plugins documentation. Pull request #2103
16
+ by Thibault Jouan.
17
+
18
+ Bug fixes:
19
+
20
+ * Fix test failure on Alpine Linux. Pull request #2079 by Ellen Marie
21
+ Dash.
22
+ * Avoid encoding issues by using binread in setup. Pull request #2089 by
23
+ Mauro Morales.
24
+ * Fix rake install_test_deps once the rake clean_env does not exist. Pull
25
+ request #2090 by Lucas Oliveira.
26
+ * Prevent to delete to "bundler-" prefix gem like bundler-audit. Pull
27
+ request #2086 by SHIBATA Hiroshi.
28
+ * Generate .bat files on Windows platform. Pull request #2094 by SHIBATA
29
+ Hiroshi.
30
+ * Workaround common options mutation in Gem::Command test. Pull request
31
+ #2098 by Thibault Jouan.
32
+ * Check gems dir existence before removing bundler. Pull request #2104 by
33
+ Thibault Jouan.
34
+ * Use setup command --regenerate-binstubs option flag. Pull request #2099
35
+ by Thibault Jouan.
36
+
3
37
  === 2.7.2
4
38
 
5
39
  Bug fixes:
@@ -97,6 +131,20 @@ Minor enhancements:
97
131
  Giddins.
98
132
  * [Version] Make hash based upon canonical segments. Pull request #1659 by
99
133
  Samuel Giddins.
134
+ * Add Ruby Together CTA, rearrange README a bit. Pull request #1775 by
135
+ Michael Bernstein.
136
+ * Update Contributing.rdoc with new label usage. Pull request #1716 by
137
+ Lynn Cyrin.
138
+ * Add --host sample to help. Pull request #1709 by Code Ahss.
139
+ * Add a helpful suggestion when `gem install` fails due to required_rub….
140
+ Pull request #1697 by Samuel Giddins.
141
+ * Add cert expiration length flag. Pull request #1725 by Luis Sagastume.
142
+ * Add submodule instructions to manual install. Pull request #1727 by
143
+ Joseph Frazier.
144
+ * Allow usage of multiple `--version` operators. Pull request #1546 by
145
+ James Wen.
146
+ * Warn when requiring deprecated files. Pull request #1939 by Ellen Marie
147
+ Dash.
100
148
 
101
149
  Compatibility changes:
102
150
 
@@ -112,20 +160,6 @@ Compatibility changes:
112
160
  Pull request #1731 by Jon Moss.
113
161
  * Update Code of Conduct to Contributor Covenant v1.4.0. Pull request
114
162
  #1796 by Matej.
115
- * Add Ruby Together CTA, rearrange README a bit. Pull request #1775 by
116
- Michael Bernstein.
117
- * Update Contributing.rdoc with new label usage. Pull request #1716 by
118
- Lynn Cyrin.
119
- * Add --host sample to help. Pull request #1709 by Code Ahss.
120
- * Add a helpful suggestion when `gem install` fails due to required_rub….
121
- Pull request #1697 by Samuel Giddins.
122
- * Add cert expiration length flag. Pull request #1725 by Luis Sagastume.
123
- * Add submodule instructions to manual install. Pull request #1727 by
124
- Joseph Frazier.
125
- * Allow usage of multiple `--version` operators. Pull request #1546 by
126
- James Wen.
127
- * Warn when requiring deprecated files. Pull request #1939 by Ellen Marie
128
- Dash.
129
163
 
130
164
  Bug fixes:
131
165
 
data/Rakefile CHANGED
@@ -144,7 +144,7 @@ end
144
144
  task(:newb).prerequisites.unshift "bundler:checkout"
145
145
 
146
146
  desc "Install gems needed to run the tests"
147
- task :install_test_deps => :clean_env do
147
+ task :install_test_deps => :clean do
148
148
  sh "gem install minitest -v '~> 4.0'"
149
149
  end
150
150
 
@@ -168,7 +168,7 @@ end
168
168
 
169
169
  task :prerelease => [:clobber, :check_manifest, :test]
170
170
 
171
- task :postrelease => %w[upload guides:publish blog:publish publish_docs]
171
+ task :postrelease => %w[upload guides:publish blog:publish]
172
172
 
173
173
  file "pkg/rubygems-#{v}" => "pkg/rubygems-update-#{v}" do |t|
174
174
  require 'find'
@@ -219,10 +219,8 @@ end
219
219
  desc "Upload release to rubygems.org"
220
220
  task :upload => %w[upload_to_s3]
221
221
 
222
- on_master = `git branch --list master`.strip == '* master'
223
- on_master = true if ENV['FORCE']
224
-
225
- Rake::Task['publish_docs'].clear unless on_master
222
+ # Ignonre to publish rdoc to docs.seattlerb.org
223
+ Rake::Task['publish_docs'].clear
226
224
 
227
225
  directory '../guides.rubygems.org' do
228
226
  sh 'git', 'clone',
@@ -266,6 +264,9 @@ namespace 'guides' do
266
264
  desc 'Updates and publishes the guides for the just-released RubyGems'
267
265
  task 'publish'
268
266
 
267
+ on_master = `git branch --list master`.strip == '* master'
268
+ on_master = true if ENV['FORCE']
269
+
269
270
  task 'publish' => %w[
270
271
  guides:pull
271
272
  guides:update
@@ -10,7 +10,7 @@ require 'rbconfig'
10
10
  require 'thread'
11
11
 
12
12
  module Gem
13
- VERSION = "2.7.2"
13
+ VERSION = "2.7.3"
14
14
  end
15
15
 
16
16
  # Must be first since it unloads the prelude from 1.9.2
@@ -47,9 +47,7 @@ require 'rubygems/errors'
47
47
  # As of RubyGems 1.3.2, RubyGems will load plugins installed in gems or
48
48
  # $LOAD_PATH. Plugins must be named 'rubygems_plugin' (.rb, .so, etc) and
49
49
  # placed at the root of your gem's #require_path. Plugins are discovered via
50
- # Gem::find_files and then loaded. Take care when implementing a plugin as your
51
- # plugin file may be loaded multiple times if multiple versions of your gem
52
- # are installed.
50
+ # Gem::find_files and then loaded.
53
51
  #
54
52
  # For an example plugin, see the {Graph gem}[https://github.com/seattlerb/graph]
55
53
  # which adds a `gem graph` command.
@@ -8,13 +8,20 @@ class Gem::Commands::CleanupCommand < Gem::Command
8
8
  def initialize
9
9
  super 'cleanup',
10
10
  'Clean up old versions of installed gems',
11
- :force => false, :install_dir => Gem.dir
11
+ :force => false, :install_dir => Gem.dir,
12
+ :check_dev => true
12
13
 
13
14
  add_option('-n', '-d', '--dryrun',
14
15
  'Do not uninstall gems') do |value, options|
15
16
  options[:dryrun] = true
16
17
  end
17
18
 
19
+ add_option('-D', '--[no-]check-development',
20
+ 'Check development dependencies while uninstalling',
21
+ '(default: true)') do |value, options|
22
+ options[:check_dev] = value
23
+ end
24
+
18
25
  @candidate_gems = nil
19
26
  @default_gems = []
20
27
  @full = nil
@@ -138,7 +145,7 @@ If no gems are named all gems in GEM_HOME are cleaned.
138
145
  end
139
146
 
140
147
  def uninstall_dep spec
141
- return unless @full.ok_to_remove?(spec.full_name)
148
+ return unless @full.ok_to_remove?(spec.full_name, options[:check_dev])
142
149
 
143
150
  if options[:dryrun] then
144
151
  say "Dry Run Mode: Would uninstall #{spec.full_name}"
@@ -82,11 +82,7 @@ class Gem::Commands::SetupCommand < Gem::Command
82
82
 
83
83
  add_option '--[no-]regenerate-binstubs',
84
84
  'Regenerate gem binstubs' do |value, options|
85
- if value then
86
- options[:regenerate_binstubs] = true
87
- else
88
- options.delete(:regenerate_binstubs)
89
- end
85
+ options[:regenerate_binstubs] = value
90
86
  end
91
87
 
92
88
  @verbose = nil
@@ -156,7 +152,7 @@ By default, this RubyGems will install gem as:
156
152
 
157
153
  say "RubyGems #{Gem::VERSION} installed"
158
154
 
159
- regenerate_binstubs
155
+ regenerate_binstubs if options[:regenerate_binstubs]
160
156
 
161
157
  uninstall_old_gemcutter
162
158
 
@@ -357,7 +353,7 @@ By default, this RubyGems will install gem as:
357
353
  mkdir_p Gem::Specification.default_specifications_dir
358
354
 
359
355
  # Workaround for non-git environment.
360
- gemspec = File.read('bundler/bundler.gemspec').gsub(/`git ls-files -z`/, "''")
356
+ gemspec = File.open('bundler/bundler.gemspec', 'rb'){|f| f.read.gsub(/`git ls-files -z`/, "''") }
361
357
  File.open('bundler/bundler.gemspec', 'w'){|f| f.write gemspec }
362
358
 
363
359
  bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
@@ -372,13 +368,24 @@ By default, this RubyGems will install gem as:
372
368
 
373
369
  bundler_spec = Gem::Specification.load(default_spec_path)
374
370
 
375
- Dir.entries(bundler_spec.gems_dir).
376
- select {|default_gem| default_gem.start_with?("bundler-") }.
377
- each {|default_gem| rm_r File.join(bundler_spec.gems_dir, default_gem) }
371
+ if File.directory? bundler_spec.gems_dir
372
+ Dir.entries(bundler_spec.gems_dir).
373
+ select {|default_gem| File.basename(default_gem).match(/^bundler-#{Gem::Version::VERSION_PATTERN}$/) }.
374
+ each {|default_gem| rm_r File.join(bundler_spec.gems_dir, default_gem) }
375
+ end
378
376
 
379
377
  mkdir_p bundler_spec.bin_dir
380
378
  bundler_spec.executables.each {|e| cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_spec.bin_dir, e) }
381
379
 
380
+ if Gem.win_platform?
381
+ require 'rubygems/installer'
382
+
383
+ installer = Gem::Installer.for_spec bundler_spec
384
+ bundler_spec.executables.each do |e|
385
+ installer.generate_windows_script e, bundler_spec.bin_dir
386
+ end
387
+ end
388
+
382
389
  say "Bundler #{bundler_spec.version} installed"
383
390
  end
384
391
 
@@ -442,7 +449,7 @@ By default, this RubyGems will install gem as:
442
449
  # for installation of bundler as default gems
443
450
  def template_files
444
451
  Dir.chdir "bundler/lib" do
445
- (Dir[File.join('bundler', 'templates', '**', '*')] + Dir[File.join('bundler', 'templates', '**', '.*')]).
452
+ (Dir[File.join('bundler', 'templates', '**', '{*,.*}')]).
446
453
  select{|f| !File.directory?(f)}
447
454
  end
448
455
  end
@@ -450,7 +457,7 @@ By default, this RubyGems will install gem as:
450
457
  # for cleanup old bundler files
451
458
  def template_files_in dir
452
459
  Dir.chdir dir do
453
- (Dir[File.join('templates', '**', '*')] + Dir[File.join('templates', '**', '.*')]).
460
+ (Dir[File.join('templates', '**', '{*,.*}')]).
454
461
  select{|f| !File.directory?(f)}
455
462
  end
456
463
  end
@@ -48,9 +48,13 @@ class Gem::Licenses
48
48
  BSD-3-Clause-Attribution
49
49
  BSD-3-Clause-Clear
50
50
  BSD-3-Clause-LBNL
51
+ BSD-3-Clause-No-Nuclear-License
52
+ BSD-3-Clause-No-Nuclear-License-2014
53
+ BSD-3-Clause-No-Nuclear-Warranty
51
54
  BSD-4-Clause
52
55
  BSD-4-Clause-UC
53
56
  BSD-Protection
57
+ BSD-Source-Code
54
58
  BSL-1.0
55
59
  Bahyph
56
60
  Barr
@@ -126,6 +130,7 @@ class Gem::Licenses
126
130
  Entessa
127
131
  ErlPL-1.1
128
132
  Eurosym
133
+ FSFAP
129
134
  FSFUL
130
135
  FSFULLR
131
136
  FTL
@@ -137,8 +142,18 @@ class Gem::Licenses
137
142
  GFDL-1.3
138
143
  GL2PS
139
144
  GPL-1.0
145
+ GPL-1.0+
140
146
  GPL-2.0
147
+ GPL-2.0+
148
+ GPL-2.0-with-GCC-exception
149
+ GPL-2.0-with-autoconf-exception
150
+ GPL-2.0-with-bison-exception
151
+ GPL-2.0-with-classpath-exception
152
+ GPL-2.0-with-font-exception
141
153
  GPL-3.0
154
+ GPL-3.0+
155
+ GPL-3.0-with-GCC-exception
156
+ GPL-3.0-with-autoconf-exception
142
157
  Giftware
143
158
  Glide
144
159
  Glulxe
@@ -152,14 +167,20 @@ class Gem::Licenses
152
167
  ISC
153
168
  ImageMagick
154
169
  Imlib2
170
+ Info-ZIP
155
171
  Intel
156
172
  Intel-ACPI
157
173
  Interbase-1.0
158
174
  JSON
159
175
  JasPer-2.0
176
+ LAL-1.2
177
+ LAL-1.3
160
178
  LGPL-2.0
179
+ LGPL-2.0+
161
180
  LGPL-2.1
181
+ LGPL-2.1+
162
182
  LGPL-3.0
183
+ LGPL-3.0+
163
184
  LGPLLR
164
185
  LPL-1.0
165
186
  LPL-1.02
@@ -170,6 +191,9 @@ class Gem::Licenses
170
191
  LPPL-1.3c
171
192
  Latex2e
172
193
  Leptonica
194
+ LiLiQ-P-1.1
195
+ LiLiQ-R-1.1
196
+ LiLiQ-Rplus-1.1
173
197
  Libpng
174
198
  MIT
175
199
  MIT-CMU
@@ -193,6 +217,7 @@ class Gem::Licenses
193
217
  NBPL-1.0
194
218
  NCSA
195
219
  NGPL
220
+ NLOD-1.0
196
221
  NLPL
197
222
  NOSL
198
223
  NPL-1.0
@@ -201,11 +226,13 @@ class Gem::Licenses
201
226
  NRL
202
227
  NTP
203
228
  Naumen
229
+ Net-SNMP
204
230
  NetCDF
205
231
  Newsletr
206
232
  Nokia
207
233
  Noweb
208
234
  Nunit
235
+ OCCT-PL
209
236
  OCLC-2.0
210
237
  ODbL-1.0
211
238
  OFL-1.0
@@ -229,6 +256,7 @@ class Gem::Licenses
229
256
  OLDAP-2.8
230
257
  OML
231
258
  OPL-1.0
259
+ OSET-PL-2.1
232
260
  OSL-1.0
233
261
  OSL-1.1
234
262
  OSL-2.0
@@ -259,6 +287,7 @@ class Gem::Licenses
259
287
  SISSL
260
288
  SISSL-1.2
261
289
  SMLNJ
290
+ SMPPL
262
291
  SNIA
263
292
  SPL-1.0
264
293
  SWL
@@ -269,12 +298,16 @@ class Gem::Licenses
269
298
  Spencer-86
270
299
  Spencer-94
271
300
  Spencer-99
301
+ StandardML-NJ
272
302
  SugarCRM-1.1.3
273
303
  TCL
304
+ TCP-wrappers
274
305
  TMate
275
306
  TORQUE-1.1
276
307
  TOSL
277
308
  UPL-1.0
309
+ Unicode-DFS-2015
310
+ Unicode-DFS-2016
278
311
  Unicode-TOU
279
312
  Unlicense
280
313
  VOSTROM
@@ -282,7 +315,9 @@ class Gem::Licenses
282
315
  Vim
283
316
  W3C
284
317
  W3C-19980720
318
+ W3C-20150513
285
319
  WTFPL
320
+ WXwindows
286
321
  Watcom-1.0
287
322
  Wsuipa
288
323
  X11
@@ -302,8 +337,10 @@ class Gem::Licenses
302
337
  Zlib
303
338
  bzip2-1.0.5
304
339
  bzip2-1.0.6
340
+ curl
305
341
  diffmark
306
342
  dvipdfm
343
+ eCos-2.0
307
344
  eGenix
308
345
  gSOAP-1.3b
309
346
  gnuplot
@@ -13,6 +13,7 @@ class TestGemCommand < Gem::TestCase
13
13
 
14
14
  @xopt = nil
15
15
 
16
+ @common_options = Gem::Command.common_options.dup
16
17
  Gem::Command.common_options.clear
17
18
  Gem::Command.common_options << [
18
19
  ['-x', '--exe', 'Execute'], lambda do |*a|
@@ -24,6 +25,11 @@ class TestGemCommand < Gem::TestCase
24
25
  @cmd = Gem::Command.new @cmd_name, 'summary'
25
26
  end
26
27
 
28
+ def teardown
29
+ super
30
+ Gem::Command.common_options.replace @common_options
31
+ end
32
+
27
33
  def test_self_add_specific_extra_args
28
34
  added_args = %w[--all]
29
35
  @cmd.add_option '--all' do |v,o| end
@@ -32,6 +32,21 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
32
32
  assert @cmd.options[:dryrun]
33
33
  end
34
34
 
35
+ def test_handle_options_check_development
36
+ @cmd.handle_options []
37
+ assert @cmd.options[:check_dev]
38
+
39
+ %w[-D --check-development].each do |options|
40
+ @cmd.handle_options [options]
41
+ assert @cmd.options[:check_dev]
42
+ end
43
+
44
+ %w[--no-check-development].each do |options|
45
+ @cmd.handle_options [options]
46
+ refute @cmd.options[:check_dev]
47
+ end
48
+ end
49
+
35
50
  def test_execute
36
51
  @cmd.options[:args] = %w[a]
37
52
 
@@ -55,6 +70,34 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
55
70
  refute_path_exists @b_1.gem_dir
56
71
  end
57
72
 
73
+ def test_execute_dev_dependencies
74
+ @b_1 = util_spec 'b', 1 do |s| s.add_development_dependency 'a', '1' end
75
+ @c_1 = util_spec 'c', 1 do |s| s.add_development_dependency 'a', '2' end
76
+
77
+ install_gem @b_1
78
+ install_gem @c_1
79
+
80
+ @cmd.handle_options %w[--check-development]
81
+
82
+ @cmd.execute
83
+
84
+ assert_path_exists @a_1.gem_dir
85
+ end
86
+
87
+ def test_execute_without_dev_dependencies
88
+ @b_1 = util_spec 'b', 1 do |s| s.add_development_dependency 'a', '1' end
89
+ @c_1 = util_spec 'c', 1 do |s| s.add_development_dependency 'a', '2' end
90
+
91
+ install_gem @b_1
92
+ install_gem @c_1
93
+
94
+ @cmd.handle_options %w[--no-check-development]
95
+
96
+ @cmd.execute
97
+
98
+ refute_path_exists @a_1.gem_dir
99
+ end
100
+
58
101
  def test_execute_all
59
102
  gemhome2 = File.join @tempdir, 'gemhome2'
60
103
 
@@ -27,6 +27,67 @@ class TestGemCommandsSetupCommand < Gem::TestCase
27
27
  open 'bundler/exe/bundle', 'w' do |io| io.puts '# bundle' end
28
28
  open 'bundler/lib/bundler.rb', 'w' do |io| io.puts '# bundler.rb' end
29
29
  open 'bundler/lib/bundler/b.rb', 'w' do |io| io.puts '# b.rb' end
30
+
31
+ FileUtils.mkdir_p 'default/gems'
32
+
33
+ gemspec = Gem::Specification.new
34
+ gemspec.name = "bundler"
35
+ gemspec.version = "1.16.0"
36
+ gemspec.bindir = "exe"
37
+ gemspec.executables = ["bundle"]
38
+
39
+ open 'bundler/bundler.gemspec', 'w' do |io|
40
+ io.puts gemspec.to_ruby
41
+ end
42
+
43
+ open(File.join(Gem::Specification.default_specifications_dir, "bundler-1.15.4.gemspec"), 'w') do |io|
44
+ io.puts '# bundler'
45
+ end
46
+
47
+ FileUtils.mkdir_p File.join(Gem.default_dir, "specifications")
48
+ open(File.join(Gem.default_dir, "specifications", "bundler-audit-1.0.0.gemspec"), 'w') do |io|
49
+ io.puts '# bundler-audit'
50
+ end
51
+
52
+ FileUtils.mkdir_p 'default/gems/bundler-1.15.4'
53
+ FileUtils.mkdir_p 'default/gems/bundler-audit-1.0.0'
54
+ end
55
+
56
+ def gem_install name
57
+ gem = util_spec name do |s|
58
+ s.executables = [name]
59
+ s.files = %W[bin/#{name}]
60
+ end
61
+ write_file File.join @tempdir, 'bin', name do |f|
62
+ f.puts '#!/usr/bin/ruby'
63
+ end
64
+ install_gem gem
65
+ File.join @gemhome, 'bin', name
66
+ end
67
+
68
+ def test_execute_regenerate_binstubs
69
+ gem_bin_path = gem_install 'a'
70
+ write_file gem_bin_path do |io|
71
+ io.puts 'I changed it!'
72
+ end
73
+
74
+ @cmd.options[:document] = []
75
+ @cmd.execute
76
+
77
+ assert_match %r{\A#!}, File.read(gem_bin_path)
78
+ end
79
+
80
+ def test_execute_no_regenerate_binstubs
81
+ gem_bin_path = gem_install 'a'
82
+ write_file gem_bin_path do |io|
83
+ io.puts 'I changed it!'
84
+ end
85
+
86
+ @cmd.options[:document] = []
87
+ @cmd.options[:regenerate_binstubs] = false
88
+ @cmd.execute
89
+
90
+ assert_equal "I changed it!\n", File.read(gem_bin_path)
30
91
  end
31
92
 
32
93
  def test_pem_files_in
@@ -55,6 +116,33 @@ class TestGemCommandsSetupCommand < Gem::TestCase
55
116
  end
56
117
  end
57
118
 
119
+ def test_install_default_bundler_gem
120
+ @cmd.extend FileUtils
121
+
122
+ @cmd.install_default_bundler_gem
123
+
124
+ if Gem.win_platform?
125
+ bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
126
+ default_spec_path = File.join(Gem::Specification.default_specifications_dir, "#{bundler_spec.full_name}.gemspec")
127
+ spec = Gem::Specification.load(default_spec_path)
128
+
129
+ spec.executables.each do |e|
130
+ assert_path_exists File.join(spec.bin_dir, "#{e}.bat")
131
+ end
132
+ end
133
+
134
+ default_dir = Gem::Specification.default_specifications_dir
135
+
136
+ refute_path_exists File.join(default_dir, "bundler-1.15.4.gemspec")
137
+ refute_path_exists 'default/gems/bundler-1.15.4'
138
+
139
+ assert_path_exists File.join(default_dir, "bundler-1.16.0.gemspec")
140
+ assert_path_exists 'default/gems/bundler-1.16.0'
141
+
142
+ assert_path_exists File.join(Gem.default_dir, "specifications", "bundler-audit-1.0.0.gemspec")
143
+ assert_path_exists 'default/gems/bundler-audit-1.0.0'
144
+ end if Gem::USE_BUNDLER_FOR_GEMDEPS
145
+
58
146
  def test_remove_old_lib_files
59
147
  lib = File.join @install_dir, 'lib'
60
148
  lib_rubygems = File.join lib, 'rubygems'
@@ -27,10 +27,11 @@ class TestGemCommandsSigninCommand < Gem::TestCase
27
27
 
28
28
  def test_execute_when_already_signed_in_with_same_host
29
29
  host = 'http://some-gemcutter-compatible-host.org'
30
- sign_in_ui = util_capture(nil, host) { @cmd.execute }
30
+
31
+ util_capture(nil, host) { @cmd.execute }
31
32
  old_credentials = YAML.load_file Gem.configuration.credentials_path
32
33
 
33
- sign_in_ui = util_capture(nil, host) { @cmd.execute }
34
+ util_capture(nil, host) { @cmd.execute }
34
35
  new_credentials = YAML.load_file Gem.configuration.credentials_path
35
36
 
36
37
  assert_equal old_credentials[host], new_credentials[host]
@@ -38,9 +39,11 @@ class TestGemCommandsSigninCommand < Gem::TestCase
38
39
 
39
40
  def test_execute_when_already_signed_in_with_different_host
40
41
  api_key = 'a5fdbb6ba150cbb83aad2bb2fede64cf04045xxxx'
41
- sign_in_ui = util_capture(nil, nil, api_key) { @cmd.execute }
42
+
43
+ util_capture(nil, nil, api_key) { @cmd.execute }
42
44
  host = 'http://some-gemcutter-compatible-host.org'
43
- sign_in_ui = util_capture(nil, host, api_key) { @cmd.execute }
45
+
46
+ util_capture(nil, host, api_key) { @cmd.execute }
44
47
  credentials = YAML.load_file Gem.configuration.credentials_path
45
48
 
46
49
  assert_equal credentials[:rubygems_api_key], api_key
@@ -2,12 +2,6 @@
2
2
  require 'rubygems/test_case'
3
3
  require 'rubygems/commands/update_command'
4
4
 
5
- begin
6
- gem "rdoc"
7
- rescue Gem::LoadError
8
- # ignore
9
- end
10
-
11
5
  class TestGemCommandsUpdateCommand < Gem::TestCase
12
6
 
13
7
  def setup
@@ -54,7 +54,7 @@ class TestGemExtConfigureBuilder < Gem::TestCase
54
54
  end
55
55
  end
56
56
 
57
- shell_error_msg = %r{(\./configure: .*)|((?:Can't|cannot) open \./configure(?:: No such file or directory)?)}
57
+ shell_error_msg = %r{(\./configure: .*)|((?:[Cc]an't|cannot) open '?\./configure'?(?:: No such file or directory)?)}
58
58
  sh_prefix_configure = "sh ./configure --prefix="
59
59
 
60
60
  assert_match 'configure failed', error.message
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
  require 'json'
3
3
  require 'net/http'
4
+ require 'uri'
4
5
 
5
- json = Net::HTTP.get('spdx.org', '/licenses/licenses.json')
6
+ json = Net::HTTP.get(URI('https://spdx.org/licenses/licenses.json'))
6
7
  licenses = JSON.parse(json)['licenses'].map do |licenseObject|
7
8
  licenseObject['licenseId']
8
9
  end
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.2
4
+ version: 2.7.3
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-11-08 00:00:00.000000000 Z
13
+ date: 2017-11-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: builder