[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Daniel Pittman daniel at puppetlabs.com
Tue May 10 08:13:09 UTC 2011


The following commit has been merged in the experimental branch:
commit 8b13e2b586af60bdef73ac8119b19233c60903ac
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Sun Apr 10 16:56:59 2011 -0700

    maint: watchr should respect personal account-wide defaults.
    
    Previously the rspec.opts file would override any other options configured for
    rspec and, by virtue of being on the command-line, would win against
    configuration files.
    
    Now, where a user configuration file exists in ~/.rspec we ignore the shipped
    set of options.  This allows advanced users to customize without using the
    default (and relatively nasty) default rpsec UI.
    
    Reviewed-By: Matt Robinson <matt at puppetlabs.com>

diff --git a/spec/watchr.rb b/spec/watchr.rb
index 6f952a6..26919d1 100644
--- a/spec/watchr.rb
+++ b/spec/watchr.rb
@@ -80,7 +80,11 @@ end
 def run_spec_files(files)
   files = Array(files)
   return if files.empty?
-  opts = File.readlines('spec/spec.opts').collect { |l| l.chomp }.join(" ")
+  if File.exist?(File.expand_path("~/.rspec")) then
+    opts = ''                   # use the user defaults
+  else
+    opts = File.readlines('spec/spec.opts').collect { |l| l.chomp }.join(" ")
+  end
   run_spec("rspec #{opts} --tty #{files.join(' ')}")
 end
 
@@ -89,12 +93,12 @@ def run_all_tests
 end
 
 def run_all_specs
-  run_test("rake spec")
+  run_spec_files "spec"
 end
 
 def run_suite
-  run_all_tests
   run_all_specs
+  run_all_tests
 end
 
 watch('spec/spec_helper.rb') { run_all_specs }

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list