require 'active_support/core_ext' require 'fileutils' $:.unshift File.expand_path(File.join("..", "lib", "sinatra"), File.dirname(__FILE__)) require 'commands' command = ARGV[0] Sinatra::Command.commands.each do |klass| if klass.command == command klass.new(ARGV).call exit(0) end end Sinatra::Command.commands.each do |klass| if klass.respond_to?(:help) puts "sinatra #{klass.command} #{klass.help}" end end