#!/usr/bin/env ruby require 'rubygems' require 'optparse' $LOAD_PATH.push File.expand_path('../../lib', __FILE__) require 'heartcheck' require 'heartcheck/generators' optparse = OptionParser.new do |opts| opts.banner = "Usage: heartcheck (rails|padrino|sinatra)\n\nYou can use flags as such:" opts.on('-h', '--help', 'Display this screen') do puts opts exit end if ARGV.size != 1 || !%w(rails sinatra padrino).include?(ARGV[0]) puts opts exit end end begin optparse.parse! rescue OptionParser::InvalidOption => e puts e exit end Heartcheck::Generator.new(ARGV).invoke_all