bin/vagabond in vagabond-0.1.4 vs bin/vagabond in vagabond-0.2.0
- old
+ new
@@ -1,6 +1,28 @@
#!/usr/bin/env ruby
+Signal.trap('INT'){ exit 255 }
+
require 'rubygems'
-require 'vagabond/commands'
+require 'vagabond'
-Vagabond::Commands.new.run!(ARGV)
+if(ARGV.include?('--version') || ARGV.include?('-v'))
+ require 'vagabond/vagabond'
+ Vagabond::Vagabond.new.send(:version)
+else
+ case arg = ARGV.shift
+ when 'server'
+ require 'vagabond/server'
+ Vagabond::Server
+ when 'knife'
+ require 'vagabond/knife'
+ ARGV.unshift(arg) unless ARGV.empty?
+ Vagabond::Knife
+ when 'test', 'kitchen'
+ require 'vagabond/kitchen'
+ Vagabond::Kitchen
+ else
+ require 'vagabond/vagabond'
+ ARGV.unshift(arg)
+ Vagabond::Vagabond
+ end.start
+end