[DRE-commits] [gem2deb] 01/08: move test_runner.rb to a standalone binary
Cédric Boutillier
boutil at moszumanska.debian.org
Mon Aug 11 13:28:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch autopkgtest
in repository gem2deb.
commit 618f565c8e12bc9404f2f82e6ad563557d47b0e4
Author: Cédric Boutillier <boutil at debian.org>
Date: Tue Jul 29 14:03:09 2014 +0200
move test_runner.rb to a standalone binary
---
bin/gem2deb-test-runner | 37 +++++++++++++++++++++++++++++++++++++
lib/gem2deb/test_runner.rb | 16 ----------------
2 files changed, 37 insertions(+), 16 deletions(-)
diff --git a/bin/gem2deb-test-runner b/bin/gem2deb-test-runner
new file mode 100755
index 0000000..e5b51a2
--- /dev/null
+++ b/bin/gem2deb-test-runner
@@ -0,0 +1,37 @@
+#!/usr/bin/ruby
+
+# Copyright © 2011, Lucas Nussbaum <lucas at debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+require 'rbconfig'
+require 'fileutils'
+
+require 'gem2deb/test_runner'
+
+if $PROGRAM_NAME == __FILE__
+ autopkgtest = false
+
+ if ARGV.length == 1 && ARGV.first == '--autopkgtest'
+ autopkgtest = true
+ elsif ARGV.length != 0
+ puts "usage: #{File.basename($PROGRAM_NAME)} [--autopkgtest]"
+ exit(1)
+ end
+
+ runner = Gem2Deb::TestRunner.detect
+ runner.autopkgtest = autopkgtest
+ runner.run_tests
+end
+
diff --git a/lib/gem2deb/test_runner.rb b/lib/gem2deb/test_runner.rb
index 1b04539..ad8e5c7 100644
--- a/lib/gem2deb/test_runner.rb
+++ b/lib/gem2deb/test_runner.rb
@@ -173,19 +173,3 @@ module Gem2Deb
end
end
-
-if $PROGRAM_NAME == __FILE__
- autopkgtest = false
-
- if ARGV.length == 1 && ARGV.first == '--autopkgtest'
- autopkgtest = true
- elsif ARGV.length != 0
- puts "usage: #{File.basename($PROGRAM_NAME)} [--autopkgtest]"
- exit(1)
- end
-
- runner = Gem2Deb::TestRunner.detect
- runner.autopkgtest = autopkgtest
- runner.run_tests
-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