#!/usr/bin/env ruby require 'pathname' source_path = (Pathname.new(__FILE__).dirname + '../lib').expand_path $LOAD_PATH << source_path require 'kazan' if ARGV.empty? puts "Please provide an arguments" puts exit 0 elsif ['-v', '--version'].include? ARGV[0] puts Kazan::VERSION exit 0 elsif ['ruby'].include?(ARGV[0]) && ['-v', '--version'].include?(ARGV[1]) puts Kazan::RUBY_PROJECT_VERSION exit 0 elsif ['rails'].include?(ARGV[0]) && ['-v', '--version'].include?(ARGV[1]) puts Kazan::RAILS_VERSION exit 0 end templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__)) Kazan::AppGenerator.source_root templates_root Kazan::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root Kazan::AppGenerator.start