[DRE-commits] [gem2deb] 05/05: make dh-make-ruby idempotent
Antonio Terceiro
terceiro at moszumanska.debian.org
Sun May 17 03:05:33 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 3f003c28251dc4d40434042de3bcf35cb5bb106c
Author: Antonio Terceiro <terceiro at debian.org>
Date: Sat May 16 23:53:02 2015 -0300
make dh-make-ruby idempotent
- always create test suite files unconditionally
- add integration test for idempotency
---
debian/changelog | 1 +
lib/gem2deb/dh_make_ruby.rb | 4 +---
test/integration/dh_make_ruby_integration_test.rb | 12 ++++++++++++
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index fa55219..7fe6800 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ gem2deb (0.17) UNRELEASED; urgency=medium
packaging, or -w/--overwrite was passed.
- when acting on an existing source package, read the source package name
from debian/changelog.
+ - always create test suite files to make dh-make-ruby idempotent
-- Antonio Terceiro <terceiro at debian.org> Sat, 16 May 2015 22:51:18 -0300
diff --git a/lib/gem2deb/dh_make_ruby.rb b/lib/gem2deb/dh_make_ruby.rb
index b7afc4b..cd67775 100644
--- a/lib/gem2deb/dh_make_ruby.rb
+++ b/lib/gem2deb/dh_make_ruby.rb
@@ -372,9 +372,7 @@ module Gem2Deb
end
def test_suite
- if !Gem2Deb::TestRunner.detect
- test_suite_rspec or test_suite_yaml or test_suite_rb
- end
+ test_suite_rspec or test_suite_yaml or test_suite_rb
end
def test_suite_rspec
diff --git a/test/integration/dh_make_ruby_integration_test.rb b/test/integration/dh_make_ruby_integration_test.rb
index 1bc9d2e..5b6786d 100644
--- a/test/integration/dh_make_ruby_integration_test.rb
+++ b/test/integration/dh_make_ruby_integration_test.rb
@@ -15,5 +15,17 @@ class DhMakeRubyIntegrationTest < Gem2DebTestCase
run_command("dh-make-ruby #{target_dir}")
end
+ should 'be idempotent with --overwrite' do
+ target_dir = File.join(tmpdir, 'pkg')
+ FileUtils.cp_r(SIMPLE_GIT, target_dir)
+
+ run_command("dh-make-ruby #{target_dir}")
+ FileUtils.cp_r(target_dir, target_dir + '.old')
+
+ run_command("dh-make-ruby --overwrite #{target_dir}")
+
+ assert_equal '', `diff -Nru #{target_dir}.old #{target_dir}`.strip
+ end
+
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