rubygems-update 3.2.3 → 3.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{History.txt → CHANGELOG.md} +443 -427
- data/Manifest.txt +28 -27
- data/Rakefile +3 -3
- data/bundler/CHANGELOG.md +7 -0
- data/bundler/bundler.gemspec +1 -1
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +2 -5
- data/bundler/{man → lib/bundler/man}/bundle-add.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-binstubs.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-cache.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-check.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-clean.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-config.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-doctor.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-exec.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-gem.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-info.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-init.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-inject.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-install.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-list.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-lock.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-open.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-outdated.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-platform.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-pristine.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-remove.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-show.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-update.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle-viz.1 +0 -0
- data/bundler/{man → lib/bundler/man}/bundle.1 +0 -0
- data/bundler/{man → lib/bundler/man}/gemfile.5 +0 -0
- data/bundler/{man → lib/bundler/man}/index.txt +0 -0
- data/bundler/lib/bundler/source/git/git_proxy.rb +27 -40
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems.rb +1 -1
- data/lib/rubygems/commands/setup_command.rb +16 -60
- data/lib/rubygems/ext/builder.rb +3 -3
- data/lib/rubygems/ext/cmake_builder.rb +1 -2
- data/lib/rubygems/ext/configure_builder.rb +1 -2
- data/lib/rubygems/remote_fetcher.rb +3 -1
- data/lib/rubygems/resolver/best_set.rb +1 -1
- data/lib/rubygems/resolver/index_specification.rb +4 -1
- data/lib/rubygems/test_case.rb +3 -3
- data/rubygems-update.gemspec +2 -2
- data/test/rubygems/data/null-required-rubygems-version.gemspec.rz +0 -0
- data/test/rubygems/test_gem_commands_setup_command.rb +13 -36
- data/test/rubygems/test_gem_dependency_installer.rb +27 -47
- data/test/rubygems/test_gem_ext_builder.rb +6 -6
- data/test/rubygems/test_gem_ext_cmake_builder.rb +2 -4
- data/test/rubygems/test_gem_ext_configure_builder.rb +2 -2
- data/test/rubygems/test_gem_remote_fetcher.rb +1 -1
- data/test/rubygems/test_gem_resolver_best_set.rb +23 -0
- data/test/rubygems/test_gem_specification.rb +1 -3
- metadata +32 -55
data/lib/rubygems/ext/builder.rb
CHANGED
@@ -29,7 +29,7 @@ class Gem::Ext::Builder
|
|
29
29
|
make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make'
|
30
30
|
end
|
31
31
|
|
32
|
-
destdir = '
|
32
|
+
destdir = 'DESTDIR=%s' % ENV['DESTDIR']
|
33
33
|
|
34
34
|
['clean', '', 'install'].each do |target|
|
35
35
|
# Pass DESTDIR via command line to override what's in MAKEFLAGS
|
@@ -37,7 +37,7 @@ class Gem::Ext::Builder
|
|
37
37
|
make_program,
|
38
38
|
destdir,
|
39
39
|
target,
|
40
|
-
].
|
40
|
+
].reject(&:empty?)
|
41
41
|
begin
|
42
42
|
run(cmd, results, "make #{target}".rstrip, make_dir)
|
43
43
|
rescue Gem::InstallError
|
@@ -56,7 +56,7 @@ class Gem::Ext::Builder
|
|
56
56
|
p(command)
|
57
57
|
end
|
58
58
|
results << "current directory: #{dir}"
|
59
|
-
results <<
|
59
|
+
results << command.shelljoin
|
60
60
|
|
61
61
|
require "open3"
|
62
62
|
# Set $SOURCE_DATE_EPOCH for the subprocess.
|
@@ -4,8 +4,7 @@ require_relative '../command'
|
|
4
4
|
class Gem::Ext::CmakeBuilder < Gem::Ext::Builder
|
5
5
|
def self.build(extension, dest_path, results, args=[], lib_dir=nil, cmake_dir=Dir.pwd)
|
6
6
|
unless File.exist?(File.join(cmake_dir, 'Makefile'))
|
7
|
-
cmd = "cmake . -DCMAKE_INSTALL_PREFIX=#{dest_path}"
|
8
|
-
cmd << " #{Gem::Command.build_args.join ' '}" unless Gem::Command.build_args.empty?
|
7
|
+
cmd = ["cmake", ".", "-DCMAKE_INSTALL_PREFIX=#{dest_path}", *Gem::Command.build_args]
|
9
8
|
|
10
9
|
run cmd, results, class_name, cmake_dir
|
11
10
|
end
|
@@ -8,8 +8,7 @@
|
|
8
8
|
class Gem::Ext::ConfigureBuilder < Gem::Ext::Builder
|
9
9
|
def self.build(extension, dest_path, results, args=[], lib_dir=nil, configure_dir=Dir.pwd)
|
10
10
|
unless File.exist?(File.join(configure_dir, 'Makefile'))
|
11
|
-
cmd = "sh ./configure --prefix=#{dest_path}"
|
12
|
-
cmd << " #{args.join ' '}" unless args.empty?
|
11
|
+
cmd = ["sh", "./configure", "--prefix=#{dest_path}", *args]
|
13
12
|
|
14
13
|
run cmd, results, class_name, configure_dir
|
15
14
|
end
|
@@ -26,13 +26,15 @@ class Gem::RemoteFetcher
|
|
26
26
|
##
|
27
27
|
# The URI which was being accessed when the exception happened.
|
28
28
|
|
29
|
-
attr_accessor :uri
|
29
|
+
attr_accessor :uri, :original_uri
|
30
30
|
|
31
31
|
def initialize(message, uri)
|
32
32
|
super message
|
33
33
|
|
34
34
|
uri = parse_uri(uri)
|
35
35
|
|
36
|
+
@original_uri = uri.dup
|
37
|
+
|
36
38
|
uri.password = 'REDACTED' if uri.respond_to?(:password) && uri.password
|
37
39
|
|
38
40
|
@uri = uri.to_s
|
@@ -58,7 +58,7 @@ class Gem::Resolver::BestSet < Gem::Resolver::ComposedSet
|
|
58
58
|
# The calling method must retry the exception to repeat the lookup.
|
59
59
|
|
60
60
|
def replace_failed_api_set(error) # :nodoc:
|
61
|
-
uri = error.
|
61
|
+
uri = error.original_uri
|
62
62
|
uri = URI uri unless URI === uri
|
63
63
|
uri = uri + "."
|
64
64
|
|
@@ -43,9 +43,12 @@ class Gem::Resolver::IndexSpecification < Gem::Resolver::Specification
|
|
43
43
|
##
|
44
44
|
# The required_rubygems_version constraint for this specification
|
45
45
|
#
|
46
|
+
# A fallback is included because the original version of the specification
|
47
|
+
# API didn't include that field, so some marshalled specs in the index have it
|
48
|
+
# set to +nil+.
|
46
49
|
|
47
50
|
def required_rubygems_version
|
48
|
-
spec.required_rubygems_version
|
51
|
+
spec.required_rubygems_version || Gem::Requirement.default
|
49
52
|
end
|
50
53
|
|
51
54
|
def ==(other)
|
data/lib/rubygems/test_case.rb
CHANGED
@@ -250,16 +250,16 @@ class Gem::TestCase < Minitest::Test
|
|
250
250
|
def assert_contains_make_command(target, output, msg = nil)
|
251
251
|
if output.match(/\n/)
|
252
252
|
msg = message(msg) do
|
253
|
-
|
253
|
+
"Expected output containing make command \"%s\", but was \n\nBEGIN_OF_OUTPUT\n%sEND_OF_OUTPUT" % [
|
254
254
|
('%s %s' % [make_command, target]).rstrip,
|
255
|
-
output
|
255
|
+
output,
|
256
256
|
]
|
257
257
|
end
|
258
258
|
else
|
259
259
|
msg = message(msg) do
|
260
260
|
'Expected make command "%s": %s' % [
|
261
261
|
('%s %s' % [make_command, target]).rstrip,
|
262
|
-
output
|
262
|
+
output,
|
263
263
|
]
|
264
264
|
end
|
265
265
|
end
|
data/rubygems-update.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rubygems-update"
|
5
|
-
s.version = "3.2.
|
5
|
+
s.version = "3.2.4"
|
6
6
|
s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
|
7
7
|
s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
|
8
8
|
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.require_paths = ["hide_lib_for_update"]
|
22
22
|
s.rdoc_options = ["--main", "README.md", "--title=RubyGems Update Documentation"]
|
23
23
|
s.extra_rdoc_files = [
|
24
|
-
"
|
24
|
+
"CHANGELOG.md", "LICENSE.txt", "MAINTAINERS.txt",
|
25
25
|
"MIT.txt", "Manifest.txt", "README.md",
|
26
26
|
"UPGRADING.md", "POLICIES.md", "CODE_OF_CONDUCT.md",
|
27
27
|
"CONTRIBUTING.md", "bundler/CHANGELOG.md",
|
Binary file
|
@@ -26,12 +26,12 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|
26
26
|
bundler/exe/bundle
|
27
27
|
bundler/lib/bundler.rb
|
28
28
|
bundler/lib/bundler/b.rb
|
29
|
+
bundler/bin/bundler/man/bundle-b.1
|
29
30
|
bundler/lib/bundler/man/bundle-b.1.ronn
|
31
|
+
bundler/lib/bundler/man/gemfile.5
|
30
32
|
bundler/lib/bundler/man/gemfile.5.ronn
|
31
33
|
bundler/lib/bundler/templates/.circleci/config.yml
|
32
34
|
bundler/lib/bundler/templates/.travis.yml
|
33
|
-
bundler/man/bundle-b.1
|
34
|
-
bundler/man/gemfile.5
|
35
35
|
]
|
36
36
|
|
37
37
|
create_dummy_files(filelist)
|
@@ -160,16 +160,6 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|
160
160
|
@cmd.files_in('lib').sort
|
161
161
|
end
|
162
162
|
|
163
|
-
def test_bundler_man1_files_in
|
164
|
-
assert_equal %w[bundle-b.1],
|
165
|
-
@cmd.bundler_man1_files_in('bundler/man').sort
|
166
|
-
end
|
167
|
-
|
168
|
-
def test_bundler_man5_files_in
|
169
|
-
assert_equal %w[gemfile.5],
|
170
|
-
@cmd.bundler_man5_files_in('bundler/man').sort
|
171
|
-
end
|
172
|
-
|
173
163
|
def test_install_lib
|
174
164
|
@cmd.extend FileUtils
|
175
165
|
|
@@ -187,19 +177,6 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|
187
177
|
end
|
188
178
|
end
|
189
179
|
|
190
|
-
def test_install_man
|
191
|
-
@cmd.extend FileUtils
|
192
|
-
|
193
|
-
Dir.mktmpdir 'man' do |dir|
|
194
|
-
@cmd.install_man dir
|
195
|
-
|
196
|
-
assert_path_exists File.join("#{dir}/man1", 'bundle-b.1')
|
197
|
-
refute_path_exists File.join("#{dir}/man1", 'bundle-b.1.ronn')
|
198
|
-
assert_path_exists File.join("#{dir}/man5", 'gemfile.5')
|
199
|
-
refute_path_exists File.join("#{dir}/man5", 'gemfile.5.ronn')
|
200
|
-
end
|
201
|
-
end
|
202
|
-
|
203
180
|
def test_install_default_bundler_gem
|
204
181
|
@cmd.extend FileUtils
|
205
182
|
|
@@ -308,8 +285,8 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|
308
285
|
gemfile_5_ronn = File.join man, 'man5', 'gemfile.5.ronn'
|
309
286
|
gemfile_5_txt = File.join man, 'man5', 'gemfile.5.txt'
|
310
287
|
|
311
|
-
files_that_go = [bundle_b_1_txt, bundle_b_1_ronn, gemfile_5_txt, gemfile_5_ronn]
|
312
|
-
files_that_stay = [ruby_1
|
288
|
+
files_that_go = [bundle_b_1, bundle_b_1_txt, bundle_b_1_ronn, gemfile_5, gemfile_5_txt, gemfile_5_ronn]
|
289
|
+
files_that_stay = [ruby_1]
|
313
290
|
|
314
291
|
create_dummy_files(files_that_go + files_that_stay)
|
315
292
|
|
@@ -326,22 +303,22 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|
326
303
|
|
327
304
|
@cmd.options[:previous_version] = Gem::Version.new '2.0.2'
|
328
305
|
|
329
|
-
File.open '
|
306
|
+
File.open 'CHANGELOG.md', 'w' do |io|
|
330
307
|
io.puts <<-HISTORY_TXT
|
331
|
-
|
308
|
+
# #{Gem::VERSION} / 2013-03-26
|
332
309
|
|
333
|
-
|
310
|
+
## Bug fixes:
|
334
311
|
* Fixed release note display for LANG=C when installing rubygems
|
335
312
|
* π is tasty
|
336
313
|
|
337
|
-
|
314
|
+
# 2.0.2 / 2013-03-06
|
338
315
|
|
339
|
-
|
316
|
+
## Bug fixes:
|
340
317
|
* Other bugs fixed
|
341
318
|
|
342
|
-
|
319
|
+
# 2.0.1 / 2013-03-05
|
343
320
|
|
344
|
-
|
321
|
+
## Bug fixes:
|
345
322
|
* Yet more bugs fixed
|
346
323
|
HISTORY_TXT
|
347
324
|
end
|
@@ -351,9 +328,9 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|
351
328
|
end
|
352
329
|
|
353
330
|
expected = <<-EXPECTED
|
354
|
-
|
331
|
+
# #{Gem::VERSION} / 2013-03-26
|
355
332
|
|
356
|
-
|
333
|
+
## Bug fixes:
|
357
334
|
* Fixed release note display for LANG=C when installing rubygems
|
358
335
|
* π is tasty
|
359
336
|
|
@@ -946,6 +946,31 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
946
946
|
assert_equal %w[d-2], inst.installed_gems.map {|s| s.full_name }
|
947
947
|
end
|
948
948
|
|
949
|
+
def test_install_legacy_spec_with_nil_required_rubygems_version
|
950
|
+
path = File.expand_path "../data/null-required-rubygems-version.gemspec.rz", __FILE__
|
951
|
+
spec = Marshal.load Gem.read_binary(path)
|
952
|
+
def spec.validate(*args); end
|
953
|
+
|
954
|
+
util_build_gem spec
|
955
|
+
|
956
|
+
cache_file = File.join @tempdir, 'gems', "#{spec.original_name}.gem"
|
957
|
+
FileUtils.mkdir_p File.dirname cache_file
|
958
|
+
FileUtils.mv spec.cache_file, cache_file
|
959
|
+
|
960
|
+
util_setup_spec_fetcher spec
|
961
|
+
|
962
|
+
data = Gem.read_binary(cache_file)
|
963
|
+
|
964
|
+
@fetcher.data['http://gems.example.com/gems/activesupport-1.0.0.gem'] = data
|
965
|
+
|
966
|
+
dep = Gem::Dependency.new 'activesupport'
|
967
|
+
|
968
|
+
inst = Gem::DependencyInstaller.new
|
969
|
+
inst.install dep
|
970
|
+
|
971
|
+
assert_equal %w[activesupport-1.0.0], Gem::Specification.map(&:full_name)
|
972
|
+
end
|
973
|
+
|
949
974
|
def test_find_gems_gems_with_sources
|
950
975
|
util_setup_gems
|
951
976
|
|
@@ -1102,21 +1127,6 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1102
1127
|
assert_equal %w[a-1], requests
|
1103
1128
|
end
|
1104
1129
|
|
1105
|
-
def util_write_a1_bin
|
1106
|
-
write_file File.join('gems', 'a-1', 'bin', 'a_bin') do |fp|
|
1107
|
-
fp.puts "#!/usr/bin/ruby"
|
1108
|
-
end
|
1109
|
-
end
|
1110
|
-
|
1111
|
-
def util_setup_c1_pre
|
1112
|
-
@c1_pre, @c1_pre_gem = util_spec 'c', '1.a' do |s|
|
1113
|
-
s.add_dependency 'a', '1.a'
|
1114
|
-
s.add_dependency 'b', '1'
|
1115
|
-
end
|
1116
|
-
|
1117
|
-
util_reset_gems
|
1118
|
-
end
|
1119
|
-
|
1120
1130
|
def util_setup_d
|
1121
1131
|
@d1, @d1_gem = util_gem 'd', '1'
|
1122
1132
|
@d2, @d2_gem = util_gem 'd', '2'
|
@@ -1124,43 +1134,13 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
1124
1134
|
util_reset_gems
|
1125
1135
|
end
|
1126
1136
|
|
1127
|
-
def util_setup_wxyz
|
1128
|
-
@x1_m, @x1_m_gem = util_spec 'x', '1' do |s|
|
1129
|
-
s.platform = Gem::Platform.new %w[cpu my_platform 1]
|
1130
|
-
end
|
1131
|
-
|
1132
|
-
@x1_o, @x1_o_gem = util_spec 'x', '1' do |s|
|
1133
|
-
s.platform = Gem::Platform.new %w[cpu other_platform 1]
|
1134
|
-
end
|
1135
|
-
|
1136
|
-
@w1, @w1_gem = util_spec 'w', '1', 'x' => nil
|
1137
|
-
|
1138
|
-
@y1, @y1_gem = util_spec 'y', '1'
|
1139
|
-
@y1_1_p, @y1_1_p_gem = util_spec 'y', '1.1' do |s|
|
1140
|
-
s.platform = Gem::Platform.new %w[cpu my_platform 1]
|
1141
|
-
end
|
1142
|
-
|
1143
|
-
@z1, @z1_gem = util_spec 'z', '1', 'y' => nil
|
1144
|
-
|
1145
|
-
util_reset_gems
|
1146
|
-
end
|
1147
|
-
|
1148
1137
|
def util_reset_gems
|
1149
1138
|
@a1 ||= nil
|
1150
1139
|
@b1 ||= nil
|
1151
1140
|
@a1_pre ||= nil
|
1152
|
-
@c1_pre ||= nil
|
1153
1141
|
@d1 ||= nil
|
1154
1142
|
@d2 ||= nil
|
1155
|
-
|
1156
|
-
@
|
1157
|
-
@x1_o ||= nil
|
1158
|
-
@y1 ||= nil
|
1159
|
-
@y1_1_p ||= nil
|
1160
|
-
@z1 ||= nil
|
1161
|
-
|
1162
|
-
util_setup_spec_fetcher(*[@a1, @a1_pre, @b1, @c1_pre,
|
1163
|
-
@d1, @d2, @x1_m, @x1_o, @w1, @y1,
|
1164
|
-
@y1_1_p, @z1].compact)
|
1143
|
+
|
1144
|
+
util_setup_spec_fetcher(*[@a1, @a1_pre, @b1, @d1, @d2].compact)
|
1165
1145
|
end
|
1166
1146
|
end
|
@@ -47,9 +47,9 @@ install:
|
|
47
47
|
|
48
48
|
results = results.join("\n").b
|
49
49
|
|
50
|
-
assert_match %r{
|
51
|
-
assert_match %r{
|
52
|
-
assert_match %r{
|
50
|
+
assert_match %r{DESTDIR\\=#{ENV['DESTDIR']} clean$}, results
|
51
|
+
assert_match %r{DESTDIR\\=#{ENV['DESTDIR']}$}, results
|
52
|
+
assert_match %r{DESTDIR\\=#{ENV['DESTDIR']} install$}, results
|
53
53
|
|
54
54
|
if /nmake/ !~ results
|
55
55
|
assert_match %r{^clean: destination$}, results
|
@@ -76,9 +76,9 @@ install:
|
|
76
76
|
|
77
77
|
results = results.join("\n").b
|
78
78
|
|
79
|
-
assert_match %r{
|
80
|
-
assert_match %r{
|
81
|
-
assert_match %r{
|
79
|
+
assert_match %r{DESTDIR\\=#{ENV['DESTDIR']} clean$}, results
|
80
|
+
assert_match %r{DESTDIR\\=#{ENV['DESTDIR']}$}, results
|
81
|
+
assert_match %r{DESTDIR\\=#{ENV['DESTDIR']} install$}, results
|
82
82
|
end
|
83
83
|
|
84
84
|
def test_build_extensions
|
@@ -40,8 +40,7 @@ install (FILES test.txt DESTINATION bin)
|
|
40
40
|
|
41
41
|
output = output.join "\n"
|
42
42
|
|
43
|
-
assert_match
|
44
|
-
%r{^cmake \. -DCMAKE_INSTALL_PREFIX=#{Regexp.escape @dest_path}}, output
|
43
|
+
assert_match %r{^cmake \. -DCMAKE_INSTALL_PREFIX\\=#{Regexp.escape @dest_path}}, output
|
45
44
|
assert_match %r{#{Regexp.escape @ext}}, output
|
46
45
|
assert_contains_make_command '', output
|
47
46
|
assert_contains_make_command 'install', output
|
@@ -58,11 +57,10 @@ install (FILES test.txt DESTINATION bin)
|
|
58
57
|
output = output.join "\n"
|
59
58
|
|
60
59
|
shell_error_msg = %r{(CMake Error: .*)}
|
61
|
-
sh_prefix_cmake = "cmake . -DCMAKE_INSTALL_PREFIX="
|
62
60
|
|
63
61
|
assert_match 'cmake failed', error.message
|
64
62
|
|
65
|
-
assert_match %r{
|
63
|
+
assert_match %r{^cmake . -DCMAKE_INSTALL_PREFIX\\=#{Regexp.escape @dest_path}}, output
|
66
64
|
assert_match %r{#{shell_error_msg}}, output
|
67
65
|
end
|
68
66
|
|
@@ -28,7 +28,7 @@ class TestGemExtConfigureBuilder < Gem::TestCase
|
|
28
28
|
Gem::Ext::ConfigureBuilder.build nil, @dest_path, output, [], nil, @ext
|
29
29
|
|
30
30
|
assert_match(/^current directory:/, output.shift)
|
31
|
-
assert_equal "sh ./configure --prefix
|
31
|
+
assert_equal "sh ./configure --prefix\\=#{@dest_path}", output.shift
|
32
32
|
assert_equal "", output.shift
|
33
33
|
assert_match(/^current directory:/, output.shift)
|
34
34
|
assert_contains_make_command 'clean', output.shift
|
@@ -50,7 +50,7 @@ class TestGemExtConfigureBuilder < Gem::TestCase
|
|
50
50
|
end
|
51
51
|
|
52
52
|
shell_error_msg = %r{(\./configure: .*)|((?:[Cc]an't|cannot) open '?\./configure'?(?:: No such file or directory)?)}
|
53
|
-
sh_prefix_configure = "sh ./configure --prefix
|
53
|
+
sh_prefix_configure = "sh ./configure --prefix\\="
|
54
54
|
|
55
55
|
assert_match 'configure failed', error.message
|
56
56
|
|
@@ -132,4 +132,27 @@ class TestGemResolverBestSet < Gem::TestCase
|
|
132
132
|
|
133
133
|
assert_equal error, e
|
134
134
|
end
|
135
|
+
|
136
|
+
def test_replace_failed_api_set_uri_with_credentials
|
137
|
+
set = @DR::BestSet.new
|
138
|
+
|
139
|
+
api_uri = URI(@gem_repo) + './info/'
|
140
|
+
api_uri.user = 'user'
|
141
|
+
api_uri.password = 'pass'
|
142
|
+
api_set = Gem::Resolver::APISet.new api_uri
|
143
|
+
|
144
|
+
set.sets << api_set
|
145
|
+
|
146
|
+
error_uri = api_uri + 'a'
|
147
|
+
|
148
|
+
error = Gem::RemoteFetcher::FetchError.new 'bogus', error_uri
|
149
|
+
|
150
|
+
set.replace_failed_api_set error
|
151
|
+
|
152
|
+
assert_equal 1, set.sets.size
|
153
|
+
|
154
|
+
refute_includes set.sets, api_set
|
155
|
+
|
156
|
+
assert_kind_of Gem::Resolver::IndexSet, set.sets.first
|
157
|
+
end
|
135
158
|
end
|
@@ -1200,10 +1200,8 @@ dependencies: []
|
|
1200
1200
|
Gem.platforms = orig_platform
|
1201
1201
|
end
|
1202
1202
|
|
1203
|
-
DATA_PATH = File.expand_path "../data", __FILE__
|
1204
|
-
|
1205
1203
|
def test_handles_private_null_type
|
1206
|
-
path = File.
|
1204
|
+
path = File.expand_path "../data/null-type.gemspec.rz", __FILE__
|
1207
1205
|
|
1208
1206
|
data = Marshal.load Gem::Util.inflate(Gem.read_binary(path))
|
1209
1207
|
|