#!/usr/bin/env ruby Dir[File.dirname(__FILE__) + "/../vendor/gems/*"].each {|lib| $:.unshift( File.expand_path(lib + "/lib") )} require 'git-style-binary/command' require "rubigen" require 'rubigen/scripts/generate' GitStyleBinary.command do banner <<-EOS Usage: #{$0} #{all_options_string} Create a gen_server skeleton EOS short_desc "Create a gen_server skeleton" opt :name, "The basename of the gen_server to generate", :type => :string run do |command| source = RubiGen::PathSource.new(:application, File.join(File.dirname(__FILE__), "../generators")) RubiGen::Base.reset_sources RubiGen::Base.append_sources source argv = [command[:name]] RubiGen::Scripts::Generate.new.run(argv, :generator => 'gen_server') end end