<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,12 +10,9 @@ module Unravler
   class CLI
     def self.execute(stdout, arguments=[])
 
-      # NOTE: the option -p/--path= is given as an example, and should be replaced in your application.
-
-      options = {
-        :path     =&gt; '~'
-      }
       mandatory_options = %w(  )
+      
+      options = { :mode =&gt; :full }
 
       parser = OptionParser.new do |opts|
         opts.banner = &lt;&lt;-BANNER.gsub(/^          /,'')
@@ -28,20 +25,35 @@ module Unravler
           Options are:
         BANNER
         opts.separator &quot;&quot;
-        # opts.on(&quot;-p&quot;, &quot;--path=PATH&quot;, String,
-        #         &quot;This is a sample message.&quot;,
-        #         &quot;For multiple lines, add more strings.&quot;,
-        #         &quot;Default: ~&quot;) { |arg| options[:path] = arg }
+        opts.on(&quot;-p&quot;, &quot;--print&quot;,
+                &quot;Print a la rake gems.&quot;) { options[:mode] = :print }
+        opts.on(&quot;-d&quot;, &quot;--dump&quot;,
+                &quot;Dump gem dependencies.&quot;) { options[:mode] = :dump }
+        opts.on(&quot;-t&quot;, &quot;--tree&quot;,
+                &quot;Pretty print the package tree.&quot;) { options[:mode] = :tree }
         opts.on(&quot;-h&quot;, &quot;--help&quot;,
                 &quot;Show this help message.&quot;) { stdout.puts opts; exit }
         opts.parse!(arguments)
 
-        if mandatory_options &amp;&amp; mandatory_options.find { |option| options[option.to_sym].nil? } || 0 == ARGV.size
+        if mandatory_options &amp;&amp; \
+          mandatory_options.find { |option| options[option.to_sym].nil? } \
+          || (:full == options[:mode] &amp;&amp; 0 == ARGV.size)
           stdout.puts opts; exit
         end
-        
-        case arguments[0]
 
+      end
+      
+      case options[:mode]
+      when :print
+        PrintExtractor.new.run
+      when :dump
+        DumpExtractor.new.run
+      when :tree
+        TreeExtractor.new.run
+
+      when :full
+
+        case arguments[0]
         when 'create'
           if 2 != ARGV.size
             stdout.puts opts; exit
@@ -51,10 +63,8 @@ module Unravler
 
         when 'push'
           appname = File.read(APPNAME_FILE).strip
-          packages = GemExtractor.new(options).run
-          packages += DatabaseExtractor.new(options).run
-          packages += ScmExtractor.new(options).run
-          packages += PluginExtractor.new(options).run
+          packages = \
+            FullExtractor.new(options).run
 
           # write .unravler file ready for upload to webservice
           File.open(DEPS_FILE, 'w') { |f|
@@ -63,9 +73,8 @@ module Unravler
               :packages =&gt; packages
             }.to_yaml)
           }
-
-        else
-          stdout.puts opts; exit
+        
+          puts &quot;Pushed dependencies for #{appname} to unravler.com&quot;
         end
       end
 </diff>
      <filename>gem/unravler/lib/unravler/cli.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>93b3c7ffb2c897d53d7d9fb822993a41438603e2</id>
    </parent>
  </parents>
  <author>
    <name>Klaas Jan Wierenga</name>
    <email>k.j.wierenga@gmail.com</email>
  </author>
  <url>http://github.com/LeipeLeon/Dev-Enter/commit/e704bbfa36e6a8445aa1ab9e51fd44514162346b</url>
  <id>e704bbfa36e6a8445aa1ab9e51fd44514162346b</id>
  <committed-date>2009-10-31T07:37:31-07:00</committed-date>
  <authored-date>2009-10-31T07:37:31-07:00</authored-date>
  <message>cleanup argument processing</message>
  <tree>e6219ee14dc6fed490c245c4d551a47992a1b851</tree>
  <committer>
    <name>Klaas Jan Wierenga</name>
    <email>k.j.wierenga@gmail.com</email>
  </committer>
</commit>
