~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to debian/patches/202_gem_default_dir.diff

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 202_gem_default_dir.dpatch by akira yamada <akira@debian.org>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Adjust the default RubyGems directory.
6
 
 
7
 
@DPATCH@
8
 
Index: b/lib/rubygems/defaults.rb
9
 
===================================================================
10
 
--- a/lib/rubygems/defaults.rb  2010-07-20 21:45:46.000000000 +0900
11
 
+++ b/lib/rubygems/defaults.rb  2010-07-20 21:46:13.000000000 +0900
12
 
@@ -15,13 +15,17 @@
13
 
   ##
14
 
   # Default home directory path to be used if an alternate value is not
15
 
   # specified in the environment
16
 
-
17
 
+  #
18
 
+  # Debian patch: search order of this directory.
19
 
+  #   1. GEM_HOME enviroment variable
20
 
+  #      (Using this, Gems are to be installed in any path as you like)
21
 
+  #   2. /var/lib/gems/{ruby version} (This is the default path in Debian system)
22
 
   def self.default_dir
23
 
     if defined? RUBY_FRAMEWORK_VERSION then
24
 
       File.join File.dirname(ConfigMap[:sitedir]), 'Gems',
25
 
                 ConfigMap[:ruby_version]
26
 
     else
27
 
-      ConfigMap[:sitelibdir].sub(%r'/site_ruby/(?=[^/]+)', '/gems/')
28
 
+      File.join('/var/lib', 'gems', ConfigMap[:ruby_version])
29
 
     end
30
 
   end
31