[DRE-commits] [gem2deb] 01/03: dh_ruby: install gemspecs to paths using API_VERSION

Antonio Terceiro terceiro at moszumanska.debian.org
Wed Jun 17 22:45:58 UTC 2015


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

terceiro pushed a commit to branch master
in repository gem2deb.

commit 122e407e37fdfb44c1e4b3f5e91ea6efe69ef209
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Wed Jun 17 19:08:07 2015 -0300

    dh_ruby: install gemspecs to paths using API_VERSION
---
 debian/changelog          | 2 ++
 lib/gem2deb/installer.rb  | 2 +-
 test/test_helper.rb       | 1 +
 test/unit/dh_ruby_test.rb | 2 +-
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2481a6b..d8c720c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ gem2deb (0.18.2) UNRELEASED; urgency=medium
     all, no even an empty one. This fixes dependency checks under autopkgtest.
   * dh-make-ruby: convert *all* underscores (`_`) to dashes (`-`) when
     converting gem names to source package names (not just the first one).
+  * dh_ruby: install gemspecs to rubygems-integration directories using
+    API_VERSION (e.g. 2.2.0) and not the short version (e.g. 2.2)
 
  -- Antonio Terceiro <terceiro at debian.org>  Sat, 13 Jun 2015 12:13:45 -0300
 
diff --git a/lib/gem2deb/installer.rb b/lib/gem2deb/installer.rb
index 845e93f..e5a10e1 100644
--- a/lib/gem2deb/installer.rb
+++ b/lib/gem2deb/installer.rb
@@ -72,7 +72,7 @@ module Gem2Deb
       if metadata.gemspec
         versions =
           if metadata.has_native_extensions?
-            ruby_versions.map { |v| RUBY_CONFIG_VERSION[v] }
+            ruby_versions.map { |v| RUBY_API_VERSION[v] }
           else
             ['all']
           end
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 438de02..c1e8ade 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -18,6 +18,7 @@ Gem2DebTestCase = Test::Unit::TestCase
 class Gem2DebTestCase
 
   SUPPORTED_VERSION_NUMBERS = Gem2Deb::RUBY_CONFIG_VERSION.values.sort
+  SUPPORTED_API_NUMBERS = Gem2Deb::RUBY_API_VERSION.values.sort
 
   OLDER_RUBY_VERSION = Gem2Deb::SUPPORTED_RUBY_VERSIONS.keys.select { |m| m =~ /^ruby/ }.sort.first
   OLDER_RUBY_VERSION_BINARY = Gem2Deb::SUPPORTED_RUBY_VERSIONS[OLDER_RUBY_VERSION]
diff --git a/test/unit/dh_ruby_test.rb b/test/unit/dh_ruby_test.rb
index 3d45b05..8638803 100644
--- a/test/unit/dh_ruby_test.rb
+++ b/test/unit/dh_ruby_test.rb
@@ -113,7 +113,7 @@ class DhRubyTest < Gem2DebTestCase
       should 'install gemspec for simplegem for all interpreters' do
         assert_installed SIMPLE_GEM_DIRNAME, 'ruby-simplegem', "/usr/share/rubygems-integration/all/specifications/simplegem-0.0.1.gemspec"
       end
-    SUPPORTED_VERSION_NUMBERS.each do |version|
+    SUPPORTED_API_NUMBERS.each do |version|
       should 'install gemspec for simpleextension under Ruby ' + version do
         assert_installed SIMPLE_EXTENSION_DIRNAME, 'ruby-simpleextension', "/usr/share/rubygems-integration/#{version}/specifications/simpleextension-1.2.3.gemspec"
       end

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



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