#!/usr/bin/env ruby require 'rubygems' gem 'rails', '=2.3.4' require 'zena/info' if %w(--version -v).include? ARGV.first puts "zena #{Zena::VERSION}" exit(0) end require 'rails/version' require 'rails_generator' require 'rails_generator/scripts/generate' template_path = File.join(Zena::ROOT, 'lib', 'zena', 'deploy', 'template.rb') args = ["-m", template_path] args << ARGV.first puts "Generating zena application from template #{template_path}" Rails::Generator::Base.use_application_sources! Rails::Generator::Scripts::Generate.new.run( args, :generator => 'app' )