Permalink
Browse files

For reals, RubyGems 1.1.0.

git-svn-id: http://rubygems.rubyforge.org/svn/tags/REL_1_1_0@1678 3d4018f9-ac1a-0410-99e9-8a154d859a19
  • Loading branch information...
drbrain
drbrain committed Mar 29, 2008
2 parents 5a44794 + a5eb203 commit b1311d11acf27c83b5a47fb0e1e779b589f717f8
Showing with 53 additions and 33,597 deletions.
  1. +4 −0 ChangeLog
  2. +6 −3 doc/release_notes/rel_1_1_0.rdoc
  3. +1 −1 lib/rubygems/commands/query_command.rb
  4. +1 −1 lib/rubygems/commands/sources_command.rb
  5. +9 −2 lib/rubygems/source_index.rb
  6. +23 −12 lib/rubygems/source_info_cache.rb
  7. +3 −0 test/test_gem_commands_query_command.rb
  8. +2 −0 test/test_gem_commands_sources_command.rb
  9. +4 −2 test/test_gem_source_index.rb
  10. +0 −18 trunk/.autotest
  11. +0 −4 trunk/.document
  12. +0 −4,477 trunk/ChangeLog
  13. +0 −340 trunk/GPL.txt
  14. +0 −53 trunk/LICENSE.txt
  15. +0 −71 trunk/README
  16. +0 −429 trunk/Rakefile
  17. +0 −1 trunk/TODO
  18. +0 −28 trunk/bin/gem
  19. +0 −38 trunk/bin/update_rubygems
  20. BIN trunk/doc/design/RubyGemsRemoteInstallerUML.png
  21. BIN trunk/doc/design/rubygems_uml.jude
  22. +0 −73 trunk/doc/doc.css
  23. +0 −10 trunk/doc/makedoc.rb
  24. +0 −569 trunk/doc/rdoc_templates/jamis.rb
  25. +0 −29 trunk/doc/release_notes/docs-rubygems-announce.rdoc
  26. +0 −4 trunk/doc/release_notes/rel_0_2_0.rdoc
  27. +0 −21 trunk/doc/release_notes/rel_0_3_0.rdoc
  28. +0 −4 trunk/doc/release_notes/rel_0_4_0.rdoc
  29. +0 −26 trunk/doc/release_notes/rel_0_5_0.rdoc
  30. +0 −16 trunk/doc/release_notes/rel_0_6_0.rdoc
  31. +0 −4 trunk/doc/release_notes/rel_0_7_0.rdoc
  32. +0 −23 trunk/doc/release_notes/rel_0_8_0.rdoc
  33. +0 −4 trunk/doc/release_notes/rel_0_8_1.rdoc
  34. +0 −70 trunk/doc/release_notes/rel_0_8_10.rdoc
  35. +0 −102 trunk/doc/release_notes/rel_0_8_11.rdoc
  36. +0 −113 trunk/doc/release_notes/rel_0_8_3.rdoc
  37. +0 −51 trunk/doc/release_notes/rel_0_8_4.rdoc
  38. +0 −117 trunk/doc/release_notes/rel_0_8_5.rdoc
  39. +0 −135 trunk/doc/release_notes/rel_0_8_7.rdoc
  40. +0 −109 trunk/doc/release_notes/rel_0_9_0.rdoc
  41. +0 −69 trunk/doc/release_notes/rel_0_9_2.rdoc
  42. +0 −66 trunk/doc/release_notes/rel_0_9_3.rdoc
  43. +0 −67 trunk/doc/release_notes/rel_0_9_4.rdoc
  44. +0 −108 trunk/doc/release_notes/rel_0_9_5.rdoc
  45. +0 −67 trunk/doc/release_notes/rel_1_0_0.rdoc
  46. +0 −56 trunk/doc/release_notes/rel_1_0_1.rdoc
  47. +0 −82 trunk/doc/release_notes/rel_1_1_0.rdoc
  48. +0 −30 trunk/examples/application/an-app.gemspec
  49. +0 −3 trunk/examples/application/bin/myapp
  50. +0 −139 trunk/examples/application/ext/Makefile
  51. +0 −3 trunk/examples/application/ext/extconf.rb
  52. +0 −1 trunk/examples/application/ext/foo.c
  53. +0 −9 trunk/examples/application/lib/somefunctionality.rb
  54. +0 −4 trunk/gemspecs/README
  55. +0 −17 trunk/gemspecs/cgikit-1.1.0.gemspec
  56. +0 −26 trunk/gemspecs/jabber4r.gemspec
  57. +0 −22 trunk/gemspecs/linguistics.gemspec
  58. +0 −21 trunk/gemspecs/ook.gemspec
  59. +0 −22 trunk/gemspecs/progressbar.gemspec
  60. +0 −22 trunk/gemspecs/redcloth.gemspec
  61. +0 −23 trunk/gemspecs/rublog.gemspec
  62. +0 −21 trunk/gemspecs/ruby-doom.gemspec
  63. +0 −21 trunk/gemspecs/rubyjdwp.gemspec
  64. +0 −21 trunk/gemspecs/statistics.gemspec
  65. +0 −24 trunk/lib/rbconfig/datadir.rb
  66. +0 −694 trunk/lib/rubygems.rb
  67. +0 −88 trunk/lib/rubygems/builder.rb
  68. +0 −406 trunk/lib/rubygems/command.rb
  69. +0 −145 trunk/lib/rubygems/command_manager.rb
  70. +0 −53 trunk/lib/rubygems/commands/build_command.rb
  71. +0 −86 trunk/lib/rubygems/commands/cert_command.rb
  72. +0 −74 trunk/lib/rubygems/commands/check_command.rb
  73. +0 −91 trunk/lib/rubygems/commands/cleanup_command.rb
  74. +0 −74 trunk/lib/rubygems/commands/contents_command.rb
  75. +0 −150 trunk/lib/rubygems/commands/dependency_command.rb
  76. +0 −86 trunk/lib/rubygems/commands/environment_command.rb
  77. +0 −60 trunk/lib/rubygems/commands/fetch_command.rb
  78. +0 −57 trunk/lib/rubygems/commands/generate_index_command.rb
  79. +0 −172 trunk/lib/rubygems/commands/help_command.rb
  80. +0 −133 trunk/lib/rubygems/commands/install_command.rb
  81. +0 −33 trunk/lib/rubygems/commands/list_command.rb
  82. +0 −101 trunk/lib/rubygems/commands/lock_command.rb
  83. +0 −111 trunk/lib/rubygems/commands/mirror_command.rb
  84. +0 −30 trunk/lib/rubygems/commands/outdated_command.rb
  85. +0 −133 trunk/lib/rubygems/commands/pristine_command.rb
  86. +0 −167 trunk/lib/rubygems/commands/query_command.rb
  87. +0 −78 trunk/lib/rubygems/commands/rdoc_command.rb
  88. +0 −37 trunk/lib/rubygems/commands/search_command.rb
  89. +0 −48 trunk/lib/rubygems/commands/server_command.rb
  90. +0 −124 trunk/lib/rubygems/commands/sources_command.rb
  91. +0 −76 trunk/lib/rubygems/commands/specification_command.rb
  92. +0 −73 trunk/lib/rubygems/commands/uninstall_command.rb
  93. +0 −95 trunk/lib/rubygems/commands/unpack_command.rb
  94. +0 −157 trunk/lib/rubygems/commands/update_command.rb
  95. +0 −86 trunk/lib/rubygems/commands/which_command.rb
  96. +0 −224 trunk/lib/rubygems/config_file.rb
  97. +0 −38 trunk/lib/rubygems/custom_require.rb
  98. +0 −53 trunk/lib/rubygems/defaults.rb
  99. +0 −65 trunk/lib/rubygems/dependency.rb
  100. +0 −211 trunk/lib/rubygems/dependency_installer.rb
  101. +0 −165 trunk/lib/rubygems/dependency_list.rb
  102. +0 −40 trunk/lib/rubygems/digest/digest_adapter.rb
  103. +0 −23 trunk/lib/rubygems/digest/md5.rb
  104. +0 −17 trunk/lib/rubygems/digest/sha1.rb
  105. +0 −17 trunk/lib/rubygems/digest/sha2.rb
  106. +0 −161 trunk/lib/rubygems/doc_manager.rb
  107. +0 −84 trunk/lib/rubygems/exceptions.rb
  108. +0 −18 trunk/lib/rubygems/ext.rb
  109. +0 −56 trunk/lib/rubygems/ext/builder.rb
  110. +0 −24 trunk/lib/rubygems/ext/configure_builder.rb
  111. +0 −23 trunk/lib/rubygems/ext/ext_conf_builder.rb
  112. +0 −27 trunk/lib/rubygems/ext/rake_builder.rb
  113. +0 −87 trunk/lib/rubygems/format.rb
  114. +0 −83 trunk/lib/rubygems/gem_openssl.rb
  115. +0 −84 trunk/lib/rubygems/gem_path_searcher.rb
  116. +0 −58 trunk/lib/rubygems/gem_runner.rb
  117. +0 −176 trunk/lib/rubygems/indexer.rb
  118. +0 −88 trunk/lib/rubygems/indexer/abstract_index_builder.rb
  119. +0 −35 trunk/lib/rubygems/indexer/latest_index_builder.rb
  120. +0 −17 trunk/lib/rubygems/indexer/marshal_index_builder.rb
  121. +0 −54 trunk/lib/rubygems/indexer/master_index_builder.rb
  122. +0 −50 trunk/lib/rubygems/indexer/quick_index_builder.rb
  123. +0 −100 trunk/lib/rubygems/install_update_options.rb
  124. +0 −479 trunk/lib/rubygems/installer.rb
  125. +0 −106 trunk/lib/rubygems/local_remote_options.rb
  126. +0 −148 trunk/lib/rubygems/old_format.rb
  127. +0 −95 trunk/lib/rubygems/package.rb
  128. +0 −24 trunk/lib/rubygems/package/f_sync_dir.rb
  129. +0 −245 trunk/lib/rubygems/package/tar_header.rb
  130. +0 −219 trunk/lib/rubygems/package/tar_input.rb
  131. +0 −143 trunk/lib/rubygems/package/tar_output.rb
  132. +0 −86 trunk/lib/rubygems/package/tar_reader.rb
  133. +0 −99 trunk/lib/rubygems/package/tar_reader/entry.rb
  134. +0 −180 trunk/lib/rubygems/package/tar_writer.rb
  135. +0 −181 trunk/lib/rubygems/platform.rb
  136. +0 −283 trunk/lib/rubygems/remote_fetcher.rb
  137. +0 −15 trunk/lib/rubygems/require_paths_builder.rb
  138. +0 −159 trunk/lib/rubygems/requirement.rb
  139. +0 −6 trunk/lib/rubygems/rubygems_version.rb
  140. +0 −786 trunk/lib/rubygems/security.rb
  141. +0 −500 trunk/lib/rubygems/server.rb
  142. +0 −519 trunk/lib/rubygems/source_index.rb
  143. +0 −365 trunk/lib/rubygems/source_info_cache.rb
  144. +0 −56 trunk/lib/rubygems/source_info_cache_entry.rb
  145. +0 −971 trunk/lib/rubygems/specification.rb
  146. +0 −25 trunk/lib/rubygems/timer.rb
  147. +0 −207 trunk/lib/rubygems/uninstaller.rb
  148. +0 −285 trunk/lib/rubygems/user_interaction.rb
  149. +0 −186 trunk/lib/rubygems/validator.rb
  150. +0 −165 trunk/lib/rubygems/version.rb
  151. +0 −49 trunk/lib/rubygems/version_option.rb
  152. +0 −10 trunk/lib/ubygems.rb
  153. +0 −1 trunk/pkgs/sources/.cvsignore
  154. +0 −3 trunk/pkgs/sources/lib/sources.rb
  155. +0 −14 trunk/pkgs/sources/sources.gemspec
  156. +0 −433 trunk/redist/session.gem
  157. +0 −2 trunk/scripts/.cvsignore
  158. +0 −31 trunk/scripts/buildtests.rb
  159. +0 −617 trunk/scripts/gemdoc.data
  160. +0 −67 trunk/scripts/gemdoc.rb
  161. +0 −40 trunk/scripts/runtest.rb
  162. +0 −33 trunk/scripts/specdoc.data
  163. +0 −171 trunk/scripts/specdoc.rb
  164. +0 −433 trunk/scripts/specdoc.yaml
  165. +0 −140 trunk/scripts/upload_gemdoc.rb
  166. +0 −307 trunk/setup.rb
  167. +0 −8 trunk/test/bogussources.rb
  168. +0 −27 trunk/test/data/gem-private_key.pem
  169. +0 −20 trunk/test/data/gem-public_cert.pem
  170. +0 −7 trunk/test/fake_certlib/openssl.rb
  171. +0 −95 trunk/test/functional.rb
  172. +0 −86 trunk/test/gem_installer_test_case.rb
  173. +0 −146 trunk/test/gem_package_tar_test_case.rb
  174. +0 −400 trunk/test/gemutilities.rb
  175. +0 −51 trunk/test/insure_session.rb
  176. +0 −43 trunk/test/mockgemui.rb
  177. +0 −27 trunk/test/private_key.pem
  178. +0 −20 trunk/test/public_cert.pem
  179. +0 −72 trunk/test/simple_gem.rb
  180. +0 −26 trunk/test/test_config.rb
  181. +0 −388 trunk/test/test_gem.rb
  182. +0 −34 trunk/test/test_gem_builder.rb
  183. +0 −196 trunk/test/test_gem_command.rb
  184. +0 −213 trunk/test/test_gem_command_manager.rb
  185. +0 −75 trunk/test/test_gem_commands_build_command.rb
  186. +0 −126 trunk/test/test_gem_commands_cert_command.rb
  187. +0 −25 trunk/test/test_gem_commands_check_command.rb
  188. +0 −92 trunk/test/test_gem_commands_contents_command.rb
  189. +0 −108 trunk/test/test_gem_commands_dependency_command.rb
  190. +0 −133 trunk/test/test_gem_commands_environment_command.rb
  191. +0 −35 trunk/test/test_gem_commands_fetch_command.rb
  192. +0 −32 trunk/test/test_gem_commands_generate_index_command.rb
  193. +0 −168 trunk/test/test_gem_commands_install_command.rb
  194. +0 −61 trunk/test/test_gem_commands_mirror_command.rb
  195. +0 −100 trunk/test/test_gem_commands_pristine_command.rb
  196. +0 −210 trunk/test/test_gem_commands_query_command.rb
  197. +0 −27 trunk/test/test_gem_commands_server_command.rb
  198. +0 −205 trunk/test/test_gem_commands_sources_command.rb
  199. +0 −94 trunk/test/test_gem_commands_specification_command.rb
  200. +0 −115 trunk/test/test_gem_commands_unpack_command.rb
  201. +0 −174 trunk/test/test_gem_commands_update_command.rb
  202. +0 −210 trunk/test/test_gem_config_file.rb
  203. +0 −89 trunk/test/test_gem_dependency.rb
  204. +0 −527 trunk/test/test_gem_dependency_installer.rb
  205. +0 −212 trunk/test/test_gem_dependency_list.rb
  206. +0 −44 trunk/test/test_gem_digest.rb
  207. +0 −32 trunk/test/test_gem_doc_manager.rb
  208. +0 −87 trunk/test/test_gem_ext_configure_builder.rb
  209. +0 −122 trunk/test/test_gem_ext_ext_conf_builder.rb
  210. +0 −73 trunk/test/test_gem_ext_rake_builder.rb
  211. +0 −69 trunk/test/test_gem_format.rb
  212. +0 −57 trunk/test/test_gem_gem_path_searcher.rb
  213. +0 −35 trunk/test/test_gem_gem_runner.rb
  214. +0 −124 trunk/test/test_gem_indexer.rb
  215. +0 −40 trunk/test/test_gem_install_update_options.rb
  216. +0 −806 trunk/test/test_gem_installer.rb
  217. +0 −84 trunk/test/test_gem_local_remote_options.rb
  218. +0 −40 trunk/test/test_gem_outdated_command.rb
  219. +0 −137 trunk/test/test_gem_package_tar_header.rb
  220. +0 −119 trunk/test/test_gem_package_tar_input.rb
  221. +0 −104 trunk/test/test_gem_package_tar_output.rb
  222. +0 −53 trunk/test/test_gem_package_tar_reader.rb
  223. +0 −116 trunk/test/test_gem_package_tar_reader_entry.rb
  224. +0 −151 trunk/test/test_gem_package_tar_writer.rb
  225. +0 −259 trunk/test/test_gem_platform.rb
  226. +0 −606 trunk/test/test_gem_remote_fetcher.rb
  227. +0 −223 trunk/test/test_gem_requirement.rb
  228. +0 −115 trunk/test/test_gem_server.rb
  229. +0 −676 trunk/test/test_gem_source_index.rb
  230. +0 −425 trunk/test/test_gem_source_info_cache.rb
  231. +0 −77 trunk/test/test_gem_source_info_cache_entry.rb
  232. +0 −870 trunk/test/test_gem_specification.rb
  233. +0 −117 trunk/test/test_gem_stream_ui.rb
  234. +0 −43 trunk/test/test_gem_uninstaller.rb
  235. +0 −70 trunk/test/test_gem_validator.rb
  236. +0 −206 trunk/test/test_gem_version.rb
  237. +0 −77 trunk/test/test_gem_version_option.rb
  238. +0 −65 trunk/test/test_kernel.rb
  239. +0 −214 trunk/util/gem_prelude.rb
View
@@ -4,6 +4,10 @@
* lib/rubygems.rb: Added Gem.ruby_version, Gem.read_binary,
Gem.binary_mode.
* lib/, test/: Read files in binary mode for windows and ruby 1.9.
+ * lib/rubygems/commands/update_command.rb: Only update once.
+ * lib/rubygems/commands/sources_command.rb: Ditto.
+ * lib/rubygems/source_index.rb: Fix #remove_extra, #find_missing so
+ legacy platform gems don't get updated repeatedly.
* doc/release_notes/rel_1_1_0.rdoc: RubyGems 1.1.0 release notes.
* lib/rubygems/rubygems_version.rb: 1.1.0.
@@ -7,7 +7,10 @@ New features:
* RubyGems now uses persistent connections on index updates. Index updates are
much faster now.
* RubyGems only updates from a latest index by default, cutting candidate gems
- for updates to roughly 1/4 (at present).
+ for updates to roughly 1/4 (at present). Index updates are even faster
+ still.
+ * `gem list -r` may only show the latest version of a gem, add --all to see
+ all gems.
* `gem spec` now extracts specifications from .gem files.
* `gem query --installed` to aid automation of checking for gems.
@@ -40,8 +43,8 @@ For a full list of changes to RubyGems, see the ChangeLog file.
== How can I get RubyGems?
-NOTE: If you have installed RubyGems using a package you may want to install a
-new RubyGems through the same packaging system.
+NOTE: If you have installed RubyGems using a package system you may want to
+install a new RubyGems through the same packaging system.
If you have a recent version of RubyGems (0.8.5 or later), then all
you need to do is:
@@ -83,7 +83,7 @@ def execute
say
begin
- Gem::SourceInfoCache.cache.refresh options[:all]
+ Gem::SourceInfoCache.cache options[:all]
rescue Gem::RemoteFetcher::FetchError
# no network
end
@@ -69,7 +69,7 @@ def execute
end
if options[:update] then
- Gem::SourceInfoCache.cache.refresh true
+ Gem::SourceInfoCache.cache true
Gem::SourceInfoCache.cache.flush
say "source cache successfully updated"
@@ -430,15 +430,22 @@ def fetch_quick_index(source_uri, all)
# Make a list of full names for all the missing gemspecs.
def find_missing(spec_names)
+ unless defined? @originals then
+ @originals = {}
+ each do |full_name, spec|
+ @originals[spec.original_name] = spec
+ end
+ end
+
spec_names.find_all { |full_name|
- specification(full_name).nil?
+ @originals[full_name].nil?
}
end
def remove_extra(spec_names)
dictionary = spec_names.inject({}) { |h, k| h[k] = true; h }
each do |name, spec|
- remove_spec name unless dictionary.include? name
+ remove_spec name unless dictionary.include? spec.original_name
end
end
@@ -31,14 +31,14 @@ class Gem::SourceInfoCache
include Gem::UserInteraction
- @cache = nil
- @system_cache_file = nil
- @user_cache_file = nil
+ ##
+ # The singleton Gem::SourceInfoCache. If +all+ is true, a full refresh will
+ # be performed if the singleton instance is being initialized.
- def self.cache
+ def self.cache(all = false)
return @cache if @cache
@cache = new
- @cache.refresh false if Gem.configuration.update_sources
+ @cache.refresh all if Gem.configuration.update_sources
@cache
end
@@ -62,6 +62,15 @@ def self.latest_user_cache_file
"latest_#{File.basename user_cache_file}"
end
+ ##
+ # Reset all singletons, discarding any changes.
+
+ def self.reset
+ @cache = nil
+ @system_cache_file = nil
+ @user_cache_file = nil
+ end
+
##
# Search all source indexes. See Gem::SourceInfoCache#search.
@@ -122,13 +131,6 @@ def cache_file
try_file(user_cache_file) or
raise "unable to locate a writable cache file")
end
-
- ##
- # Force cache file to be reset, useful for integration testing of rubygems
-
- def reset_cache_file
- @cache_file = nil
- end
##
# Write the cache to a local file (if it is dirty).
@@ -245,6 +247,13 @@ def reset_cache_data
@cache_data = nil
end
+ ##
+ # Force cache file to be reset, useful for integration testing of rubygems
+
+ def reset_cache_file
+ @cache_file = nil
+ end
+
##
# Searches all source indexes. See Gem::SourceIndex#search for details on
# +pattern+ and +platform_only+. If +all+ is set to true, the full index
@@ -350,5 +359,7 @@ def write_cache
end
end
+ reset
+
end
@@ -26,6 +26,7 @@ def test_execute
cache.update
cache.write_cache
cache.reset_cache_data
+ Gem::SourceInfoCache.reset
a2_name = @a2.full_name
@fetcher.data["#{@gem_repo}/quick/latest_index.rz"] = util_zip a2_name
@@ -44,6 +45,7 @@ def test_execute
*** REMOTE GEMS ***
a (2)
+pl (1)
EOF
assert_equal expected, @ui.output
@@ -55,6 +57,7 @@ def test_execute_all
cache.update
cache.write_cache
cache.reset_cache_data
+ Gem::SourceInfoCache.reset
a1_name = @a1.full_name
a2_name = @a2.full_name
@@ -181,6 +181,8 @@ def test_execute_update
@cmd.handle_options %w[--update]
util_setup_source_info_cache
+ Gem::SourceInfoCache.reset
+
util_setup_fake_fetcher
si = Gem::SourceIndex.new
si.add_spec @a1
@@ -398,10 +398,12 @@ def test_outdated
def test_remove_extra
@source_index.add_spec @a1
@source_index.add_spec @a2
+ @source_index.add_spec @pl1
- @source_index.remove_extra [@a1.full_name]
+ @source_index.remove_extra [@a1.full_name, @pl1.full_name]
- assert_equal [@a1.full_name], @source_index.gems.map { |n,s| n }
+ assert_equal [@a1.full_name],
+ @source_index.gems.map { |n,s| n }.sort
end
def test_remove_extra_no_changes
View
@@ -1,18 +0,0 @@
-Autotest.add_hook :initialize do |at|
- at.order = :natural # I am a bad person - Eric Hodel
-
- at.add_exception %r%/\.svn/%
- at.add_exception %r%\.rbc$%
-
- at.find_directories.clear
- at.find_directories.push 'lib', 'test'
-
- at.add_mapping %r%^lib/rubygems.rb$% do |_, m|
- "test/test_gem.rb"
- end
-
- at.add_mapping %r%^lib/rubygems/(.*).rb$% do |_, m|
- "test/test_gem_#{m[1].gsub '/', '_'}.rb"
- end
-end
-
View
@@ -1,4 +0,0 @@
-README.txt
-lib
-GPL.txt
-LICENSE.txt
Oops, something went wrong.

0 comments on commit b1311d1

Please sign in to comment.