rubygems-update 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. data.tar.gz.sig +0 -0
  2. data/ChangeLog +267 -1
  3. data/Rakefile +13 -7
  4. data/doc/release_notes/rel_1_2_0.rdoc +105 -0
  5. data/lib/rubygems.rb +82 -14
  6. data/lib/rubygems/command.rb +1 -1
  7. data/lib/rubygems/command_manager.rb +3 -2
  8. data/lib/rubygems/commands/cert_command.rb +1 -1
  9. data/lib/rubygems/commands/dependency_command.rb +57 -19
  10. data/lib/rubygems/commands/environment_command.rb +2 -0
  11. data/lib/rubygems/commands/fetch_command.rb +3 -1
  12. data/lib/rubygems/commands/install_command.rb +3 -3
  13. data/lib/rubygems/commands/list_command.rb +30 -28
  14. data/lib/rubygems/commands/lock_command.rb +1 -1
  15. data/lib/rubygems/commands/outdated_command.rb +5 -2
  16. data/lib/rubygems/commands/pristine_command.rb +3 -44
  17. data/lib/rubygems/commands/query_command.rb +80 -21
  18. data/lib/rubygems/commands/sources_command.rb +56 -28
  19. data/lib/rubygems/commands/specification_command.rb +4 -3
  20. data/lib/rubygems/commands/stale_command.rb +27 -0
  21. data/lib/rubygems/commands/update_command.rb +35 -22
  22. data/lib/rubygems/config_file.rb +29 -12
  23. data/lib/rubygems/custom_require.rb +1 -1
  24. data/lib/rubygems/defaults.rb +1 -1
  25. data/lib/rubygems/dependency.rb +63 -9
  26. data/lib/rubygems/dependency_installer.rb +60 -23
  27. data/lib/rubygems/dependency_list.rb +1 -1
  28. data/lib/rubygems/doc_manager.rb +5 -5
  29. data/lib/rubygems/gem_openssl.rb +1 -1
  30. data/lib/rubygems/indexer.rb +269 -84
  31. data/lib/rubygems/install_update_options.rb +6 -0
  32. data/lib/rubygems/installer.rb +35 -12
  33. data/lib/rubygems/local_remote_options.rb +26 -5
  34. data/lib/rubygems/platform.rb +15 -1
  35. data/lib/rubygems/remote_fetcher.rb +158 -90
  36. data/lib/rubygems/requirement.rb +16 -12
  37. data/lib/rubygems/rubygems_version.rb +1 -1
  38. data/lib/rubygems/security.rb +2 -2
  39. data/lib/rubygems/server.rb +239 -110
  40. data/lib/rubygems/source_index.rb +44 -18
  41. data/lib/rubygems/source_info_cache.rb +1 -1
  42. data/lib/rubygems/spec_fetcher.rb +251 -0
  43. data/lib/rubygems/specification.rb +120 -38
  44. data/lib/rubygems/test_utilities.rb +120 -0
  45. data/lib/rubygems/uninstaller.rb +11 -10
  46. data/lib/rubygems/user_interaction.rb +149 -74
  47. data/lib/rubygems/validator.rb +3 -3
  48. data/lib/rubygems/version.rb +23 -21
  49. data/setup.rb +105 -100
  50. data/test/gemutilities.rb +63 -86
  51. data/test/test_config.rb +0 -5
  52. data/test/test_gem.rb +22 -2
  53. data/test/test_gem_command_manager.rb +1 -1
  54. data/test/test_gem_commands_dependency_command.rb +125 -6
  55. data/test/test_gem_commands_environment_command.rb +1 -0
  56. data/test/test_gem_commands_fetch_command.rb +24 -4
  57. data/test/test_gem_commands_install_command.rb +6 -8
  58. data/test/{test_gem_outdated_command.rb → test_gem_commands_outdated_command.rb} +5 -2
  59. data/test/test_gem_commands_pristine_command.rb +13 -4
  60. data/test/test_gem_commands_query_command.rb +113 -37
  61. data/test/test_gem_commands_sources_command.rb +101 -31
  62. data/test/test_gem_commands_specification_command.rb +4 -1
  63. data/test/test_gem_commands_stale_command.rb +39 -0
  64. data/test/test_gem_commands_update_command.rb +17 -27
  65. data/test/test_gem_config_file.rb +38 -1
  66. data/test/test_gem_dependency.rb +51 -0
  67. data/test/test_gem_dependency_installer.rb +133 -25
  68. data/test/test_gem_gem_path_searcher.rb +4 -1
  69. data/test/test_gem_indexer.rb +124 -19
  70. data/test/test_gem_installer.rb +32 -2
  71. data/test/test_gem_local_remote_options.rb +6 -5
  72. data/test/test_gem_remote_fetcher.rb +14 -9
  73. data/test/test_gem_server.rb +207 -21
  74. data/test/test_gem_source_index.rb +203 -63
  75. data/test/test_gem_source_info_cache.rb +8 -6
  76. data/test/test_gem_source_info_cache_entry.rb +11 -9
  77. data/test/test_gem_spec_fetcher.rb +303 -0
  78. data/test/test_gem_specification.rb +91 -7
  79. data/test/test_gem_uninstaller.rb +21 -0
  80. data/test/test_gem_version.rb +14 -5
  81. data/test/test_kernel.rb +1 -1
  82. metadata +10 -73
  83. metadata.gz.sig +0 -0
  84. data/lib/rubygems/indexer/abstract_index_builder.rb +0 -88
  85. data/lib/rubygems/indexer/latest_index_builder.rb +0 -35
  86. data/lib/rubygems/indexer/marshal_index_builder.rb +0 -17
  87. data/lib/rubygems/indexer/master_index_builder.rb +0 -54
  88. data/lib/rubygems/indexer/quick_index_builder.rb +0 -50
  89. data/test/gem_installer_test_case.rbc +0 -0
  90. data/test/gem_package_tar_test_case.rbc +0 -0
  91. data/test/gemutilities.rbc +0 -0
  92. data/test/mockgemui.rbc +0 -0
  93. data/test/simple_gem.rbc +0 -0
  94. data/test/test_config.rbc +0 -0
  95. data/test/test_gem.rbc +0 -0
  96. data/test/test_gem_builder.rbc +0 -0
  97. data/test/test_gem_command.rbc +0 -0
  98. data/test/test_gem_command_manager.rbc +0 -0
  99. data/test/test_gem_commands_build_command.rbc +0 -0
  100. data/test/test_gem_commands_cert_command.rbc +0 -0
  101. data/test/test_gem_commands_check_command.rbc +0 -0
  102. data/test/test_gem_commands_contents_command.rbc +0 -0
  103. data/test/test_gem_commands_dependency_command.rbc +0 -0
  104. data/test/test_gem_commands_environment_command.rbc +0 -0
  105. data/test/test_gem_commands_fetch_command.rbc +0 -0
  106. data/test/test_gem_commands_generate_index_command.rbc +0 -0
  107. data/test/test_gem_commands_install_command.rbc +0 -0
  108. data/test/test_gem_commands_mirror_command.rbc +0 -0
  109. data/test/test_gem_commands_pristine_command.rbc +0 -0
  110. data/test/test_gem_commands_query_command.rbc +0 -0
  111. data/test/test_gem_commands_server_command.rbc +0 -0
  112. data/test/test_gem_commands_sources_command.rbc +0 -0
  113. data/test/test_gem_commands_specification_command.rbc +0 -0
  114. data/test/test_gem_commands_unpack_command.rbc +0 -0
  115. data/test/test_gem_commands_update_command.rbc +0 -0
  116. data/test/test_gem_config_file.rbc +0 -0
  117. data/test/test_gem_dependency.rbc +0 -0
  118. data/test/test_gem_dependency_installer.rbc +0 -0
  119. data/test/test_gem_dependency_list.rbc +0 -0
  120. data/test/test_gem_digest.rbc +0 -0
  121. data/test/test_gem_doc_manager.rbc +0 -0
  122. data/test/test_gem_ext_configure_builder.rbc +0 -0
  123. data/test/test_gem_ext_ext_conf_builder.rbc +0 -0
  124. data/test/test_gem_ext_rake_builder.rbc +0 -0
  125. data/test/test_gem_format.rbc +0 -0
  126. data/test/test_gem_gem_path_searcher.rbc +0 -0
  127. data/test/test_gem_gem_runner.rbc +0 -0
  128. data/test/test_gem_indexer.rbc +0 -0
  129. data/test/test_gem_install_update_options.rbc +0 -0
  130. data/test/test_gem_installer.rbc +0 -0
  131. data/test/test_gem_local_remote_options.rbc +0 -0
  132. data/test/test_gem_outdated_command.rbc +0 -0
  133. data/test/test_gem_package_tar_header.rbc +0 -0
  134. data/test/test_gem_package_tar_input.rbc +0 -0
  135. data/test/test_gem_package_tar_output.rbc +0 -0
  136. data/test/test_gem_package_tar_reader.rbc +0 -0
  137. data/test/test_gem_package_tar_reader_entry.rbc +0 -0
  138. data/test/test_gem_package_tar_writer.rbc +0 -0
  139. data/test/test_gem_platform.rbc +0 -0
  140. data/test/test_gem_remote_fetcher.rbc +0 -0
  141. data/test/test_gem_requirement.rbc +0 -0
  142. data/test/test_gem_server.rbc +0 -0
  143. data/test/test_gem_source_index.rbc +0 -0
  144. data/test/test_gem_source_info_cache.rbc +0 -0
  145. data/test/test_gem_source_info_cache_entry.rbc +0 -0
  146. data/test/test_gem_specification.rbc +0 -0
  147. data/test/test_gem_stream_ui.rbc +0 -0
  148. data/test/test_gem_uninstaller.rbc +0 -0
  149. data/test/test_gem_validator.rbc +0 -0
  150. data/test/test_gem_version.rbc +0 -0
  151. data/test/test_gem_version_option.rbc +0 -0
  152. data/test/test_kernel.rbc +0 -0
data.tar.gz.sig CHANGED
Binary file
data/ChangeLog CHANGED
@@ -1,3 +1,269 @@
1
+ 2008-06-21 Eric Hodel <drbrain@segment7.net>
2
+
3
+ * lib/rubygems/specification.rb: Load specifications from the future.
4
+ Roll back specification version change.
5
+ * lib/rubygems/remote_fetcher.rb: Reset connection when an HTTP
6
+ server misbehaves.
7
+ * setup.rb: Fix --destdir for windows.
8
+ * doc/release_notes/rel_1_2_0.rdoc: Bugs in RubyGems were
9
+ unintentionally added, order bug fixes by importance.
10
+ * lib/rubygems/rubygems_version.rb: 1.2.0.
11
+
12
+ 2008-06-20 Eric Hodel <drbrain@segment7.net>
13
+
14
+ * lib/rubygems/uninstaller.rb: Improve output when a gem to uninstall
15
+ isn't found. Bug #20746 reported by Chad Wooley.
16
+ * setup.rb: Fix rdoc installation with --destdir. Patch #20739 by
17
+ Matthew Kent.
18
+ * lib/rubygems/commands/install_command.rb: Don't reset GEM_PATH when
19
+ installing. Fixes Bug #20746 by Chad Wooley.
20
+
21
+ 2008-06-20 Luis Lavena <luislavena@gmail.com>
22
+
23
+ * setup.rb: Only prepend install_destdir when especified. Fixes
24
+ installation issues related to Windows paths (/C:/...)
25
+
26
+ 2008-06-19 Eric Hodel <drbrain@segment7.net>
27
+
28
+ * lib/rubygems/dependency_installer.rb: Ensure that the entire
29
+ dependency chain is installed. Fixes bug reported by Chad Woolley.
30
+
31
+ 2008-06-18 Eric Hodel <drbrain@segment7.net>
32
+
33
+ * lib/rubygems/commands/dependency_command.rb: Restore matching
34
+ everything when no name is specified, regexp matching. Fixes bug
35
+ #20716, bug #20717 by Chad Woolley.
36
+
37
+ 2008-06-18 Chad Woolley <thewoolleyman@gmail.com>
38
+
39
+ * lib/rubygems/config_file.rb: Fix --config-file option with no
40
+ equals and subsequent options to properly assign config file.
41
+ Previously config file was overwritten by subsequent option.
42
+ Fixes bug #16688.
43
+
44
+ 2008-06-17 Eric Hodel <drbrain@segment7.net>
45
+
46
+ * lib/rubygems/version.rb: Gem::Version #hash and #eql? now operate
47
+ on the version string, terms of the version string, so "1" and "1.0"
48
+ no longer correspond to the same slot. Fixes indexer bug reported by
49
+ Chad Woolley.
50
+ * setup.rb: Fix --format-executable. Patch #20698 by Richard Brown.
51
+ * util/gem_prelude.rb: Prevent infinite recursion, check for Gem now.
52
+ Patch from ruby trunk by nobu.
53
+ * lib/*: Spelling cleanup. Patch from trunk by Evan Farrar.
54
+ * test/*: Fixes for win32 test failures reported by Luis Lavena.
55
+ * util/gem_prelude.rb: Only remove methods added by gem_prelude.rb.
56
+
57
+ 2008-06-16 Eric Hodel <drbrain@segment7.net>
58
+
59
+ * lib/rubygems/indexer.rb: Fix quick_index generation.
60
+ * lib/rubygems/specification.rb: Correctly guard new spec features
61
+ for older RubyGems.
62
+ * lib/rubygems/config_file.rb: Add system-wide config file
63
+ (/etc/gemrc). Patch #14723 by Phil Hagelberg. Add windows code to
64
+ use appropriate directory. Code by Daniel Berger.
65
+ * doc/release_notes/rel_1_2_0.rdoc: Draft of 1.2.0 release notes.
66
+
67
+ 2008-06-15 Eric Hodel <drbrain@segment7.net>
68
+
69
+ * lib/rubygems/server.rb: Store off if we are returning Marshal
70
+ format before running =~ again. Fixes bug reported by Chad Woolley.
71
+ * lib/rubygems/commands/stale_command.rb: `gem stale` lists gems by
72
+ last access time. Patch #20593 by Aaron Patterson.
73
+ * lib/rubygems/setup.rb: Add --vendor and --destdir to setup.rb for
74
+ packagers. Patch #20610 by Richard Brown. Don't look for stub
75
+ files to remove any more.
76
+ * lib/rubygems/specification.rb: Bump specification version and be
77
+ backwards compatible with type 2 specs.
78
+ * lib/rubygems/commands/query_command.rb: Add installed location to
79
+ details for installed gems.
80
+
81
+ 2008-06-09 Eric Hodel <drbrain@segment7.net>
82
+
83
+ * lib/rubygems/dependency_installer.rb: Only install all dependencies
84
+ when install_dir option is set. Don't include satisfied dependencies
85
+ when gathering dependencies.
86
+ * lib/rubygems/commands/query_command.rb: Display authors, rubyforge
87
+ and homepage urls with details.
88
+ * lib/rubygems/commands/environment_command.rb: Add executable
89
+ directory (from Rubinius).
90
+ * lib/rubygems/commands/install_command.rb: Don't set install_dir by
91
+ default.
92
+ * lib/rubygems/commands/update_command.rb: Don't set install_dir by
93
+ default. Use #find_missing for efficiency.
94
+
95
+ 2008-06-07 Eric Hodel <drbrain@segment7.net>
96
+
97
+ * lib/rubygems/server.rb: Fully mirror Gem::Indexer indexes, set
98
+ correct content-type headers, always refresh the source index.
99
+ * lib/rubygems/source_index.rb: Add spec_dirs so that #refresh! will
100
+ always reload from the same locations. #refresh! on manually-built
101
+ SourceIndex now raises. Fixes #20509 by Chad Woolley.
102
+
103
+ 2008-06-06 Eric Hodel <drbrain@segment7.net>
104
+
105
+ * lib/rubygems/installer.rb: Remove previous bin_script_path in case
106
+ it is a symlink.
107
+ * lib/rubygems/commands/pristine_command.rb: Force reinstallation of
108
+ the gem using the installer. Fixes bug #20387 by Erik Persson.
109
+ * lib/rubygems/doc_manager.rb: Ensure args to RDoc are all strings.
110
+ * lib/rubygems/source_index.rb: Use find_matching to discover updated
111
+ specs instead of fetch.
112
+ * lib/rubygems/commands/query_command.rb: Platform, not name in spec
113
+ tuples.
114
+
115
+ 2008-06-05 Eric Hodel <drbrain@segment7.net>
116
+
117
+ * lib/rubygems/local_remote_options.rb: Ensure remote repository URLs
118
+ reference directories. Fixes bug #20134 by Neil Wilson.
119
+ * lib/rubygems/source_index.rb: Gracefully handle ^C or explicit exit
120
+ while loading .gemspec files from disk. Fixes bug #20523 by Joel
121
+ VanderWerf.
122
+ * lib/rubygems/specification.rb: Use File#expand_path in
123
+ installation_path. Fixes bug #19317 by Hemant Kumar.
124
+ * lib/rubygems/spec_fetcher.rb: Fix legacy test against URI.
125
+ * lib/rubygems/remote_fetcher.rb: Always raise FetchError from
126
+ RemoteFetcher. Fix FetchErrors without URIs. Refactor Net::HTTP
127
+ request code to use persistent connections for HEAD requests. Feature
128
+ Request #7973 by Christian Schachtzabel.
129
+ * lib/rubygems.rb: Don't load custom_require until after the OS and
130
+ implementation have had a chance to set paths.
131
+
132
+ 2008-06-04 Eric Hodel <drbrain@segment7.net>
133
+
134
+ * lib/rubygems/commands/source_index.rb: Only fetch specs we need in
135
+ #outdated.
136
+ * lib/rubygems.rb: Fix typo in ::activate exception.
137
+ * lib/rubygems/dependency.rb: For #to_s, display dependency type when
138
+ nil.
139
+ * lib/rubygems/dependency_installer.rb: Reset #installed_gems for
140
+ every #install. Fixes bug #19444 by Glenn Rempe.
141
+ * lib/rubygems/installer.rb: Don't re-read the disk to check for new
142
+ gems, add them by hand on install.
143
+
144
+ 2008-06-03 Eric Hodel <drbrain@segment7.net>
145
+
146
+ * lib/rubygems.rb: Add ::gzip, ::gunzip, ::deflate and ::inflate.
147
+ * lib/rubygems/server.rb: Add specs and latest_specs indicies.
148
+ * setup.rb: Don't require rdoc until needed. Patch #20414 by Brian
149
+ Candler.
150
+ * lib/uninstaller.rb: Correctly uninstall gems installed with a
151
+ legacy platform. Patch #19877 by Luis Lavena.
152
+ * lib/rubygems/commands/update_command.rb: Only fetch remote specs
153
+ when we know what we're looking for.
154
+
155
+ 2008-06-02 Eric Hodel <drbrain@segment7.net>
156
+
157
+ * lib/rubygems/specification.rb: Remove double slash in
158
+ #installation_path. Fixes bug #19896 by Heiko Seebach.
159
+ * lib/rubygems/remote_fetcher.rb: Require StringIO. Fixes bug #19866
160
+ by Caleb Land.
161
+ * lib/rubygems.rb: Require rubygems/defaults/#{RBX_ENGINE}.rb and
162
+ rubygem/defaults/operating_system.rb if they exist. (OS require comes
163
+ first and may be overridden by operating system.)
164
+
165
+ 2008-06-01 Eric Hodel <drbrain@segment7.net>
166
+
167
+ * lib/rubygems/indexer.rb: Ensure identical names, versions and
168
+ platforms are identical for a smaller index.
169
+ * lib/rubygems/spec_fetcher.rb: Only write to cache when we own it.
170
+ * lib/rubygems.rb: Honor default_path if GEM_PATH environment
171
+ variable is not set. Patch #19502 by Donavan Pantke.
172
+ * lib/rubygems/installer.rb: Set file mode indicated by tar file.
173
+ Patch #19737 by Jason Roelofs.
174
+
175
+ 2008-06-01 John Barnette <jbarnette@rubyforge.org>
176
+
177
+ * lib/rubygems.rb: Add Gem.available?(gem, *specs) for easy availability
178
+ checks at runtime.
179
+
180
+ 2008-05-31 Eric Hodel <drbrain@segment7.net>
181
+
182
+ * lib/rubygems/commands/dependency_command.rb: Delay fetching specs
183
+ until needed. Reverse dependencies can no longer be calculated for
184
+ remote sources. Add backwards compatibility.
185
+ * lib/rubygems/commands/fetch_command.rb: Add backwards
186
+ compatibility.
187
+
188
+ 2008-05-30 Eric Hodel <drbrain@segment7.net>
189
+
190
+ * lib/rubygems/local_remote_options.rb: --sources option should not
191
+ add URIs to Gem.sources.
192
+ * lib/rubygems/spec_fetcher.rb: Add #warn_legacy to help handling
193
+ legacy sources.
194
+ * luby/rubygems/commands/query_command.rb: Add backwards
195
+ compatibility with legacy sources.
196
+
197
+ 2008-05-28 Eric Hodel <drbrain@segment7.net>
198
+
199
+ * lib/rubygems/remote_fetcher.rb: Add #uri to
200
+ Gem::RemoteFetcher::FetchError.
201
+ * lib/rubygems/user_interaction.rb: Improve RDoc slightly.
202
+ * lib/rubygems/spec_fetcher.rb: Introduce backwards compatibility for
203
+ legacy (pre 1.2) repositories
204
+ * lib/rubygems/commands/sources_command.rb: Backwards compatibility
205
+ and restoration of --update.
206
+ * lib/rubygems/specification.rb: Ensure nil-typed dependencies become
207
+ runtime dependencies.
208
+
209
+ 2008-05-27 Eric Hodel <drbrain@segment7.net>
210
+
211
+ * lib/rubygems/spec_fetcher.rb: Switch #fetch, #find_matching to be
212
+ compatible with Gem::SourceInfoCache#search_with_source. Add caching
213
+ for .gemspec files.
214
+ * lib/rubygems/dependency_installer.rb: Switch to SpecFetcher.
215
+ * lib/rubygems/source_index.rb: Switch #outdated to use SpecFetcher.
216
+ * lib/rubygems/commands/dependency_command.rb: Switch to SpecFetcher.
217
+ * lib/rubygems/commands/outdated_command.rb: Switch to SpecFetcher.
218
+ * lib/rubygems/commands/query_command.rb: Switch to SpecFetcher.
219
+ * lib/rubygems/commands/sources_command.rb: Switch to SpecFetcher.
220
+ * lib/rubygems/commands/update_command.rb: Switch to SpecFetcher.
221
+ * lib/rubygems/version.rb: Handle comparisons with non-Gem::Version
222
+ objects.
223
+
224
+ 2008-05-13 Eric Hodel <drbrain@segment7.net>
225
+
226
+ * lib/rubygems/spec_fetcher.rb: Add caching of specs, latest_specs
227
+ files.
228
+ * test/gemutilities.rb: Ensure Gem.user_home doesn't point to ~.
229
+
230
+ 2008-05-09 Eric Hodel <drbrain@segment7.net>
231
+
232
+ * lib/rubygems/indexer.rb: Add Marshal format index of spec names,
233
+ versions and platforms. WIP.
234
+ * lib/rubygems/spec_fetcher.rb: WIP for replacement of
235
+ Gem::SourceInfoCache and SourceInfoCacheEntry.
236
+ * lib/rubygems/dependency.rb: Add #=~.
237
+
238
+ 2008-05-07 John Barnette <jbarnette@gmail.com>
239
+
240
+ * lib/rubygems/specification.rb, et. al: Let gems have development
241
+ dependencies, which aren't installed (except when --development is
242
+ supplied) or activated.
243
+
244
+ 2008-05-02 Eric Hodel <drbrain@segment7.net>
245
+
246
+ * lib/rubygems/indexer.rb: Refactored into simpler more imperative
247
+ code.
248
+ * lib/rubygems.rb: Leave rbconfig/datadir.rb for non-RubyGems use.
249
+
250
+ 2008-04-16 Eric Hodel <drbrain@segment7.net>
251
+
252
+ * lib/rubygems/server.rb: Refresh the source index per request so new
253
+ gems will be found after server startup.
254
+
255
+ 2008-04-15 Eric Hodel <drbrain@segment7.net>
256
+
257
+ * lib/rubygems/source_index.rb: Only print out "Bulk updating" when
258
+ verbose, fix #latest_specs documentation.
259
+ * lib/rubygems/dependency_installer.rb: Add :cache_dir option for
260
+ Tinderbox.
261
+
262
+ 2008-04-14 Eric Hodel <drbrain@segment7.net>
263
+
264
+ * lib/rubygems/test_utilities.rb: Expose some internal testing
265
+ utilities that are of general use.
266
+
1
267
  2008-04-10 Eric Hodel <drbrain@segment7.net>
2
268
 
3
269
  * lib/rubygems.rb: Fix Gem.prefix so it reports nil when rubygems.rb
@@ -3749,7 +4015,7 @@ Tue Dec 6 14:51:13 2005 Jim Weirich <jim@tardis>
3749
4015
  2004-04-02 07:48 chadfowler
3750
4016
 
3751
4017
  * lib/rubygems/remote_installer.rb: Prompt for installation of
3752
- dependenciees.
4018
+ dependencies.
3753
4019
 
3754
4020
  For now, there is a puts/gets in the middle of
3755
4021
  remote_installer.rb This should probably be cleaned up later
data/Rakefile CHANGED
@@ -282,7 +282,13 @@ PKG_FILES = FileList[
282
282
  "setup.rb",
283
283
  "test/**/*"
284
284
  ]
285
- PKG_FILES.exclude(%r(^test/temp(/|$)))
285
+
286
+ PKG_FILES.exclude %r(^test/temp(/|$))
287
+ PKG_FILES.exclude %r(\*\.rbc$)
288
+
289
+ task :package_files do
290
+ puts PKG_FILES.join("\n")
291
+ end
286
292
 
287
293
  Rake::PackageTask.new("package") do |p|
288
294
  p.name = PKG_NAME
@@ -307,7 +313,7 @@ installation of RubyGems before this update can be applied.
307
313
  s.email = "rubygems-developers@rubyforge.org"
308
314
  s.homepage = "http://rubygems.rubyforge.org"
309
315
  s.rubyforge_project = "rubygems"
310
- s.bindir = "bin" # Use these for applications.
316
+ s.bindir = "bin" # Use these for applications.
311
317
  s.executables = ["update_rubygems"]
312
318
  certdir = ENV['CERT_DIR']
313
319
  if certdir
@@ -336,7 +342,8 @@ task :install do
336
342
  svnversion = `svnversion`.split(':').last.sub(/[^\d]/, '').strip
337
343
 
338
344
  unless svnversion.empty? then
339
- current_version = Gem::RubyGemsVersion.split '.', 4
345
+ File.read('lib/rubygems/rubygems_version.rb') =~ /RubyGemsVersion = '(.*)'/
346
+ current_version = $1.split '.', 4
340
347
  rubygems_version = (current_version[0, 3] << svnversion).join '.'
341
348
  rubygems_version_file = File.join Gem::ConfigMap[:sitelibdir], 'rubygems',
342
349
  'rubygems_version.rb'
@@ -395,7 +402,7 @@ task :rf => :rubyfiles
395
402
  # RUBINIUS_PATH.
396
403
 
397
404
  diff_options = "-urpN --exclude '*svn*' --exclude '*swp' --exclude '*rbc'"
398
- rsync_options = "-avP --exclude '*svn*' --exclude '*swp' --exclude '*rbc' --exclude '*.rej' --exclude '*.orig'"
405
+ rsync_options = "-avP --exclude '*svn*' --exclude '*swp' --exclude '*rbc' --exclude '*.rej' --exclude '*.orig' --exclude 'lib/rubygems/defaults/*'"
399
406
 
400
407
  rubinius_dir = ENV['RUBINIUS_PATH'] || '../../../git/git.rubini.us/code'
401
408
  ruby_dir = ENV['RUBY_PATH'] || '../../ruby/trunk'
@@ -423,7 +430,7 @@ end
423
430
 
424
431
  desc "Updates Rubinius HEAD with the currently checked-out copy of RubyGems."
425
432
  task :update_rubinius do
426
- sh "rsync #{rsync_options} bin/gem #{rubinius_dir}/lib/bin/gem.rb"
433
+ sh "rsync #{rsync_options} bin/gem #{rubinius_dir}/lib/bin/gem"
427
434
  sh "rsync #{rsync_options} lib/ #{rubinius_dir}/lib"
428
435
  sh "rsync #{rsync_options} test/ #{rubinius_dir}/test/rubygems"
429
436
  sh "rsync #{rsync_options} util/gem_prelude.rb #{rubinius_dir}/kernel/core/gem_prelude.rb"
@@ -431,11 +438,10 @@ end
431
438
 
432
439
  desc "Diffs Rubinius HEAD with the currently checked-out copy of RubyGems."
433
440
  task :diff_rubinius do
434
- sh "diff #{diff_options} bin/gem #{rubinius_dir}/lib/bin/gem.rb; true"
441
+ sh "diff #{diff_options} bin/gem #{rubinius_dir}/lib/bin/gem; true"
435
442
  sh "diff #{diff_options} lib/ubygems.rb #{rubinius_dir}/lib/ubygems.rb; true"
436
443
  sh "diff #{diff_options} lib/rubygems.rb #{rubinius_dir}/lib/rubygems.rb; true"
437
444
  sh "diff #{diff_options} lib/rubygems #{rubinius_dir}/lib/rubygems; true"
438
- sh "diff #{diff_options} lib/rbconfig #{rubinius_dir}/lib/rbconfig; true"
439
445
  sh "diff #{diff_options} test #{rubinius_dir}/test/rubygems; true"
440
446
  sh "diff #{diff_options} util/gem_prelude.rb #{rubinius_dir}/kernel/core/gem_prelude.rb; true"
441
447
  end
@@ -0,0 +1,105 @@
1
+ = Announce: RubyGems Release 1.2.0
2
+
3
+ Release 1.2.0 adds new features and fixes some bugs.
4
+
5
+ New features:
6
+
7
+ * RubyGems no longer performs bulk updates and instead only fetches the gemspec
8
+ files it needs. Alternate sources will need to upgrade to RubyGems 1.2 to
9
+ allow RubyGems to take advantage of the new metadata updater. If a pre 1.2
10
+ remote source is in the sources list, RubyGems will revert to the bulk update
11
+ code for compatibility.
12
+ * RubyGems now has runtime and development dependency types. Use
13
+ #add_development_dependency and #add_runtime_dependency. All typeless
14
+ dependencies are considered to be runtime dependencies.
15
+ * RubyGems will now require rubygems/defaults/operating_system.rb and
16
+ rubygems/defaults/#{RBX_ENGINE}.rb if they exist. This allows packagers and
17
+ ruby implementers to add custom behavior to RubyGems via these files. (If
18
+ the RubyGems API is insufficient, please suggest improvements via the
19
+ RubyGems list.)
20
+ * /etc/gemrc (and windows equivalent) for global settings
21
+ * setup.rb now handles --vendor and --destdir for packagers
22
+ * `gem stale` command that lists gems by last access time
23
+
24
+ Bugs Fixed:
25
+
26
+ * File modes from gems are now honored, patch #19737
27
+ * Marshal Gem::Specification objects from the future can now be loaded.
28
+ * A trailing / is now added to remote sources when missing, bug #20134
29
+ * Gems with legacy platforms will now be correctly uninstalled, patch #19877
30
+ * `gem install --no-wrappers` followed by `gem install --wrappers` no longer
31
+ overwrites executables
32
+ * `gem pristine` now forces reinstallation of gems, bug #20387
33
+ * RubyGems gracefully handles ^C while loading .gemspec files from disk, bug
34
+ #20523
35
+ * Paths are expanded in more places, bug #19317, bug #19896
36
+ * Gem::DependencyInstaller resets installed gems every install, bug #19444
37
+ * Gem.default_path is now honored if GEM_PATH is not set, patch #19502
38
+
39
+ Other Changes Include:
40
+
41
+ * setup.rb
42
+ * stub files created by RubyGems 0.7.x and older are no longer removed. When
43
+ upgrading from these ancient versions, upgrade to 1.1.x first to clean up
44
+ stubs.
45
+ * RDoc is no longer required until necessary, patch #20414
46
+ * `gem server`
47
+ * Now completely matches the output of `gem generate_index` and
48
+ has correct content types
49
+ * Refreshes from source directories for every hit. The server will no longer
50
+ need to be restarted after installing gems.
51
+ * `gem query --details` and friends now display author, homepage, rubyforge url
52
+ and installed location
53
+ * `gem install` without -i no longer reinstalls dependencies if they are in
54
+ GEM_PATH but not in GEM_HOME
55
+ * Gem::RemoteFetcher now performs persistent connections for HEAD requests,
56
+ bug #7973
57
+
58
+ For a full list of changes to RubyGems and the contributor for each change, see
59
+ the ChangeLog file.
60
+
61
+ Special thanks to Chad Wooley for backwards compatibility testing and Luis
62
+ Lavena for continuing windows support.
63
+
64
+ == How can I get RubyGems?
65
+
66
+ NOTE: If you have installed RubyGems using a package system you may want to
67
+ install a new RubyGems through the same packaging system.
68
+
69
+ If you have a recent version of RubyGems (0.8.5 or later), then all
70
+ you need to do is:
71
+
72
+ $ gem update --system (you might need to be admin/root)
73
+
74
+ (Note: You may have to run the command twice if you have any previosly
75
+ installed rubygems-update gems).
76
+
77
+ If you have an older version of RubyGems installed, then you can still
78
+ do it in two steps:
79
+
80
+ $ gem install rubygems-update (again, might need to be admin/root)
81
+ $ update_rubygems (... here too)
82
+
83
+ If you don't have any gems install, there is still the pre-gem
84
+ approach to getting software ... doing it manually:
85
+
86
+ 1. DOWNLOAD FROM: http://rubyforge.org/frs/?group_id=126
87
+ 2. UNPACK INTO A DIRECTORY AND CD THERE
88
+ 3. INSTALL WITH: ruby setup.rb (you may need admin/root privilege)
89
+
90
+ == To File Bugs
91
+
92
+ The RubyGems bug tracker can be found on RubyForge at:
93
+ http://rubyforge.org/tracker/?func=add&group_id=126&atid=575
94
+
95
+ When filing a bug, `gem env` output will be helpful in diagnosing the issue.
96
+
97
+ If you find a bug where RubyGems crashes, please provide debug output. You can
98
+ do that with `gem --debug the_command`.
99
+
100
+ == Thanks
101
+
102
+ Keep those gems coming!
103
+
104
+ -- Jim & Chad & Eric (for the RubyGems team)
105
+
@@ -67,11 +67,14 @@ module Gem
67
67
  :RUBY_SO_NAME => RbConfig::CONFIG["RUBY_SO_NAME"],
68
68
  :arch => RbConfig::CONFIG["arch"],
69
69
  :bindir => RbConfig::CONFIG["bindir"],
70
+ :datadir => RbConfig::CONFIG["datadir"],
70
71
  :libdir => RbConfig::CONFIG["libdir"],
71
72
  :ruby_install_name => RbConfig::CONFIG["ruby_install_name"],
72
73
  :ruby_version => RbConfig::CONFIG["ruby_version"],
73
74
  :sitedir => RbConfig::CONFIG["sitedir"],
74
- :sitelibdir => RbConfig::CONFIG["sitelibdir"]
75
+ :sitelibdir => RbConfig::CONFIG["sitelibdir"],
76
+ :vendordir => RbConfig::CONFIG["vendordir"] ,
77
+ :vendorlibdir => RbConfig::CONFIG["vendorlibdir"]
75
78
  )
76
79
 
77
80
  DIRECTORIES = %w[cache doc gems specifications] unless defined?(DIRECTORIES)
@@ -137,7 +140,7 @@ module Gem
137
140
 
138
141
  unless matches.any? { |spec| spec.version == existing_spec.version } then
139
142
  raise Gem::Exception,
140
- "can't activate #{gem}, already activated #{existing_spec.full_name}]"
143
+ "can't activate #{gem}, already activated #{existing_spec.full_name}"
141
144
  end
142
145
 
143
146
  return false
@@ -151,7 +154,7 @@ module Gem
151
154
  @loaded_specs[spec.name] = spec
152
155
 
153
156
  # Load dependent gems first
154
- spec.dependencies.each do |dep_gem|
157
+ spec.runtime_dependencies.each do |dep_gem|
155
158
  activate dep_gem
156
159
  end
157
160
 
@@ -203,6 +206,20 @@ module Gem
203
206
 
204
207
  private_class_method :all_partials
205
208
 
209
+ ##
210
+ # See if a given gem is available.
211
+
212
+ def self.available?(gem, *requirements)
213
+ requirements = Gem::Requirement.default if requirements.empty?
214
+
215
+ unless gem.respond_to?(:name) and
216
+ gem.respond_to?(:version_requirements) then
217
+ gem = Gem::Dependency.new gem, requirements
218
+ end
219
+
220
+ !Gem.source_index.search(gem).empty?
221
+ end
222
+
206
223
  ##
207
224
  # The mode needed to read a file as straight binary.
208
225
 
@@ -267,6 +284,13 @@ module Gem
267
284
  File.join(spec.full_gem_path, 'data', gem_name)
268
285
  end
269
286
 
287
+ ##
288
+ # A Zlib::Deflate.deflate wrapper
289
+
290
+ def self.deflate(data)
291
+ Zlib::Deflate.deflate data
292
+ end
293
+
270
294
  ##
271
295
  # The path where gems are to be installed.
272
296
 
@@ -345,6 +369,33 @@ module Gem
345
369
 
346
370
  private_class_method :find_home
347
371
 
372
+ ##
373
+ # Zlib::GzipReader wrapper that unzips +data+.
374
+
375
+ def self.gunzip(data)
376
+ data = StringIO.new data
377
+
378
+ Zlib::GzipReader.new(data).read
379
+ end
380
+
381
+ ##
382
+ # Zlib::GzipWriter wrapper that zips +data+.
383
+
384
+ def self.gzip(data)
385
+ zipped = StringIO.new
386
+
387
+ Zlib::GzipWriter.wrap zipped do |io| io.write data end
388
+
389
+ zipped.string
390
+ end
391
+
392
+ ##
393
+ # A Zlib::Inflate#inflate wrapper
394
+
395
+ def self.inflate(data)
396
+ Zlib::Inflate.inflate data
397
+ end
398
+
348
399
  ##
349
400
  # Return a list of all possible load paths for the latest version for all
350
401
  # gems in the Gem installation.
@@ -438,7 +489,11 @@ module Gem
438
489
  @gem_path ||= nil
439
490
 
440
491
  unless @gem_path then
441
- paths = [ENV['GEM_PATH']] || [default_path]
492
+ paths = if ENV['GEM_PATH'] then
493
+ [ENV['GEM_PATH']]
494
+ else
495
+ [default_path]
496
+ end
442
497
 
443
498
  if defined?(APPLE_GEM_HOME) and not ENV['GEM_PATH'] then
444
499
  paths << APPLE_GEM_HOME
@@ -459,7 +514,7 @@ module Gem
459
514
 
460
515
  ##
461
516
  # Array of platforms this RubyGems supports.
462
-
517
+
463
518
  def self.platforms
464
519
  @platforms ||= []
465
520
  if @platforms.empty?
@@ -586,13 +641,13 @@ module Gem
586
641
  def self.set_paths(gpaths)
587
642
  if gpaths
588
643
  @gem_path = gpaths.split(File::PATH_SEPARATOR)
589
-
644
+
590
645
  if File::ALT_SEPARATOR then
591
646
  @gem_path.map! do |path|
592
647
  path.gsub File::ALT_SEPARATOR, File::SEPARATOR
593
648
  end
594
649
  end
595
-
650
+
596
651
  @gem_path << Gem.dir
597
652
  else
598
653
  @gem_path = [Gem.dir]
@@ -683,24 +738,25 @@ module Gem
683
738
 
684
739
  end
685
740
 
686
- end
741
+ MARSHAL_SPEC_DIR = "quick/Marshal.#{Gem.marshal_version}/"
687
742
 
688
- # Modify the non-gem version of datadir to handle gem package names.
743
+ YAML_SPEC_DIR = 'quick/'
689
744
 
690
- require 'rbconfig/datadir'
745
+ end
691
746
 
692
- module Config # :nodoc:
747
+ module Config
748
+ # :stopdoc:
693
749
  class << self
694
- alias gem_original_datadir datadir
695
-
696
750
  # Return the path to the data directory associated with the named
697
751
  # package. If the package is loaded as a gem, return the gem
698
752
  # specific data directory. Otherwise return a path to the share
699
753
  # area as define by "#{ConfigMap[:datadir]}/#{package_name}".
700
754
  def datadir(package_name)
701
- Gem.datadir(package_name) || Config.gem_original_datadir(package_name)
755
+ Gem.datadir(package_name) ||
756
+ File.join(Gem::ConfigMap[:datadir], package_name)
702
757
  end
703
758
  end
759
+ # :startdoc:
704
760
  end
705
761
 
706
762
  require 'rubygems/exceptions'
@@ -712,6 +768,18 @@ require 'rubygems/source_index' # Needed for Kernel#gem
712
768
  require 'rubygems/platform'
713
769
  require 'rubygems/builder' # HACK: Needed for rake's package task.
714
770
 
771
+ begin
772
+ require 'rubygems/defaults/operating_system'
773
+ rescue LoadError
774
+ end
775
+
776
+ if defined?(RUBY_ENGINE) then
777
+ begin
778
+ require "rubygems/defaults/#{RUBY_ENGINE}"
779
+ rescue LoadError
780
+ end
781
+ end
782
+
715
783
  if RUBY_VERSION < '1.9' then
716
784
  require 'rubygems/custom_require'
717
785
  end