rubygems-update 2.6.0 → 2.6.1
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/CONTRIBUTING.rdoc +1 -1
- data/History.txt +11 -0
- data/Rakefile +1 -1
- data/lib/rubygems.rb +25 -3
- data/lib/rubygems/resolver/installer_set.rb +8 -4
- data/test/rubygems/test_gem.rb +39 -0
- data/test/rubygems/test_gem_commands_build_command.rb +1 -1
- data/test/rubygems/test_gem_commands_install_command.rb +20 -0
- data/test/rubygems/test_gem_commands_open_command.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33fc382d6a0acd7e0eaa22d067a5b303e3db630e
|
4
|
+
data.tar.gz: e62ae0a2c43adf972a86ec7e0b6cf86a61a48281
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bcb015d0fe23b6774a1c05b56bfcae79e6d3e5b8771cdc5b012defe1d81d2bc8c0a12bd5028ba5cdeb375d857fe03bf7796e3e8775e6f914121730b9acf4b47
|
7
|
+
data.tar.gz: f4ad540901b518c621824ecd5ffee80dad0a24e90a3591bb898e5aa6fbd07ce675b6aa426a8991362731209dc43405518eeb214ea79d2aa283de1b6804c6b498
|
data/CONTRIBUTING.rdoc
CHANGED
@@ -94,7 +94,7 @@ accepted. There should also be more detailed information in the comments.
|
|
94
94
|
reference the existing issue.
|
95
95
|
* *abandonded* - This is an issue/pull request that has aged off, is no longer
|
96
96
|
applicable or similar.
|
97
|
-
* *declined* - An issue that won't be fixed/implemented or a pull request that
|
97
|
+
* *declined* - An issue that won't be fixed/implemented or a pull request that
|
98
98
|
is not accepted.
|
99
99
|
* *deprecated* - An issue/pull request that no longer applies to the actively
|
100
100
|
maintained codebase.
|
data/History.txt
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 2.6.1 / 2016-02-28
|
4
|
+
|
5
|
+
Bug fixes:
|
6
|
+
|
7
|
+
* Ensure `default_path` and `home` are set for paths. Pull request #1513
|
8
|
+
by Aaron Patterson.
|
9
|
+
* Restore but deprecate support for Array values on `Gem.paths=`. Pull
|
10
|
+
request #1514 by Aaron Patterson.
|
11
|
+
* Fix invalid gem file preventing gem install from working. Pull request
|
12
|
+
#1499 by Luis Sagastume.
|
13
|
+
|
3
14
|
=== 2.6.0 / 2016-02-26
|
4
15
|
|
5
16
|
Minor enhancements:
|
data/Rakefile
CHANGED
data/lib/rubygems.rb
CHANGED
@@ -10,7 +10,7 @@ require 'rbconfig'
|
|
10
10
|
require 'thread'
|
11
11
|
|
12
12
|
module Gem
|
13
|
-
VERSION = '2.6.
|
13
|
+
VERSION = '2.6.1'
|
14
14
|
end
|
15
15
|
|
16
16
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -345,10 +345,32 @@ module Gem
|
|
345
345
|
# Initialize the filesystem paths to use from +env+.
|
346
346
|
# +env+ is a hash-like object (typically ENV) that
|
347
347
|
# is queried for 'GEM_HOME', 'GEM_PATH', and 'GEM_SPEC_CACHE'
|
348
|
+
# Keys for the +env+ hash should be Strings, and values of the hash should
|
349
|
+
# be Strings or +nil+.
|
348
350
|
|
349
351
|
def self.paths=(env)
|
350
352
|
clear_paths
|
351
|
-
|
353
|
+
target = {}
|
354
|
+
env.each_pair do |k,v|
|
355
|
+
case k
|
356
|
+
when 'GEM_HOME', 'GEM_PATH', 'GEM_SPEC_CACHE'
|
357
|
+
case v
|
358
|
+
when nil, String
|
359
|
+
target[k] = v
|
360
|
+
when Array
|
361
|
+
unless Gem::Deprecate.skip
|
362
|
+
warn <<-eowarn
|
363
|
+
Array values in the parameter are deprecated. Please use a String or nil.
|
364
|
+
An Array was passed in from #{caller[3]}
|
365
|
+
eowarn
|
366
|
+
end
|
367
|
+
target[k] = v.join File::PATH_SEPARATOR
|
368
|
+
end
|
369
|
+
else
|
370
|
+
target[k] = v
|
371
|
+
end
|
372
|
+
end
|
373
|
+
@paths = Gem::PathSupport.new ENV.to_hash.merge(target)
|
352
374
|
Gem::Specification.dirs = @paths.path
|
353
375
|
end
|
354
376
|
|
@@ -956,7 +978,7 @@ module Gem
|
|
956
978
|
def self.use_paths(home, *paths)
|
957
979
|
paths.flatten!
|
958
980
|
paths.compact!
|
959
|
-
hash = { "GEM_HOME" => home, "GEM_PATH" => paths.join(File::PATH_SEPARATOR) }
|
981
|
+
hash = { "GEM_HOME" => home, "GEM_PATH" => paths.empty? ? home : paths.join(File::PATH_SEPARATOR) }
|
960
982
|
hash.delete_if { |_, v| v.nil? }
|
961
983
|
self.paths = hash
|
962
984
|
end
|
@@ -138,10 +138,14 @@ class Gem::Resolver::InstallerSet < Gem::Resolver::Set
|
|
138
138
|
|
139
139
|
local_source = Gem::Source::Local.new
|
140
140
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
141
|
+
begin
|
142
|
+
if local_spec = local_source.find_gem(name, dep.requirement) then
|
143
|
+
res << Gem::Resolver::IndexSpecification.new(
|
144
|
+
self, local_spec.name, local_spec.version,
|
145
|
+
local_source, local_spec.platform)
|
146
|
+
end
|
147
|
+
rescue Gem::Package::FormatError
|
148
|
+
# ignore
|
145
149
|
end
|
146
150
|
end
|
147
151
|
|
data/test/rubygems/test_gem.rb
CHANGED
@@ -1010,6 +1010,45 @@ class TestGem < Gem::TestCase
|
|
1010
1010
|
assert_equal expected, err
|
1011
1011
|
end
|
1012
1012
|
|
1013
|
+
def test_self_use_paths_with_nils
|
1014
|
+
orig_home = ENV.delete 'GEM_HOME'
|
1015
|
+
orig_path = ENV.delete 'GEM_PATH'
|
1016
|
+
Gem.use_paths nil, nil
|
1017
|
+
assert_equal Gem.default_dir, Gem.paths.home
|
1018
|
+
assert_equal (Gem.default_path + [Gem.paths.home]).uniq, Gem.paths.path
|
1019
|
+
ensure
|
1020
|
+
ENV['GEM_HOME'] = orig_home
|
1021
|
+
ENV['GEM_PATH'] = orig_path
|
1022
|
+
end
|
1023
|
+
|
1024
|
+
def test_setting_paths_does_not_warn_about_unknown_keys
|
1025
|
+
stdout, stderr = capture_io do
|
1026
|
+
Gem.paths = { 'foo' => [],
|
1027
|
+
'bar' => Object.new,
|
1028
|
+
'GEM_HOME' => Gem.paths.home,
|
1029
|
+
'GEM_PATH' => 'foo' }
|
1030
|
+
end
|
1031
|
+
assert_equal ['foo', Gem.paths.home], Gem.paths.path
|
1032
|
+
assert_equal '', stderr
|
1033
|
+
assert_equal '', stdout
|
1034
|
+
end
|
1035
|
+
|
1036
|
+
def test_setting_paths_does_not_mutate_parameter_object
|
1037
|
+
Gem.paths = { 'GEM_HOME' => Gem.paths.home,
|
1038
|
+
'GEM_PATH' => 'foo' }.freeze
|
1039
|
+
assert_equal ['foo', Gem.paths.home], Gem.paths.path
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
def test_deprecated_paths=
|
1043
|
+
stdout, stderr = capture_io do
|
1044
|
+
Gem.paths = { 'GEM_HOME' => Gem.paths.home,
|
1045
|
+
'GEM_PATH' => [Gem.paths.home, 'foo'] }
|
1046
|
+
end
|
1047
|
+
assert_equal [Gem.paths.home, 'foo'], Gem.paths.path
|
1048
|
+
assert_match(/Array values in the parameter are deprecated. Please use a String or nil/, stderr)
|
1049
|
+
assert_equal '', stdout
|
1050
|
+
end
|
1051
|
+
|
1013
1052
|
def test_self_use_paths
|
1014
1053
|
util_ensure_gem_dirs
|
1015
1054
|
|
@@ -62,7 +62,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase
|
|
62
62
|
assert_equal '', @ui.output
|
63
63
|
assert_equal "ERROR: Gemspec file not found: some_gem\n", @ui.error
|
64
64
|
end
|
65
|
-
|
65
|
+
|
66
66
|
def test_can_find_gemspecs_without_dot_gemspec
|
67
67
|
gemspec_file = File.join(@tempdir, @gem.spec_name)
|
68
68
|
|
@@ -438,6 +438,26 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
438
438
|
assert_match "1 gem installed", @ui.output
|
439
439
|
end
|
440
440
|
|
441
|
+
def test_execute_with_invalid_gem_file
|
442
|
+
FileUtils.touch("a.gem")
|
443
|
+
|
444
|
+
spec_fetcher do |fetcher|
|
445
|
+
fetcher.gem 'a', 2
|
446
|
+
end
|
447
|
+
|
448
|
+
@cmd.options[:args] = %w[a]
|
449
|
+
|
450
|
+
use_ui @ui do
|
451
|
+
assert_raises Gem::MockGemUi::SystemExitException, @ui.error do
|
452
|
+
@cmd.execute
|
453
|
+
end
|
454
|
+
end
|
455
|
+
|
456
|
+
assert_equal %w[a-2], @cmd.installed_specs.map { |spec| spec.full_name }
|
457
|
+
|
458
|
+
assert_match "1 gem installed", @ui.output
|
459
|
+
end
|
460
|
+
|
441
461
|
def test_execute_remote_ignores_files
|
442
462
|
specs = spec_fetcher do |fetcher|
|
443
463
|
fetcher.gem 'a', 1
|
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.
|
4
|
+
version: 2.6.1
|
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: 2016-02-
|
13
|
+
date: 2016-02-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: minitest
|
@@ -555,7 +555,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
555
555
|
version: '0'
|
556
556
|
requirements: []
|
557
557
|
rubyforge_project:
|
558
|
-
rubygems_version: 2.
|
558
|
+
rubygems_version: 2.6.0
|
559
559
|
signing_key:
|
560
560
|
specification_version: 4
|
561
561
|
summary: RubyGems is a package management framework for Ruby
|