rubygems-update 2.0.0 → 2.0.2
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -1
- data/.autotest +1 -0
- data/History.txt +32 -0
- data/Manifest.txt +2 -0
- data/lib/rubygems.rb +14 -5
- data/lib/rubygems/available_set.rb +70 -72
- data/lib/rubygems/commands/cert_command.rb +1 -0
- data/lib/rubygems/commands/query_command.rb +7 -7
- data/lib/rubygems/commands/setup_command.rb +21 -4
- data/lib/rubygems/commands/sources_command.rb +13 -0
- data/lib/rubygems/config_file.rb +29 -16
- data/lib/rubygems/defaults.rb +1 -1
- data/lib/rubygems/dependency_installer.rb +18 -10
- data/lib/rubygems/dependency_list.rb +1 -1
- data/lib/rubygems/dependency_resolver.rb +17 -4
- data/lib/rubygems/ext/builder.rb +0 -7
- data/lib/rubygems/ext/ext_conf_builder.rb +43 -8
- data/lib/rubygems/installer.rb +4 -4
- data/lib/rubygems/package.rb +2 -1
- data/lib/rubygems/rdoc.rb +10 -1
- data/lib/rubygems/remote_fetcher.rb +8 -3
- data/lib/rubygems/security.rb +21 -1
- data/lib/rubygems/security/policy.rb +2 -0
- data/lib/rubygems/source.rb +10 -0
- data/lib/rubygems/spec_fetcher.rb +38 -0
- data/lib/rubygems/specification.rb +1 -1
- data/lib/rubygems/ssl_certs/GeoTrust_Global_CA.pem +20 -0
- data/lib/rubygems/test_utilities.rb +6 -3
- data/test/rubygems/test_gem.rb +13 -1
- data/test/rubygems/test_gem_commands_fetch_command.rb +4 -0
- data/test/rubygems/test_gem_commands_query_command.rb +16 -0
- data/test/rubygems/test_gem_commands_setup_command.rb +18 -1
- data/test/rubygems/test_gem_commands_sources_command.rb +39 -0
- data/test/rubygems/test_gem_config_file.rb +15 -0
- data/test/rubygems/test_gem_dependency_installer.rb +55 -0
- data/test/rubygems/test_gem_dependency_resolver_api_set.rb +80 -0
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +1 -7
- data/test/rubygems/test_gem_installer.rb +92 -1
- data/test/rubygems/test_gem_remote_fetcher.rb +3 -0
- data/test/rubygems/test_gem_source.rb +11 -0
- data/test/rubygems/test_gem_source_list.rb +1 -1
- data/test/rubygems/test_gem_spec_fetcher.rb +80 -8
- data/test/rubygems/test_require.rb +19 -8
- metadata +14 -11
- metadata.gz.sig +0 -0
@@ -399,6 +399,9 @@ gems:
|
|
399
399
|
@fetcher.instance_variable_set :@a1, @a1
|
400
400
|
@fetcher.instance_variable_set :@a2, @a2
|
401
401
|
def @fetcher.fetch_path uri, mtime = nil, head = false
|
402
|
+
raise Gem::RemoteFetcher::FetchError.new 'no http upgrade', uri if
|
403
|
+
uri.scheme != 'http'
|
404
|
+
|
402
405
|
case uri.request_uri
|
403
406
|
when /#{@a1.spec_name}/ then
|
404
407
|
Gem.deflate Marshal.dump @a1
|
@@ -184,5 +184,16 @@ class TestGemSource < Gem::TestCase
|
|
184
184
|
end
|
185
185
|
end
|
186
186
|
|
187
|
+
def test_uri_equals
|
188
|
+
@source.api_uri # cached
|
189
|
+
|
190
|
+
refute_equal URI('https://secure.example'), @source.api_uri
|
191
|
+
|
192
|
+
@source.uri = URI 'https://secure.example'
|
193
|
+
|
194
|
+
assert_equal URI('https://secure.example'), @source.uri
|
195
|
+
assert_equal URI('https://secure.example'), @source.api_uri
|
196
|
+
end
|
197
|
+
|
187
198
|
end
|
188
199
|
|
@@ -32,13 +32,14 @@ class TestGemSpecFetcher < Gem::TestCase
|
|
32
32
|
Gem::NameTuple.new(spec.name, spec.version, spec.original_platform)
|
33
33
|
}
|
34
34
|
|
35
|
-
v = Gem.marshal_version
|
36
|
-
s_zip = util_gzip(Marshal.dump(Gem::NameTuple.to_basic(@specs)))
|
37
|
-
l_zip = util_gzip(Marshal.dump(Gem::NameTuple.to_basic(@latest_specs)))
|
38
|
-
p_zip = util_gzip(Marshal.dump(Gem::NameTuple.to_basic(@prerelease_specs)))
|
39
|
-
|
40
|
-
@fetcher.data["#{@gem_repo}
|
41
|
-
@fetcher.data["#{@gem_repo}
|
35
|
+
@v = Gem.marshal_version
|
36
|
+
@s_zip = util_gzip(Marshal.dump(Gem::NameTuple.to_basic(@specs)))
|
37
|
+
@l_zip = util_gzip(Marshal.dump(Gem::NameTuple.to_basic(@latest_specs)))
|
38
|
+
@p_zip = util_gzip(Marshal.dump(Gem::NameTuple.to_basic(@prerelease_specs)))
|
39
|
+
|
40
|
+
@fetcher.data["#{@gem_repo}specs.#{@v}.gz"] = @s_zip
|
41
|
+
@fetcher.data["#{@gem_repo}latest_specs.#{@v}.gz"] = @l_zip
|
42
|
+
@fetcher.data["#{@gem_repo}prerelease_specs.#{@v}.gz"] = @p_zip
|
42
43
|
|
43
44
|
@sf = Gem::SpecFetcher.new
|
44
45
|
|
@@ -200,7 +201,6 @@ class TestGemSpecFetcher < Gem::TestCase
|
|
200
201
|
assert_equal comp.sort, specs[@source].sort
|
201
202
|
end
|
202
203
|
|
203
|
-
|
204
204
|
def test_available_specs_cache
|
205
205
|
specs, _ = @sf.available_specs(:latest)
|
206
206
|
|
@@ -240,5 +240,77 @@ class TestGemSpecFetcher < Gem::TestCase
|
|
240
240
|
assert_kind_of Gem::SourceFetchProblem, errors.first
|
241
241
|
end
|
242
242
|
|
243
|
+
def test_upgrade_http_source
|
244
|
+
Gem.configuration.verbose = :really
|
245
|
+
|
246
|
+
source = Gem::Source.new URI 'http://example'
|
247
|
+
same_source = nil
|
248
|
+
|
249
|
+
use_ui @ui do
|
250
|
+
same_source = @sf.upgrade_http_source source
|
251
|
+
end
|
252
|
+
|
253
|
+
assert_equal URI('http://example'), same_source.uri
|
254
|
+
|
255
|
+
assert_empty @ui.output
|
256
|
+
assert_empty @ui.error
|
257
|
+
end
|
258
|
+
|
259
|
+
def test_upgrade_http_source_rubygems
|
260
|
+
Gem.configuration.verbose = :really
|
261
|
+
|
262
|
+
source = Gem::Source.new URI 'http://rubygems.org'
|
263
|
+
same_source = nil
|
264
|
+
https_source = nil
|
265
|
+
|
266
|
+
use_ui @ui do
|
267
|
+
same_source = @sf.upgrade_http_source source
|
268
|
+
end
|
269
|
+
|
270
|
+
assert_equal URI('http://rubygems.org'), same_source.uri
|
271
|
+
|
272
|
+
@fetcher.data['https://rubygems.org/'] = 'hello'
|
273
|
+
|
274
|
+
use_ui @ui do
|
275
|
+
https_source = @sf.upgrade_http_source source
|
276
|
+
end
|
277
|
+
|
278
|
+
assert_equal URI('https://rubygems.org'), https_source.uri
|
279
|
+
|
280
|
+
assert_empty @ui.error
|
281
|
+
|
282
|
+
expected = <<-EXPECTED
|
283
|
+
Upgrading http://rubygems.org to HTTPS failed, continuing
|
284
|
+
Upgraded http://rubygems.org to HTTPS
|
285
|
+
EXPECTED
|
286
|
+
|
287
|
+
assert_equal expected, @ui.output
|
288
|
+
end
|
289
|
+
|
290
|
+
def test_upgrade_http_source_rubygems_405
|
291
|
+
Gem.configuration.verbose = :really
|
292
|
+
|
293
|
+
source = Gem::Source.new URI 'http://rubygems.org'
|
294
|
+
https_source = nil
|
295
|
+
|
296
|
+
@fetcher.data['https://rubygems.org/'] = proc do
|
297
|
+
raise Gem::RemoteFetcher::FetchError.new ' Not Allowed 405 ', nil
|
298
|
+
end
|
299
|
+
|
300
|
+
use_ui @ui do
|
301
|
+
https_source = @sf.upgrade_http_source source
|
302
|
+
end
|
303
|
+
|
304
|
+
assert_equal URI('https://rubygems.org'), https_source.uri
|
305
|
+
|
306
|
+
assert_empty @ui.error
|
307
|
+
|
308
|
+
expected = <<-EXPECTED
|
309
|
+
Upgraded http://rubygems.org to HTTPS
|
310
|
+
EXPECTED
|
311
|
+
|
312
|
+
assert_equal expected, @ui.output
|
313
|
+
end
|
314
|
+
|
243
315
|
end
|
244
316
|
|
@@ -2,19 +2,30 @@ require 'rubygems/test_case'
|
|
2
2
|
require 'rubygems'
|
3
3
|
|
4
4
|
class TestGemRequire < Gem::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
super
|
8
|
+
|
9
|
+
assert_raises LoadError do
|
10
|
+
save_loaded_features do
|
11
|
+
require 'test_gem_require_a'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
5
16
|
def assert_require(path)
|
6
17
|
assert require(path), "'#{path}' was already required"
|
7
18
|
end
|
8
19
|
|
9
20
|
def test_require_is_not_lazy_with_exact_req
|
10
|
-
a1 = new_spec "a", "1", {"b" => "= 1"}, "lib/
|
21
|
+
a1 = new_spec "a", "1", {"b" => "= 1"}, "lib/test_gem_require_a.rb"
|
11
22
|
b1 = new_spec "b", "1", nil, "lib/b/c.rb"
|
12
23
|
b2 = new_spec "b", "2", nil, "lib/b/c.rb"
|
13
24
|
|
14
25
|
install_specs a1, b1, b2
|
15
26
|
|
16
27
|
save_loaded_features do
|
17
|
-
assert_require '
|
28
|
+
assert_require 'test_gem_require_a'
|
18
29
|
assert_equal %w(a-1 b-1), loaded_spec_names
|
19
30
|
assert_equal unresolved_names, []
|
20
31
|
|
@@ -24,14 +35,14 @@ class TestGemRequire < Gem::TestCase
|
|
24
35
|
end
|
25
36
|
|
26
37
|
def test_require_is_lazy_with_inexact_req
|
27
|
-
a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/
|
38
|
+
a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/test_gem_require_a.rb"
|
28
39
|
b1 = new_spec "b", "1", nil, "lib/b/c.rb"
|
29
40
|
b2 = new_spec "b", "2", nil, "lib/b/c.rb"
|
30
41
|
|
31
42
|
install_specs a1, b1, b2
|
32
43
|
|
33
44
|
save_loaded_features do
|
34
|
-
assert_require '
|
45
|
+
assert_require 'test_gem_require_a'
|
35
46
|
assert_equal %w(a-1), loaded_spec_names
|
36
47
|
assert_equal unresolved_names, ["b (>= 1)"]
|
37
48
|
|
@@ -41,13 +52,13 @@ class TestGemRequire < Gem::TestCase
|
|
41
52
|
end
|
42
53
|
|
43
54
|
def test_require_is_not_lazy_with_one_possible
|
44
|
-
a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/
|
55
|
+
a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/test_gem_require_a.rb"
|
45
56
|
b1 = new_spec "b", "1", nil, "lib/b/c.rb"
|
46
57
|
|
47
58
|
install_specs a1, b1
|
48
59
|
|
49
60
|
save_loaded_features do
|
50
|
-
assert_require '
|
61
|
+
assert_require 'test_gem_require_a'
|
51
62
|
assert_equal %w(a-1 b-1), loaded_spec_names
|
52
63
|
assert_equal unresolved_names, []
|
53
64
|
|
@@ -59,13 +70,13 @@ class TestGemRequire < Gem::TestCase
|
|
59
70
|
def test_activate_via_require_respects_loaded_files
|
60
71
|
require 'benchmark' # stdlib
|
61
72
|
save_loaded_features do
|
62
|
-
a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/
|
73
|
+
a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/test_gem_require_a.rb"
|
63
74
|
b1 = new_spec "b", "1", nil, "lib/benchmark.rb"
|
64
75
|
b2 = new_spec "b", "2", nil, "lib/benchmark.rb"
|
65
76
|
|
66
77
|
install_specs a1, b1, b2
|
67
78
|
|
68
|
-
require '
|
79
|
+
require 'test_gem_require_a'
|
69
80
|
assert_equal unresolved_names, ["b (>= 1)"]
|
70
81
|
|
71
82
|
refute require('benchmark'), "benchmark should have already been loaded"
|
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.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -14,7 +14,7 @@ cert_chain:
|
|
14
14
|
-----BEGIN CERTIFICATE-----
|
15
15
|
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRAwDgYDVQQDDAdkcmJy
|
16
16
|
YWluMRgwFgYKCZImiZPyLGQBGRYIc2VnbWVudDcxEzARBgoJkia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-
|
35
|
+
date: 2013-03-06 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: minitest
|
@@ -294,6 +294,7 @@ files:
|
|
294
294
|
- lib/rubygems/ssl_certs/.document
|
295
295
|
- lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem
|
296
296
|
- lib/rubygems/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem
|
297
|
+
- lib/rubygems/ssl_certs/GeoTrust_Global_CA.pem
|
297
298
|
- lib/rubygems/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem
|
298
299
|
- lib/rubygems/syck_hack.rb
|
299
300
|
- lib/rubygems/test_case.rb
|
@@ -391,6 +392,7 @@ files:
|
|
391
392
|
- test/rubygems/test_gem_dependency_installer.rb
|
392
393
|
- test/rubygems/test_gem_dependency_list.rb
|
393
394
|
- test/rubygems/test_gem_dependency_resolver.rb
|
395
|
+
- test/rubygems/test_gem_dependency_resolver_api_set.rb
|
394
396
|
- test/rubygems/test_gem_doctor.rb
|
395
397
|
- test/rubygems/test_gem_ext_cmake_builder.rb
|
396
398
|
- test/rubygems/test_gem_ext_configure_builder.rb
|
@@ -448,7 +450,7 @@ post_install_message:
|
|
448
450
|
rdoc_options:
|
449
451
|
- --main
|
450
452
|
- README.rdoc
|
451
|
-
- --title=RubyGems 2.0.
|
453
|
+
- --title=RubyGems 2.0.2 Documentation
|
452
454
|
require_paths:
|
453
455
|
- hide_lib_for_update
|
454
456
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -463,7 +465,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
463
465
|
version: '0'
|
464
466
|
requirements: []
|
465
467
|
rubyforge_project: rubygems
|
466
|
-
rubygems_version: 2.0.
|
468
|
+
rubygems_version: 2.0.1
|
467
469
|
signing_key:
|
468
470
|
specification_version: 4
|
469
471
|
summary: RubyGems is a package management framework for Ruby
|
@@ -509,6 +511,7 @@ test_files:
|
|
509
511
|
- test/rubygems/test_gem_dependency_installer.rb
|
510
512
|
- test/rubygems/test_gem_dependency_list.rb
|
511
513
|
- test/rubygems/test_gem_dependency_resolver.rb
|
514
|
+
- test/rubygems/test_gem_dependency_resolver_api_set.rb
|
512
515
|
- test/rubygems/test_gem_doctor.rb
|
513
516
|
- test/rubygems/test_gem_ext_cmake_builder.rb
|
514
517
|
- test/rubygems/test_gem_ext_configure_builder.rb
|
metadata.gz.sig
CHANGED
Binary file
|