[DRE-commits] [gem2deb] 03/07: gem2deb-test-runner: run the bundled rake instead
Antonio Terceiro
terceiro at moszumanska.debian.org
Wed Jul 22 01:54:35 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 e95d33f0cb28915603ec30b89c13066c15293588
Author: Antonio Terceiro <terceiro at debian.org>
Date: Tue Jul 21 22:20:03 2015 -0300
gem2deb-test-runner: run the bundled rake instead
And drop the dependency on the standalone rake package
---
debian/changelog | 2 +-
debian/control | 3 +--
lib/gem2deb/test_runner.rb | 15 ++++++++++++---
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index bd17e74..d82644f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,7 +3,7 @@ gem2deb (0.20) UNRELEASED; urgency=medium
* gem2deb-test-runner:
- when checking dependencies, don't add rubygems-integration paths from
different Ruby versions to GEM_PATH.
- - add dependency on rake, and simplify the command line that runs rake.
+ - simplify the command line that runs rake
- gem2deb/rake/testtask: Use options to make all test runs verbose by
default
- gem2deb/rake/spectask: add a utility task for running tests with rspec
diff --git a/debian/control b/debian/control
index a277f42..65b9c44 100644
--- a/debian/control
+++ b/debian/control
@@ -49,8 +49,7 @@ Description: Debian Ruby packaging suite
Package: gem2deb-test-runner
Architecture: all
-Depends: rake,
- ruby | ruby-interpreter,
+Depends: ruby | ruby-interpreter,
ruby-minitest,
ruby-test-unit,
${misc:Depends},
diff --git a/lib/gem2deb/test_runner.rb b/lib/gem2deb/test_runner.rb
index 2b8f9de..b500a87 100644
--- a/lib/gem2deb/test_runner.rb
+++ b/lib/gem2deb/test_runner.rb
@@ -95,9 +95,18 @@ module Gem2Deb
required_file && File.exist?(required_file)
end
- def run_ruby(*cmd)
+
+ def run_ruby(*args)
+ run(rubyver, *args)
+ end
+
+ def run_rake(*args)
+ run(rubyver.sub('ruby', 'rake'), *args)
+ end
+
+ def run(program, *args)
rubylib = load_path.join(':')
- cmd.unshift(rubyver)
+ cmd = [program] + args
rlib = (ENV['RUBYLIB'] ? ENV['RUBYLIB'] + ':' : '') + rubylib
puts "RUBYLIB=#{rubylib} " + cmd.shelljoin
@@ -173,7 +182,7 @@ module Gem2Deb
end
def do_run_tests
puts "Running tests for #{rubyver} using debian/ruby-tests.rake ..."
- run_ruby('-S', 'rake', '-f', 'debian/ruby-tests.rake')
+ run_rake('-f', 'debian/ruby-tests.rake')
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