rubygems-update 2.6.11 → 2.6.12
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 +5 -5
- data/History.txt +23 -0
- data/lib/rubygems.rb +2 -1
- data/lib/rubygems/commands/open_command.rb +1 -1
- data/lib/rubygems/commands/query_command.rb +1 -1
- data/lib/rubygems/commands/sources_command.rb +1 -1
- data/lib/rubygems/dependency_list.rb +1 -1
- data/lib/rubygems/installer.rb +8 -1
- data/lib/rubygems/platform.rb +1 -1
- data/lib/rubygems/security.rb +1 -1
- data/lib/rubygems/server.rb +1 -1
- data/lib/rubygems/specification.rb +1 -1
- data/lib/rubygems/test_case.rb +4 -1
- data/test/rubygems/test_gem.rb +28 -5
- data/test/rubygems/test_gem_commands_open_command.rb +2 -1
- data/test/rubygems/test_gem_commands_query_command.rb +55 -1
- data/test/rubygems/test_gem_commands_sources_command.rb +52 -0
- data/test/rubygems/test_gem_installer.rb +5 -0
- data/test/rubygems/test_require.rb +11 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 44c39a40585bfd8c3d906bdc7bae896a7a0c335a
|
4
|
+
data.tar.gz: 6ca4daf88142d1426d98f45a2f8c7e95a743b40e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 144d483fedfaa9c66bfaeb41a6380d790b093086a9e754cf9d1979f8bbce1aff61338459c644405ebf2018122335c3fe1f01f6a7b8695ea80c6fcc3de34a2e72
|
7
|
+
data.tar.gz: 03a3dc90d9d15e3d827f2e55486e2ccc44d8dcae5a0f5b9a02ba1d832bdb3c574c4a0c4e798beff3c2e8d344533a686480dfd8392872ed8473d9ccfca36c2a8f
|
data/History.txt
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 2.6.12 / 2017-04-30
|
4
|
+
|
5
|
+
Bug fixes:
|
6
|
+
|
7
|
+
* Fix test_self_find_files_with_gemfile to sort expected files. Pull
|
8
|
+
request #1880 by Kazuaki Matsuo.
|
9
|
+
* Fix issue for MinGW / MSYS2 builds and testing. Pull request #1879 by
|
10
|
+
MSP-Greg.
|
11
|
+
* Fix gem open to open highest version number rather than lowest. Pull
|
12
|
+
request #1877 by Tim Pope.
|
13
|
+
* Add a test for requiring a default spec as installed by the ruby
|
14
|
+
installer. Pull request #1899 by Samuel Giddins.
|
15
|
+
* Fix broken --exact parameter to gem command. Pull request #1873 by Jason
|
16
|
+
Frey.
|
17
|
+
* [Installer] Generate backwards-compatible binstubs. Pull request #1904
|
18
|
+
by Samuel Giddins.
|
19
|
+
* Fix pre-existing source recognition on add action. Pull request #1883 by
|
20
|
+
Jonathan Claudius.
|
21
|
+
* Prevent negative IDs in output of #inspect. Pull request #1908 by Vít
|
22
|
+
Ondruch.
|
23
|
+
* Allow Gem.finish_resolve to respect already-activated specs. Pull
|
24
|
+
request #1910 by Samuel Giddins.
|
25
|
+
|
3
26
|
=== 2.6.11 / 2017-03-16
|
4
27
|
|
5
28
|
Bug fixes:
|
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.12"
|
14
14
|
end
|
15
15
|
|
16
16
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -234,6 +234,7 @@ module Gem
|
|
234
234
|
|
235
235
|
def self.finish_resolve(request_set=Gem::RequestSet.new)
|
236
236
|
request_set.import Gem::Specification.unresolved_deps.values
|
237
|
+
request_set.import Gem.loaded_specs.values.map {|s| Gem::Dependency.new(s.name, s.version) }
|
237
238
|
|
238
239
|
request_set.resolve_current.each do |s|
|
239
240
|
s.full_spec.activate
|
@@ -86,7 +86,7 @@ is too hard to use.
|
|
86
86
|
name = Array(options[:name])
|
87
87
|
else
|
88
88
|
args = options[:args].to_a
|
89
|
-
name = options[:exact] ? args : args.map{|arg| /#{arg}/i }
|
89
|
+
name = options[:exact] ? args.map{|arg| /\A#{Regexp.escape(arg)}\Z/ } : args.map{|arg| /#{arg}/i }
|
90
90
|
end
|
91
91
|
|
92
92
|
prerelease = options[:prerelease]
|
@@ -44,7 +44,7 @@ class Gem::Commands::SourcesCommand < Gem::Command
|
|
44
44
|
source = Gem::Source.new source_uri
|
45
45
|
|
46
46
|
begin
|
47
|
-
if Gem.sources.include?
|
47
|
+
if Gem.sources.include? source then
|
48
48
|
say "source #{source_uri} already present in the cache"
|
49
49
|
else
|
50
50
|
source.load_specs :released
|
data/lib/rubygems/installer.rb
CHANGED
@@ -214,7 +214,7 @@ class Gem::Installer
|
|
214
214
|
|
215
215
|
ruby_executable = true
|
216
216
|
existing = io.read.slice(%r{
|
217
|
-
|
217
|
+
^\s*(
|
218
218
|
gem \s |
|
219
219
|
load \s Gem\.bin_path\( |
|
220
220
|
load \s Gem\.activate_bin_path\(
|
@@ -701,6 +701,8 @@ class Gem::Installer
|
|
701
701
|
# Return the text for an application file.
|
702
702
|
|
703
703
|
def app_script_text(bin_file_name)
|
704
|
+
# note that the `load` lines cannot be indented, as old RG versions match
|
705
|
+
# against the beginning of the line
|
704
706
|
return <<-TEXT
|
705
707
|
#{shebang bin_file_name}
|
706
708
|
#
|
@@ -723,7 +725,12 @@ if ARGV.first
|
|
723
725
|
end
|
724
726
|
end
|
725
727
|
|
728
|
+
if Gem.respond_to?(:activate_bin_path)
|
726
729
|
load Gem.activate_bin_path('#{spec.name}', '#{bin_file_name}', version)
|
730
|
+
else
|
731
|
+
gem #{spec.name.dump}, version
|
732
|
+
load Gem.bin_path(#{spec.name.dump}, #{bin_file_name.dump}, version)
|
733
|
+
end
|
727
734
|
TEXT
|
728
735
|
end
|
729
736
|
|
data/lib/rubygems/platform.rb
CHANGED
data/lib/rubygems/security.rb
CHANGED
@@ -455,7 +455,7 @@ module Gem::Security
|
|
455
455
|
|
456
456
|
##
|
457
457
|
# Creates a new key pair of the specified +length+ and +algorithm+. The
|
458
|
-
# default is a
|
458
|
+
# default is a 3072 bit RSA key.
|
459
459
|
|
460
460
|
def self.create_key length = KEY_LENGTH, algorithm = KEY_ALGORITHM
|
461
461
|
algorithm.new length
|
data/lib/rubygems/server.rb
CHANGED
@@ -657,7 +657,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
|
657
657
|
"only_one_executable" => true,
|
658
658
|
"full_name" => "rubygems-#{Gem::VERSION}",
|
659
659
|
"has_deps" => false,
|
660
|
-
"homepage" => "http://
|
660
|
+
"homepage" => "http://guides.rubygems.org/",
|
661
661
|
"name" => 'rubygems',
|
662
662
|
"ri_installed" => true,
|
663
663
|
"summary" => "RubyGems itself",
|
data/lib/rubygems/test_case.rb
CHANGED
@@ -484,7 +484,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
484
484
|
|
485
485
|
system @git, 'add', gemspec
|
486
486
|
system @git, 'commit', '-a', '-m', 'a non-empty commit message', '--quiet'
|
487
|
-
head = Gem::Util.popen(
|
487
|
+
head = Gem::Util.popen(@git, 'rev-parse', 'master').strip
|
488
488
|
end
|
489
489
|
|
490
490
|
return name, git_spec.version, directory, head
|
@@ -1498,6 +1498,8 @@ end
|
|
1498
1498
|
begin
|
1499
1499
|
gem 'rdoc'
|
1500
1500
|
require 'rdoc'
|
1501
|
+
|
1502
|
+
require 'rubygems/rdoc'
|
1501
1503
|
rescue LoadError, Gem::LoadError
|
1502
1504
|
end
|
1503
1505
|
|
@@ -1514,3 +1516,4 @@ tmpdirs << (ENV['GEM_PATH'] = Dir.mktmpdir("path"))
|
|
1514
1516
|
pid = $$
|
1515
1517
|
END {tmpdirs.each {|dir| Dir.rmdir(dir)} if $$ == pid}
|
1516
1518
|
Gem.clear_paths
|
1519
|
+
Gem.loaded_specs.clear
|
data/test/rubygems/test_gem.rb
CHANGED
@@ -75,6 +75,29 @@ class TestGem < Gem::TestCase
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
+
def test_self_finish_resolve_respects_loaded_specs
|
79
|
+
save_loaded_features do
|
80
|
+
a1 = new_spec "a", "1", "b" => "> 0"
|
81
|
+
b1 = new_spec "b", "1", "c" => ">= 1"
|
82
|
+
b2 = new_spec "b", "2", "c" => ">= 2"
|
83
|
+
c1 = new_spec "c", "1"
|
84
|
+
c2 = new_spec "c", "2"
|
85
|
+
|
86
|
+
install_specs c1, c2, b1, b2, a1
|
87
|
+
|
88
|
+
a1.activate
|
89
|
+
c1.activate
|
90
|
+
|
91
|
+
assert_equal %w(a-1 c-1), loaded_spec_names
|
92
|
+
assert_equal ["b (> 0)"], unresolved_names
|
93
|
+
|
94
|
+
Gem.finish_resolve
|
95
|
+
|
96
|
+
assert_equal %w(a-1 b-1 c-1), loaded_spec_names
|
97
|
+
assert_equal [], unresolved_names
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
78
101
|
def test_self_install
|
79
102
|
spec_fetcher do |f|
|
80
103
|
f.gem 'a', 1
|
@@ -492,7 +515,7 @@ class TestGem < Gem::TestCase
|
|
492
515
|
skip if RUBY_VERSION <= "1.8.7"
|
493
516
|
|
494
517
|
cwd = File.expand_path("test/rubygems", @@project_dir)
|
495
|
-
$LOAD_PATH.unshift
|
518
|
+
actual_load_path = $LOAD_PATH.unshift(cwd).dup
|
496
519
|
|
497
520
|
discover_path = File.join 'lib', 'sff', 'discover.rb'
|
498
521
|
|
@@ -518,12 +541,12 @@ class TestGem < Gem::TestCase
|
|
518
541
|
expected = [
|
519
542
|
File.expand_path('test/rubygems/sff/discover.rb', @@project_dir),
|
520
543
|
File.join(foo1.full_gem_path, discover_path)
|
521
|
-
]
|
544
|
+
].sort
|
522
545
|
|
523
|
-
assert_equal expected, Gem.find_files('sff/discover')
|
524
|
-
assert_equal expected, Gem.find_files('sff/**.rb'), '[ruby-core:31730]'
|
546
|
+
assert_equal expected, Gem.find_files('sff/discover').sort
|
547
|
+
assert_equal expected, Gem.find_files('sff/**.rb').sort, '[ruby-core:31730]'
|
525
548
|
ensure
|
526
|
-
assert_equal cwd,
|
549
|
+
assert_equal cwd, actual_load_path.shift unless RUBY_VERSION <= "1.8.7"
|
527
550
|
end
|
528
551
|
|
529
552
|
def test_self_find_latest_files
|
@@ -24,7 +24,8 @@ class TestGemCommandsOpenCommand < Gem::TestCase
|
|
24
24
|
@cmd.options[:args] = %w[foo]
|
25
25
|
@cmd.options[:editor] = "#{Gem.ruby} -e0 --"
|
26
26
|
|
27
|
-
|
27
|
+
gem 'foo', '1.0.0'
|
28
|
+
spec = gem 'foo', '1.0.1'
|
28
29
|
mock = MiniTest::Mock.new
|
29
30
|
mock.expect(:call, true, [spec.full_gem_path])
|
30
31
|
|
@@ -642,7 +642,7 @@ pl (1)
|
|
642
642
|
assert_equal expected, @ui.output
|
643
643
|
end
|
644
644
|
|
645
|
-
def
|
645
|
+
def test_execute_exact_remote
|
646
646
|
spec_fetcher do |fetcher|
|
647
647
|
fetcher.spec 'coolgem-omg', 3
|
648
648
|
fetcher.spec 'coolgem', '4.2.1'
|
@@ -665,6 +665,60 @@ coolgem (4.2.1)
|
|
665
665
|
assert_equal expected, @ui.output
|
666
666
|
end
|
667
667
|
|
668
|
+
def test_execute_exact_local
|
669
|
+
spec_fetcher do |fetcher|
|
670
|
+
fetcher.spec 'coolgem-omg', 3
|
671
|
+
fetcher.spec 'coolgem', '4.2.1'
|
672
|
+
fetcher.spec 'wow_coolgem', 1
|
673
|
+
end
|
674
|
+
|
675
|
+
@cmd.handle_options %w[--exact coolgem]
|
676
|
+
|
677
|
+
use_ui @ui do
|
678
|
+
@cmd.execute
|
679
|
+
end
|
680
|
+
|
681
|
+
expected = <<-EOF
|
682
|
+
|
683
|
+
*** LOCAL GEMS ***
|
684
|
+
|
685
|
+
coolgem (4.2.1)
|
686
|
+
EOF
|
687
|
+
|
688
|
+
assert_equal expected, @ui.output
|
689
|
+
end
|
690
|
+
|
691
|
+
def test_execute_exact_multiple
|
692
|
+
spec_fetcher do |fetcher|
|
693
|
+
fetcher.spec 'coolgem-omg', 3
|
694
|
+
fetcher.spec 'coolgem', '4.2.1'
|
695
|
+
fetcher.spec 'wow_coolgem', 1
|
696
|
+
|
697
|
+
fetcher.spec 'othergem-omg', 3
|
698
|
+
fetcher.spec 'othergem', '1.2.3'
|
699
|
+
fetcher.spec 'wow_othergem', 1
|
700
|
+
end
|
701
|
+
|
702
|
+
@cmd.handle_options %w[--exact coolgem othergem]
|
703
|
+
|
704
|
+
use_ui @ui do
|
705
|
+
@cmd.execute
|
706
|
+
end
|
707
|
+
|
708
|
+
expected = <<-EOF
|
709
|
+
|
710
|
+
*** LOCAL GEMS ***
|
711
|
+
|
712
|
+
coolgem (4.2.1)
|
713
|
+
|
714
|
+
*** LOCAL GEMS ***
|
715
|
+
|
716
|
+
othergem (1.2.3)
|
717
|
+
EOF
|
718
|
+
|
719
|
+
assert_equal expected, @ui.output
|
720
|
+
end
|
721
|
+
|
668
722
|
private
|
669
723
|
|
670
724
|
def add_gems_to_fetcher
|
@@ -108,6 +108,58 @@ source #{@gem_repo} already present in the cache
|
|
108
108
|
assert_equal '', @ui.error
|
109
109
|
end
|
110
110
|
|
111
|
+
def test_execute_add_redundant_source_trailing_slash
|
112
|
+
# Remove pre-existing gem source (w/ slash)
|
113
|
+
repo_with_slash = "http://gems.example.com/"
|
114
|
+
@cmd.handle_options %W[--remove #{repo_with_slash}]
|
115
|
+
use_ui @ui do
|
116
|
+
@cmd.execute
|
117
|
+
end
|
118
|
+
source = Gem::Source.new repo_with_slash
|
119
|
+
assert_equal false, Gem.sources.include?(source)
|
120
|
+
|
121
|
+
expected = <<-EOF
|
122
|
+
#{repo_with_slash} removed from sources
|
123
|
+
EOF
|
124
|
+
|
125
|
+
assert_equal expected, @ui.output
|
126
|
+
assert_equal '', @ui.error
|
127
|
+
|
128
|
+
# Re-add pre-existing gem source (w/o slash)
|
129
|
+
repo_without_slash = "http://gems.example.com"
|
130
|
+
@cmd.handle_options %W[--add #{repo_without_slash}]
|
131
|
+
use_ui @ui do
|
132
|
+
@cmd.execute
|
133
|
+
end
|
134
|
+
source = Gem::Source.new repo_without_slash
|
135
|
+
assert_equal true, Gem.sources.include?(source)
|
136
|
+
|
137
|
+
expected = <<-EOF
|
138
|
+
http://gems.example.com/ removed from sources
|
139
|
+
http://gems.example.com added to sources
|
140
|
+
EOF
|
141
|
+
|
142
|
+
assert_equal expected, @ui.output
|
143
|
+
assert_equal '', @ui.error
|
144
|
+
|
145
|
+
# Re-add original gem source (w/ slash)
|
146
|
+
@cmd.handle_options %W[--add #{repo_with_slash}]
|
147
|
+
use_ui @ui do
|
148
|
+
@cmd.execute
|
149
|
+
end
|
150
|
+
source = Gem::Source.new repo_with_slash
|
151
|
+
assert_equal true, Gem.sources.include?(source)
|
152
|
+
|
153
|
+
expected = <<-EOF
|
154
|
+
http://gems.example.com/ removed from sources
|
155
|
+
http://gems.example.com added to sources
|
156
|
+
source http://gems.example.com/ already present in the cache
|
157
|
+
EOF
|
158
|
+
|
159
|
+
assert_equal expected, @ui.output
|
160
|
+
assert_equal '', @ui.error
|
161
|
+
end
|
162
|
+
|
111
163
|
def test_execute_add_http_rubygems_org
|
112
164
|
http_rubygems_org = 'http://rubygems.org'
|
113
165
|
|
@@ -62,7 +62,12 @@ if ARGV.first
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
if Gem.respond_to?(:activate_bin_path)
|
65
66
|
load Gem.activate_bin_path('a', 'executable', version)
|
67
|
+
else
|
68
|
+
gem "a", version
|
69
|
+
load Gem.bin_path("a", "executable", version)
|
70
|
+
end
|
66
71
|
EOF
|
67
72
|
|
68
73
|
wrapper = @installer.app_script_text 'executable'
|
@@ -301,6 +301,17 @@ class TestGemRequire < Gem::TestCase
|
|
301
301
|
assert_equal %w(default-2.0.0.0), loaded_spec_names
|
302
302
|
end
|
303
303
|
|
304
|
+
def test_realworld_default_gem
|
305
|
+
skip "no default gems on ruby < 2.0" unless RUBY_VERSION >= "2"
|
306
|
+
cmd = <<-RUBY
|
307
|
+
$stderr = $stdout
|
308
|
+
require "json"
|
309
|
+
puts Gem.loaded_specs["json"].default_gem?
|
310
|
+
RUBY
|
311
|
+
output = Gem::Util.popen(Gem.ruby, "-e", cmd).strip
|
312
|
+
assert_equal "true", output
|
313
|
+
end
|
314
|
+
|
304
315
|
def test_default_gem_and_normal_gem
|
305
316
|
default_gem_spec = new_default_spec("default", "2.0.0.0",
|
306
317
|
nil, "default/gem.rb")
|
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.12
|
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-04-30 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.
|
803
|
+
rubygems_version: 2.6.11
|
804
804
|
signing_key:
|
805
805
|
specification_version: 4
|
806
806
|
summary: RubyGems is a package management framework for Ruby
|