<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,16 +3,20 @@ class WarningShot::ManualResolver
   order  10000
   branch :manual
   
-  description 'A glorified todo list of things that need to be resolved manually'
+  description 'A glorified todo list of things that need to be done manually'
       
   cli(&quot;--notes&quot;, &quot;List all the notes in the manual branch&quot;) do |val|
     WarningShot::Resolver.descendants.each{|d| d.disable!}
     self.enable!
     
-    config = WarningShot::Config.parse_args
-    config[:verbosity] = :verbose
+    #REmove any occurance of --notes
+    args = ARGV - ARGV.find_all{|x| x =~ /--notes/i}
+    config = WarningShot::Config.parse_args(args)
     
+    config[:verbosity] = :verbose
+
     dr = WarningShot::DependencyResolver.new(config)    
+
     dr.dependency_tree[:manual].each { |note| puts &quot;~ #{note}&quot; }
     
     exit
@@ -25,7 +29,7 @@ class WarningShot::ManualResolver
     NoteResource.new(note)
   end
   
-  register :test do |dep|
-    logger.info &quot; ~ #{dep.msg}&quot;
-  end
+  before(:test){logger.info &quot;\nReminders:&quot;}
+  register(:test){|dep| logger.info &quot; ~ #{dep.msg}&quot;}
+  after(:test){ logger.info &quot;&quot;}  
 end
\ No newline at end of file</diff>
      <filename>lib/resolvers/manual_resolver.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,7 +29,7 @@ module WarningShot
       :oload        =&gt; [],
       :environment  =&gt; 'development',
       :resolve      =&gt; false,
-      :config_paths =&gt; ['.'  / 'config' / 'warningshot', '~' / '.warningshot'],
+      :config_paths =&gt; ['.'  / 'config' / 'warningshot' / &quot;*.{yml,yaml}&quot;, '~' / '.warningshot' / &quot;*.{yml,yaml}&quot;],
       :application  =&gt; '.',
       :log_path     =&gt; '.' / 'log' / 'warningshot.log',
       :log_level    =&gt; :info,
@@ -94,7 +94,9 @@ module WarningShot
         WarningShot::Config::DEFAULTS.clone.merge(opt_config)
       end
       
-      def parse_args(argv = ARGV)
+      def parse_args(argv=nil)
+        argv ||= ARGV.clone
+        
         @@cli_options = {}
         @@cli_options[:environment] = ENV[&quot;WARNING_SHOT_ENV&quot;] if ENV[&quot;WARNING_SHOT_ENV&quot;]
       
@@ -111,10 +113,10 @@ module WarningShot
         WarningShot::Config::PARSER.on(&quot;--resolve&quot;,&quot;Resolve missing dependencies (probably need sudo)&quot;) do |resolve|
           @@cli_options[:resolve] = resolve
         end
-        WarningShot::Config::PARSER.on(&quot;-a=PATH&quot;,&quot;--app=PATH&quot;, String, &quot;Path to application&quot;, &quot;Default: #{DEFAULTS[:application]}&quot;) do |app|
+        WarningShot::Config::PARSER.on(&quot;-a=PATH&quot;,&quot;--app=PATH&quot;, String, &quot;Path to application (Base for all relative paths)&quot;, &quot;Default: #{DEFAULTS[:application]}&quot;) do |app|
           @@cli_options[:application] = app
         end
-        WarningShot::Config::PARSER.on(&quot;-c=PATH&quot;,&quot;--configs=PATH&quot;, String,&quot;Path to config directories (':' seperated)&quot;,&quot;Default: #{DEFAULTS[:config_paths].join(':')}&quot;) do |config|
+        WarningShot::Config::PARSER.on(&quot;-c=PATH&quot;,&quot;--configs=PATH&quot;, String,&quot;Globs to config files (':' seperated)&quot;,&quot;Default: #{DEFAULTS[:config_paths].join(':')}&quot;) do |config|
           @@cli_options[:config_paths] = config.split(':')
         end
         </diff>
      <filename>lib/warningshot/config.rb</filename>
    </modified>
    <modified>
      <diff>@@ -155,9 +155,7 @@ module WarningShot
       self[:config_paths].each do |config_path|
         @logger.debug &quot;Parsing config: #{config_path}&quot;
         #Parse the global/running env configs out of the YAML files.
-        Dir[config_path / WarningShot::RecipeExt].each do |config_file|
-          # Use WarningShot::RecipeExt &amp; regexp on extension to make supporting add'l
-          # file types easier in the future
+        Dir[config_path].each do |config_file|
           case File.extname(config_file)
           when /.y(a)?ml/
             parse_yml config_file
@@ -179,12 +177,11 @@ module WarningShot
     #
     # @api protected
     def parse_yml(file)
-      #if only on branch is specified in a yaml file it may not come back as an array
+      #if only one branch is specified in a yaml file it may not come back as an array
       branches  = YAML::load(File.open(file,'r'))
 
-      if branches === false
-        @logger.error &quot;Skipping malformed Yaml file: #{file}&quot;
-        return
+      unless branches.is_a?(Array) || branches.is_a?(Hash)
+        raise Exception, &quot;Malformed config file: #{file}&quot;
       end
 
       #Support for multiple dep branches in one file
@@ -206,6 +203,8 @@ module WarningShot
         #remove nil's if they made it into branch somehow (bad yaml probably)
         @dependency_tree[branch_name].delete(nil)
       end
+    rescue Exception =&gt; ex
+      @logger.error ex.message
     end
 
   end</diff>
      <filename>lib/warningshot/dependency_resolver.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ module WarningShot
       end
     
       def generate_configs(path)
-        from  = WarningShot.dir_for(:templates) / WarningShot::RecipeExt
+        from  = WarningShot.dir_for(:templates) / &quot;*.{yml,yaml}&quot;
         copy_templates from, path
       end
       </diff>
      <filename>lib/warningshot/template_generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,8 +13,6 @@ module WarningShot
     :images     =&gt; 'images',
     :resolvers  =&gt; 'lib' / 'resolvers'
   }
-
-  RecipeExt = &quot;*.{yml,yaml}&quot;.freeze
   
   class &lt;&lt; self
     def register_application_type(type,&amp;block)</diff>
      <filename>lib/warningshot/warning_shot.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 describe WarningShot::DependencyResolver do
   before :all do
     @config = WarningShot::Config.create({
-      :config_paths =&gt; [$test_data],
+      :config_paths =&gt; [$test_data / &quot;*.{yml,yaml}&quot;],
       :environment =&gt; 'rspec',
       :log_path =&gt; $log_file
     })
@@ -9,8 +9,8 @@ describe WarningShot::DependencyResolver do
   end
   
   it 'should accept a glob to find config files' do
-    # Consider taking a glob instead of a set of paths
-    pending
+    dr = WarningShot::DependencyResolver.new(@config)
+    dr.dependency_tree.length.should_not be(0)
   end
   
   it 'should create a dependency tree from a set of config files' do    </diff>
      <filename>test/spec/unit/warningshot/dependency_resolver_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@ describe WarningShot::TemplateGenerator do
   end
   
   it &quot;should have generate YAML config files&quot; do
-    yaml_files = Dir[@test_path / WarningShot::RecipeExt]
+    yaml_files = Dir[@test_path / &quot;*.{yml,yaml}&quot;]
     yaml_files.empty?.should be(false)
   end
   </diff>
      <filename>test/spec/unit/warningshot/template_generator_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f1bdcb79f2e57fa1c25497b4e5cf690d58d4e812</id>
    </parent>
  </parents>
  <author>
    <name>Cory ODaniel</name>
    <email>contact@coryodaniel.com</email>
  </author>
  <url>http://github.com/coryodaniel/warningshot/commit/0d89cc7dbc9daa15354821d635efe775bda751b7</url>
  <id>0d89cc7dbc9daa15354821d635efe775bda751b7</id>
  <committed-date>2009-02-05T19:32:09-08:00</committed-date>
  <authored-date>2009-02-05T19:32:09-08:00</authored-date>
  <message>Config clones before use to preserve origian args
fix for manual resolver
fix for how globbing done for config files</message>
  <tree>3ee790034c3b9daf0021bf817e706c9dfd21dc2d</tree>
  <committer>
    <name>Cory ODaniel</name>
    <email>contact@coryodaniel.com</email>
  </committer>
</commit>
