[DRE-commits] [rubygems-integration] 01/10: Add /usr/lib/$(triplet)/rubygems-integration/$(ruby_version) to Gem.path
Antonio Terceiro
terceiro at moszumanska.debian.org
Wed Jun 17 22:17:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository rubygems-integration.
commit d3e9aae539b4332829ad3f2014a64f6d2db33f71
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date: Thu Oct 2 11:32:25 2014 -0300
Add /usr/lib/$(triplet)/rubygems-integration/$(ruby_version) to Gem.path
---
debian/changelog | 8 ++++++++
lib/rubygems/defaults/operating_system.rb | 6 +++++-
spec/rubygems_integration_spec.rb | 5 +++++
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 8a1041a..eddbed8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+rubygems-integration (1.9) UNRELEASED; urgency=medium
+
+ * Include /usr/lib/$(triplet)/rubygems-integration/$(ruby_version) in the
+ Rubygems path. This will be used to support Debian packages that install
+ as "proper gems".
+
+ -- Antonio Terceiro <terceiro at debian.org> Thu, 02 Oct 2014 11:24:35 -0300
+
rubygems-integration (1.8) unstable; urgency=medium
[ Antonio Terceiro ]
diff --git a/lib/rubygems/defaults/operating_system.rb b/lib/rubygems/defaults/operating_system.rb
index 799a220..0df294d 100644
--- a/lib/rubygems/defaults/operating_system.rb
+++ b/lib/rubygems/defaults/operating_system.rb
@@ -22,8 +22,12 @@ class << Gem
extra_path = File.join('/usr/share/rubygems-integration', '2.1')
end
+ arch = Gem::ConfigMap[:arch]
+ api_version = Gem::ConfigMap[:ruby_version]
+
upstream_default_path + [
- File.join('/usr/share/rubygems-integration', Gem::ConfigMap[:ruby_version]),
+ "/usr/lib/#{arch}/rubygems-integration/#{api_version}",
+ File.join('/usr/share/rubygems-integration', api_version),
extra_path,
'/usr/share/rubygems-integration/all'
].compact
diff --git a/spec/rubygems_integration_spec.rb b/spec/rubygems_integration_spec.rb
index 2cc1a5d..9894e43 100644
--- a/spec/rubygems_integration_spec.rb
+++ b/spec/rubygems_integration_spec.rb
@@ -4,6 +4,7 @@ require 'rbconfig'
require 'rubygems/defaults/operating_system'
$RUBY_VERSION = RbConfig::CONFIG['ruby_version']
+$ARCH = `dpkg-architecture -qDEB_HOST_MULTIARCH`.strip
class RubygemsIntegrationSpec < MiniTest::Spec
it 'puts gems in /var/lib/gems/VERSION by default' do
@@ -17,4 +18,8 @@ class RubygemsIntegrationSpec < MiniTest::Spec
it 'includes /usr/share/rubygems-integration/VERSION in Gem.path' do
Gem.default_path.must_include '/usr/share/rubygems-integration/' + $RUBY_VERSION
end
+
+ it 'includes /usr/lib/ARCH/rubygems-integration/VERSION in Gem.path' do
+ Gem.default_path.must_include "/usr/lib/#{$ARCH}/rubygems-integration/#{$RUBY_VERSION}"
+ 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