Sha256: 468ee4f2bfa64c0cee6c4a657fcbde510842995b679c5c981c48ef496203b40e
Contents?: true
Size: 1.52 KB
Versions: 6
Compression:
Stored size: 1.52 KB
Contents
#!/usr/bin/env ruby require 'rubygems' require 'rubigen' require 'rubigen/scripts/generate' def find_project_file(dir=nil) dir ||= Dir.pwd while dir.length > 1 Dir.glob(File.join(dir, '*.jsproj')) { |file| return file if File.basename(dir)===File.basename(file, '.jsproj') } dir = File.dirname(dir) end end def find_app_root path= Dir.pwd while '/'!=path return path if File.exists?(File.join(path, "distil.yml")) path = File.expand_path(File.join(path, "..")) end end case ARGV[0] when 'app' # pull off app "command" ARGV.shift source = RubiGen::PathSource.new(:application, File.join(File.dirname(__FILE__), "../app_generators")) RubiGen::Base.reset_sources RubiGen::Base.append_sources source RubiGen::Scripts::Generate.new.run(ARGV, :generator => 'coherent') when 'demo' # pull off app "command" ARGV.shift source = RubiGen::PathSource.new(:application, File.join(File.dirname(__FILE__), "../demo_generators")) RubiGen::Base.reset_sources RubiGen::Base.append_sources source generator= ARGV.shift RubiGen::Scripts::Generate.new.run(ARGV, :generator => generator) when 'plugin' require File.join(File.dirname(__FILE__), "../lib/plugin") ARGV.shift Coherent::Commands::Plugin.parse! else PROJECT_FILE= find_project_file if !PROJECT_FILE puts "Could not determine project root." exit 1 end APP_ROOT= File.dirname(PROJECT_FILE) RubiGen::Base.use_component_sources! [:coherent, :test_unit] RubiGen::Scripts::Generate.new.run(ARGV) end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
coherent-0.6.6 | bin/coherent |
coherent-0.6.5 | bin/coherent |
coherent-0.6.4 | bin/coherent |
coherent-0.6.2 | bin/coherent |
coherent-0.6.1 | bin/coherent |
coherent-0.6.0 | bin/coherent |