[DRE-commits] [gem2deb] 01/01: Run wrap-and-sort after generation from templates

Lucas Nussbaum lucas at moszumanska.debian.org
Sat May 16 10:27:02 UTC 2015


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

lucas pushed a commit to branch run-wrap-and-sort
in repository gem2deb.

commit d11ee113a49cdaae7c3474887300677855b8ac8f
Author: Lucas Nussbaum <lucas at debian.org>
Date:   Mon May 11 23:00:59 2015 +0200

    Run wrap-and-sort after generation from templates
---
 debian/changelog               | 3 +++
 lib/gem2deb/dh_make_ruby.rb    | 1 +
 test/unit/dh_make_ruby_test.rb | 6 +++---
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4cd68d8..8a75f14 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ gem2deb (0.16) UNRELEASED; urgency=medium
     Closes: #733171
   * bin/dh-make-ruby: use '.' (current directory) as default target.
     Closes: #777747
+  * dh-make-ruby: run wrap-and-sort after generating boilerplate from
+    templates. test/unit/dh_make_ruby_test.rb also had to be modified
+    to robustify the dependencies extractor. Closes: #784556
 
  -- Lucas Nussbaum <lucas at debian.org>  Mon, 11 May 2015 21:10:48 +0200
 
diff --git a/lib/gem2deb/dh_make_ruby.rb b/lib/gem2deb/dh_make_ruby.rb
index 156a4a2..97a883e 100644
--- a/lib/gem2deb/dh_make_ruby.rb
+++ b/lib/gem2deb/dh_make_ruby.rb
@@ -281,6 +281,7 @@ module Gem2Deb
         end
       end
       FileUtils.chmod 0755, 'debian/rules'
+      run('wrap-and-sort')
     end
 
     def templates
diff --git a/test/unit/dh_make_ruby_test.rb b/test/unit/dh_make_ruby_test.rb
index 883ef72..a96f358 100644
--- a/test/unit/dh_make_ruby_test.rb
+++ b/test/unit/dh_make_ruby_test.rb
@@ -134,9 +134,9 @@ class DhMakeRubyTest < Gem2DebTestCase
 
   context 'dependencies' do
     setup do
-      text = File.read(File.join(DEBIANIZED_SIMPLE_GEM, 'debian/control'))
-      line = text.lines.find { |l| l =~ /^Depends: / }.strip
-      @dependencies = line.gsub(/^Depends:\s*/, '').split(/\s*,\s*/)
+      file = File.join(DEBIANIZED_SIMPLE_GEM, 'debian/control')
+      deps = `grep-dctrl -sDepends -n '' #{file}`
+      @dependencies = deps.split(/\s*,\s*/)
     end
     should 'get simple dependency' do
       assert_include @dependencies, 'ruby-dep'

-- 
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