[DRE-commits] [SCM] gem2deb.git branch, master, updated. debian/0.2.3-4-gfb547d8

Antonio Terceiro terceiro at softwarelivre.org
Wed May 11 19:19:38 UTC 2011


The following commit has been merged in the master branch:
commit fbb55504f5ad8d0860c6fb08914d0eeef10a6f60
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Wed May 11 12:05:34 2011 -0700

    Extract logic for running tests to a single method

diff --git a/lib/gem2deb/dh_ruby.rb b/lib/gem2deb/dh_ruby.rb
index 4d6e6c7..4aa6381 100644
--- a/lib/gem2deb/dh_ruby.rb
+++ b/lib/gem2deb/dh_ruby.rb
@@ -120,21 +120,11 @@ module Gem2Deb
           if File::exists?(vendor_dir) and File::exists?(vendor_arch_dir)
             remove_duplicate_files(vendor_dir, vendor_arch_dir)
           end
-          # run tests for this version of ruby
-          if not run_tests(rubyver)
-            supported_versions.delete(rubyver)
-          end
-        end
-      else
-        # run tests for all versions
-        tested_versions = supported_versions
-        tested_versions.each do |rubyver|
-          if not run_tests(rubyver)
-            supported_versions.delete(rubyver)
-          end
         end
       end
 
+      run_tests(supported_versions)
+
       File::open("debian/#{package}.substvars", "a") do |fd|
         fd.puts "ruby:Versions=#{supported_versions.join(' ')}"
       end
@@ -231,7 +221,15 @@ module Gem2Deb
       end
     end
 
-    def run_tests(rubyver)
+    def run_tests(supported_versions)
+      supported_versions.each do |rubyver|
+        if !run_tests_for_version(rubyver)
+          supported_versions.delete(rubyver)
+        end
+      end
+    end
+
+    def run_tests_for_version(rubyver)
       if skip_checks?
         return
       end

-- 
gem2deb.git



More information about the Pkg-ruby-extras-commits mailing list