[DRE-commits] [rubygems-integration] 02/03: Add workaround ruby2.1-specific gemspecs in the wrong place

Antonio Terceiro terceiro at moszumanska.debian.org
Wed Apr 30 13:57:08 UTC 2014


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository rubygems-integration.

commit fd8200755d942d990d50eb1dd4d0cb00c238159f
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Wed Apr 30 10:50:32 2014 -0300

    Add workaround ruby2.1-specific gemspecs in the wrong place
    
    from wrong path used by gem2deb (Closes: #746470) . The definitive fix belongs in gem2deb and is making it install the gemspecs to the correct place so that rubygems-integration does not have to be changed again when the next version comes.
---
 debian/changelog                          |  6 ++++++
 lib/rubygems/defaults/operating_system.rb | 11 ++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 5656fe4..6cdaaeb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,12 @@ rubygems-integration (1.7) UNRELEASED; urgency=medium
 
   * Drop dependency on Ruby, since the interpreters now actually depend on
     this package.
+  * Add workaround for loading ruby2.1-specific gemspecs from wrong path used
+    by gem2deb (Closes: #746470)
+    .
+    The definitive fix belongs in gem2deb and is making it install the
+    gemspecs to the correct place so that rubygems-integration does not have
+    to be changed again when the next version comes.
 
  -- Antonio Terceiro <terceiro at debian.org>  Wed, 30 Apr 2014 10:25:57 -0300
 
diff --git a/lib/rubygems/defaults/operating_system.rb b/lib/rubygems/defaults/operating_system.rb
index 5a28b9f..b443c85 100644
--- a/lib/rubygems/defaults/operating_system.rb
+++ b/lib/rubygems/defaults/operating_system.rb
@@ -14,7 +14,16 @@ class << Gem
 
   alias :upstream_default_path :default_path
   def default_path
-    upstream_default_path + [File.join('/usr/share/rubygems-integration', Gem::ConfigMap[:ruby_version]), '/usr/share/rubygems-integration/all']
+    extra_path = nil
+    if RbConfig::CONFIG['ruby_version'] == '2.1.0'
+      extra_path = File.join('/usr/share/rubygems-integration', '2.1')
+    end
+
+    upstream_default_path + [
+      File.join('/usr/share/rubygems-integration', Gem::ConfigMap[:ruby_version]),
+      extra_path,
+      '/usr/share/rubygems-integration/all'
+    ].compact
   end
 
 end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/rubygems-integration.git



More information about the Pkg-ruby-extras-commits mailing list