<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/commands/console.rb</filename>
    </added>
    <added>
      <filename>lib/commands/gen.rb</filename>
    </added>
    <added>
      <filename>lib/commands/help.rb</filename>
    </added>
    <added>
      <filename>lib/commands/start.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,70 +1,27 @@
 #!/usr/bin/env ruby
-require 'rubygems'
-require 'choice'
-require 'rakegen'
-
-# if we're in the waves source, prepend it to the load path
-# waves_lib = File.expand_path( &quot;#{File.dirname(__FILE__)}/../../waves/lib&quot; )
-# $:.unshift waves_lib if File.exist?(waves_lib)
-# require 'waves'
-
-WAVES = &quot;#{File.dirname(__FILE__)}/..&quot; 
 
-require File.join(WAVES, 'lib', 'ext', 'string')
+# WARNING: This strange preamble might look easy to clean-up, but it is needed
+# to work with older versions of gems (&lt; 1.2).
 
-Choice.options do
-  banner 'Usage:  waves path/to/app [-h]'
-  option :help  do
-    long '--help'
-    desc 'Show this message'
-  end
-  
-  option :orm do
-    short '-o'
-    long '--orm=ORM'
-    desc &quot;Select an ORM (e.g. active_record, sequel, none)&quot;
-    default &quot;sequel&quot;
-  end
-    
-end
-
-puts &quot;** Waves #{File.read(&quot;#{WAVES}/doc/VERSION&quot;)}&quot;
+require 'rubygems'
 
-available_orms = [ 'sequel' ,  'active_record' , 'none' ]
-orm = Choice.choices.orm.snake_case
-orm_require, orm_include = case orm
-when 'sequel'
-  [&quot;require 'layers/orm/sequel'&quot;, &quot;include Waves::Layers::ORM::Sequel&quot;]
-when /active([-_]*)record/
-  [&quot;require 'layers/orm/active_record'&quot;, &quot;include Waves::Layers::ORM::ActiveRecord&quot;]
-when 'none'
-  ['', '# This app was generated without an ORM layer.']
+waves = [
+    (WAVES if defined? WAVES), ENV[ 'WAVES'], './waves'
+].compact.map { |dir| File.join(dir, 'lib') }.find( &amp;File.method( :directory? ) )
+if waves
+    $: &lt;&lt; waves
+    waves = File.join( waves, 'waves' )
 else
-  puts &quot;I'm sorry, '#{orm}' is not listed as an available option.\nTry: \t&quot;
-  available_orms.each { |x| puts &quot;\t\t#{x}&quot; }
-  raise ArgumentError
+    waves = 'waves'
 end
+require waves
 
-app_path = ARGV[0]
-app_name = File.basename(app_path)
-if app_name =~ /[^\w\d_]/
-  raise ArgumentError, &lt;&lt;-TEXT
-  Unusable name: \&quot;#{app_name}\&quot;
-  Application names may contain only letters, numbers, and underscores.&quot;
-TEXT
-end
-
-template = &quot;#{WAVES}/app&quot;
-
-generator = Rakegen.new(&quot;waves:app&quot;) do |gen|
-  gen.source = template
-  gen.target = app_path
-  gen.template_assigns = {:name =&gt; app_name.camel_case, :orm_require =&gt; orm_require, :orm_include =&gt; orm_include }
-end
-
-puts &quot;** Creating new Waves application ...&quot;
 
-Rake::Task[&quot;waves:app&quot;].invoke
+puts &quot;** Waves #{Waves.version} **&quot;
 
-puts &quot;** Application created!&quot;
 
+begin
+  require &quot;commands/#{ARGV.first}&quot;
+rescue LoadError =&gt; e
+  require &quot;commands/help&quot;
+end</diff>
      <filename>bin/waves</filename>
    </modified>
    <modified>
      <diff>@@ -45,7 +45,7 @@ module Waves
     
     def start_logger
       Waves::Logger.start
-      Waves::Logger.info &quot;Waves #{Waves.version} starting up ...&quot;
+      Waves::Logger.info &quot;Manager starting up ...&quot;
     end
     
     def start_console</diff>
      <filename>lib/runtime/manager.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>bin/waves-console</filename>
    </removed>
    <removed>
      <filename>bin/waves-server</filename>
    </removed>
    <removed>
      <filename>lib/commands/waves-console.rb</filename>
    </removed>
    <removed>
      <filename>lib/commands/waves-server.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>14e91d241a1c6c23ce8182c0d78d61000d8fcece</id>
    </parent>
  </parents>
  <author>
    <name>Dan Yoder</name>
    <email>dan@zeraweb.com</email>
  </author>
  <url>http://github.com/dyoder/waves/commit/f3f70e305ce043488bbde560b3e3e1ba71f14d03</url>
  <id>f3f70e305ce043488bbde560b3e3e1ba71f14d03</id>
  <committed-date>2008-10-13T21:55:09-07:00</committed-date>
  <authored-date>2008-10-13T21:55:09-07:00</authored-date>
  <message>There is now just one true Waves command. And it is called 'waves'.</message>
  <tree>168beccbf2c8801c37196d74180d118034a8f14b</tree>
  <committer>
    <name>Dan Yoder</name>
    <email>dan@zeraweb.com</email>
  </committer>
</commit>
