mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: update to 1.3.5.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6c0f2b097e
commit
ed5d5c5829
34 changed files with 6650 additions and 136 deletions
|
@ -1,4 +1,6 @@
|
|||
Tue Dec 8 16:16:47 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Tue Dec 8 16:19:05 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/rubygems: update to 1.3.5.
|
||||
|
||||
* lib/rubygems/defaults.rb (Gem::default_dir): removed a clause
|
||||
doing nothing.
|
||||
|
|
5529
doc/rubygems/ChangeLog
Normal file
5529
doc/rubygems/ChangeLog
Normal file
File diff suppressed because it is too large
Load diff
799
doc/rubygems/History.txt
Normal file
799
doc/rubygems/History.txt
Normal file
|
@ -0,0 +1,799 @@
|
|||
=== 1.3.5 / 2009-07-21
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* Fix use of prerelease gems.
|
||||
* Gem.bin_path no longer escapes path with spaces. Bug #25935 and #26458.
|
||||
|
||||
Deprecation Notices:
|
||||
|
||||
* Bulk index update is no longer supported (the code currently remains, but not
|
||||
the tests)
|
||||
* Gem::manage_gems was removed in 1.3.3.
|
||||
* Time::today was removed in 1.3.3.
|
||||
|
||||
=== 1.3.4 / 2009-05-03
|
||||
|
||||
Bug Fixes:
|
||||
|
||||
* Fixed various warnings
|
||||
* Gem::ruby_version works correctly for 1.8 branch and trunk
|
||||
* Prerelease gems now show up in `gem list` and can be used
|
||||
* Fixed option name for `gem setup --format-executable`
|
||||
* RubyGems now matches Ruby > 1.9.1 gem paths
|
||||
* Gem::RemoteFetcher#download now works for explicit Windows paths across
|
||||
drives. Bug #25882 by Lars Christensen
|
||||
* Fix typo in Gem::Requirement#parse. Bug #26000 by Mike Gunderloy.
|
||||
|
||||
Deprecation Notices:
|
||||
|
||||
* Bulk index update is no longer supported (the code currently remains, but not
|
||||
the tests)
|
||||
* Gem::manage_gems was removed in 1.3.3.
|
||||
* Time::today was removed in 1.3.3.
|
||||
|
||||
=== 1.3.3 / 2009-05-04
|
||||
|
||||
New Features:
|
||||
|
||||
* `gem server` allows port names (from /etc/services) with --port.
|
||||
* `gem server` now has search that jumps to RDoc. Patch #22959 by Vladimir
|
||||
Dobriakov.
|
||||
* `gem spec` can retrieve single fields from a spec (like `gem spec rake
|
||||
authors`).
|
||||
* Gem::Specification#has_rdoc= is deprecated and ignored (defaults to true)
|
||||
* RDoc is now generated regardless of Gem::Specification#has_rdoc?
|
||||
|
||||
Bug Fixes:
|
||||
|
||||
* `gem clean` now cleans up --user-install gems. Bug #25516 by Brett
|
||||
Eisenberg.
|
||||
* Gem.bin_path now escapes paths with spaces.
|
||||
* Rake extension builder uses explicit correctly loads rubygems when invoking
|
||||
rake.
|
||||
* Prerelease versions now match "~>" correctly. Patch #25759 by Yossef
|
||||
Mendelssohn.
|
||||
* Check bindir for executables, not root when validating. Bug reported by
|
||||
David Chelimsky.
|
||||
* Remove Time.today, no way to override it before RubyGems loads. Bug #25564
|
||||
by Emanuele Vicentini
|
||||
* Raise Gem::Exception for #installation_path when not installed. Bug #25741
|
||||
by Daniel Berger.
|
||||
* Don't raise in Gem::Specification#validate when homepage is nil. Bug #25677
|
||||
by Mike Burrows.
|
||||
* Uninstall executables from the correct directory. Bug #25555 by Brett
|
||||
Eisenberg.
|
||||
* Raise Gem::LoadError if Kernel#gem fails due to previously-loaded gem. Bug
|
||||
reported by Alf Mikula.
|
||||
|
||||
Deprecation Notices:
|
||||
|
||||
* Gem::manage_gems has been removed.
|
||||
* Time::today has been removed early. There was no way to make it warn and be
|
||||
easy to override with user code.
|
||||
|
||||
=== 1.3.2 / 2009-04-15
|
||||
|
||||
Select New Features:
|
||||
|
||||
* RubyGems now loads plugins from rubygems_plugin.rb in installed gems.
|
||||
This can be used to add commands (See Gem::CommandManager) or add
|
||||
install/uninstall hooks (See Gem::Installer and Gem::Uninstaller).
|
||||
* Gem::Version now understands prerelease versions using letters. (eg.
|
||||
'1.2.1.b') Thanks to Josh Susser, Alex Vollmer and Phil Hagelberg.
|
||||
* RubyGems now includes a Rake task for creating gems which replaces rake's
|
||||
Rake::GemPackageTask. See Gem::PackageTask.
|
||||
* Gem::find_files now returns paths in $LOAD_PATH.
|
||||
* Added Gem::promote_load_path for use with Gem::find_files
|
||||
* Added Gem::bin_path to make finding executables easier. Patch #24114 by
|
||||
James Tucker.
|
||||
* Various improvements to build arguments for installing gems.
|
||||
* `gem contents` added --all and --no-prefix.
|
||||
* Gem::Specification
|
||||
* #validate strips directories and errors on not-files.
|
||||
* #description no longer removes newlines.
|
||||
* #name must be a String.
|
||||
* FIXME and TODO are no longer allowed in various fields.
|
||||
* Added support for a license attribute. Feature #11041 (partial).
|
||||
* Removed Gem::Specification::list, too much process growth. Bug #23668 by
|
||||
Steve Purcell.
|
||||
* `gem generate_index`
|
||||
* Can now generate an RSS feed.
|
||||
* Modern indicies can now be updated incrementally.
|
||||
* Legacy indicies can be updated separately from modern.
|
||||
|
||||
Select Bugs Fixed:
|
||||
|
||||
* Better gem activation error message. Patch #23082.
|
||||
* Kernel methods are now private. Patch #20801 by James M. Lawrence.
|
||||
* Fixed various usability issues with `gem check`.
|
||||
* `gem update` now rescues InstallError and continues. Bug #19268 by Gabriel
|
||||
Wilkins.
|
||||
* Allow 'https', 'file' as a valid schemes for --source. Patch #22485.
|
||||
* `gem install`
|
||||
* Now removes existing path before installing. Bug #22837.
|
||||
* Uses Gem::bin_path in executable stubs to work around Kernel#load bug in
|
||||
1.9.
|
||||
* Correctly handle build args (after --) via the API. Bug #23210.
|
||||
* --user-install
|
||||
* `gem install --no-user-install` now works. Patch #23573 by Alf Mikula.
|
||||
* `gem uninstall` can now uninstall from ~/.gem. Bug #23760 by Roger Pack.
|
||||
* setup.rb
|
||||
* Clarify RubyGems RDoc installation location. Bug #22656 by Gian Marco
|
||||
Gherardi.
|
||||
* Allow setup to run from read-only location. Patch #21862 by Luis Herrera.
|
||||
* Fixed overwriting ruby executable when BASERUBY was not set. Bug #24958
|
||||
by Michael Soulier.
|
||||
* Ensure we're in a RubyGems dir when installing.
|
||||
* Deal with extraneous quotation mark when autogenerating .bat file on MS
|
||||
Windows. Bug #22712.
|
||||
|
||||
Deprecation Notices:
|
||||
|
||||
* Gem::manage_gems has been removed.
|
||||
* Time::today will be removed in RubyGems 1.4.
|
||||
|
||||
Special thanks to Chad Wooley for backwards compatibility testing and Luis
|
||||
Lavena and Daniel Berger for continuing windows support.
|
||||
|
||||
=== 1.3.1 / 2008-10-28
|
||||
|
||||
Bugs fixed:
|
||||
|
||||
* Disregard ownership of ~ under Windows while creating ~/.gem. Fixes
|
||||
issues related to no uid support under Windows.
|
||||
* Fix requires for Gem::inflate, Gem::deflate, etc.
|
||||
* Make Gem.dir respect :gemhome value from config. (Note: this feature may be
|
||||
removed since it is hard to implement on 1.9.)
|
||||
* Kernel methods are now private. Patch #20801 by James M. Lawrence.
|
||||
* Gem::location_of_caller now behaves on Windows. Patch by Daniel Berger.
|
||||
* Silence PATH warning.
|
||||
|
||||
Deprecation Notices:
|
||||
|
||||
* Gem::manage_gems will be removed on or after March 2009.
|
||||
|
||||
=== 1.3.0 / 2008-09-25
|
||||
|
||||
New features:
|
||||
|
||||
* RubyGems doesn't print LOCAL/REMOTE titles for `gem query` and friends if
|
||||
stdout is not a TTY, except with --both.
|
||||
* Added Gem.find_files, allows a gem to discover features provided by other
|
||||
gems.
|
||||
* Added pre/post (un)install hooks for packagers of RubyGems. (Not for gems
|
||||
themselves).
|
||||
* RubyGems now installs gems into ~/.gem if GEM_HOME is not writable. Use
|
||||
--no-user-install command-line switch to disable this behavior.
|
||||
* Fetching specs for update now uses If-Modified-Since requests.
|
||||
* RubyGems now updates the ri cache when the rdoc gem is installed and
|
||||
documentation is generated.
|
||||
|
||||
Deprecation Notices:
|
||||
|
||||
* Gem::manage_gems now warns when called. It will be removed on or after March
|
||||
2009.
|
||||
|
||||
Bugs Fixed:
|
||||
|
||||
* RubyGems 1.3.0+ now updates when no previous rubygems-update is installed.
|
||||
Bug #20775 by Hemant Kumar.
|
||||
* RubyGems now uses the regexp we already have for `gem list --installed`. Bug
|
||||
#20876 by Nick Hoffman.
|
||||
* Platform is now forced to Gem::Platform::RUBY when nil or blank in the
|
||||
indexer. Fixes various uninstallable gems.
|
||||
* Handle EINVAL on seek. Based on patch in bug #20791 by Neil Wilson.
|
||||
* Fix HTTPS support. Patch #21072 by Alex Arnell.
|
||||
* RubyGems now loads all cache files even if latest has been loaded. Bug
|
||||
#20776 by Uwe Kubosch.
|
||||
* RubyGems checks for support of development dependencies for #to_ruby. Bug
|
||||
#20778 by Evan Weaver.
|
||||
* Now specifications from the future can be loaded.
|
||||
* Binary script uninstallation fixed. Bug #21234 by Neil Wilson.
|
||||
* Uninstallation with -i fixed. Bug #20812 by John Clayton.
|
||||
* Gem::Uninstaller#remove_all now calls Gem::Uninstaller#uninstall_gem so hooks
|
||||
get called. Bug #21242 by Neil Wilson.
|
||||
* Gem.ruby now properly escaped on windows. Fixes problem with extension
|
||||
compilation.
|
||||
* `gem lock --strict` works again. Patch #21814 by Sven Engelhardt.
|
||||
* Platform detection for Solaris was improved. Patch #21911 by Bob Remeika.
|
||||
|
||||
Other Changes Include:
|
||||
|
||||
* `gem help install` now describes _version_ argument to executable stubs
|
||||
* `gem help environment` describes environment variables and ~/.gemrc and
|
||||
/etc/gemrc
|
||||
* On-disk gemspecs are now read in UTF-8 and written with a UTF-8 magic comment
|
||||
* Rakefile
|
||||
* If the SETUP_OPTIONS environment variable is set, pass its contents as
|
||||
arguments to setup.rb
|
||||
* lib/rubygems/platform.rb
|
||||
* Remove deprecated constant warnings and really deprecate them. (WIN32,
|
||||
etc).
|
||||
* lib/rubygems/remote_fetcher.rb
|
||||
* Now uses ~/.gem/cache if the cache dir in GEM_HOME is not writable.
|
||||
* lib/rubygems/source_index.rb
|
||||
* Deprecate options to 'search' other than Gem::Dependency instances and
|
||||
issue warning until November 2008.
|
||||
* setup.rb
|
||||
* --destdir folder structure now built using Pathname, so it works for
|
||||
Windows platforms.
|
||||
* test/*
|
||||
* Fixes to run tests when under test/rubygems/. Patch by Yusuke ENDOH
|
||||
[ruby-core:17353].
|
||||
* test/test_ext_configure_builder.rb
|
||||
* Locale-free patch by Yusuke Endoh [ruby-core:17444].
|
||||
|
||||
=== 1.2.0 / 2008-06-21
|
||||
|
||||
New features:
|
||||
|
||||
* RubyGems no longer performs bulk updates and instead only fetches the gemspec
|
||||
files it needs. Alternate sources will need to upgrade to RubyGems 1.2 to
|
||||
allow RubyGems to take advantage of the new metadata updater. If a pre 1.2
|
||||
remote source is in the sources list, RubyGems will revert to the bulk update
|
||||
code for compatibility.
|
||||
* RubyGems now has runtime and development dependency types. Use
|
||||
#add_development_dependency and #add_runtime_dependency. All typeless
|
||||
dependencies are considered to be runtime dependencies.
|
||||
* RubyGems will now require rubygems/defaults/operating_system.rb and
|
||||
rubygems/defaults/#{RBX_ENGINE}.rb if they exist. This allows packagers and
|
||||
ruby implementers to add custom behavior to RubyGems via these files. (If
|
||||
the RubyGems API is insufficient, please suggest improvements via the
|
||||
RubyGems list.)
|
||||
* /etc/gemrc (and windows equivalent) for global settings
|
||||
* setup.rb now handles --vendor and --destdir for packagers
|
||||
* `gem stale` command that lists gems by last access time
|
||||
|
||||
Bugs Fixed:
|
||||
|
||||
* File modes from gems are now honored, patch #19737
|
||||
* Marshal Gem::Specification objects from the future can now be loaded.
|
||||
* A trailing / is now added to remote sources when missing, bug #20134
|
||||
* Gems with legacy platforms will now be correctly uninstalled, patch #19877
|
||||
* `gem install --no-wrappers` followed by `gem install --wrappers` no longer
|
||||
overwrites executables
|
||||
* `gem pristine` now forces reinstallation of gems, bug #20387
|
||||
* RubyGems gracefully handles ^C while loading .gemspec files from disk, bug
|
||||
#20523
|
||||
* Paths are expanded in more places, bug #19317, bug #19896
|
||||
* Gem::DependencyInstaller resets installed gems every install, bug #19444
|
||||
* Gem.default_path is now honored if GEM_PATH is not set, patch #19502
|
||||
|
||||
Other Changes Include:
|
||||
|
||||
* setup.rb
|
||||
* stub files created by RubyGems 0.7.x and older are no longer removed. When
|
||||
upgrading from these ancient versions, upgrade to 1.1.x first to clean up
|
||||
stubs.
|
||||
* RDoc is no longer required until necessary, patch #20414
|
||||
* `gem server`
|
||||
* Now completely matches the output of `gem generate_index` and
|
||||
has correct content types
|
||||
* Refreshes from source directories for every hit. The server will no longer
|
||||
need to be restarted after installing gems.
|
||||
* `gem query --details` and friends now display author, homepage, rubyforge url
|
||||
and installed location
|
||||
* `gem install` without -i no longer reinstalls dependencies if they are in
|
||||
GEM_PATH but not in GEM_HOME
|
||||
* Gem::RemoteFetcher now performs persistent connections for HEAD requests,
|
||||
bug #7973
|
||||
|
||||
=== 1.1.1 / 2008-04-11
|
||||
|
||||
Bugs Fixed:
|
||||
|
||||
* Gem.prefix now returns non-nil only when RubyGems was installed outside
|
||||
sitelibdir or libdir.
|
||||
* The `gem server` gem list now correctly links to gem details.
|
||||
* `gem update --system` now passes --no-format-executable to setup.rb.
|
||||
* Gem::SourceIndex#refresh! now works with multiple gem repositories.
|
||||
* Downloaded gems now go into --install-dir's cache directory.
|
||||
* Various fixes to downloading gem metadata.
|
||||
* `gem install --force` now ignores network errors too.
|
||||
* `gem pristine` now rebuilds extensions.
|
||||
* `gem update --system` now works on virgin Apple ruby.
|
||||
* Gem::RemoteFetcher handles Errno::ECONNABORTED.
|
||||
* Printing of release notes fixed.
|
||||
|
||||
=== 1.1.0 / 2008-03-29
|
||||
|
||||
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). 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.
|
||||
|
||||
Bugs Fixed:
|
||||
|
||||
* RubyGems works with both Config and RbConfig now.
|
||||
* Executables are now cleaned upon uninstall.
|
||||
* You can now uninstall from a particular directory.
|
||||
* Updating from non-default sources fixed.
|
||||
* Executable stubs now use ruby install name in shebang.
|
||||
* `gem unpack` checks every directory in Gem.path now.
|
||||
* `gem install` now exits with non-zero exit code when appropriate.
|
||||
* `gem update` only updates gems that need updates.
|
||||
* `gem update` doesn't force remote-only updates.
|
||||
* `gem update` handles dependencies properly when updating.
|
||||
* Gems are now loaded in Gem.path order.
|
||||
* Gem stub scripts on windows now work outside Gem.bindir.
|
||||
* `gem sources -r` now works without network access.
|
||||
|
||||
Other Changes Include:
|
||||
|
||||
* RubyGems now requires Ruby > 1.8.3.
|
||||
* Release notes are now printed upon installation.
|
||||
* `gem env path` now prints a usable path.
|
||||
* `gem install` reverts to local-only installation upon network error.
|
||||
* Tar handling code refactoring and cleanup.
|
||||
* Gem::DependencyInstaller's API has changed.
|
||||
|
||||
For a full list of changes to RubyGems, see the ChangeLog file.
|
||||
|
||||
=== 1.0.1 / 2007-12-20
|
||||
|
||||
Bugs Fixed:
|
||||
|
||||
* Installation on Ruby 1.8.3 through 1.8.5 fixed
|
||||
* `gem build` on 1.8.3 fixed
|
||||
|
||||
Other Changes Include:
|
||||
|
||||
* Since RubyGems 0.9.5, RubyGems is no longer supported on Ruby 1.8.2 or older,
|
||||
this is official in RubyGems 1.0.1.
|
||||
|
||||
=== 1.0.0 / 2007-12-20
|
||||
|
||||
Major New Features Include:
|
||||
|
||||
* RubyGems warns about various problems with gemspecs during gem building
|
||||
* More-consistent versioning for the RubyGems software
|
||||
|
||||
Other Changes Include:
|
||||
|
||||
* Fixed various bugs and problems with installing gems on Windows
|
||||
* Fixed using `gem server` for installing gems
|
||||
* Various operations are even more verbose with --verbose
|
||||
* Built gems are now backwards compatible with 0.9.4
|
||||
* Improved detection of RUBYOPT loading rubygems
|
||||
* `ruby setup.rb` now has a --help option
|
||||
* Gem::Specification#bindir is now respected on installation
|
||||
* Executable stubs can now be installed to match ruby's name, so if ruby is
|
||||
installed as 'ruby18', foo_exec will be installed as 'foo_exec18'
|
||||
* `gem unpack` can now unpack into a specific directory with --target
|
||||
* OpenSSL is no longer required by default
|
||||
|
||||
Deprecations and Deletions:
|
||||
|
||||
* Kernel#require_gem has been removed
|
||||
* Executables without a shebang will not be wrapped in a future version, this
|
||||
may cause such executables to fail to operate on installation
|
||||
* Gem::Platform constants other than RUBY and CURRENT have been removed
|
||||
* Gem::RemoteInstaller was removed
|
||||
* Gem::Specification#test_suite_file and #test_suite_file= are deprecated in
|
||||
favor of #test_file and #test_file=
|
||||
* Gem::Specification#autorequire= has been deprecated
|
||||
* Time::today will be removed in a future version
|
||||
|
||||
=== 0.9.5 / 2007-11-19
|
||||
|
||||
Major New Features Include:
|
||||
|
||||
* Platform support
|
||||
* Automatic installation of platform gems
|
||||
* New bandwidth and memory friendlier index file format
|
||||
* "Offline" mode (--no-update-sources)
|
||||
* Bulk update threshold can be specified (-B, --bulk-threshold)
|
||||
* New `gem fetch` command
|
||||
* `gem` now has "really verbose" output when you specify -v
|
||||
* Improved stubs and `gem.bat` on mswin, including better compatiblity
|
||||
with the One-Click Installer.
|
||||
|
||||
Other Changes Include:
|
||||
|
||||
* Time::today is deprecated and will be removed at a future date
|
||||
* Gem::manage_gems is deprecated and will be removed at a future date
|
||||
* `gem install --include-dependencies` (-y) is now deprecated since it is the
|
||||
default, use --ignore-dependencies to turn off automatic dependency
|
||||
installation
|
||||
* Multi-version diamond dependencies only are installed once
|
||||
* Processing a YAML bulk index update takes less memory
|
||||
* `gem install -i` makes sure all depenencies are installed
|
||||
* `gem update --system` reinstalls into the prefix it was originally installed
|
||||
in
|
||||
* `gem update --system` respects --no-rdoc and --no-ri flags
|
||||
* HTTP basic authentication support for proxies
|
||||
* Gem::Specification#platforms should no longer be a String, use
|
||||
Gem::Platform::CURRENT when building binary gems instead
|
||||
* `gem env` has more diagnostic information
|
||||
* require 'rubygems' loads less code
|
||||
* sources.gem is gone, RubyGems now uses built-in defaults
|
||||
* `gem install --source` will no longer add --source by default, use `gem
|
||||
sources --add` to make it a permanent extra source
|
||||
* `gem query` (list) no longer prints details by default
|
||||
* Exact gem names are matched in various places
|
||||
* mkrf extensions are now supported
|
||||
* A gem can depend on a specific RubyGems version
|
||||
* `gem_server` is now `gem server`
|
||||
* `gemlock` is now `gem lock`
|
||||
* `gem_mirror` is now `gem mirror`
|
||||
* `gemwhich` is now `gem which`
|
||||
* `gemri` is no longer included with RubyGems
|
||||
* `index_gem_repository.rb` is now `gem generate_index`
|
||||
* `gem` performs more validation of parameters
|
||||
* Custom rdoc styles are now supported
|
||||
* Gem indexer no longer removes quick index during index creation
|
||||
* Kernel#require only rescues a LoadError for the file being required now
|
||||
* `gem dependencies` can now display some information for remote gems
|
||||
* Updating RubyGems now works with RUBYOPT=-rubygems
|
||||
|
||||
Special thanks to:
|
||||
|
||||
* Daniel Berger
|
||||
* Luis Lavena
|
||||
* Tom Copeland
|
||||
* Wilson Bilkovich
|
||||
|
||||
=== 0.9.4 / 2007-05-23
|
||||
|
||||
If you are experiencing problems with the source index (e.g. strange
|
||||
"No Method" errors), or problems with zlib (e.g. "Buffer Error"
|
||||
messsage), we recommend upgrading to RubyGems 0.9.4.
|
||||
|
||||
Bug Fixes Include:
|
||||
|
||||
* Several people have been experiencing problems with no method errors
|
||||
on the source index cache. The source index cache is now a bit more
|
||||
self healing. Furthermore, if the source index cache is
|
||||
irreparable, then it is automatically dropped and reloaded.
|
||||
* The source cache files may now be dropped with the "gem sources
|
||||
--clear-all" command. (This command may require root is the system
|
||||
source cache is in a root protected area).
|
||||
* Several sub-commands were accidently dropped from the "gem" command.
|
||||
These commands have been restored.
|
||||
|
||||
=== 0.9.3 / 2007-05-10
|
||||
|
||||
Bug Fixes Include:
|
||||
|
||||
The ZLib library on Windows will occasionally complains about a buffer error
|
||||
when unpacking gems. The Gems software has a workaround for that problem, but
|
||||
the workaround was only enabled for versions of ZLib 1.2.1 or earlier. We
|
||||
have received several reports of the error occuring with ZLib 1.2.3, so we
|
||||
have permanently enabled the work around on all versions.
|
||||
|
||||
=== 0.9.2 / 2007-02-05
|
||||
|
||||
Bug Fixes Include:
|
||||
|
||||
* The "unpack" command now works properly.
|
||||
* User name and password are now passed properly to the authenticating
|
||||
proxy when downloading gems.
|
||||
|
||||
=== 0.9.1 / 2007-01-16
|
||||
|
||||
See ChangeLog
|
||||
|
||||
=== 0.9.0 / 2006-06-28
|
||||
|
||||
Finally, the much anticipated RubyGems version 0.9.0 is now available.
|
||||
This release includes a number of new features and bug fixes. The
|
||||
number one change is that we can now download the gem index
|
||||
incrementally. This will greatly speed up the gem command when only a
|
||||
few gems are out of date.
|
||||
|
||||
Major Enhancments include:
|
||||
|
||||
* The gem index is now downloaded incrementally, only updating entries
|
||||
that are out of date. If more than 50 entries are out of date, we
|
||||
revert back to a bulk download.
|
||||
* Several patches related to allowing RubyGems to work with
|
||||
authenticating proxies (from Danie Roux and Anatol Pomozov). Just
|
||||
put the user and password in the proxy URL (e.g. -p
|
||||
http://user:password@proxy.address.com:8080) or use the
|
||||
HTTP_PROXY_USER and HTTP_PROXY_PASS environment variables.
|
||||
* The gem unpack command can now accept a file path rather than just a
|
||||
install gem name.
|
||||
* Both RI and RDOC documents are now generated by default.
|
||||
* A gemri command is included to read gem RI docs (only needed for
|
||||
Ruby 1.8.4 or earlier).
|
||||
|
||||
Minor enhancements include:
|
||||
|
||||
* Verison 0.0.0 is now a valid gem version.
|
||||
* Better detection of missing SSL functionality.
|
||||
* SSL is not required if the security policy does not require
|
||||
signature checking.
|
||||
* Rake built extensions are now supported (Tilman Sauerbeck).
|
||||
* Several autorequire bug fixes.
|
||||
* --traceback is now an alias for --backtrace (I can never remember
|
||||
which one it is).
|
||||
* SAFE=1 compatibility fixes.
|
||||
* .rbw is now a supported suffix for RubyGem's custom require.
|
||||
* Several Ruby 1.9 compatibility fixes (Eric Hodel).
|
||||
|
||||
Bug Fixes:
|
||||
|
||||
* Added dashes to gemspecs generated in Ruby 1.8.3. This solves some
|
||||
cross-Ruby version compatibility issues.
|
||||
* Fixed bug where the wrong executables could be uninstalled (Eric
|
||||
Hodel).
|
||||
* Fixed bug where gem unpack occasionally unpacked the wrong gem.
|
||||
* Fixed bug where a fatal error occured when permissions on .gemrc
|
||||
were too restrictive (reported by Luca Pireddu).
|
||||
* Fixed prefix handling for native expressions (patch by Aaron Patterson).
|
||||
* Fixed several Upgrade => Update typos.
|
||||
|
||||
=== 0.8.11 / 2005-07-13
|
||||
|
||||
* -y is a synonym for --include-dependencies.
|
||||
* Better handling of errors in the top level rescue clause.
|
||||
* Package list command (e.g. gem inspect GEM).
|
||||
* .gemrc now allows cvsrc-like options to set defaults per subcommand.
|
||||
* The autorequire gem spec field will now accept a list.
|
||||
* Substituted Time for Date in specs, increasing performance
|
||||
dramatically.
|
||||
* Fixed reported bug of gem directories ending in "-" (reported by
|
||||
Erik Hatcher).
|
||||
* Fixed but in installer that caused dependency installation to not
|
||||
work.
|
||||
* Added Paul Duncan's gem signing patch.
|
||||
* Added Mark Hubbart's Framework patch (for better integration with OS
|
||||
X).
|
||||
* Added David Glasser's install-from-mirror patch.
|
||||
* Additional internal structural cleanup and test reorganization.
|
||||
|
||||
=== 0.8.10 / 2005-03-27
|
||||
|
||||
* In multi-user environments, it is common to supply mulitple versions of gems
|
||||
(for example Rails), allowing individual users to select the version of the
|
||||
gem they desire. This allows a user to be insulated from updates to that
|
||||
gem. RubyGems 0.8.10 fixes a problem where gems could occasionally become
|
||||
confused about the current versions of libraries selected by the user.
|
||||
* The other annoying bug is that if there are any existing rubygems-update gems
|
||||
installed, then the "gem update --system" command will download a new
|
||||
update, but install the latest update prior to the download.
|
||||
|
||||
=== 0.8.9
|
||||
|
||||
Never released
|
||||
|
||||
=== 0.8.8 / 2005-03-14
|
||||
|
||||
* Moved the master definition of class Requirement back under version.
|
||||
Kept the body of Requirement under Gem.
|
||||
|
||||
=== 0.8.7 / 2005-03-14
|
||||
|
||||
Even though it has only been a few weeks since that last release,
|
||||
there are quite a number of new features in 0.8.7. A complete list of
|
||||
new features will be given below, but here is a summary of the hot
|
||||
items.
|
||||
|
||||
* The bug that prevented some users from installing rails has been
|
||||
squashed. A big thanks to Bill Guindon (aGorilla) for helping track
|
||||
that one down.
|
||||
|
||||
There are several new commands available on the gem command:
|
||||
|
||||
* gem cleanup GEMNAME -- Cleanup (uninstall) all the old versions of
|
||||
gem. If the gem name is omitted, the entire repository is cleaned.
|
||||
* gem dependency GEMNAME -- Show the dependencies for the named gems.
|
||||
This is really helpful when trying to figure out what gem needs what
|
||||
other gem.
|
||||
|
||||
There changes to the existing commands as well.
|
||||
|
||||
* gem uninstall is much smarter about removing gems from the
|
||||
repository. Lists of gems are now uninstalled in proper dependency
|
||||
order (ie. if A depends on B, A is uninstalled first). Also,
|
||||
warnings about broken dependencies occur only when removing the
|
||||
*last* gem that supports a dependency is removed.
|
||||
|
||||
Both gem install and gem uninstall support some new command line
|
||||
options that can reduce the amount of yes/no queries given the user.
|
||||
For install we have:
|
||||
|
||||
* --ignore-dependencies -- Only install requests gems, no
|
||||
dependendecies are automatically installed.
|
||||
* --include-dependencies -- Automatically install dependencies,
|
||||
without confirmation.
|
||||
|
||||
For gem uninstall, the new options are:
|
||||
|
||||
* --all -- Uninstall all matching gems without confirmation.
|
||||
* --ignore-dependencies -- Uninstall, even if dependencies are broken.
|
||||
* --executables -- Remove executables without confirmation
|
||||
|
||||
Under general cleanup, gems will not, by default, run RDoc on packages
|
||||
that do not have the RDoc flag set.
|
||||
|
||||
And finally there is a new library file 'gemconfigure' to aid in
|
||||
writing version sensitive applications (without undue dependencies on
|
||||
RubyGems); and 'gemwhich', a short script to locate libraries in the
|
||||
file system. You can read more about them here:
|
||||
|
||||
* gemconfigure: http://docs.rubygems.org/read/chapter/4#page73
|
||||
* gemwhich: http://docs.rubygems.org/read/chapter/17
|
||||
|
||||
=== 0.8.6 / 2005-02-27
|
||||
|
||||
* Fixed a small bug with shebang construction
|
||||
|
||||
=== 0.8.5 / 2005-02-26
|
||||
|
||||
Do you know how you used to dread getting the following message while
|
||||
installing gems?
|
||||
|
||||
Updating Gem source index for: http://gems.rubyforge.org
|
||||
|
||||
It could take up to 30 seconds (on my machine, even worse on others) for
|
||||
that crazy source index to update.
|
||||
|
||||
This latest release of RubyGems speeds that wait time up considerably.
|
||||
The following table gives the following times for installing RedCloth
|
||||
with a required source index update on three system we had available to
|
||||
us. No RDoc generation was included in the following times.
|
||||
|
||||
RubyGems Linux Mac OSX Windows
|
||||
0.8.4 33 secs 73 secs 58 secs
|
||||
0.8.5 8 secs 14 secs 21 secs
|
||||
|
||||
The new caching code is at least 3x faster than previous versions. Woo
|
||||
Hoo!
|
||||
|
||||
=== 0.8.4 / 2005-01-01
|
||||
|
||||
* Rubygems 0.8.3's installer was broken unless you already had an older
|
||||
version of RubyGems installed. That's fixed.
|
||||
* Change in the way Gem::Specification internally deals with lazy attributes
|
||||
and defaults, bringing (with some loadpath_manager changes) a fairly
|
||||
significant increase in speed.
|
||||
* Support for lower-cased Gem file names (for you, Paul Duncan :)
|
||||
* Erik Veenstra's patch for making Gem versions sortable.
|
||||
|
||||
=== 0.8.3 / 2004-12-07
|
||||
|
||||
No real earth shattering news here, but there were a number of really
|
||||
annoying issues involving other libraries that RubyGems depends upon.
|
||||
0.8.3 contains some workarounds for these issues. In particular:
|
||||
|
||||
* Added workaround for the null byte in Dir string issue. (see
|
||||
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/121702).
|
||||
(Thanks to Mauricio Fernández for the quick response on this one).
|
||||
* Added workaround for old version of Zlib on windows that caused
|
||||
Ruwiki to fail to install. (see
|
||||
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/121770)
|
||||
* Added workaround for large YAML file issues. (We dynamically cut
|
||||
down the size of the source index YAML file and seem to have worked
|
||||
around immediate issues.
|
||||
|
||||
There has been some minor usability enhancements and changes ...
|
||||
|
||||
* A user specific source index cache can be used when the site-wide
|
||||
cache is unwritable (i.e. because you are running as a non-admin).
|
||||
This *greatly* speeds up gem commands run in non-admin mode when the
|
||||
site-wide cache is out of date.
|
||||
* The gem command now used an HTTP HEAD command to detect if the
|
||||
server's source index needs to be downloaed.
|
||||
* gem check gemname --test will run unit tests on installed gems that
|
||||
have unit tests.
|
||||
* Multiple gem names are allowed on the gem install command line.
|
||||
This means you can do:
|
||||
|
||||
gem install rake rails needle postgres-pr pimki
|
||||
|
||||
(Ok, you get the idea)
|
||||
* Multiple authors my be specified in a Gem spec.
|
||||
* Switched to using setup.rb (rather than a custom install script) for
|
||||
the installation of RubyGems itself. If you have installed RubyGems
|
||||
before, double check the installation instructions and make sure you
|
||||
use setup.rb instead of install.rb.
|
||||
* Ryan Davis has provided a patch so you can use an env variable
|
||||
(GEM_SKIP), to tell loadpath_manager not to load gems of those
|
||||
names. This was useful for him while testing libs that he had in
|
||||
development.
|
||||
|
||||
=== 0.8.1 / 2009-09-14
|
||||
|
||||
* Quick release to capture some bug fixes.
|
||||
|
||||
=== 0.8.0 / 2009-09-12
|
||||
|
||||
* Remove need for library stubs. Set the RUBYOPT environment variable to
|
||||
include "rrubygems", and a normal require will find gem files. Continue to
|
||||
use 'require_gem gem_name, version' to specify gem versions.
|
||||
* Deprecated "test_suite_file" gemspec attribute in favor of "test_files" array.
|
||||
* Generates rdoc by default on installs.
|
||||
* Adopted tar/gzip file format, thanks to Mauricio Fernandez.
|
||||
* "gem rdoc" allows generation of rdoc after gem installation (will add a "gem
|
||||
test"
|
||||
* Application stubs can now accept an optional parameter of _VERSION_ that will
|
||||
run an arbitrary version of the application requested.
|
||||
* Various bug fixes
|
||||
* Various platform-independency improvements
|
||||
* "gem spec --all" displays spec info for all installed version of a given gem.
|
||||
* Dynamic caching of sources
|
||||
* Support for user-definable sources on the command line (thanks Assaph Mehr)
|
||||
* More intelligent support for platform-dependent gems. Use Platform::CURRENT
|
||||
when building a gem to set its platform to the one you're building on.
|
||||
Installation displays a choice of platform-dependent gems, allowing the user
|
||||
to pick.
|
||||
* Added "gem unpack" for "unpacking" a gem to the current directory
|
||||
|
||||
=== 0.7.0 / 2004-07-09
|
||||
|
||||
See ChangeLog
|
||||
|
||||
=== 0.6.0 / 2004-06-08
|
||||
|
||||
* Collapse output of --search and --list (and gem_server) operations so that
|
||||
each gem is listed only once, with each of its versions listed on the same
|
||||
line.
|
||||
* bin/gem: new --upgrade-all option allows one to upgrade every installed gem
|
||||
* new #required_ruby_version attribute added to gem specification for
|
||||
specifying a dependency on which version of ruby the gem needs. Format it
|
||||
accepts is the same as the Gem::Version::Requirement format:
|
||||
|
||||
spec.required_ruby_version = "> 1.8.0"
|
||||
* --install-stub defaults to true, so library stubs are created
|
||||
|
||||
=== 0.5.0 / 2004-06-06
|
||||
|
||||
* Jim added the ability to specify version constraints to avoid API
|
||||
incompatibilities. This has been the subject of much debate for the past
|
||||
couple of months, with many ideas and code contributed by Eivind Eklund and
|
||||
Mauricio Fernandez. The following set of assertions shows how it works:
|
||||
|
||||
assert_inadequate("1.3", "~> 1.4")
|
||||
assert_adequate( "1.4", "~> 1.4")
|
||||
assert_adequate( "1.5", "~> 1.4")
|
||||
assert_inadequate("2.0", "~> 1.4") # This one is key--the new operator
|
||||
# disallows major version number
|
||||
# differences.
|
||||
* Group gem search output when multiple versions exist for a given gem:
|
||||
|
||||
activerecord (0.7.8, 0.7.7, 0.7.6, 0.7.5)
|
||||
Implements the ActiveRecord pattern for ORM.
|
||||
* Add arbitrary RDoc-able files via gemspec (not just Ruby source files) for
|
||||
people who have, for example, README.rdoc in their distributions. Add to
|
||||
gemspec via: spec.extra_rdoc_files = ["list", "of", "files"]. Ruby files are
|
||||
automatically included.
|
||||
* Some small bug fixes
|
||||
|
||||
=== 0.4.0 / 2004-05-31
|
||||
|
||||
* Minor bug fixes including Windows compatability issues
|
||||
|
||||
=== 0.3.0 / 2004-04-30
|
||||
|
||||
* Cleanup of command-line arguments and handling. Most commands accept a
|
||||
--local or --remote modifier.
|
||||
* Creation of Application Gems (packages that include executable programs).
|
||||
See http://rubygems.rubyforge.org/wiki/wiki.pl?DeveloperGuide for information
|
||||
on how to use it.
|
||||
* Basic functionality for installing binary gems from source (:extensions
|
||||
property of gem specification holds an array of paths to extconf.rb files to
|
||||
be used for compilation)
|
||||
* Install library "stub" allowing a normal 'require' to work (which then does
|
||||
the rubygems require and 'require_gem'
|
||||
* --run-tests runs the test suite specified by the "test_suite_file" property
|
||||
of a gem specification
|
||||
* HTTP Proxy support works. Rewrite of HTTP code.
|
||||
* Unit and functional tests added (see Rakefile).
|
||||
* Prompt before remote-installing dependencies during gem installation.
|
||||
* Config file for storing preferences for 'gem' command usage.
|
||||
* Generally improved error messages (still more work to do)
|
||||
* Rearranged gem directory structure for cleanliness.
|
||||
|
||||
=== 0.2.0 / 2004-03-14
|
||||
|
||||
* Initial public release
|
||||
|
53
doc/rubygems/LICENSE.txt
Normal file
53
doc/rubygems/LICENSE.txt
Normal file
|
@ -0,0 +1,53 @@
|
|||
RubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim
|
||||
Weirich and others. You can redistribute it and/or modify it under
|
||||
either the terms of the GPL (see the GPL.txt file), or the conditions
|
||||
below:
|
||||
|
||||
1. You may make and give away verbatim copies of the source form of the
|
||||
software without restriction, provided that you duplicate all of the
|
||||
original copyright notices and associated disclaimers.
|
||||
|
||||
2. You may modify your copy of the software in any way, provided that
|
||||
you do at least ONE of the following:
|
||||
|
||||
a) place your modifications in the Public Domain or otherwise
|
||||
make them Freely Available, such as by posting said
|
||||
modifications to Usenet or an equivalent medium, or by allowing
|
||||
the author to include your modifications in the software.
|
||||
|
||||
b) use the modified software only within your corporation or
|
||||
organization.
|
||||
|
||||
c) rename any non-standard executables so the names do not conflict
|
||||
with standard executables, which must also be provided.
|
||||
|
||||
d) make other distribution arrangements with the author.
|
||||
|
||||
3. You may distribute the software in object code or executable
|
||||
form, provided that you do at least ONE of the following:
|
||||
|
||||
a) distribute the executables and library files of the software,
|
||||
together with instructions (in the manual page or equivalent)
|
||||
on where to get the original distribution.
|
||||
|
||||
b) accompany the distribution with the machine-readable source of
|
||||
the software.
|
||||
|
||||
c) give non-standard executables non-standard names, with
|
||||
instructions on where to get the original software distribution.
|
||||
|
||||
d) make other distribution arrangements with the author.
|
||||
|
||||
4. You may modify and include the part of the software into any other
|
||||
software (possibly commercial).
|
||||
|
||||
5. The scripts and library files supplied as input to or produced as
|
||||
output from the software do not automatically fall under the
|
||||
copyright of the software, but belong to whomever generated them,
|
||||
and may be sold commercially, and may be aggregated with this
|
||||
software.
|
||||
|
||||
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
40
doc/rubygems/README
Normal file
40
doc/rubygems/README
Normal file
|
@ -0,0 +1,40 @@
|
|||
= RubyGems
|
||||
|
||||
* http://rubygems.rubyforge.org/
|
||||
* http://rubyforge.org/projects/rubygems
|
||||
* http://rubygems.org/
|
||||
|
||||
== DESCRIPTION
|
||||
|
||||
RubyGems is a package management framework for Ruby.
|
||||
|
||||
This gem is an update for the RubyGems software. You must have an
|
||||
installation of RubyGems before this update can be applied.
|
||||
|
||||
See Gem for information on RubyGems (or `ri Gem`)
|
||||
|
||||
To upgrade to the latest RubyGems, run:
|
||||
|
||||
$ gem install --system # you might need to be an administrator or root
|
||||
|
||||
NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no
|
||||
rubygems-update installed. You will need to use the following instructions
|
||||
if you see "Nothing to update".
|
||||
|
||||
If you have an older version of RubyGems installed, then you can still
|
||||
do it in two steps:
|
||||
|
||||
$ gem install rubygems-update # again, might need to be admin/root
|
||||
$ update_rubygems # ... here too
|
||||
|
||||
If you don't have any RubyGems install, there is still the pre-gem approach to
|
||||
getting software, doing it manually:
|
||||
|
||||
1. Download from: http://rubyforge.org/frs/?group_id=126
|
||||
2. Unpack into a directory and cd there
|
||||
3. Install with: ruby setup.rb # you may need admin/root privilege
|
||||
|
||||
For more details and other options, see:
|
||||
|
||||
ruby setup.rb --help
|
||||
|
|
@ -5,13 +5,14 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/rubygems_version'
|
||||
require 'rubygems/defaults'
|
||||
require 'thread'
|
||||
require 'etc'
|
||||
|
||||
module Gem
|
||||
|
||||
RubyGemsVersion = VERSION = '1.3.5'
|
||||
|
||||
##
|
||||
# Raised when RubyGems is unable to load or activate a gem. Contains the
|
||||
# name and version requirements of the gem that either conflicts with
|
||||
|
@ -381,7 +382,7 @@ module Gem
|
|||
raise Gem::Exception, msg
|
||||
end
|
||||
|
||||
File.join(spec.full_gem_path, spec.bindir, exec_name).sub(/.*\s.*/m, '"\&"')
|
||||
File.join(spec.full_gem_path, spec.bindir, exec_name)
|
||||
end
|
||||
|
||||
##
|
||||
|
|
|
@ -49,7 +49,7 @@ class Gem::Command
|
|||
def self.build_args
|
||||
@build_args ||= []
|
||||
end
|
||||
|
||||
|
||||
def self.build_args=(value)
|
||||
@build_args = value
|
||||
end
|
||||
|
@ -197,7 +197,7 @@ class Gem::Command
|
|||
# def usage
|
||||
# "#{program_name} FILE [FILE ...]"
|
||||
# end
|
||||
#
|
||||
#
|
||||
# def arguments
|
||||
# "FILE name of file to find"
|
||||
# end
|
||||
|
|
|
@ -88,6 +88,8 @@ By default, this RubyGems will install gem as:
|
|||
end
|
||||
|
||||
def execute
|
||||
@verbose = Gem.configuration.really_verbose
|
||||
|
||||
install_destdir = options[:destdir]
|
||||
|
||||
unless install_destdir.empty? then
|
||||
|
@ -113,22 +115,30 @@ By default, this RubyGems will install gem as:
|
|||
|
||||
remove_source_caches install_destdir
|
||||
|
||||
say "RubyGems #{Gem::VERSION} installed"
|
||||
|
||||
install_rdoc
|
||||
|
||||
say
|
||||
say "-" * 78
|
||||
say
|
||||
|
||||
release_notes = File.join Dir.pwd, 'doc', 'release_notes',
|
||||
"rel_#{Gem::RubyGemsVersion.gsub '.', '_'}.rdoc"
|
||||
|
||||
if File.exist? release_notes then
|
||||
say File.read(release_notes)
|
||||
else
|
||||
say "Oh-no! Unable to find release notes!"
|
||||
say "Looked in: #{release_notes}" if Gem.configuration.really_verbose
|
||||
if @verbose then
|
||||
say "-" * 78
|
||||
say
|
||||
end
|
||||
|
||||
release_notes = File.join Dir.pwd, 'History.txt'
|
||||
|
||||
release_notes = if File.exist? release_notes then
|
||||
open release_notes do |io|
|
||||
text = io.gets '==='
|
||||
text << io.gets('===')
|
||||
text[0...-3]
|
||||
end
|
||||
else
|
||||
"Oh-no! Unable to find release notes!"
|
||||
end
|
||||
|
||||
say release_notes
|
||||
|
||||
say
|
||||
say "-" * 78
|
||||
say
|
||||
|
@ -145,7 +155,7 @@ By default, this RubyGems will install gem as:
|
|||
end
|
||||
|
||||
def install_executables(bin_dir)
|
||||
say "Installing gem executable"
|
||||
say "Installing gem executable" if @verbose
|
||||
|
||||
@bin_file_names = []
|
||||
|
||||
|
@ -203,7 +213,7 @@ TEXT
|
|||
end
|
||||
|
||||
def install_lib(lib_dir)
|
||||
say "Installing RubyGems"
|
||||
say "Installing RubyGems" if @verbose
|
||||
|
||||
Dir.chdir 'lib' do
|
||||
lib_files = Dir[File.join('**', '*rb')]
|
||||
|
@ -226,23 +236,23 @@ TEXT
|
|||
if File.writable? gem_doc_dir and
|
||||
(not File.exist? rubygems_doc_dir or
|
||||
File.writable? rubygems_doc_dir) then
|
||||
say "Removing old RubyGems RDoc and ri"
|
||||
say "Removing old RubyGems RDoc and ri" if @verbose
|
||||
Dir[File.join(Gem.dir, 'doc', 'rubygems-[0-9]*')].each do |dir|
|
||||
rm_rf dir
|
||||
end
|
||||
|
||||
if options[:ri] then
|
||||
ri_dir = File.join rubygems_doc_dir, 'ri'
|
||||
say "Installing #{rubygems_name} ri into #{ri_dir}"
|
||||
say "Installing #{rubygems_name} ri into #{ri_dir}" if @verbose
|
||||
run_rdoc '--ri', '--op', ri_dir
|
||||
end
|
||||
|
||||
if options[:rdoc] then
|
||||
rdoc_dir = File.join rubygems_doc_dir, 'rdoc'
|
||||
say "Installing #{rubygems_name} rdoc into #{rdoc_dir}"
|
||||
say "Installing #{rubygems_name} rdoc into #{rdoc_dir}" if @verbose
|
||||
run_rdoc '--op', rdoc_dir
|
||||
end
|
||||
else
|
||||
elsif @verbose then
|
||||
say "Skipping RDoc generation, #{gem_doc_dir} not writable"
|
||||
say "Set the GEM_HOME environment variable if you want RDoc generated"
|
||||
end
|
||||
|
@ -327,7 +337,7 @@ abort "#{deprecation_message}"
|
|||
system_cache_file = File.join(install_destdir,
|
||||
Gem::SourceInfoCache.system_cache_file)
|
||||
|
||||
say "Removing old source_cache files"
|
||||
say "Removing old source_cache files" if Gem.configuration.really_verbose
|
||||
rm_f user_cache_file if File.writable? File.dirname(user_cache_file)
|
||||
rm_f system_cache_file if File.writable? File.dirname(system_cache_file)
|
||||
end
|
||||
|
|
|
@ -29,7 +29,7 @@ class Gem::Format
|
|||
end
|
||||
|
||||
##
|
||||
# Reads the named gem file and returns a Format object, representing
|
||||
# Reads the named gem file and returns a Format object, representing
|
||||
# the data from the gem file
|
||||
#
|
||||
# file_path:: [String] Path to the gem file
|
||||
|
|
|
@ -141,7 +141,7 @@ class Gem::Indexer
|
|||
"Complete"
|
||||
|
||||
Gem.time 'Generated YAML quick index gemspecs' do
|
||||
index.each do |original_name, spec|
|
||||
index.released_gems.each do |original_name, spec|
|
||||
spec_file_name = "#{original_name}.gemspec.rz"
|
||||
yaml_name = File.join @quick_dir, spec_file_name
|
||||
|
||||
|
@ -221,7 +221,7 @@ class Gem::Indexer
|
|||
files = []
|
||||
|
||||
Gem.time 'Generated Marshal quick index gemspecs' do
|
||||
(index.gems.merge(index.prerelease_gems)).each do |original_name, spec|
|
||||
index.gems.each do |original_name, spec|
|
||||
spec_file_name = "#{original_name}.gemspec.rz"
|
||||
marshal_name = File.join @quick_marshal_dir, spec_file_name
|
||||
|
||||
|
@ -275,7 +275,7 @@ class Gem::Indexer
|
|||
# Builds indicies for RubyGems 1.2 and newer. Handles full, latest, prerelease
|
||||
|
||||
def build_modern_indicies(index)
|
||||
build_modern_index(index.sort, @specs_index, 'specs')
|
||||
build_modern_index(index.released_specs.sort, @specs_index, 'specs')
|
||||
build_modern_index(index.latest_specs.sort,
|
||||
@latest_specs_index,
|
||||
'latest specs')
|
||||
|
@ -534,7 +534,7 @@ class Gem::Indexer
|
|||
FileUtils.rm_rf @directory
|
||||
end
|
||||
|
||||
##
|
||||
##
|
||||
# Zlib::GzipWriter wrapper that gzips +filename+ on disk.
|
||||
|
||||
def gzip(filename)
|
||||
|
@ -654,8 +654,8 @@ class Gem::Indexer
|
|||
files = build_marshal_gemspecs index
|
||||
|
||||
Gem.time 'Updated indexes' do
|
||||
update_specs_index index, @dest_specs_index, @specs_index
|
||||
update_specs_index index, @dest_latest_specs_index, @latest_specs_index
|
||||
update_specs_index index.released_gems, @dest_specs_index, @specs_index
|
||||
update_specs_index index.released_gems, @dest_latest_specs_index, @latest_specs_index
|
||||
update_specs_index(index.prerelease_gems, @dest_prerelease_specs_index,
|
||||
@prerelease_specs_index)
|
||||
end
|
||||
|
|
|
@ -41,7 +41,7 @@ require 'rake/packagetask'
|
|||
#
|
||||
# require 'rubygems'
|
||||
# require 'rubygems/package_task'
|
||||
#
|
||||
#
|
||||
# spec = Gem::Specification.new do |s|
|
||||
# s.platform = Gem::Platform::RUBY
|
||||
# s.summary = "Ruby based make-like utility."
|
||||
|
@ -56,7 +56,7 @@ require 'rake/packagetask'
|
|||
# and dependencies are specified in standard Ruby syntax.
|
||||
# EOF
|
||||
# end
|
||||
#
|
||||
#
|
||||
# Gem::PackageTask.new(spec) do |pkg|
|
||||
# pkg.need_zip = true
|
||||
# pkg.need_tar = true
|
||||
|
|
|
@ -103,7 +103,7 @@ class Gem::Platform
|
|||
def to_s
|
||||
to_a.compact.join '-'
|
||||
end
|
||||
|
||||
|
||||
def empty?
|
||||
to_s.empty?
|
||||
end
|
||||
|
|
|
@ -218,7 +218,7 @@ require 'rubygems/gem_openssl'
|
|||
#
|
||||
# # signing key (still kept in an undisclosed location!)
|
||||
# s.signing_key = '/mnt/floppy/alf-private_key.pem'
|
||||
#
|
||||
#
|
||||
# # certificate chain (includes the issuer certificate now too)
|
||||
# s.cert_chain = ['/home/alf/doc/seattlerb-public_cert.pem',
|
||||
# '/home/alf/doc/alf_at_seattle-public_cert.pem']
|
||||
|
@ -274,7 +274,7 @@ require 'rubygems/gem_openssl'
|
|||
# # convert a PEM format X509 certificate into DER format:
|
||||
# # (note: Windows .cer files are X509 certificates in DER format)
|
||||
# $ openssl x509 -in input.pem -outform der -out output.der
|
||||
#
|
||||
#
|
||||
# # print out the certificate in a human-readable format:
|
||||
# $ openssl x509 -in input.pem -noout -text
|
||||
#
|
||||
|
@ -282,7 +282,7 @@ require 'rubygems/gem_openssl'
|
|||
#
|
||||
# # convert a PEM format RSA key into DER format:
|
||||
# $ openssl rsa -in input_key.pem -outform der -out output_key.der
|
||||
#
|
||||
#
|
||||
# # print out the key in a human readable format:
|
||||
# $ openssl rsa -in input_key.pem -noout -text
|
||||
#
|
||||
|
|
|
@ -30,7 +30,7 @@ class Gem::SourceIndex
|
|||
|
||||
include Gem::UserInteraction
|
||||
|
||||
attr_reader :gems, :prerelease_gems # :nodoc:
|
||||
attr_reader :gems # :nodoc:
|
||||
|
||||
##
|
||||
# Directories to use to refresh this SourceIndex when calling refresh!
|
||||
|
@ -122,16 +122,22 @@ class Gem::SourceIndex
|
|||
# #prerelease_gems
|
||||
|
||||
def initialize(specifications={})
|
||||
@gems, @prerelease_gems = [{}, {}]
|
||||
@gems = {}
|
||||
specifications.each{ |full_name, spec| add_spec spec }
|
||||
@spec_dirs = nil
|
||||
end
|
||||
|
||||
##
|
||||
# Both regular and prerelease gems
|
||||
|
||||
# TODO: remove method
|
||||
def all_gems
|
||||
@gems.merge @prerelease_gems
|
||||
@gems
|
||||
end
|
||||
|
||||
def prerelease_gems
|
||||
@gems.reject{ |name, gem| !gem.version.prerelease? }
|
||||
end
|
||||
|
||||
def released_gems
|
||||
@gems.reject{ |name, gem| gem.version.prerelease? }
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -153,8 +159,8 @@ class Gem::SourceIndex
|
|||
end
|
||||
|
||||
##
|
||||
# Returns an Array specifications for the latest versions of each gem in
|
||||
# this index.
|
||||
# Returns an Array specifications for the latest released versions
|
||||
# of each gem in this index.
|
||||
|
||||
def latest_specs
|
||||
result = Hash.new { |h,k| h[k] = [] }
|
||||
|
@ -165,6 +171,7 @@ class Gem::SourceIndex
|
|||
curr_ver = spec.version
|
||||
prev_ver = latest.key?(name) ? latest[name].version : nil
|
||||
|
||||
next if curr_ver.prerelease?
|
||||
next unless prev_ver.nil? or curr_ver >= prev_ver or
|
||||
latest[name].platform != Gem::Platform::RUBY
|
||||
|
||||
|
@ -192,7 +199,14 @@ class Gem::SourceIndex
|
|||
# An array including only the prerelease gemspecs
|
||||
|
||||
def prerelease_specs
|
||||
@prerelease_gems.values
|
||||
prerelease_gems.values
|
||||
end
|
||||
|
||||
##
|
||||
# An array including only the released gemspecs
|
||||
|
||||
def released_specs
|
||||
released_gems.values
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -201,11 +215,7 @@ class Gem::SourceIndex
|
|||
def add_spec(gem_spec, name = gem_spec.full_name)
|
||||
# No idea why, but the Indexer wants to insert them using original_name
|
||||
# instead of full_name. So we make it an optional arg.
|
||||
if gem_spec.version.prerelease?
|
||||
@prerelease_gems[name] = gem_spec
|
||||
else
|
||||
@gems[name] = gem_spec
|
||||
end
|
||||
@gems[name] = gem_spec
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -221,11 +231,7 @@ class Gem::SourceIndex
|
|||
# Remove a gem specification named +full_name+.
|
||||
|
||||
def remove_spec(full_name)
|
||||
if @gems.key? full_name then
|
||||
@gems.delete full_name
|
||||
else
|
||||
@prerelease_gems.delete full_name
|
||||
end
|
||||
@gems.delete full_name
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -408,7 +414,7 @@ class Gem::SourceIndex
|
|||
end
|
||||
|
||||
def ==(other) # :nodoc:
|
||||
self.class === other and @gems == other.gems
|
||||
self.class === other and @gems == other.gems
|
||||
end
|
||||
|
||||
def dump
|
||||
|
|
|
@ -286,7 +286,7 @@ class Gem::SourceInfoCache
|
|||
next unless Gem.sources.include? source_uri
|
||||
# TODO - Remove this gunk after 2008/11
|
||||
unless pattern.kind_of?(Gem::Dependency)
|
||||
pattern = Gem::Dependency.new(pattern, Gem::Requirement.default)
|
||||
pattern = Gem::Dependency.new(pattern, Gem::Requirement.default)
|
||||
end
|
||||
sic_entry.source_index.search pattern, platform_only
|
||||
end.flatten.compact
|
||||
|
@ -306,7 +306,7 @@ class Gem::SourceInfoCache
|
|||
|
||||
# TODO - Remove this gunk after 2008/11
|
||||
unless pattern.kind_of?(Gem::Dependency)
|
||||
pattern = Gem::Dependency.new(pattern, Gem::Requirement.default)
|
||||
pattern = Gem::Dependency.new(pattern, Gem::Requirement.default)
|
||||
end
|
||||
|
||||
sic_entry.source_index.search(pattern, only_platform).each do |spec|
|
||||
|
|
|
@ -22,7 +22,7 @@ class Gem::SpecFetcher
|
|||
attr_reader :latest_specs # :nodoc:
|
||||
|
||||
##
|
||||
# Cache of all spces
|
||||
# Cache of all released specs
|
||||
|
||||
attr_reader :specs # :nodoc:
|
||||
|
||||
|
@ -61,8 +61,9 @@ class Gem::SpecFetcher
|
|||
|
||||
##
|
||||
# Fetch specs matching +dependency+. If +all+ is true, all matching
|
||||
# versions are returned. If +matching_platform+ is false, all platforms are
|
||||
# returned. If +prerelease+ is true, prerelease versions are included.
|
||||
# (released) versions are returned. If +matching_platform+ is
|
||||
# false, all platforms are returned. If +prerelease+ is true,
|
||||
# prerelease versions are included.
|
||||
|
||||
def fetch(dependency, all = false, matching_platform = true, prerelease = false)
|
||||
specs_and_sources = find_matching dependency, all, matching_platform, prerelease
|
||||
|
@ -112,9 +113,9 @@ class Gem::SpecFetcher
|
|||
end
|
||||
|
||||
##
|
||||
# Find spec names that match +dependency+. If +all+ is true, all matching
|
||||
# versions are returned. If +matching_platform+ is false, gems for all
|
||||
# platforms are returned.
|
||||
# Find spec names that match +dependency+. If +all+ is true, all
|
||||
# matching released versions are returned. If +matching_platform+
|
||||
# is false, gems for all platforms are returned.
|
||||
|
||||
def find_matching(dependency, all = false, matching_platform = true, prerelease = false)
|
||||
found = {}
|
||||
|
@ -161,7 +162,7 @@ class Gem::SpecFetcher
|
|||
|
||||
##
|
||||
# Returns a list of gems available for each source in Gem::sources. If
|
||||
# +all+ is true, all versions are returned instead of only latest
|
||||
# +all+ is true, all released versions are returned instead of only latest
|
||||
# versions. If +prerelease+ is true, include prerelease versions.
|
||||
|
||||
def list(all = false, prerelease = false)
|
||||
|
@ -183,7 +184,7 @@ class Gem::SpecFetcher
|
|||
cache = { :latest => @latest_specs,
|
||||
:prerelease => @prerelease_specs,
|
||||
:all => @specs }[type]
|
||||
|
||||
|
||||
Gem.sources.each do |source_uri|
|
||||
source_uri = URI.parse source_uri
|
||||
|
||||
|
@ -194,6 +195,12 @@ class Gem::SpecFetcher
|
|||
list[source_uri] = cache[source_uri]
|
||||
end
|
||||
|
||||
if type == :all
|
||||
list.values.map do |gems|
|
||||
gems.reject! { |g| g[1].prerelease? }
|
||||
end
|
||||
end
|
||||
|
||||
list
|
||||
end
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ require 'rubygems/remote_fetcher'
|
|||
# @fetcher = Gem::FakeFetcher.new
|
||||
# @fetcher.data['http://gems.example.com/yaml'] = source_index.to_yaml
|
||||
# Gem::RemoteFetcher.fetcher = @fetcher
|
||||
#
|
||||
#
|
||||
# # invoke RubyGems code
|
||||
#
|
||||
#
|
||||
# paths = @fetcher.paths
|
||||
# assert_equal 'http://gems.example.com/yaml', paths.shift
|
||||
# assert paths.empty?, paths.join(', ')
|
||||
|
|
|
@ -15,7 +15,7 @@ begin
|
|||
Gem.activate('test-unit')
|
||||
rescue Gem::LoadError
|
||||
# Ignore - use the test-unit library that's part of the standard library
|
||||
end
|
||||
end
|
||||
|
||||
##
|
||||
# Validator performs various gem file and gem database validation
|
||||
|
|
|
@ -166,7 +166,7 @@ class Gem::Version
|
|||
def prerelease?
|
||||
parts.any? { |part| part.alpha? }
|
||||
end
|
||||
|
||||
|
||||
##
|
||||
# The release for this version (e.g. 1.2.0.a -> 1.2.0)
|
||||
# Non-prerelease versions return themselves
|
||||
|
|
|
@ -35,7 +35,7 @@ class TarTestCase < RubyGemTestCase
|
|||
linkname 100
|
||||
magic 6
|
||||
version 2
|
||||
uname 32
|
||||
uname 32
|
||||
gname 32
|
||||
devmajor 8
|
||||
devminor 8
|
||||
|
@ -54,7 +54,7 @@ class TarTestCase < RubyGemTestCase
|
|||
next
|
||||
end
|
||||
|
||||
assert_equal expected[offset, length], actual[offset, length],
|
||||
assert_equal expected[offset, length], actual[offset, length],
|
||||
"Field #{name} of the tar header differs."
|
||||
|
||||
offset += length
|
||||
|
|
|
@ -23,7 +23,7 @@ def install_session
|
|||
puts
|
||||
puts "with the appropriate admin privileges."
|
||||
puts "*****************************************************************"
|
||||
puts
|
||||
puts
|
||||
exit
|
||||
end
|
||||
gem 'session'
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#++
|
||||
|
||||
SIMPLE_GEM = <<-GEMDATA
|
||||
MD5SUM = "e3701f9db765a2358aef94c40ded71c8"
|
||||
MD5SUM = "b12a4d48febeb2289c539c2574c4b6f8"
|
||||
if $0 == __FILE__
|
||||
require 'optparse'
|
||||
|
||||
|
||||
options = {}
|
||||
ARGV.options do |opts|
|
||||
opts.on_tail("--help", "show this message") {puts opts; exit}
|
||||
|
@ -19,45 +19,45 @@
|
|||
end
|
||||
|
||||
require 'rubygems'
|
||||
@directory = options[:directory] || Gem.dir
|
||||
@directory = options[:directory] || Gem.dir
|
||||
@force = options[:force]
|
||||
|
||||
gem = Gem::Installer.new(__FILE__).install(@force, @directory)
|
||||
|
||||
gem = Gem::Installer.new(__FILE__).install(@force, @directory)
|
||||
if options[:gen_rdoc]
|
||||
Gem::DocManager.new(gem).generate_rdoc
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
--- !ruby/object:Gem::Specification
|
||||
--- !ruby/object:Gem::Specification
|
||||
rubygems_version: "1.0"
|
||||
name: testing
|
||||
version: !ruby/object:Gem::Version
|
||||
version: !ruby/object:Gem::Version
|
||||
version: 1.2.3
|
||||
date: 2004-03-18 22:01:52.859121 -05:00
|
||||
platform:
|
||||
platform:
|
||||
summary: This exercise the gem testing stuff.
|
||||
require_paths:
|
||||
require_paths:
|
||||
- lib
|
||||
files:
|
||||
files:
|
||||
- lib/foo.rb
|
||||
- lib/test
|
||||
- lib/test.rb
|
||||
- lib/test/wow.rb
|
||||
autorequire: test
|
||||
test_suite_file: foo
|
||||
requirements:
|
||||
requirements:
|
||||
- a computer processor
|
||||
---
|
||||
-
|
||||
---
|
||||
-
|
||||
size: 109
|
||||
mode: 420
|
||||
path: lib/foo.rb
|
||||
-
|
||||
-
|
||||
size: 0
|
||||
mode: 420
|
||||
path: lib/test.rb
|
||||
-
|
||||
-
|
||||
size: 15
|
||||
mode: 420
|
||||
path: lib/test/wow.rb
|
||||
|
|
|
@ -78,14 +78,6 @@ class TestGem < RubyGemTestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_self_bin_path_with_spaces
|
||||
quick_gem 'sp ace', '3' do |s|
|
||||
s.executables = ['exec']
|
||||
end
|
||||
path = Gem.bin_path('sp ace', 'exec')
|
||||
assert_equal %w(" "), [path[0,1], path[-1,1]], "Path should be escaped"
|
||||
end
|
||||
|
||||
def test_self_bin_path_not_found
|
||||
assert_raises(Gem::GemNotFoundException) do
|
||||
Gem.bin_path('non-existent')
|
||||
|
@ -449,7 +441,7 @@ class TestGem < RubyGemTestCase
|
|||
def test_self_refresh
|
||||
util_make_gems
|
||||
|
||||
a1_spec = File.join @gemhome, "specifications", "#{@a1.full_name}.gemspec"
|
||||
a1_spec = File.join @gemhome, "specifications", "#{@a1.full_name}.gemspec"
|
||||
|
||||
FileUtils.mv a1_spec, @tempdir
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ Gem a-1
|
|||
|
||||
Gem a-2
|
||||
|
||||
Gem a-3.a
|
||||
|
||||
Gem a_evil-9
|
||||
|
||||
Gem b-2
|
||||
|
@ -100,6 +102,8 @@ Gem a-1
|
|||
|
||||
Gem a-2
|
||||
|
||||
Gem a-3.a
|
||||
|
||||
Gem a_evil-9
|
||||
|
||||
Gem b-2
|
||||
|
|
|
@ -57,5 +57,25 @@ class TestGemCommandsUninstallCommand < GemInstallerTestCase
|
|||
assert_empty output, "UI output should be empty after an uninstall error"
|
||||
end
|
||||
|
||||
def test_execute_prerelease
|
||||
@spec = quick_gem "pre", "2.b"
|
||||
@gem = File.join @tempdir, "#{@spec.full_name}.gem"
|
||||
FileUtils.touch @gem
|
||||
|
||||
util_setup_gem
|
||||
|
||||
use_ui @ui do
|
||||
@installer.install
|
||||
end
|
||||
|
||||
@cmd.options[:args] = ["pre"]
|
||||
|
||||
use_ui @ui do
|
||||
@cmd.execute
|
||||
end
|
||||
|
||||
output = @ui.output
|
||||
assert_match(/Successfully uninstalled/, output)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
0
test/rubygems/test_gem_digest.rb
Executable file → Normal file
0
test/rubygems/test_gem_digest.rb
Executable file → Normal file
|
@ -18,7 +18,7 @@ class TestGemDocManager < RubyGemTestCase
|
|||
|
||||
def test_uninstall_doc_unwritable
|
||||
orig_mode = File.stat(@spec.installation_path).mode
|
||||
|
||||
|
||||
# File.chmod has no effect on MS Windows directories (it needs ACL).
|
||||
if win_platform?
|
||||
skip("test_uninstall_doc_unwritable skipped on MS Windows")
|
||||
|
|
|
@ -9,7 +9,7 @@ require_relative 'gemutilities'
|
|||
require 'rubygems/indexer'
|
||||
|
||||
unless ''.respond_to? :to_xs then
|
||||
warn "Gem::Indexer tests are being skipped. Install builder gem."
|
||||
warn "Gem::Indexer tests are being skipped. Install builder gem." if $VERBOSE
|
||||
end
|
||||
|
||||
class TestGemIndexer < RubyGemTestCase
|
||||
|
@ -118,10 +118,13 @@ class TestGemIndexer < RubyGemTestCase
|
|||
expected = <<-EOF
|
||||
a-1
|
||||
a-2
|
||||
a-3.a
|
||||
a_evil-9
|
||||
b-2
|
||||
c-1.2
|
||||
d-2.0
|
||||
d-2.0.a
|
||||
d-2.0.b
|
||||
pl-1-i386-linux
|
||||
EOF
|
||||
|
||||
|
@ -163,13 +166,13 @@ pl-1-i386-linux
|
|||
assert_indexed @tempdir, "latest_specs.#{@marshal_version}.gz"
|
||||
|
||||
expected = <<-EOF
|
||||
<?xml version="1.0"?>
|
||||
<rss version="2.0">
|
||||
<?xml version=\"1.0\"?>
|
||||
<rss version=\"2.0\">
|
||||
<channel>
|
||||
<title>ExampleForge gems</title>
|
||||
<link>http://example.com</link>
|
||||
<description>Recently released gems from http://example.com</description>
|
||||
<generator>RubyGems v#{Gem::RubyGemsVersion}</generator>
|
||||
<generator>RubyGems v1.3.4</generator>
|
||||
<docs>http://cyber.law.harvard.edu/rss/rss.html</docs>
|
||||
<item>
|
||||
<title>a-2</title>
|
||||
|
@ -178,9 +181,21 @@ pl-1-i386-linux
|
|||
</description>
|
||||
<author>example@example.com (A User)</author>
|
||||
<guid>a-2</guid>
|
||||
<enclosure url="http://gems.example.com/gems/a-2.gem"
|
||||
length="3072" type="application/octet-stream" />
|
||||
<pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
|
||||
<enclosure url=\"http://gems.example.com/gems/a-2.gem\"
|
||||
length=\"3072\" type=\"application/octet-stream\" />
|
||||
<pubDate>#{@a2.date.rfc2822}</pubDate>
|
||||
<link>http://example.com</link>
|
||||
</item>
|
||||
<item>
|
||||
<title>a-3.a</title>
|
||||
<description>
|
||||
<pre>This is a test description</pre>
|
||||
</description>
|
||||
<author>example@example.com (A User)</author>
|
||||
<guid>a-3.a</guid>
|
||||
<enclosure url=\"http://gems.example.com/gems/a-3.a.gem\"
|
||||
length=\"3072\" type=\"application/octet-stream\" />
|
||||
<pubDate>#{@a3a.date.rfc2822}</pubDate>
|
||||
<link>http://example.com</link>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -190,9 +205,9 @@ pl-1-i386-linux
|
|||
</description>
|
||||
<author>example@example.com (A User)</author>
|
||||
<guid>a_evil-9</guid>
|
||||
<enclosure url="http://gems.example.com/gems/a_evil-9.gem"
|
||||
length="3072" type="application/octet-stream" />
|
||||
<pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
|
||||
<enclosure url=\"http://gems.example.com/gems/a_evil-9.gem\"
|
||||
length=\"3072\" type=\"application/octet-stream\" />
|
||||
<pubDate>#{@a_evil9.date.rfc2822}</pubDate>
|
||||
<link>http://example.com</link>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -202,9 +217,9 @@ pl-1-i386-linux
|
|||
</description>
|
||||
<author>example@example.com (A User)</author>
|
||||
<guid>b-2</guid>
|
||||
<enclosure url="http://gems.example.com/gems/b-2.gem"
|
||||
length="3072" type="application/octet-stream" />
|
||||
<pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
|
||||
<enclosure url=\"http://gems.example.com/gems/b-2.gem\"
|
||||
length=\"3072\" type=\"application/octet-stream\" />
|
||||
<pubDate>#{@b2.date.rfc2822}</pubDate>
|
||||
<link>http://example.com</link>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -214,9 +229,33 @@ pl-1-i386-linux
|
|||
</description>
|
||||
<author>example@example.com (A User)</author>
|
||||
<guid>c-1.2</guid>
|
||||
<enclosure url="http://gems.example.com/gems/c-1.2.gem"
|
||||
length="3072" type="application/octet-stream" />
|
||||
<pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
|
||||
<enclosure url=\"http://gems.example.com/gems/c-1.2.gem\"
|
||||
length=\"3072\" type=\"application/octet-stream\" />
|
||||
<pubDate>#{@c1_2.date.rfc2822}</pubDate>
|
||||
<link>http://example.com</link>
|
||||
</item>
|
||||
<item>
|
||||
<title>d-2.0.a</title>
|
||||
<description>
|
||||
<pre>This is a test description</pre>
|
||||
</description>
|
||||
<author>example@example.com (A User)</author>
|
||||
<guid>d-2.0.a</guid>
|
||||
<enclosure url=\"http://gems.example.com/gems/d-2.0.a.gem\"
|
||||
length=\"3072\" type=\"application/octet-stream\" />
|
||||
<pubDate>#{@d2_0_a.date.rfc2822}</pubDate>
|
||||
<link>http://example.com</link>
|
||||
</item>
|
||||
<item>
|
||||
<title>d-2.0.b</title>
|
||||
<description>
|
||||
<pre>This is a test description</pre>
|
||||
</description>
|
||||
<author>example@example.com (A User)</author>
|
||||
<guid>d-2.0.b</guid>
|
||||
<enclosure url=\"http://gems.example.com/gems/d-2.0.b.gem\"
|
||||
length=\"3072\" type=\"application/octet-stream\" />
|
||||
<pubDate>#{@d2_0_b.date.rfc2822}</pubDate>
|
||||
<link>http://example.com</link>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -226,9 +265,9 @@ pl-1-i386-linux
|
|||
</description>
|
||||
<author>example@example.com (A User)</author>
|
||||
<guid>pl-1-x86-linux</guid>
|
||||
<enclosure url="http://gems.example.com/gems/pl-1-x86-linux.gem"
|
||||
length="3072" type="application/octet-stream" />
|
||||
<pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
|
||||
<enclosure url=\"http://gems.example.com/gems/pl-1-x86-linux.gem\"
|
||||
length=\"3072\" type=\"application/octet-stream\" />
|
||||
<pubDate>#{@pl1.date.rfc2822}</pubDate>
|
||||
<link>http://example.com</link>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -247,9 +286,9 @@ eighty characters.</pre>
|
|||
</description>
|
||||
<author>example@example.com (Example), example2@example.com (Example2)</author>
|
||||
<guid>a-1</guid>
|
||||
<enclosure url="http://gems.example.com/gems/a-1.gem"
|
||||
length="3584" type="application/octet-stream" />
|
||||
<pubDate>#{(Gem::Specification::TODAY - 86400).rfc2822}</pubDate>
|
||||
<enclosure url=\"http://gems.example.com/gems/a-1.gem\"
|
||||
length=\"3584\" type=\"application/octet-stream\" />
|
||||
<pubDate>#{@a1.date.rfc2822}</pubDate>
|
||||
<link>http://a.example.com</link>
|
||||
</item>
|
||||
</channel>
|
||||
|
@ -462,9 +501,9 @@ eighty characters.</pre>
|
|||
@ui.output
|
||||
assert_match %r%^\.\.\.\.\.\.\.\.\.\.$%, @ui.output
|
||||
assert_match %r%^Loaded all gems$%, @ui.output
|
||||
assert_match %r%^Generating Marshal quick index gemspecs for 7 gems$%,
|
||||
assert_match %r%^Generating Marshal quick index gemspecs for 10 gems$%,
|
||||
@ui.output
|
||||
assert_match %r%^Generating YAML quick index gemspecs for 7 gems$%,
|
||||
assert_match %r%^Generating YAML quick index gemspecs for 10 gems$%,
|
||||
@ui.output
|
||||
assert_match %r%^Complete$%, @ui.output
|
||||
assert_match %r%^Generating specs index$%, @ui.output
|
||||
|
@ -473,7 +512,7 @@ eighty characters.</pre>
|
|||
assert_match %r%^Generating latest index$%, @ui.output
|
||||
assert_match %r%^Generating prerelease specs index$%, @ui.output
|
||||
assert_match %r%^Generating Marshal master index$%, @ui.output
|
||||
assert_match %r%^Generating YAML master index for 7 gems \(this may take a while\)$%, @ui.output
|
||||
assert_match %r%^Generating YAML master index for 10 gems \(this may take a while\)$%, @ui.output
|
||||
assert_match %r%^Complete$%, @ui.output
|
||||
assert_match %r%^Compressing indicies$%, @ui.output
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class TestGemPackageTarInput < TarTestCase
|
|||
meta = @spec.to_yaml
|
||||
|
||||
f.write tar_file_header("metadata", "", 0644, meta.size)
|
||||
f.write meta + "\0" * (1024 - meta.size)
|
||||
f.write meta + "\0" * (1024 - meta.size)
|
||||
f.write "\0" * 1024
|
||||
end
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class TestTarWriter < TarTestCase
|
|||
def test_add_file_simple_padding
|
||||
@tar_writer.add_file_simple 'x', 0, 100
|
||||
|
||||
assert_headers_equal tar_file_header('x', '', 0, 100),
|
||||
assert_headers_equal tar_file_header('x', '', 0, 100),
|
||||
@io.string[0, 512]
|
||||
|
||||
assert_equal "\0" * 512, @io.string[512, 512]
|
||||
|
@ -60,7 +60,7 @@ class TestTarWriter < TarTestCase
|
|||
end
|
||||
|
||||
def test_add_file_simple_size
|
||||
assert_raises Gem::Package::TarWriter::FileOverflow do
|
||||
assert_raises Gem::Package::TarWriter::FileOverflow do
|
||||
@tar_writer.add_file_simple("lib/foo/bar", 0, 10) do |io|
|
||||
io.write "1" * 11
|
||||
end
|
||||
|
@ -68,7 +68,7 @@ class TestTarWriter < TarTestCase
|
|||
end
|
||||
|
||||
def test_add_file_unseekable
|
||||
assert_raises Gem::Package::NonSeekableIO do
|
||||
assert_raises Gem::Package::NonSeekableIO do
|
||||
Gem::Package::TarWriter.new(Object.new).add_file 'x', 0
|
||||
end
|
||||
end
|
||||
|
|
|
@ -335,14 +335,12 @@ WARNING: Invalid .gemspec format in '#{spec_file}'
|
|||
@source_index.add_spec gem_a1_alpha
|
||||
|
||||
refute @source_index.latest_specs.include?(gem_a1_alpha)
|
||||
assert_nil @source_index.specification(gem_a1_alpha.full_name)
|
||||
assert @source_index.find_name(gem_a1_alpha.full_name).empty?
|
||||
assert @source_index.prerelease_specs.include?(gem_a1_alpha)
|
||||
|
||||
# TODO: don't think this tests writing prerelease index to disk
|
||||
end
|
||||
|
||||
def test_refresh_bang
|
||||
a1_spec = File.join @gemhome, "specifications", "#{@a1.full_name}.gemspec"
|
||||
a1_spec = File.join @gemhome, "specifications", "#{@a1.full_name}.gemspec"
|
||||
|
||||
FileUtils.mv a1_spec, @tempdir
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ class TestGemSpecFetcher < RubyGemTestCase
|
|||
util_zip(Marshal.dump(@a2))
|
||||
@fetcher.data["#{@gem_repo}#{Gem::MARSHAL_SPEC_DIR}#{@a_pre.full_name}.gemspec.rz"] =
|
||||
util_zip(Marshal.dump(@a_pre))
|
||||
@fetcher.data["#{@gem_repo}#{Gem::MARSHAL_SPEC_DIR}#{@a3a.full_name}.gemspec.rz"] =
|
||||
util_zip(Marshal.dump(@a3a))
|
||||
|
||||
dep = Gem::Dependency.new 'a', 1
|
||||
specs_and_sources = @sf.fetch dep, true
|
||||
|
@ -273,7 +275,12 @@ RubyGems will revert to legacy indexes degrading performance.
|
|||
|
||||
assert_equal [@uri], specs.keys
|
||||
|
||||
assert_equal @specs, specs[@uri].sort
|
||||
assert_equal([["a", Gem::Version.new("1"), "ruby"],
|
||||
["a", Gem::Version.new("2"), "ruby"],
|
||||
["a_evil", Gem::Version.new("9"), "ruby"],
|
||||
["c", Gem::Version.new("1.2"), "ruby"],
|
||||
["pl", Gem::Version.new("1"), "i386-linux"]],
|
||||
specs[@uri].sort)
|
||||
end
|
||||
|
||||
def test_list_cache
|
||||
|
@ -307,7 +314,12 @@ RubyGems will revert to legacy indexes degrading performance.
|
|||
|
||||
specs = @sf.list true
|
||||
|
||||
assert_equal [@specs], specs.values, 'specs file not loaded'
|
||||
assert_equal([[["a", Gem::Version.new("1"), "ruby"],
|
||||
["a", Gem::Version.new("2"), "ruby"],
|
||||
["a_evil", Gem::Version.new("9"), "ruby"],
|
||||
["c", Gem::Version.new("1.2"), "ruby"],
|
||||
["pl", Gem::Version.new("1"), "i386-linux"]]],
|
||||
specs.values, 'specs file not loaded')
|
||||
end
|
||||
|
||||
def test_list_prerelease
|
||||
|
@ -320,8 +332,10 @@ RubyGems will revert to legacy indexes degrading performance.
|
|||
specs = @sf.load_specs @uri, 'specs'
|
||||
|
||||
expected = [
|
||||
['a', Gem::Version.new('1.a'), Gem::Platform::RUBY],
|
||||
['a', Gem::Version.new(1), Gem::Platform::RUBY],
|
||||
['a', Gem::Version.new(2), Gem::Platform::RUBY],
|
||||
['a', Gem::Version.new('3.a'), Gem::Platform::RUBY],
|
||||
['a_evil', Gem::Version.new(9), Gem::Platform::RUBY],
|
||||
['c', Gem::Version.new('1.2'), Gem::Platform::RUBY],
|
||||
['pl', Gem::Version.new(1), 'i386-linux'],
|
||||
|
|
|
@ -566,7 +566,7 @@ end
|
|||
'i386-mswin32_80' => 'a-1-x86-mswin32-80',
|
||||
'i386-mingw32' => 'a-1-x86-mingw32'
|
||||
}
|
||||
|
||||
|
||||
test_cases.each do |arch, expected|
|
||||
util_set_arch arch
|
||||
@a1.platform = 'current'
|
||||
|
|
|
@ -199,7 +199,7 @@ class TestGemVersion < RubyGemTestCase
|
|||
refute Gem::Version.new('2.9').prerelease?
|
||||
refute Gem::Version.new('22.1.50.0').prerelease?
|
||||
end
|
||||
|
||||
|
||||
def test_release
|
||||
assert_equal Gem::Version.new('1.2.0'), Gem::Version.new('1.2.0.a').release
|
||||
assert_equal Gem::Version.new('1.1'), Gem::Version.new('1.1.rc10').release
|
||||
|
@ -219,7 +219,7 @@ class TestGemVersion < RubyGemTestCase
|
|||
assert_adequate( "1.4.5", "~> 1.4.4")
|
||||
assert_inadequate("1.5", "~> 1.4.4")
|
||||
assert_inadequate("2.0", "~> 1.4.4")
|
||||
|
||||
|
||||
assert_inadequate("1.1.pre", "~> 1.0.0")
|
||||
assert_adequate( "1.1.pre", "~> 1.1")
|
||||
assert_inadequate("2.0.a", "~> 1.0")
|
||||
|
|
Loading…
Reference in a new issue