rubygems-update 1.3.5 → 1.3.6
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.
- data.tar.gz.sig +0 -0
- data/.autotest +8 -1
- data/ChangeLog +164 -0
- data/History.txt +52 -1
- data/Manifest.txt +8 -8
- data/README +3 -2
- data/Rakefile +49 -5
- data/bin/gem +2 -2
- data/bin/update_rubygems +9 -11
- data/cruise_config.rb +4 -3
- data/hide_lib_for_update/note.txt +5 -0
- data/lib/rbconfig/datadir.rb +10 -14
- data/lib/rubygems.rb +117 -140
- data/lib/rubygems/builder.rb +4 -2
- data/lib/rubygems/command.rb +51 -48
- data/lib/rubygems/command_manager.rb +2 -0
- data/lib/rubygems/commands/dependency_command.rb +10 -5
- data/lib/rubygems/commands/environment_command.rb +1 -1
- data/lib/rubygems/commands/fetch_command.rb +6 -5
- data/lib/rubygems/commands/install_command.rb +1 -0
- data/lib/rubygems/commands/mirror_command.rb +8 -8
- data/lib/rubygems/commands/owner_command.rb +75 -0
- data/lib/rubygems/commands/pristine_command.rb +1 -1
- data/lib/rubygems/commands/push_command.rb +45 -0
- data/lib/rubygems/commands/query_command.rb +4 -1
- data/lib/rubygems/commands/rdoc_command.rb +24 -9
- data/lib/rubygems/commands/server_command.rb +6 -0
- data/lib/rubygems/commands/setup_command.rb +14 -4
- data/lib/rubygems/commands/unpack_command.rb +2 -2
- data/lib/rubygems/commands/update_command.rb +2 -2
- data/lib/rubygems/commands/which_command.rb +7 -9
- data/lib/rubygems/config_file.rb +100 -26
- data/lib/rubygems/defaults.rb +1 -1
- data/lib/rubygems/dependency.rb +133 -75
- data/lib/rubygems/dependency_installer.rb +28 -10
- data/lib/rubygems/dependency_list.rb +41 -12
- data/lib/rubygems/doc_manager.rb +7 -0
- data/lib/rubygems/format.rb +16 -20
- data/lib/rubygems/gem_openssl.rb +1 -1
- data/lib/rubygems/gem_path_searcher.rb +10 -12
- data/lib/rubygems/gemcutter_utilities.rb +49 -0
- data/lib/rubygems/indexer.rb +2 -2
- data/lib/rubygems/install_update_options.rb +1 -9
- data/lib/rubygems/installer.rb +35 -76
- data/lib/rubygems/local_remote_options.rb +1 -2
- data/lib/rubygems/package.rb +0 -1
- data/lib/rubygems/package/tar_input.rb +3 -1
- data/lib/rubygems/package_task.rb +16 -11
- data/lib/rubygems/remote_fetcher.rb +22 -8
- data/lib/rubygems/requirement.rb +78 -100
- data/lib/rubygems/server.rb +41 -10
- data/lib/rubygems/source_index.rb +5 -5
- data/lib/rubygems/spec_fetcher.rb +2 -2
- data/lib/rubygems/specification.rb +66 -16
- data/lib/rubygems/test_utilities.rb +33 -4
- data/lib/rubygems/uninstaller.rb +3 -3
- data/lib/rubygems/user_interaction.rb +45 -0
- data/lib/rubygems/validator.rb +6 -7
- data/lib/rubygems/version.rb +206 -149
- data/lib/rubygems/version_option.rb +16 -0
- data/test/fake_certlib/openssl.rb +1 -1
- data/test/functional.rb +0 -7
- data/test/gem_installer_test_case.rb +4 -4
- data/test/gem_package_tar_test_case.rb +1 -1
- data/test/gemutilities.rb +35 -31
- data/test/insure_session.rb +0 -8
- data/test/mockgemui.rb +0 -8
- data/test/simple_gem.rb +2 -8
- data/test/test_config.rb +3 -10
- data/test/test_gem.rb +9 -14
- data/test/test_gem_builder.rb +1 -7
- data/test/test_gem_command.rb +1 -8
- data/test/test_gem_command_manager.rb +1 -7
- data/test/test_gem_commands_build_command.rb +4 -4
- data/test/test_gem_commands_cert_command.rb +1 -2
- data/test/test_gem_commands_check_command.rb +1 -7
- data/test/test_gem_commands_contents_command.rb +1 -1
- data/test/test_gem_commands_dependency_command.rb +17 -31
- data/test/test_gem_commands_environment_command.rb +1 -1
- data/test/test_gem_commands_fetch_command.rb +14 -12
- data/test/test_gem_commands_generate_index_command.rb +1 -1
- data/test/test_gem_commands_install_command.rb +22 -20
- data/test/test_gem_commands_list_command.rb +1 -1
- data/test/test_gem_commands_lock_command.rb +1 -1
- data/test/test_gem_commands_mirror_command.rb +5 -5
- data/test/test_gem_commands_outdated_command.rb +3 -5
- data/test/test_gem_commands_owner_command.rb +105 -0
- data/test/test_gem_commands_pristine_command.rb +2 -2
- data/test/test_gem_commands_push_command.rb +61 -0
- data/test/test_gem_commands_query_command.rb +23 -56
- data/test/test_gem_commands_server_command.rb +1 -1
- data/test/test_gem_commands_sources_command.rb +1 -70
- data/test/test_gem_commands_specification_command.rb +3 -4
- data/test/test_gem_commands_stale_command.rb +1 -1
- data/test/test_gem_commands_uninstall_command.rb +3 -4
- data/test/test_gem_commands_unpack_command.rb +1 -1
- data/test/test_gem_commands_update_command.rb +13 -13
- data/test/test_gem_commands_which_command.rb +66 -0
- data/test/test_gem_config_file.rb +13 -7
- data/test/test_gem_dependency.rb +82 -134
- data/test/test_gem_dependency_installer.rb +55 -30
- data/test/test_gem_dependency_list.rb +28 -7
- data/test/test_gem_doc_manager.rb +1 -7
- data/test/test_gem_ext_configure_builder.rb +2 -2
- data/test/test_gem_ext_ext_conf_builder.rb +1 -1
- data/test/test_gem_ext_rake_builder.rb +1 -1
- data/test/test_gem_format.rb +14 -11
- data/test/test_gem_gem_path_searcher.rb +12 -1
- data/test/test_gem_gem_runner.rb +1 -1
- data/test/test_gem_gemcutter_utilities.rb +103 -0
- data/test/test_gem_indexer.rb +44 -51
- data/test/test_gem_install_update_options.rb +1 -7
- data/test/test_gem_installer.rb +22 -82
- data/test/test_gem_local_remote_options.rb +1 -1
- data/test/test_gem_package_tar_header.rb +1 -8
- data/test/test_gem_package_tar_input.rb +1 -8
- data/test/test_gem_package_tar_output.rb +1 -8
- data/test/test_gem_package_tar_reader.rb +1 -8
- data/test/test_gem_package_tar_reader_entry.rb +1 -8
- data/test/test_gem_package_tar_writer.rb +1 -8
- data/test/test_gem_package_task.rb +1 -25
- data/test/test_gem_platform.rb +4 -4
- data/test/test_gem_remote_fetcher.rb +31 -21
- data/test/test_gem_requirement.rb +210 -140
- data/test/test_gem_server.rb +36 -1
- data/test/test_gem_source_index.rb +7 -13
- data/test/test_gem_spec_fetcher.rb +17 -47
- data/test/test_gem_specification.rb +7 -20
- data/test/test_gem_stream_ui.rb +21 -1
- data/test/test_gem_uninstaller.rb +1 -2
- data/test/test_gem_validator.rb +2 -8
- data/test/test_gem_version.rb +110 -254
- data/test/test_gem_version_option.rb +1 -1
- data/test/test_kernel.rb +1 -7
- data/util/CL2notes +1 -1
- data/util/gem_prelude.rb.template +64 -41
- metadata +33 -71
- metadata.gz.sig +0 -0
- data/lib/rubygems/digest/digest_adapter.rb +0 -49
- data/lib/rubygems/digest/md5.rb +0 -23
- data/lib/rubygems/digest/sha1.rb +0 -22
- data/lib/rubygems/digest/sha2.rb +0 -22
- data/lib/rubygems/timer.rb +0 -28
- data/test/test_gem_digest.rb +0 -46
- data/test/test_gem_source_info_cache.rb +0 -447
- data/test/test_gem_source_info_cache_entry.rb +0 -78
@@ -1,78 +0,0 @@
|
|
1
|
-
require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
|
2
|
-
require 'rubygems/source_info_cache_entry'
|
3
|
-
|
4
|
-
class TestGemSourceInfoCacheEntry < RubyGemTestCase
|
5
|
-
|
6
|
-
def setup
|
7
|
-
super
|
8
|
-
|
9
|
-
util_setup_fake_fetcher
|
10
|
-
|
11
|
-
@si = Gem::SourceIndex.new
|
12
|
-
@si.add_spec @a1
|
13
|
-
@sic_e = Gem::SourceInfoCacheEntry.new @si, @si.dump.size
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_refresh
|
17
|
-
@fetcher.data["#{@gem_repo}Marshal.#{@marshal_version}.Z"] =
|
18
|
-
proc { raise }
|
19
|
-
@fetcher.data["#{@gem_repo}Marshal.#{@marshal_version}"] = @si.dump
|
20
|
-
|
21
|
-
use_ui @ui do
|
22
|
-
@sic_e.refresh @gem_repo, true
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_refresh_all
|
27
|
-
@si.add_spec @a2
|
28
|
-
|
29
|
-
a1_name = @a1.full_name
|
30
|
-
a2_name = @a2.full_name
|
31
|
-
|
32
|
-
@fetcher.data["#{@gem_repo}quick/index.rz"] =
|
33
|
-
util_zip [a1_name, a2_name].join("\n")
|
34
|
-
@fetcher.data["#{@gem_repo}quick/latest_index.rz"] = util_zip a2_name
|
35
|
-
@fetcher.data["#{@gem_repo}quick/Marshal.#{Gem.marshal_version}/#{a1_name}.gemspec.rz"] = util_zip Marshal.dump(@a1)
|
36
|
-
@fetcher.data["#{@gem_repo}quick/Marshal.#{Gem.marshal_version}/#{a2_name}.gemspec.rz"] = util_zip Marshal.dump(@a2)
|
37
|
-
@fetcher.data["#{@gem_repo}Marshal.#{Gem.marshal_version}"] =
|
38
|
-
Marshal.dump @si
|
39
|
-
|
40
|
-
sic_e = Gem::SourceInfoCacheEntry.new Gem::SourceIndex.new, 0
|
41
|
-
|
42
|
-
assert_equal [], sic_e.source_index.map { |n,| n }
|
43
|
-
|
44
|
-
use_ui @ui do
|
45
|
-
assert sic_e.refresh(@gem_repo, false)
|
46
|
-
end
|
47
|
-
|
48
|
-
assert_equal [a2_name], sic_e.source_index.map { |n,| n }.sort
|
49
|
-
|
50
|
-
use_ui @ui do
|
51
|
-
sic_e.refresh @gem_repo, true
|
52
|
-
end
|
53
|
-
|
54
|
-
assert_equal [a1_name, a2_name], sic_e.source_index.map { |n,| n }.sort
|
55
|
-
end
|
56
|
-
|
57
|
-
def test_refresh_bad_uri
|
58
|
-
assert_raises URI::BadURIError do
|
59
|
-
@sic_e.refresh 'gems.example.com', true
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
def test_refresh_update
|
64
|
-
si = Gem::SourceIndex.new
|
65
|
-
si.add_spec @a1
|
66
|
-
si.add_spec @b2
|
67
|
-
@fetcher.data["#{@gem_repo}Marshal.#{@marshal_version}"] = si.dump
|
68
|
-
|
69
|
-
use_ui @ui do
|
70
|
-
@sic_e.refresh @gem_repo, true
|
71
|
-
end
|
72
|
-
|
73
|
-
new_gem = @sic_e.source_index.specification(@b2.full_name)
|
74
|
-
assert_equal @b2.full_name, new_gem.full_name
|
75
|
-
end
|
76
|
-
|
77
|
-
end
|
78
|
-
|