New features since 1.3.1: * 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. * `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?
44 lines
1.8 KiB
Text
44 lines
1.8 KiB
Text
$NetBSD: patch-ah,v 1.5 2009/06/10 21:44:31 minskim Exp $
|
|
|
|
--- lib/rubygems.rb.orig 2009-05-21 14:44:06.000000000 -0700
|
|
+++ lib/rubygems.rb
|
|
@@ -396,7 +396,13 @@ module Gem
|
|
##
|
|
# The path where gem executables are to be installed.
|
|
|
|
- def self.bindir(install_dir=Gem.dir)
|
|
+ def self.bindir(install_dir=Gem.dir, install_root=nil)
|
|
+ unless install_root.nil?
|
|
+ install_root_path = Pathname.new install_root
|
|
+ install_dir_path = Pathname.new install_dir
|
|
+ install_dir_path = install_dir_path.relative_path_from install_root_path
|
|
+ install_dir = install_dir_path.expand_path File::SEPARATOR
|
|
+ end
|
|
return File.join(install_dir, 'bin') unless
|
|
install_dir.to_s == Gem.default_dir
|
|
Gem.default_bindir
|
|
@@ -637,12 +643,12 @@ module Gem
|
|
##
|
|
# The index to insert activated gem paths into the $LOAD_PATH.
|
|
#
|
|
- # Defaults to the site lib directory unless gem_prelude.rb has loaded paths,
|
|
+ # Defaults to the vendor lib directory unless gem_prelude.rb has loaded paths,
|
|
# then it inserts the activated gem's paths before the gem_prelude.rb paths
|
|
# so you can override the gem_prelude.rb default $LOAD_PATH paths.
|
|
|
|
def self.load_path_insert_index
|
|
- index = $LOAD_PATH.index ConfigMap[:sitelibdir]
|
|
+ index = $LOAD_PATH.index ConfigMap[:vendorlibdir]
|
|
|
|
$LOAD_PATH.each_with_index do |path, i|
|
|
if path.instance_variables.include?(:@gem_prelude_index) or
|
|
@@ -750,7 +756,8 @@ module Gem
|
|
def self.prefix
|
|
prefix = File.dirname File.expand_path(__FILE__)
|
|
|
|
- if File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or
|
|
+ if File.dirname(prefix) == File.expand_path(ConfigMap[:vendorlibdir]) or
|
|
+ File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or
|
|
File.dirname(prefix) == File.expand_path(ConfigMap[:libdir]) or
|
|
'lib' != File.basename(prefix) then
|
|
nil
|