[DRE-commits] [gem2deb] 01/01: fix conversion of gem names with uppercase characters
Antonio Terceiro
terceiro at moszumanska.debian.org
Fri Apr 10 08:50:17 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 8113b172bbd9e02a547bdc91391d9ce66bacdc01
Author: Antonio Terceiro <terceiro at debian.org>
Date: Fri Apr 10 10:50:10 2015 +0200
fix conversion of gem names with uppercase characters
---
debian/changelog | 7 +++++++
lib/gem2deb/dh_make_ruby.rb | 2 +-
test/unit/dh_make_ruby_test.rb | 8 ++++++++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 7c3adb9..eec0693 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+gem2deb (0.14) UNRELEASED; urgency=medium
+
+ * dh-make-ruby: fix conversion of gem names with uppercase characters into
+ debian package names
+
+ -- Antonio Terceiro <terceiro at debian.org> Fri, 10 Apr 2015 10:49:34 +0200
+
gem2deb (0.13) experimental; urgency=medium
[ Antonio Terceiro ]
diff --git a/lib/gem2deb/dh_make_ruby.rb b/lib/gem2deb/dh_make_ruby.rb
index 4c39f1f..e145d90 100644
--- a/lib/gem2deb/dh_make_ruby.rb
+++ b/lib/gem2deb/dh_make_ruby.rb
@@ -107,7 +107,7 @@ module Gem2Deb
end
def gem_name_to_source_package_name(gem_name)
- @gem_to_package[gem_name] || 'ruby-' + gem_name.gsub(/^ruby[-_]|[-_]ruby$/, '')
+ @gem_to_package[gem_name] || 'ruby-' + gem_name.downcase.gsub(/^ruby[-_]|[-_]ruby$/, '')
end
def generate_or_update_gem_to_package_data
diff --git a/test/unit/dh_make_ruby_test.rb b/test/unit/dh_make_ruby_test.rb
index aca2a2c..883ef72 100644
--- a/test/unit/dh_make_ruby_test.rb
+++ b/test/unit/dh_make_ruby_test.rb
@@ -30,6 +30,14 @@ class DhMakeRubyTest < Gem2DebTestCase
assert_equal 'ruby-foo', Gem2Deb::DhMakeRuby.new('foo_ruby-1.2.3.tar.gz').source_package_name
end
+ should 'properly convert CFPropertyList to debian package name' do
+ assert_equal 'ruby-cfpropertylist', Gem2Deb::DhMakeRuby.new('CFPropertyList-1.2.3.tar.gz').source_package_name
+ end
+
+ should 'properly convert Fancy_Package to debian package name' do
+ assert_equal 'ruby-fancy-package', Gem2Deb::DhMakeRuby.new('Fancy_Package-1.2.3.tar.gz').source_package_name
+ end
+
should 'use #nnnn if no ITP bug exists' do
@dh_make_ruby = Gem2Deb::DhMakeRuby.new('ruby_foo-1.2.3.tar.gz', :do_wnpp_check => true)
@dh_make_ruby.stubs(:wnpp_check).returns('')
--
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