<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/snipe/configuration.rb</filename>
    </added>
    <added>
      <filename>lib/snipe/error.rb</filename>
    </added>
    <added>
      <filename>lib/snipe/log.rb</filename>
    </added>
    <added>
      <filename>lib/snipe/paths.rb</filename>
    </added>
    <added>
      <filename>spec/log_spec.rb</filename>
    </added>
    <added>
      <filename>spec/paths_spec.rb</filename>
    </added>
    <added>
      <filename>spec/version_spec.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -8,4 +8,4 @@
 $: &lt;&lt; File.expand_path(File.join(File.dirname(__FILE__),&quot;..&quot;,&quot;lib&quot;))
 require 'snipe'
 
-puts &quot;I am the killer app snipe at version #{Snipe::VERSION}!&quot;
+Snipe::Cli.new( ARGV, ENV ).run</diff>
      <filename>bin/snipe</filename>
    </modified>
    <modified>
      <diff>@@ -4,54 +4,14 @@
 #++
 
 module Snipe
+end
 
-  # The root directory of the project is considered to be the parent directory
-  # of the 'lib' directory.
-  #   
-  # returns:: [String] The full expanded path of the parent directory of 'lib'
-  #           going up the path from the current file.  Trailing
-  #           File::SEPARATOR is guaranteed.
-  #   
-  def self.root_dir
-    unless @root_dir
-      path_parts = ::File.expand_path(__FILE__).split(::File::SEPARATOR)
-      lib_index  = path_parts.rindex(&quot;lib&quot;)
-      @root_dir = path_parts[0...lib_index].join(::File::SEPARATOR) + ::File::SEPARATOR
-    end 
-    return @root_dir
-  end 
-
-  # returns:: [String] The full expanded path of the +config+ directory
-  #           below _root_dir_.  All parameters passed in are joined onto the
-  #           result.  Trailing File::SEPARATOR is guaranteed if _args_ are
-  #           *not* present.
-  #   
-  def self.config_path(*args)
-    self.sub_path(&quot;config&quot;, *args)
-  end 
-
-  # returns:: [String] The full expanded path of the +data+ directory below
-  #           _root_dir_.  All parameters passed in are joined onto the 
-  #           result. Trailing File::SEPARATOR is guaranteed if 
-  #           _*args_ are *not* present.
-  #   
-  def self.data_path(*args)
-    self.sub_path(&quot;data&quot;, *args)
-  end 
-
-  # returns:: [String] The full expanded path of the +lib+ directory below
-  #           _root_dir_.  All parameters passed in are joined onto the 
-  #           result. Trailing File::SEPARATOR is guaranteed if 
-  #           _*args_ are *not* present.
-  #   
-  def self.lib_path(*args)
-    self.sub_path(&quot;lib&quot;, *args)
-  end 
+# External requirements
 
-  def self.sub_path(sub,*args)
-    sp = ::File.join(root_dir, sub) + File::SEPARATOR
-    sp = ::File.join(sp, *args) if args
-  end
 
-end
+# Internal requirements
+require 'snipe/paths'
 require 'snipe/version'
+require 'snipe/error'
+require 'snipe/configuration'
+require 'snipe/log'</diff>
      <filename>lib/snipe.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,16 +9,17 @@ module Snipe
     MINOR   = 0
     BUILD   = 1
 
-    def to_a 
+    def self.to_a 
       [MAJOR, MINOR, BUILD]
     end
 
-    def to_s
+    def self.to_s
       to_a.join(&quot;.&quot;)
     end
 
-    module_function :to_a
-    module_function :to_s
+    def self.to_hash
+      { :major =&gt; MAJOR, :minor =&gt; MINOR, :build =&gt; BUILD }
+    end
 
     STRING = Version.to_s
   end</diff>
      <filename>lib/snipe/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,3 +3,56 @@ require 'spec'
 
 $: &lt;&lt; File.expand_path(File.join(File.dirname(__FILE__),&quot;..&quot;,&quot;lib&quot;))
 require 'snipe'
+
+Logging::Logger['Snipe'].level = :all
+module Spec
+  module Log
+    def self.io
+      @io ||= StringIO.new
+    end
+    def self.appender
+      @appender ||= Logging::Appenders::IO.new( &quot;speclog&quot;, io )
+    end
+
+    Logging::Logger['Snipe'].add_appenders( Log.appender )
+
+    def self.layout
+      @layout ||= Logging::Layouts::Pattern.new(
+        :pattern      =&gt; &quot;[%d] %5l %6p %c : %m\n&quot;,
+        :date_pattern =&gt; &quot;%Y-%m-%d %H:%M:%S&quot;
+      )
+    end
+
+    Log.appender.layout = layout
+
+  end
+
+  module Helpers
+    require 'tmpdir'
+    def make_temp_dir( unique_id = $$ )
+      dirname = File.join( Dir.tmpdir, &quot;sst-agent-#{unique_id}&quot; ) 
+      FileUtils.mkdir_p( dirname ) unless File.directory?( dirname )
+      return dirname
+    end
+
+    # the logging output from the test, if that class has any logging
+    def spec_log
+      Log.io.string
+    end
+  end
+end
+
+
+Spec::Runner.configure do |config|
+  include Spec::Helpers
+  config.before do
+    Spec::Log.io.rewind
+    Spec::Log.io.truncate( 0 )
+  end
+
+  config.after do
+    Spec::Log.io.rewind
+    Spec::Log.io.truncate( 0 )
+  end
+end  
+</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,8 +13,8 @@ if spec_config = Configuration.for_if_exist?(&quot;test&quot;) then
       require 'spec/rake/spectask'
       Spec::Rake::SpecTask.new do |r| 
         r.ruby_opts   = spec_config.ruby_opts
-        r.libs        = [ Snipe.lib_path, 
-                          Snipe.root_dir ]
+        r.libs        = [ Snipe::Paths.lib_path, 
+                          Snipe::Paths.root_dir ]
         r.spec_files  = spec_config.files 
         r.spec_opts   = spec_config.options
 </diff>
      <filename>tasks/rspec.rake</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>spec/snipe_spec.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>e949f9e692cb2f64da0c88723c78ff5bb4e8b214</id>
    </parent>
  </parents>
  <author>
    <name>Jeremy Hinegardner</name>
    <email>jeremy@hinegardner.org</email>
  </author>
  <url>http://github.com/copiousfreetime/snipe/commit/20166d1c22719b406eae4f599cc49bc820accda3</url>
  <id>20166d1c22719b406eae4f599cc49bc820accda3</id>
  <committed-date>2009-02-20T23:10:25-08:00</committed-date>
  <authored-date>2009-02-20T23:10:25-08:00</authored-date>
  <message>project basics in</message>
  <tree>9caf2b23fb65cc69c0ecd3bfd994c33e4d897027</tree>
  <committer>
    <name>Jeremy Hinegardner</name>
    <email>jeremy@hinegardner.org</email>
  </committer>
</commit>
