libgems 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +5811 -0
- data/History.txt +887 -0
- data/LICENSE.txt +51 -0
- data/README.md +87 -0
- data/Rakefile +113 -0
- data/lib/gauntlet_libgems.rb +50 -0
- data/lib/libgems.rb +1246 -0
- data/lib/libgems/builder.rb +102 -0
- data/lib/libgems/command.rb +534 -0
- data/lib/libgems/command_manager.rb +182 -0
- data/lib/libgems/commands/build_command.rb +53 -0
- data/lib/libgems/commands/cert_command.rb +86 -0
- data/lib/libgems/commands/check_command.rb +80 -0
- data/lib/libgems/commands/cleanup_command.rb +106 -0
- data/lib/libgems/commands/contents_command.rb +98 -0
- data/lib/libgems/commands/dependency_command.rb +195 -0
- data/lib/libgems/commands/environment_command.rb +133 -0
- data/lib/libgems/commands/fetch_command.rb +67 -0
- data/lib/libgems/commands/generate_index_command.rb +133 -0
- data/lib/libgems/commands/help_command.rb +172 -0
- data/lib/libgems/commands/install_command.rb +178 -0
- data/lib/libgems/commands/list_command.rb +35 -0
- data/lib/libgems/commands/lock_command.rb +110 -0
- data/lib/libgems/commands/mirror_command.rb +111 -0
- data/lib/libgems/commands/outdated_command.rb +33 -0
- data/lib/libgems/commands/owner_command.rb +75 -0
- data/lib/libgems/commands/pristine_command.rb +93 -0
- data/lib/libgems/commands/push_command.rb +56 -0
- data/lib/libgems/commands/query_command.rb +280 -0
- data/lib/libgems/commands/rdoc_command.rb +91 -0
- data/lib/libgems/commands/search_command.rb +31 -0
- data/lib/libgems/commands/server_command.rb +86 -0
- data/lib/libgems/commands/sources_command.rb +157 -0
- data/lib/libgems/commands/specification_command.rb +125 -0
- data/lib/libgems/commands/stale_command.rb +27 -0
- data/lib/libgems/commands/uninstall_command.rb +83 -0
- data/lib/libgems/commands/unpack_command.rb +121 -0
- data/lib/libgems/commands/update_command.rb +160 -0
- data/lib/libgems/commands/which_command.rb +86 -0
- data/lib/libgems/config_file.rb +345 -0
- data/lib/libgems/custom_require.rb +44 -0
- data/lib/libgems/defaults.rb +101 -0
- data/lib/libgems/dependency.rb +227 -0
- data/lib/libgems/dependency_installer.rb +286 -0
- data/lib/libgems/dependency_list.rb +208 -0
- data/lib/libgems/doc_manager.rb +242 -0
- data/lib/libgems/errors.rb +35 -0
- data/lib/libgems/exceptions.rb +91 -0
- data/lib/libgems/ext.rb +18 -0
- data/lib/libgems/ext/builder.rb +56 -0
- data/lib/libgems/ext/configure_builder.rb +25 -0
- data/lib/libgems/ext/ext_conf_builder.rb +24 -0
- data/lib/libgems/ext/rake_builder.rb +39 -0
- data/lib/libgems/format.rb +81 -0
- data/lib/libgems/gem_openssl.rb +92 -0
- data/lib/libgems/gem_path_searcher.rb +100 -0
- data/lib/libgems/gem_runner.rb +79 -0
- data/lib/libgems/gemcutter_utilities.rb +49 -0
- data/lib/libgems/indexer.rb +720 -0
- data/lib/libgems/install_update_options.rb +125 -0
- data/lib/libgems/installer.rb +604 -0
- data/lib/libgems/local_remote_options.rb +135 -0
- data/lib/libgems/old_format.rb +153 -0
- data/lib/libgems/package.rb +97 -0
- data/lib/libgems/package/f_sync_dir.rb +23 -0
- data/lib/libgems/package/tar_header.rb +266 -0
- data/lib/libgems/package/tar_input.rb +222 -0
- data/lib/libgems/package/tar_output.rb +144 -0
- data/lib/libgems/package/tar_reader.rb +106 -0
- data/lib/libgems/package/tar_reader/entry.rb +141 -0
- data/lib/libgems/package/tar_writer.rb +241 -0
- data/lib/libgems/package_task.rb +126 -0
- data/lib/libgems/platform.rb +183 -0
- data/lib/libgems/remote_fetcher.rb +414 -0
- data/lib/libgems/require_paths_builder.rb +18 -0
- data/lib/libgems/requirement.rb +153 -0
- data/lib/libgems/security.rb +814 -0
- data/lib/libgems/server.rb +872 -0
- data/lib/libgems/source_index.rb +597 -0
- data/lib/libgems/source_info_cache.rb +395 -0
- data/lib/libgems/source_info_cache_entry.rb +56 -0
- data/lib/libgems/spec_fetcher.rb +337 -0
- data/lib/libgems/specification.rb +1487 -0
- data/lib/libgems/test_utilities.rb +147 -0
- data/lib/libgems/text.rb +65 -0
- data/lib/libgems/uninstaller.rb +278 -0
- data/lib/libgems/user_interaction.rb +527 -0
- data/lib/libgems/validator.rb +240 -0
- data/lib/libgems/version.rb +316 -0
- data/lib/libgems/version_option.rb +65 -0
- data/lib/rbconfig/datadir.rb +20 -0
- data/test/bogussources.rb +8 -0
- data/test/data/gem-private_key.pem +27 -0
- data/test/data/gem-public_cert.pem +20 -0
- data/test/fake_certlib/openssl.rb +7 -0
- data/test/foo/discover.rb +0 -0
- data/test/gem_installer_test_case.rb +97 -0
- data/test/gem_package_tar_test_case.rb +132 -0
- data/test/gemutilities.rb +605 -0
- data/test/insure_session.rb +43 -0
- data/test/mockgemui.rb +56 -0
- data/test/plugin/exception/libgems_plugin.rb +2 -0
- data/test/plugin/load/libgems_plugin.rb +1 -0
- data/test/plugin/standarderror/libgems_plugin.rb +2 -0
- data/test/private_key.pem +27 -0
- data/test/public_cert.pem +20 -0
- data/test/rubygems_plugin.rb +21 -0
- data/test/simple_gem.rb +66 -0
- data/test/test_config.rb +12 -0
- data/test/test_gem.rb +780 -0
- data/test/test_gem_builder.rb +27 -0
- data/test/test_gem_command.rb +178 -0
- data/test/test_gem_command_manager.rb +207 -0
- data/test/test_gem_commands_build_command.rb +74 -0
- data/test/test_gem_commands_cert_command.rb +124 -0
- data/test/test_gem_commands_check_command.rb +18 -0
- data/test/test_gem_commands_contents_command.rb +156 -0
- data/test/test_gem_commands_dependency_command.rb +216 -0
- data/test/test_gem_commands_environment_command.rb +144 -0
- data/test/test_gem_commands_fetch_command.rb +76 -0
- data/test/test_gem_commands_generate_index_command.rb +135 -0
- data/test/test_gem_commands_install_command.rb +315 -0
- data/test/test_gem_commands_list_command.rb +36 -0
- data/test/test_gem_commands_lock_command.rb +68 -0
- data/test/test_gem_commands_mirror_command.rb +60 -0
- data/test/test_gem_commands_outdated_command.rb +40 -0
- data/test/test_gem_commands_owner_command.rb +105 -0
- data/test/test_gem_commands_pristine_command.rb +108 -0
- data/test/test_gem_commands_push_command.rb +81 -0
- data/test/test_gem_commands_query_command.rb +426 -0
- data/test/test_gem_commands_server_command.rb +59 -0
- data/test/test_gem_commands_sources_command.rb +209 -0
- data/test/test_gem_commands_specification_command.rb +139 -0
- data/test/test_gem_commands_stale_command.rb +38 -0
- data/test/test_gem_commands_uninstall_command.rb +83 -0
- data/test/test_gem_commands_unpack_command.rb +199 -0
- data/test/test_gem_commands_update_command.rb +207 -0
- data/test/test_gem_commands_which_command.rb +66 -0
- data/test/test_gem_config_file.rb +287 -0
- data/test/test_gem_dependency.rb +149 -0
- data/test/test_gem_dependency_installer.rb +661 -0
- data/test/test_gem_dependency_list.rb +230 -0
- data/test/test_gem_doc_manager.rb +31 -0
- data/test/test_gem_ext_configure_builder.rb +84 -0
- data/test/test_gem_ext_ext_conf_builder.rb +173 -0
- data/test/test_gem_ext_rake_builder.rb +81 -0
- data/test/test_gem_format.rb +70 -0
- data/test/test_gem_gem_path_searcher.rb +78 -0
- data/test/test_gem_gem_runner.rb +45 -0
- data/test/test_gem_gemcutter_utilities.rb +103 -0
- data/test/test_gem_indexer.rb +673 -0
- data/test/test_gem_install_update_options.rb +68 -0
- data/test/test_gem_installer.rb +857 -0
- data/test/test_gem_local_remote_options.rb +97 -0
- data/test/test_gem_package_tar_header.rb +130 -0
- data/test/test_gem_package_tar_input.rb +112 -0
- data/test/test_gem_package_tar_output.rb +97 -0
- data/test/test_gem_package_tar_reader.rb +46 -0
- data/test/test_gem_package_tar_reader_entry.rb +109 -0
- data/test/test_gem_package_tar_writer.rb +144 -0
- data/test/test_gem_package_task.rb +59 -0
- data/test/test_gem_platform.rb +264 -0
- data/test/test_gem_remote_fetcher.rb +740 -0
- data/test/test_gem_requirement.rb +292 -0
- data/test/test_gem_server.rb +356 -0
- data/test/test_gem_silent_ui.rb +113 -0
- data/test/test_gem_source_index.rb +461 -0
- data/test/test_gem_spec_fetcher.rb +410 -0
- data/test/test_gem_specification.rb +1334 -0
- data/test/test_gem_stream_ui.rb +218 -0
- data/test/test_gem_text.rb +43 -0
- data/test/test_gem_uninstaller.rb +146 -0
- data/test/test_gem_validator.rb +63 -0
- data/test/test_gem_version.rb +181 -0
- data/test/test_gem_version_option.rb +89 -0
- data/test/test_kernel.rb +59 -0
- metadata +402 -0
@@ -0,0 +1,181 @@
|
|
1
|
+
require File.expand_path('../gemutilities', __FILE__)
|
2
|
+
require "libgems/version"
|
3
|
+
|
4
|
+
class TestGemVersion < RubyGemTestCase
|
5
|
+
|
6
|
+
def test_bump
|
7
|
+
assert_bumped_version_equal "5.3", "5.2.4"
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_bump_alpha
|
11
|
+
assert_bumped_version_equal "5.3", "5.2.4.a"
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_bump_alphanumeric
|
15
|
+
assert_bumped_version_equal "5.3", "5.2.4.a10"
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_bump_trailing_zeros
|
19
|
+
assert_bumped_version_equal "5.1", "5.0.0"
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_bump_one_level
|
23
|
+
assert_bumped_version_equal "6", "5"
|
24
|
+
end
|
25
|
+
|
26
|
+
# FIX: For "legacy reasons," any object that responds to +version+
|
27
|
+
# is returned unchanged. I'm not certain why.
|
28
|
+
|
29
|
+
def test_class_create
|
30
|
+
fake = Object.new
|
31
|
+
def fake.version; "1.0" end
|
32
|
+
|
33
|
+
assert_same fake, LibGems::Version.create(fake)
|
34
|
+
assert_nil LibGems::Version.create(nil)
|
35
|
+
assert_equal v("5.1"), LibGems::Version.create("5.1")
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_eql_eh
|
39
|
+
assert_version_eql "1.2", "1.2"
|
40
|
+
refute_version_eql "1.2", "1.2.0"
|
41
|
+
refute_version_eql "1.2", "1.3"
|
42
|
+
refute_version_eql "1.2.b1", "1.2.b.1"
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_equals2
|
46
|
+
assert_version_equal "1.2", "1.2"
|
47
|
+
refute_version_equal "1.2", "1.3"
|
48
|
+
assert_version_equal "1.2.b1", "1.2.b.1"
|
49
|
+
end
|
50
|
+
|
51
|
+
# REVISIT: consider removing as too impl-bound
|
52
|
+
def test_hash
|
53
|
+
assert_equal v("1.2").hash, v("1.2").hash
|
54
|
+
refute_equal v("1.2").hash, v("1.3").hash
|
55
|
+
refute_equal v("1.2").hash, v("1.2.0").hash
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_initialize
|
59
|
+
["1.0", "1.0 ", " 1.0 ", "1.0\n", "\n1.0\n"].each do |good|
|
60
|
+
assert_version_equal "1.0", good
|
61
|
+
end
|
62
|
+
|
63
|
+
assert_version_equal "1", 1
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_initialize_bad
|
67
|
+
["junk", "1.0\n2.0"].each do |bad|
|
68
|
+
e = assert_raises ArgumentError do
|
69
|
+
LibGems::Version.new bad
|
70
|
+
end
|
71
|
+
|
72
|
+
assert_equal "Malformed version number string #{bad}", e.message
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def test_prerelease
|
77
|
+
assert_prerelease "1.2.0.a"
|
78
|
+
assert_prerelease "2.9.b"
|
79
|
+
assert_prerelease "22.1.50.0.d"
|
80
|
+
assert_prerelease "1.2.d.42"
|
81
|
+
|
82
|
+
assert_prerelease '1.A'
|
83
|
+
|
84
|
+
refute_prerelease "1.2.0"
|
85
|
+
refute_prerelease "2.9"
|
86
|
+
refute_prerelease "22.1.50.0"
|
87
|
+
end
|
88
|
+
|
89
|
+
def test_release
|
90
|
+
assert_release_equal "1.2.0", "1.2.0.a"
|
91
|
+
assert_release_equal "1.1", "1.1.rc10"
|
92
|
+
assert_release_equal "1.9.3", "1.9.3.alpha.5"
|
93
|
+
assert_release_equal "1.9.3", "1.9.3"
|
94
|
+
end
|
95
|
+
|
96
|
+
def test_spaceship
|
97
|
+
assert_equal( 0, v("1.0") <=> v("1.0.0"))
|
98
|
+
assert_equal( 1, v("1.0") <=> v("1.0.a"))
|
99
|
+
assert_equal( 1, v("1.8.2") <=> v("0.0.0"))
|
100
|
+
assert_equal( 1, v("1.8.2") <=> v("1.8.2.a"))
|
101
|
+
assert_equal( 1, v("1.8.2.b") <=> v("1.8.2.a"))
|
102
|
+
assert_equal(-1, v("1.8.2.a") <=> v("1.8.2"))
|
103
|
+
assert_equal( 1, v("1.8.2.a10") <=> v("1.8.2.a9"))
|
104
|
+
assert_equal( 0, v("") <=> v("0"))
|
105
|
+
|
106
|
+
assert_nil v("1.0") <=> "whatever"
|
107
|
+
end
|
108
|
+
|
109
|
+
def test_spermy_recommendation
|
110
|
+
assert_spermy_equal "~> 1.0", "1"
|
111
|
+
assert_spermy_equal "~> 1.0", "1.0"
|
112
|
+
assert_spermy_equal "~> 1.2", "1.2"
|
113
|
+
assert_spermy_equal "~> 1.2", "1.2.0"
|
114
|
+
assert_spermy_equal "~> 1.2", "1.2.3"
|
115
|
+
assert_spermy_equal "~> 1.2", "1.2.3.a.4"
|
116
|
+
end
|
117
|
+
|
118
|
+
def test_to_s
|
119
|
+
assert_equal "5.2.4", v("5.2.4").to_s
|
120
|
+
end
|
121
|
+
|
122
|
+
# Asserts that +version+ is a prerelease.
|
123
|
+
|
124
|
+
def assert_prerelease version
|
125
|
+
assert v(version).prerelease?, "#{version} is a prerelease"
|
126
|
+
end
|
127
|
+
|
128
|
+
# Assert that +expected+ is the "spermy" recommendation for +version".
|
129
|
+
|
130
|
+
def assert_spermy_equal expected, version
|
131
|
+
assert_equal expected, v(version).spermy_recommendation
|
132
|
+
end
|
133
|
+
|
134
|
+
# Assert that bumping the +unbumped+ version yields the +expected+.
|
135
|
+
|
136
|
+
def assert_bumped_version_equal expected, unbumped
|
137
|
+
assert_version_equal expected, v(unbumped).bump
|
138
|
+
end
|
139
|
+
|
140
|
+
# Assert that +release+ is the correct non-prerelease +version+.
|
141
|
+
|
142
|
+
def assert_release_equal release, version
|
143
|
+
assert_version_equal release, v(version).release
|
144
|
+
end
|
145
|
+
|
146
|
+
# Assert that two versions are equal. Handles strings or
|
147
|
+
# LibGems::Version instances.
|
148
|
+
|
149
|
+
def assert_version_equal expected, actual
|
150
|
+
assert_equal v(expected), v(actual)
|
151
|
+
end
|
152
|
+
|
153
|
+
# Assert that two versions are eql?. Checks both directions.
|
154
|
+
|
155
|
+
def assert_version_eql first, second
|
156
|
+
first, second = v(first), v(second)
|
157
|
+
assert first.eql?(second), "#{first} is eql? #{second}"
|
158
|
+
assert second.eql?(first), "#{second} is eql? #{first}"
|
159
|
+
end
|
160
|
+
|
161
|
+
# Refute the assumption that +version+ is a prerelease.
|
162
|
+
|
163
|
+
def refute_prerelease version
|
164
|
+
refute v(version).prerelease?, "#{version} is NOT a prerelease"
|
165
|
+
end
|
166
|
+
|
167
|
+
# Refute the assumption that two versions are eql?. Checks both
|
168
|
+
# directions.
|
169
|
+
|
170
|
+
def refute_version_eql first, second
|
171
|
+
first, second = v(first), v(second)
|
172
|
+
refute first.eql?(second), "#{first} is NOT eql? #{second}"
|
173
|
+
refute second.eql?(first), "#{second} is NOT eql? #{first}"
|
174
|
+
end
|
175
|
+
|
176
|
+
# Refute the assumption that the two versions are equal?.
|
177
|
+
|
178
|
+
def refute_version_equal unexpected, actual
|
179
|
+
refute_equal v(unexpected), v(actual)
|
180
|
+
end
|
181
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require File.expand_path('../gemutilities', __FILE__)
|
2
|
+
require 'libgems/command'
|
3
|
+
require 'libgems/version_option'
|
4
|
+
|
5
|
+
class TestGemVersionOption < RubyGemTestCase
|
6
|
+
|
7
|
+
def setup
|
8
|
+
super
|
9
|
+
|
10
|
+
@cmd = LibGems::Command.new 'dummy', 'dummy'
|
11
|
+
@cmd.extend LibGems::VersionOption
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_add_platform_option
|
15
|
+
@cmd.add_platform_option
|
16
|
+
|
17
|
+
assert @cmd.handles?(%w[--platform x86-darwin])
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_add_version_option
|
21
|
+
@cmd.add_version_option
|
22
|
+
|
23
|
+
assert @cmd.handles?(%w[--version >1])
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_enables_prerelease
|
27
|
+
@cmd.add_version_option
|
28
|
+
|
29
|
+
@cmd.handle_options %w[mygem -v 0.2.0.a]
|
30
|
+
assert @cmd.options[:prerelease]
|
31
|
+
|
32
|
+
@cmd.handle_options %w[mygem -v 0.2.0]
|
33
|
+
refute @cmd.options[:prerelease]
|
34
|
+
|
35
|
+
@cmd.handle_options %w[mygem]
|
36
|
+
refute @cmd.options[:prerelease]
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_platform_option
|
40
|
+
@cmd.add_platform_option
|
41
|
+
|
42
|
+
@cmd.handle_options %w[--platform x86-freebsd6 --platform x86-freebsd7]
|
43
|
+
|
44
|
+
expected = [
|
45
|
+
LibGems::Platform::RUBY,
|
46
|
+
LibGems::Platform.new('x86-freebsd6'),
|
47
|
+
LibGems::Platform.new('x86-freebsd7'),
|
48
|
+
]
|
49
|
+
|
50
|
+
assert_equal expected, LibGems.platforms
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_platform_option_ruby
|
54
|
+
@cmd.add_platform_option
|
55
|
+
|
56
|
+
@cmd.handle_options %w[--platform ruby]
|
57
|
+
|
58
|
+
expected = [
|
59
|
+
LibGems::Platform::RUBY
|
60
|
+
]
|
61
|
+
|
62
|
+
assert_equal expected, LibGems.platforms
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_platform_option_twice
|
66
|
+
@cmd.add_platform_option
|
67
|
+
|
68
|
+
@cmd.handle_options %w[--platform x86-freebsd6 --platform x86-freebsd-6]
|
69
|
+
|
70
|
+
expected = [
|
71
|
+
LibGems::Platform::RUBY,
|
72
|
+
LibGems::Platform.new('x86-freebsd6'),
|
73
|
+
]
|
74
|
+
|
75
|
+
assert_equal expected, LibGems.platforms
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_version_option
|
79
|
+
@cmd.add_version_option
|
80
|
+
|
81
|
+
@cmd.handle_options %w[--version >1]
|
82
|
+
|
83
|
+
expected = { :version => LibGems::Requirement.new('> 1'), :args => [] }
|
84
|
+
|
85
|
+
assert_equal expected, @cmd.options
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
|
data/test/test_kernel.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
require File.expand_path('../gemutilities', __FILE__)
|
2
|
+
require 'libgems/package'
|
3
|
+
|
4
|
+
class TestKernel < RubyGemTestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
super
|
8
|
+
|
9
|
+
@old_path = $:.dup
|
10
|
+
|
11
|
+
util_make_gems
|
12
|
+
end
|
13
|
+
|
14
|
+
def teardown
|
15
|
+
super
|
16
|
+
|
17
|
+
$:.replace @old_path
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_gem
|
21
|
+
assert gem('a', '= 1'), "Should load"
|
22
|
+
assert $:.any? { |p| %r{a-1/lib} =~ p }
|
23
|
+
assert $:.any? { |p| %r{a-1/bin} =~ p }
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_gem_redundant
|
27
|
+
assert gem('a', '= 1'), "Should load"
|
28
|
+
refute gem('a', '= 1'), "Should not load"
|
29
|
+
assert_equal 1, $:.select { |p| %r{a-1/lib} =~ p }.size
|
30
|
+
assert_equal 1, $:.select { |p| %r{a-1/bin} =~ p }.size
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_gem_overlapping
|
34
|
+
assert gem('a', '= 1'), "Should load"
|
35
|
+
refute gem('a', '>= 1'), "Should not load"
|
36
|
+
assert_equal 1, $:.select { |p| %r{a-1/lib} =~ p }.size
|
37
|
+
assert_equal 1, $:.select { |p| %r{a-1/bin} =~ p }.size
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_gem_conflicting
|
41
|
+
assert gem('a', '= 1'), "Should load"
|
42
|
+
|
43
|
+
ex = assert_raises LibGems::LoadError do
|
44
|
+
gem 'a', '= 2'
|
45
|
+
end
|
46
|
+
|
47
|
+
assert_match(/activate a \(= 2, runtime\)/, ex.message)
|
48
|
+
assert_match(/activated a-1/, ex.message)
|
49
|
+
assert_equal 'a', ex.name
|
50
|
+
assert_equal LibGems::Requirement.new('= 2'), ex.version_requirement
|
51
|
+
|
52
|
+
assert $:.any? { |p| %r{a-1/lib} =~ p }
|
53
|
+
assert $:.any? { |p| %r{a-1/bin} =~ p }
|
54
|
+
refute $:.any? { |p| %r{a-2/lib} =~ p }
|
55
|
+
refute $:.any? { |p| %r{a-2/bin} =~ p }
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
metadata
ADDED
@@ -0,0 +1,402 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: libgems
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jim Weirich
|
9
|
+
- Chad Fowler
|
10
|
+
- Eric Hodel
|
11
|
+
- Loren Segal
|
12
|
+
autorequire:
|
13
|
+
bindir: bin
|
14
|
+
cert_chain: []
|
15
|
+
|
16
|
+
date: 2011-06-08 00:00:00 Z
|
17
|
+
dependencies: []
|
18
|
+
|
19
|
+
description: |
|
20
|
+
# SlimGems
|
21
|
+
|
22
|
+
* Website: http://slimgems.github.com/
|
23
|
+
* Github: http://github.com/slimgems/slimgems
|
24
|
+
* Get gems from: http://rubygems.org
|
25
|
+
|
26
|
+
## Description
|
27
|
+
|
28
|
+
SlimGems is a drop-in replacement for RubyGems, a package management framework
|
29
|
+
for Ruby. We forked the project at 1.3.7, which was a great stable release.
|
30
|
+
|
31
|
+
SlimGems focuses on maintaining a sane and stable API. We believe that the
|
32
|
+
project has been put through enough stress testing by the community to lock
|
33
|
+
into the current API functionality for the forseeable future. We will also
|
34
|
+
continue to improve the runtime performance over time; we can do this
|
35
|
+
without changing the API.
|
36
|
+
|
37
|
+
## Project Goals
|
38
|
+
|
39
|
+
1. A fast package manager that "Just Works". We will attempt to make SlimGems
|
40
|
+
as fast as possible and believe it can be done without breaking the existing
|
41
|
+
API.
|
42
|
+
|
43
|
+
2. A consistent and stable API. Deprecations will not occur without ample
|
44
|
+
warning to library developers *before* a release. Deprecations will not
|
45
|
+
necessarily mean removed methods or runtime warnings, and we will consult
|
46
|
+
with the community if widely used APIs ever need to be removed.
|
47
|
+
|
48
|
+
3. Receptive and friendly project maintainers. We will listen to your bugs
|
49
|
+
and suggestions without deriding you. We believe the community deserves
|
50
|
+
a voice in matters that affect package management tools, and we respect
|
51
|
+
that voice.
|
52
|
+
|
53
|
+
4. Improved communication with the community about future plans. We believe
|
54
|
+
it's important to keep the community informed about major changes. We will
|
55
|
+
discuss our rationale for any changes that might cause problems for other
|
56
|
+
library developers.
|
57
|
+
|
58
|
+
## What Do I Have to do Differently to Use SlimGems?
|
59
|
+
|
60
|
+
Nothing. We maintain the same install paths, APIs and overall runtime environment
|
61
|
+
that RubyGems had. The only difference is that we have no intention on changing
|
62
|
+
this environment in future upgrades. You can upgrade safely knowing that the
|
63
|
+
newer versions of SlimGems will still be compatible with all of your code.
|
64
|
+
|
65
|
+
In short, yes, "require 'libgems'" still works.
|
66
|
+
|
67
|
+
## Installing and Upgrading
|
68
|
+
|
69
|
+
If you're on RubyGems, you can easily upgrade to SlimGems by typing:
|
70
|
+
|
71
|
+
$ gem install slimgems
|
72
|
+
|
73
|
+
You can do this from SlimGems too, but if you have SlimGems already, upgrading
|
74
|
+
works better with:
|
75
|
+
|
76
|
+
$ gem update --system
|
77
|
+
|
78
|
+
If you don't have any RubyGems or SlimGems install, there is still the pre-gem
|
79
|
+
approach to getting software, doing it manually:
|
80
|
+
|
81
|
+
1. Download from: http://github.com/slimgems/slimgems
|
82
|
+
2. Unpack into a directory and cd there
|
83
|
+
3. Install with: ruby setup.rb # you may need admin/root privilege
|
84
|
+
|
85
|
+
For more details and other options, see:
|
86
|
+
|
87
|
+
ruby setup.rb --help
|
88
|
+
|
89
|
+
## Uninstalling
|
90
|
+
|
91
|
+
If SlimGems isn't for you, you can downgrade back to RubyGems by performing
|
92
|
+
the following intuitive command:
|
93
|
+
|
94
|
+
$ gem uninstall slimgems
|
95
|
+
|
96
|
+
Again, you might need to have administrator privileges (sudo) to run these
|
97
|
+
commands.
|
98
|
+
|
99
|
+
## Notes about this SlimGems Fork
|
100
|
+
|
101
|
+
SlimGems is a RubyGems fork of RubyGems 1.3.7 and a limited set of backports
|
102
|
+
from 1.5.2. SlimGems is maintained by Loren Segal and others. SlimGems will
|
103
|
+
provide continual improvements with a stable API.
|
104
|
+
|
105
|
+
You can download the original RubyGems project at
|
106
|
+
http://rubyforge.org/projects/rubygems
|
107
|
+
|
108
|
+
email: lsegal@soen.ca
|
109
|
+
executables: []
|
110
|
+
|
111
|
+
extensions: []
|
112
|
+
|
113
|
+
extra_rdoc_files: []
|
114
|
+
|
115
|
+
files:
|
116
|
+
- lib/gauntlet_libgems.rb
|
117
|
+
- lib/libgems/builder.rb
|
118
|
+
- lib/libgems/command.rb
|
119
|
+
- lib/libgems/command_manager.rb
|
120
|
+
- lib/libgems/commands/build_command.rb
|
121
|
+
- lib/libgems/commands/cert_command.rb
|
122
|
+
- lib/libgems/commands/check_command.rb
|
123
|
+
- lib/libgems/commands/cleanup_command.rb
|
124
|
+
- lib/libgems/commands/contents_command.rb
|
125
|
+
- lib/libgems/commands/dependency_command.rb
|
126
|
+
- lib/libgems/commands/environment_command.rb
|
127
|
+
- lib/libgems/commands/fetch_command.rb
|
128
|
+
- lib/libgems/commands/generate_index_command.rb
|
129
|
+
- lib/libgems/commands/help_command.rb
|
130
|
+
- lib/libgems/commands/install_command.rb
|
131
|
+
- lib/libgems/commands/list_command.rb
|
132
|
+
- lib/libgems/commands/lock_command.rb
|
133
|
+
- lib/libgems/commands/mirror_command.rb
|
134
|
+
- lib/libgems/commands/outdated_command.rb
|
135
|
+
- lib/libgems/commands/owner_command.rb
|
136
|
+
- lib/libgems/commands/pristine_command.rb
|
137
|
+
- lib/libgems/commands/push_command.rb
|
138
|
+
- lib/libgems/commands/query_command.rb
|
139
|
+
- lib/libgems/commands/rdoc_command.rb
|
140
|
+
- lib/libgems/commands/search_command.rb
|
141
|
+
- lib/libgems/commands/server_command.rb
|
142
|
+
- lib/libgems/commands/sources_command.rb
|
143
|
+
- lib/libgems/commands/specification_command.rb
|
144
|
+
- lib/libgems/commands/stale_command.rb
|
145
|
+
- lib/libgems/commands/uninstall_command.rb
|
146
|
+
- lib/libgems/commands/unpack_command.rb
|
147
|
+
- lib/libgems/commands/update_command.rb
|
148
|
+
- lib/libgems/commands/which_command.rb
|
149
|
+
- lib/libgems/config_file.rb
|
150
|
+
- lib/libgems/custom_require.rb
|
151
|
+
- lib/libgems/defaults.rb
|
152
|
+
- lib/libgems/dependency.rb
|
153
|
+
- lib/libgems/dependency_installer.rb
|
154
|
+
- lib/libgems/dependency_list.rb
|
155
|
+
- lib/libgems/doc_manager.rb
|
156
|
+
- lib/libgems/errors.rb
|
157
|
+
- lib/libgems/exceptions.rb
|
158
|
+
- lib/libgems/ext/builder.rb
|
159
|
+
- lib/libgems/ext/configure_builder.rb
|
160
|
+
- lib/libgems/ext/ext_conf_builder.rb
|
161
|
+
- lib/libgems/ext/rake_builder.rb
|
162
|
+
- lib/libgems/ext.rb
|
163
|
+
- lib/libgems/format.rb
|
164
|
+
- lib/libgems/gem_openssl.rb
|
165
|
+
- lib/libgems/gem_path_searcher.rb
|
166
|
+
- lib/libgems/gem_runner.rb
|
167
|
+
- lib/libgems/gemcutter_utilities.rb
|
168
|
+
- lib/libgems/indexer.rb
|
169
|
+
- lib/libgems/install_update_options.rb
|
170
|
+
- lib/libgems/installer.rb
|
171
|
+
- lib/libgems/local_remote_options.rb
|
172
|
+
- lib/libgems/old_format.rb
|
173
|
+
- lib/libgems/package/f_sync_dir.rb
|
174
|
+
- lib/libgems/package/tar_header.rb
|
175
|
+
- lib/libgems/package/tar_input.rb
|
176
|
+
- lib/libgems/package/tar_output.rb
|
177
|
+
- lib/libgems/package/tar_reader/entry.rb
|
178
|
+
- lib/libgems/package/tar_reader.rb
|
179
|
+
- lib/libgems/package/tar_writer.rb
|
180
|
+
- lib/libgems/package.rb
|
181
|
+
- lib/libgems/package_task.rb
|
182
|
+
- lib/libgems/platform.rb
|
183
|
+
- lib/libgems/remote_fetcher.rb
|
184
|
+
- lib/libgems/require_paths_builder.rb
|
185
|
+
- lib/libgems/requirement.rb
|
186
|
+
- lib/libgems/security.rb
|
187
|
+
- lib/libgems/server.rb
|
188
|
+
- lib/libgems/source_index.rb
|
189
|
+
- lib/libgems/source_info_cache.rb
|
190
|
+
- lib/libgems/source_info_cache_entry.rb
|
191
|
+
- lib/libgems/spec_fetcher.rb
|
192
|
+
- lib/libgems/specification.rb
|
193
|
+
- lib/libgems/test_utilities.rb
|
194
|
+
- lib/libgems/text.rb
|
195
|
+
- lib/libgems/uninstaller.rb
|
196
|
+
- lib/libgems/user_interaction.rb
|
197
|
+
- lib/libgems/validator.rb
|
198
|
+
- lib/libgems/version.rb
|
199
|
+
- lib/libgems/version_option.rb
|
200
|
+
- lib/libgems.rb
|
201
|
+
- lib/rbconfig/datadir.rb
|
202
|
+
- test/bogussources.rb
|
203
|
+
- test/data/gem-private_key.pem
|
204
|
+
- test/data/gem-public_cert.pem
|
205
|
+
- test/fake_certlib/openssl.rb
|
206
|
+
- test/foo/discover.rb
|
207
|
+
- test/gem_installer_test_case.rb
|
208
|
+
- test/gem_package_tar_test_case.rb
|
209
|
+
- test/gemutilities.rb
|
210
|
+
- test/insure_session.rb
|
211
|
+
- test/mockgemui.rb
|
212
|
+
- test/plugin/exception/libgems_plugin.rb
|
213
|
+
- test/plugin/load/libgems_plugin.rb
|
214
|
+
- test/plugin/standarderror/libgems_plugin.rb
|
215
|
+
- test/private_key.pem
|
216
|
+
- test/public_cert.pem
|
217
|
+
- test/rubygems_plugin.rb
|
218
|
+
- test/simple_gem.rb
|
219
|
+
- test/test_config.rb
|
220
|
+
- test/test_gem.rb
|
221
|
+
- test/test_gem_builder.rb
|
222
|
+
- test/test_gem_command.rb
|
223
|
+
- test/test_gem_command_manager.rb
|
224
|
+
- test/test_gem_commands_build_command.rb
|
225
|
+
- test/test_gem_commands_cert_command.rb
|
226
|
+
- test/test_gem_commands_check_command.rb
|
227
|
+
- test/test_gem_commands_contents_command.rb
|
228
|
+
- test/test_gem_commands_dependency_command.rb
|
229
|
+
- test/test_gem_commands_environment_command.rb
|
230
|
+
- test/test_gem_commands_fetch_command.rb
|
231
|
+
- test/test_gem_commands_generate_index_command.rb
|
232
|
+
- test/test_gem_commands_install_command.rb
|
233
|
+
- test/test_gem_commands_list_command.rb
|
234
|
+
- test/test_gem_commands_lock_command.rb
|
235
|
+
- test/test_gem_commands_mirror_command.rb
|
236
|
+
- test/test_gem_commands_outdated_command.rb
|
237
|
+
- test/test_gem_commands_owner_command.rb
|
238
|
+
- test/test_gem_commands_pristine_command.rb
|
239
|
+
- test/test_gem_commands_push_command.rb
|
240
|
+
- test/test_gem_commands_query_command.rb
|
241
|
+
- test/test_gem_commands_server_command.rb
|
242
|
+
- test/test_gem_commands_sources_command.rb
|
243
|
+
- test/test_gem_commands_specification_command.rb
|
244
|
+
- test/test_gem_commands_stale_command.rb
|
245
|
+
- test/test_gem_commands_uninstall_command.rb
|
246
|
+
- test/test_gem_commands_unpack_command.rb
|
247
|
+
- test/test_gem_commands_update_command.rb
|
248
|
+
- test/test_gem_commands_which_command.rb
|
249
|
+
- test/test_gem_config_file.rb
|
250
|
+
- test/test_gem_dependency.rb
|
251
|
+
- test/test_gem_dependency_installer.rb
|
252
|
+
- test/test_gem_dependency_list.rb
|
253
|
+
- test/test_gem_doc_manager.rb
|
254
|
+
- test/test_gem_ext_configure_builder.rb
|
255
|
+
- test/test_gem_ext_ext_conf_builder.rb
|
256
|
+
- test/test_gem_ext_rake_builder.rb
|
257
|
+
- test/test_gem_format.rb
|
258
|
+
- test/test_gem_gem_path_searcher.rb
|
259
|
+
- test/test_gem_gem_runner.rb
|
260
|
+
- test/test_gem_gemcutter_utilities.rb
|
261
|
+
- test/test_gem_indexer.rb
|
262
|
+
- test/test_gem_install_update_options.rb
|
263
|
+
- test/test_gem_installer.rb
|
264
|
+
- test/test_gem_local_remote_options.rb
|
265
|
+
- test/test_gem_package_tar_header.rb
|
266
|
+
- test/test_gem_package_tar_input.rb
|
267
|
+
- test/test_gem_package_tar_output.rb
|
268
|
+
- test/test_gem_package_tar_reader.rb
|
269
|
+
- test/test_gem_package_tar_reader_entry.rb
|
270
|
+
- test/test_gem_package_tar_writer.rb
|
271
|
+
- test/test_gem_package_task.rb
|
272
|
+
- test/test_gem_platform.rb
|
273
|
+
- test/test_gem_remote_fetcher.rb
|
274
|
+
- test/test_gem_requirement.rb
|
275
|
+
- test/test_gem_server.rb
|
276
|
+
- test/test_gem_silent_ui.rb
|
277
|
+
- test/test_gem_source_index.rb
|
278
|
+
- test/test_gem_spec_fetcher.rb
|
279
|
+
- test/test_gem_specification.rb
|
280
|
+
- test/test_gem_stream_ui.rb
|
281
|
+
- test/test_gem_text.rb
|
282
|
+
- test/test_gem_uninstaller.rb
|
283
|
+
- test/test_gem_validator.rb
|
284
|
+
- test/test_gem_version.rb
|
285
|
+
- test/test_gem_version_option.rb
|
286
|
+
- test/test_kernel.rb
|
287
|
+
- History.txt
|
288
|
+
- LICENSE.txt
|
289
|
+
- README.md
|
290
|
+
- Rakefile
|
291
|
+
- ChangeLog
|
292
|
+
homepage: http://rubygems.org
|
293
|
+
licenses: []
|
294
|
+
|
295
|
+
post_install_message: "Upgraded from LibGems to LibGems 0.0.1\n\
|
296
|
+
\xEF\xBB\xBF=== 1.3.8 / 2011-05-16\n\n\
|
297
|
+
SlimGems is born! SlimGems is a fork of RubyGems, see README.md for more.\n\n"
|
298
|
+
rdoc_options: []
|
299
|
+
|
300
|
+
require_paths:
|
301
|
+
- lib
|
302
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
303
|
+
none: false
|
304
|
+
requirements:
|
305
|
+
- - ">"
|
306
|
+
- !ruby/object:Gem::Version
|
307
|
+
version: 1.8.3
|
308
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
309
|
+
none: false
|
310
|
+
requirements:
|
311
|
+
- - ">="
|
312
|
+
- !ruby/object:Gem::Version
|
313
|
+
version: "0"
|
314
|
+
requirements: []
|
315
|
+
|
316
|
+
rubyforge_project:
|
317
|
+
rubygems_version: 1.8.5
|
318
|
+
signing_key:
|
319
|
+
specification_version: 3
|
320
|
+
summary: LibGems is a package management framework for Ruby
|
321
|
+
test_files:
|
322
|
+
- test/bogussources.rb
|
323
|
+
- test/fake_certlib/openssl.rb
|
324
|
+
- test/foo/discover.rb
|
325
|
+
- test/gem_installer_test_case.rb
|
326
|
+
- test/gem_package_tar_test_case.rb
|
327
|
+
- test/gemutilities.rb
|
328
|
+
- test/insure_session.rb
|
329
|
+
- test/mockgemui.rb
|
330
|
+
- test/plugin/exception/libgems_plugin.rb
|
331
|
+
- test/plugin/load/libgems_plugin.rb
|
332
|
+
- test/plugin/standarderror/libgems_plugin.rb
|
333
|
+
- test/rubygems_plugin.rb
|
334
|
+
- test/simple_gem.rb
|
335
|
+
- test/test_config.rb
|
336
|
+
- test/test_gem.rb
|
337
|
+
- test/test_gem_builder.rb
|
338
|
+
- test/test_gem_command.rb
|
339
|
+
- test/test_gem_command_manager.rb
|
340
|
+
- test/test_gem_commands_build_command.rb
|
341
|
+
- test/test_gem_commands_cert_command.rb
|
342
|
+
- test/test_gem_commands_check_command.rb
|
343
|
+
- test/test_gem_commands_contents_command.rb
|
344
|
+
- test/test_gem_commands_dependency_command.rb
|
345
|
+
- test/test_gem_commands_environment_command.rb
|
346
|
+
- test/test_gem_commands_fetch_command.rb
|
347
|
+
- test/test_gem_commands_generate_index_command.rb
|
348
|
+
- test/test_gem_commands_install_command.rb
|
349
|
+
- test/test_gem_commands_list_command.rb
|
350
|
+
- test/test_gem_commands_lock_command.rb
|
351
|
+
- test/test_gem_commands_mirror_command.rb
|
352
|
+
- test/test_gem_commands_outdated_command.rb
|
353
|
+
- test/test_gem_commands_owner_command.rb
|
354
|
+
- test/test_gem_commands_pristine_command.rb
|
355
|
+
- test/test_gem_commands_push_command.rb
|
356
|
+
- test/test_gem_commands_query_command.rb
|
357
|
+
- test/test_gem_commands_server_command.rb
|
358
|
+
- test/test_gem_commands_sources_command.rb
|
359
|
+
- test/test_gem_commands_specification_command.rb
|
360
|
+
- test/test_gem_commands_stale_command.rb
|
361
|
+
- test/test_gem_commands_uninstall_command.rb
|
362
|
+
- test/test_gem_commands_unpack_command.rb
|
363
|
+
- test/test_gem_commands_update_command.rb
|
364
|
+
- test/test_gem_commands_which_command.rb
|
365
|
+
- test/test_gem_config_file.rb
|
366
|
+
- test/test_gem_dependency.rb
|
367
|
+
- test/test_gem_dependency_installer.rb
|
368
|
+
- test/test_gem_dependency_list.rb
|
369
|
+
- test/test_gem_doc_manager.rb
|
370
|
+
- test/test_gem_ext_configure_builder.rb
|
371
|
+
- test/test_gem_ext_ext_conf_builder.rb
|
372
|
+
- test/test_gem_ext_rake_builder.rb
|
373
|
+
- test/test_gem_format.rb
|
374
|
+
- test/test_gem_gem_path_searcher.rb
|
375
|
+
- test/test_gem_gem_runner.rb
|
376
|
+
- test/test_gem_gemcutter_utilities.rb
|
377
|
+
- test/test_gem_indexer.rb
|
378
|
+
- test/test_gem_install_update_options.rb
|
379
|
+
- test/test_gem_installer.rb
|
380
|
+
- test/test_gem_local_remote_options.rb
|
381
|
+
- test/test_gem_package_tar_header.rb
|
382
|
+
- test/test_gem_package_tar_input.rb
|
383
|
+
- test/test_gem_package_tar_output.rb
|
384
|
+
- test/test_gem_package_tar_reader.rb
|
385
|
+
- test/test_gem_package_tar_reader_entry.rb
|
386
|
+
- test/test_gem_package_tar_writer.rb
|
387
|
+
- test/test_gem_package_task.rb
|
388
|
+
- test/test_gem_platform.rb
|
389
|
+
- test/test_gem_remote_fetcher.rb
|
390
|
+
- test/test_gem_requirement.rb
|
391
|
+
- test/test_gem_server.rb
|
392
|
+
- test/test_gem_silent_ui.rb
|
393
|
+
- test/test_gem_source_index.rb
|
394
|
+
- test/test_gem_spec_fetcher.rb
|
395
|
+
- test/test_gem_specification.rb
|
396
|
+
- test/test_gem_stream_ui.rb
|
397
|
+
- test/test_gem_text.rb
|
398
|
+
- test/test_gem_uninstaller.rb
|
399
|
+
- test/test_gem_validator.rb
|
400
|
+
- test/test_gem_version.rb
|
401
|
+
- test/test_gem_version_option.rb
|
402
|
+
- test/test_kernel.rb
|