rubygems-update 2.7.3 → 2.7.4.pre1
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 +4 -4
- data/.travis.yml +6 -6
- data/lib/rubygems.rb +3 -3
- data/lib/rubygems/command.rb +9 -1
- data/lib/rubygems/commands/setup_command.rb +10 -1
- data/test/rubygems/test_gem_commands_setup_command.rb +25 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63ff9e604a757363d9926d8ef215fbe51d795b9d93206eaaed9e4837f7591066
|
4
|
+
data.tar.gz: 2bf3a54bc891263ceecef4ac5376eb30019680610c477ee4bd35d7bd8e2f499e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fcfed1779678c1205d2b1f1d3b8db19dec0ac2fce2b012c01e9c11fcf141ba3f66a6f500a3849be680c3585d5c40e3142475043dd6d192b5d5b584f18f170fb
|
7
|
+
data.tar.gz: 4caae01296d1578aa96b937124b71af579ef494ab1fcd45781a8c16f3d751e8b3b8c70755b36f8351ff8afa063773dcef0e954b1c8287a8f65838600622fcbce
|
data/.travis.yml
CHANGED
@@ -18,9 +18,9 @@ rvm:
|
|
18
18
|
- 1.9.3
|
19
19
|
- 2.0.0
|
20
20
|
- 2.1.10
|
21
|
-
- 2.2.
|
22
|
-
- 2.3.
|
23
|
-
- 2.4.
|
21
|
+
- 2.2.9
|
22
|
+
- 2.3.6
|
23
|
+
- 2.4.3
|
24
24
|
- ruby-head
|
25
25
|
env:
|
26
26
|
- "TEST_TOOL=rubygems YAML=syck"
|
@@ -38,11 +38,11 @@ matrix:
|
|
38
38
|
env: "TEST_TOOL=rubygems YAML=syck"
|
39
39
|
- rvm: 2.1.10
|
40
40
|
env: "TEST_TOOL=rubygems YAML=syck"
|
41
|
-
- rvm: 2.2.
|
41
|
+
- rvm: 2.2.9
|
42
42
|
env: "TEST_TOOL=rubygems YAML=syck"
|
43
|
-
- rvm: 2.3.
|
43
|
+
- rvm: 2.3.6
|
44
44
|
env: "TEST_TOOL=rubygems YAML=syck"
|
45
|
-
- rvm: 2.4.
|
45
|
+
- rvm: 2.4.3
|
46
46
|
env: "TEST_TOOL=rubygems YAML=syck"
|
47
47
|
- rvm: ruby-head
|
48
48
|
env: "TEST_TOOL=rubygems YAML=syck"
|
data/lib/rubygems.rb
CHANGED
@@ -10,7 +10,7 @@ require 'rbconfig'
|
|
10
10
|
require 'thread'
|
11
11
|
|
12
12
|
module Gem
|
13
|
-
VERSION = "2.7.
|
13
|
+
VERSION = "2.7.4.pre1"
|
14
14
|
end
|
15
15
|
|
16
16
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -161,7 +161,7 @@ module Gem
|
|
161
161
|
# these are defined in Ruby 1.8.7, hence the need for this convoluted setup.
|
162
162
|
|
163
163
|
READ_BINARY_ERRORS = begin
|
164
|
-
read_binary_errors = [Errno::EACCES, Errno::EROFS]
|
164
|
+
read_binary_errors = [Errno::EACCES, Errno::EROFS, Errno::ENOSYS]
|
165
165
|
read_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP)
|
166
166
|
read_binary_errors
|
167
167
|
end.freeze
|
@@ -171,7 +171,7 @@ module Gem
|
|
171
171
|
# these are defined in Ruby 1.8.7.
|
172
172
|
|
173
173
|
WRITE_BINARY_ERRORS = begin
|
174
|
-
write_binary_errors = []
|
174
|
+
write_binary_errors = [Errno::ENOSYS]
|
175
175
|
write_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP)
|
176
176
|
write_binary_errors
|
177
177
|
end.freeze
|
data/lib/rubygems/command.rb
CHANGED
@@ -300,7 +300,10 @@ class Gem::Command
|
|
300
300
|
|
301
301
|
options[:build_args] = build_args
|
302
302
|
|
303
|
-
|
303
|
+
if options[:silent]
|
304
|
+
old_ui = self.ui
|
305
|
+
self.ui = ui = Gem::SilentUI.new
|
306
|
+
end
|
304
307
|
|
305
308
|
if options[:help] then
|
306
309
|
show_help
|
@@ -309,6 +312,11 @@ class Gem::Command
|
|
309
312
|
else
|
310
313
|
execute
|
311
314
|
end
|
315
|
+
ensure
|
316
|
+
if ui
|
317
|
+
self.ui = old_ui
|
318
|
+
ui.close
|
319
|
+
end
|
312
320
|
end
|
313
321
|
|
314
322
|
##
|
@@ -359,6 +359,8 @@ By default, this RubyGems will install gem as:
|
|
359
359
|
bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
|
360
360
|
bundler_spec.files = Dir.chdir("bundler") { Dir["{*.md,{lib,exe,man}/**/*}"] }
|
361
361
|
bundler_spec.executables -= %w[bundler bundle_ruby]
|
362
|
+
|
363
|
+
# Remove bundler-*.gemspec in default specification directory.
|
362
364
|
Dir.entries(Gem::Specification.default_specifications_dir).
|
363
365
|
select {|gs| gs.start_with?("bundler-") }.
|
364
366
|
each {|gs| File.delete(File.join(Gem::Specification.default_specifications_dir, gs)) }
|
@@ -368,9 +370,16 @@ By default, this RubyGems will install gem as:
|
|
368
370
|
|
369
371
|
bundler_spec = Gem::Specification.load(default_spec_path)
|
370
372
|
|
373
|
+
# Remove gemspec that was same version of vendored bundler.
|
374
|
+
normal_gemspec = File.join(Gem.default_dir, "specifications", "bundler-#{bundler_spec.version}.gemspec")
|
375
|
+
if File.file? normal_gemspec
|
376
|
+
File.delete normal_gemspec
|
377
|
+
end
|
378
|
+
|
379
|
+
# Remove gem files that were same version of vendored bundler.
|
371
380
|
if File.directory? bundler_spec.gems_dir
|
372
381
|
Dir.entries(bundler_spec.gems_dir).
|
373
|
-
select {|default_gem| File.basename(default_gem)
|
382
|
+
select {|default_gem| File.basename(default_gem) == "bundler-#{bundler_spec.version}" }.
|
374
383
|
each {|default_gem| rm_r File.join(bundler_spec.gems_dir, default_gem) }
|
375
384
|
end
|
376
385
|
|
@@ -6,6 +6,8 @@ require 'rubygems/commands/setup_command'
|
|
6
6
|
|
7
7
|
class TestGemCommandsSetupCommand < Gem::TestCase
|
8
8
|
|
9
|
+
BUNDLER_VERS = `gem list -e bundler`[/([^() ]+)\)\Z/, 1] || "1.16.0"
|
10
|
+
|
9
11
|
def setup
|
10
12
|
super
|
11
13
|
|
@@ -41,10 +43,16 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|
41
43
|
end
|
42
44
|
|
43
45
|
open(File.join(Gem::Specification.default_specifications_dir, "bundler-1.15.4.gemspec"), 'w') do |io|
|
44
|
-
|
46
|
+
gemspec.version = "1.15.4"
|
47
|
+
io.puts gemspec.to_ruby
|
45
48
|
end
|
46
49
|
|
47
50
|
FileUtils.mkdir_p File.join(Gem.default_dir, "specifications")
|
51
|
+
|
52
|
+
open(File.join(Gem.default_dir, "specifications", "bundler-#{BUNDLER_VERS}.gemspec"), 'w') do |io|
|
53
|
+
io.puts '# bundler-1.16.1'
|
54
|
+
end
|
55
|
+
|
48
56
|
open(File.join(Gem.default_dir, "specifications", "bundler-audit-1.0.0.gemspec"), 'w') do |io|
|
49
57
|
io.puts '# bundler-audit'
|
50
58
|
end
|
@@ -133,13 +141,25 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|
133
141
|
|
134
142
|
default_dir = Gem::Specification.default_specifications_dir
|
135
143
|
|
144
|
+
# expect to remove other versions of bundler gemspecs on default specification directory.
|
136
145
|
refute_path_exists File.join(default_dir, "bundler-1.15.4.gemspec")
|
137
|
-
|
138
|
-
|
139
|
-
assert_path_exists File.join(default_dir, "bundler-1.16.0.gemspec")
|
140
|
-
assert_path_exists 'default/gems/bundler-1.16.0'
|
146
|
+
assert_path_exists File.join(default_dir, "bundler-#{BUNDLER_VERS}.gemspec")
|
141
147
|
|
148
|
+
# expect to not remove bundler-* gemspecs.
|
142
149
|
assert_path_exists File.join(Gem.default_dir, "specifications", "bundler-audit-1.0.0.gemspec")
|
150
|
+
|
151
|
+
# expect to remove normal gem that was same version. because it's promoted default gems.
|
152
|
+
refute_path_exists File.join(Gem.default_dir, "specifications", "bundler-#{BUNDLER_VERS}.gemspec")
|
153
|
+
|
154
|
+
# expect to install default gems. It location was `site_ruby` direcotry on real world.
|
155
|
+
assert_path_exists "default/gems/bundler-#{BUNDLER_VERS}"
|
156
|
+
|
157
|
+
# expect to not remove other versions of bundler on `site_ruby`
|
158
|
+
assert_path_exists 'default/gems/bundler-1.15.4'
|
159
|
+
|
160
|
+
# TODO: We need to assert to remove same version of bundler on gem_dir direcotry(It's not site_ruby dir)
|
161
|
+
|
162
|
+
# expect to not remove bundler-* direcotyr.
|
143
163
|
assert_path_exists 'default/gems/bundler-audit-1.0.0'
|
144
164
|
end if Gem::USE_BUNDLER_FOR_GEMDEPS
|
145
165
|
|
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.
|
4
|
+
version: 2.7.4.pre1
|
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-
|
13
|
+
date: 2017-12-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: builder
|
@@ -803,7 +803,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
803
803
|
version: '0'
|
804
804
|
requirements: []
|
805
805
|
rubyforge_project:
|
806
|
-
rubygems_version: 2.7.
|
806
|
+
rubygems_version: 2.7.3
|
807
807
|
signing_key:
|
808
808
|
specification_version: 4
|
809
809
|
summary: ''
|